07-11-2018 01:58 PM
In brief, I'm trying to read the contineous data from uc(micro controler) on serial port
ex, @gsm_1&gps_1#@gsm_2&gps_2#@gsm_3&gps_3#@gsm_4&gps_4#@gsm_5&gps_5#@gsm_6&gps_7#@gsm_8&gps_8#@gsm_9&gps_9#@gsm_10&gps_10#
if i'm receiving like above data. I 'm want to split them and show them in a table like
S.NO GSM GPS
01 gsm_1 gps_1
02 gsm_2 gps_2
03 gsm_3 gps_3
04 gsm_4 gps_4
05 gsm_5 gps_5
..on so no like above.
07-11-2018 02:07 PM - edited 07-11-2018 02:08 PM
07-12-2018 04:34 AM
From controller , we 'll get above data.( through serial port we can get data including # char).
07-12-2018 04:41 AM
07-12-2018 04:42 AM
When data comes contineously how we receive synchronously. Bcz we don't have buffer in it, as well it is running in while loop.
07-12-2018 04:46 AM - edited 07-12-2018 04:46 AM
Hi l12,
When data comes contineously how we receive synchronously. Bcz we don't have buffer in it, as well it is running in while loop.
How do you receive the string data right now?
Why do you want to receive "synchronously"? What is your definition of "synchronously"?
Which buffers are you talking about?
Why don't you attach your VI?
And please read this because of "Bcz"…
07-12-2018 05:35 AM
Please check in page_2 at visa read.
07-12-2018 05:53 AM
Hi l12,
Here how to receive data, when I'm writing * controller 'll give data(@9391177113&25252525255 #)
You already know "how to receive data": use VISARead as you already do…
There is a problem with your MatchPattern afterwards: you try to match "&" twice even though there is only one "&" char in the message!
07-12-2018 07:02 AM
@l12ec937 wrote:
In brief, I'm trying to read the contineous data from uc(micro controler) on serial port
ex, @gsm_1&gps_1#@gsm_2&gps_2#@gsm_3&gps_3#@gsm_4&gps_4#@gsm_5&gps_5#@gsm_6&gps_7#@gsm_8&gps_8#@gsm_9&gps_9#@gsm_10&gp
If you have control over how that microcontroller works, I would have that data stream updated to just have all of the values tab or space delimited. Less characters yields a higher possible throughput. This would also make it easier to read.
gsm_1 gps_1 gsm_2 gps_2 gsm_3 gps_3 gsm_4 gps_4 gsm_5 gps_5 gsm_6 gps_7 gsm_8 gps_8 gsm_9 gps_9 gsm_10 gps_10
So if you can get that done, then you just read the line and use Spreadsheet String To Array followed by a Reshape Array to convert it into a 2D array.