LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help, please! Unbundle data from serial string (com-port)

Hello all ! Sorry, but I need you help again.
 
I use the attached vi, but I can`t unbundle by name my string fron com-port. I can`t understand, how vi work.
My serial string is:
 
MARK1--low_byte1--hi_byte1--END1--MARK2--low_byte2--hi_byte2-END1, etceteras. (MARKn - number of channel(11h and 22h for 1-st, and 2-d channal, low_byte - 1-st byte from 10-bit ADC, hi_byte - from 10-bit ADC, END-end byte of chanal (0dh))
Please, explain me, how i can unbundle my string whith this vi. In my first messege i give format of my string.
And how a can plot graph of both channals?
 
Thank you! I need help. (My boss kill me)

Message Edited by Mihalis on 07-14-2005 11:10 AM

0 Kudos
Message 1 of 30
(4,160 Views)
give an exact example of the com string, does it include the "--"?

You should use the Scan from String (String >> Scan From String), use the format modifier input to specify what you want to extract from the string.

-Joe
0 Kudos
Message 2 of 30
(4,121 Views)

There is also an error in your file, it is showing as 1kB which is way too small for a LV Vi.

 

P.M.

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 3 of 30
(4,118 Views)
I am sorry for attached vi. That it.
My string does not  include the "--".
It consist 8 byte in the cycle, in other words: (2 channals)
1-st byte(number of 1-st channel-11 hex)---(2-nd and 3-d bytes - data from 10 bit ADC )  --  4th - byte end of packet of first channel(0D hex)
 
then
 
1-st byte(number of 2 channal-22 hex)---(2-nd and 3-d bytes - data from 10 bit ADC )  --  4th - byte end of packet of second channal(0D hex).
How i can unbundle my string whith this vi?
How i can plot graph of both channels?
 
Thanks!

Message Edited by Mihalis on 07-14-2005 06:25 PM

0 Kudos
Message 4 of 30
(4,110 Views)
Hello Mihalis,

it seems to be very easy, as you always get 4 byte per data value...

Have a look at the attached vi. Perhaps you have to change the conversion of the data bytes (2nd and 3rd) to get the right bit order etc. from your ADC values.

Hope this helps

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 5 of 30
(4,099 Views)

Hello GerdW,  it`s good VI.

One question: how i can plot graph of each channel?

Thank you!

0 Kudos
Message 6 of 30
(4,070 Views)
Hello Mihalis,

maybe this could help you...

Message Edited by GerdW on 07-15-2005 01:20 PM

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Download All
Message 7 of 30
(4,063 Views)

Hello GerdW!

Last question: how i can plot graph of each channel, using you previous VI (string_2_data.vi).? (Two channels?)

Спасибо (Thanks!)

Message Edited by Mihalis on 07-15-2005 04:10 PM

0 Kudos
Message 8 of 30
(4,055 Views)
Hello Mihalis,

I changed the vi to display only 2 channels...

P.S.: Спасибо is one of the words i didn't forget from school 🙂



Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 9 of 30
(4,047 Views)

Hello GerdW!

I understand, how work you VI, i  have in view, how i can use you VI

Attachment 4Plots.vi (22 kb)

 with my VI (attached). I work with LabView 1 week, so i too less know.

I don`t undestand, how join blue and yellow line. (Signals) 

0 Kudos
Message 10 of 30
(4,043 Views)