キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

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 件の賞賛
メッセージ1/30
4,910件の閲覧回数
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 件の賞賛
メッセージ2/30
4,871件の閲覧回数

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 件の賞賛
メッセージ3/30
4,868件の閲覧回数
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 件の賞賛
メッセージ4/30
4,860件の閲覧回数
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
メッセージ5/30
4,849件の閲覧回数

Hello GerdW,  it`s good VI.

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

Thank you!

0 件の賞賛
メッセージ6/30
4,820件の閲覧回数
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
すべてをダウンロード
メッセージ7/30
4,813件の閲覧回数

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 件の賞賛
メッセージ8/30
4,805件の閲覧回数
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
メッセージ9/30
4,797件の閲覧回数

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 件の賞賛
メッセージ10/30
4,793件の閲覧回数