LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how starting scan string from desired symbol ?

Hello! Problem:
I have a endless string of data from  my device. I need start scan string from "A"  symbol, and then pass this string further in my VI, including start symbol "A".
How i can do it?
Thank you!
0 Kudos
Message 1 of 6
(3,049 Views)

No string is endless. The string has to have an end at some point. You can't pass the entire string before you get the entire string. If you do have the entire string, you can simply use Search\Split string from the String>>Additional palette.
If you want to start passing the incoming data when the character arrives and continue passing the incoming data, it depends on how you need the data, but you can basically use queuing functions to do this. If this didn't help, write more about how you need your string to be and\or post an example. 


___________________
Try to take over the world!
Message 2 of 6
(3,043 Views)

Hi, thanks for answer!
Yes, I want to start passing the incoming data when the character "A" arrives
and continue passing the incoming data in my VI.


Why "A"?
My hardware (homemade) has 2 channels ("A" and "B") and its date, and I must be sure, that graphs plots right,
therefore I need scan string from "A" (or "B") symbol.

I attached VI. I think, you understand, what need.
Thanks !!!

0 Kudos
Message 3 of 6
(3,037 Views)
Hello Mihalis,

I thought we had this done in the thread "Help, please! Unbundle data from serial string (com-port)" ? There I have shown a way to start scanning at a special character. Now you only changed the character to search for?


Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 6
(3,030 Views)
Hello GerdW!
At that time we convert string to byte array (u8), but now I need scan string fron serial port simpliciter, and when my subVI "see" symbol "A", its begin work (attached VI in previous message)
When I power on my device first and then on my VI, that all right, but if I start my VI first, and then power on my device, that I have a problem, becouse VI can start scan string in the middle, and graph plot wrong.
I need scann string on "A" or "B" symbol one time and then and continue passing the incoming data. How a can do it using string functions?
 
Mihalis.
0 Kudos
Message 5 of 6
(3,021 Views)
Hello Mihalis,

you have two choices:
1) in your data collection (communication with device) you can wait for your "start" character to appear and write the data to your string only after the first encounter of "start"
2) get all characters from device, but do a search/split for "start" in your data string (as I did in my example last time).

Message Edited by GerdW on 08-04-2005 03:20 PM

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 6
(3,021 Views)