09-29-2011 05:54 PM
KVH,
If the µC send a termination character you can use it. Otherwise don't be afraid of a timeout 😉 set a reasonable timeout and try to read n+1 characters , The read will timeout with an error and you can check if it is really a timeout and if you have read reasonable characters. Well defined protocols have a termination character , (or always a known length) or tell at the beginning how much data they will send. Maybe time for a firmware update 😉
Try to keep the threads independend , four while loops for the four ports. Or four action engines in the background (search the forum for these) . The timebases of these µCs and your PC will get out of sync, so use the sync vis if needed. and decide what to do if after one hour one unit have send less data than the others....
11-05-2012 03:01 AM
Hi all,
I have a kind of a similar target to extract raw data from ECG simulator. I Am trying to configure the VI modified here, but it is not working properly.
I am receiving the data into buffer and amplitude is changing.
I have a protocol which includes 103 bytes per pocket.
I am trying to receive the noise from an analog input of the bluetooth device: http://processors.wiki.ti.com/index.php/EZ430-RF256x
My protocol:
Header 255
Header 255
1st value Hi bite
1st value Low byte
2nd value Hi byte
2nd value low Byte
-----------------------
other values are not ysed
-------------
50th Value Hi byte
50th value low byte
Number of values
Total 103 bytes per a pocket.
Looking forward for a positive responce and advice.
cheers
Serg
11-05-2012 10:12 AM
nsw,
please record some raw data in a string, make that string value the default data (right click on it .....) save the vi and post it here
In a second png mark the values of intrest....
Doesn't sound that hard 😉
11-06-2012 12:11 AM
mmmm
Thanks for the response)
I will try...
Well, my string array looks like in the attachment: data from bluetooth.
I also tryed to work the first version of VI from that topic.
It seems that I received something on the first graph: file data graph
At least the first unmodofied version counts high and low bytes using my specifik protocol.
The second version, which is modified (mod) i cant tune in to work with my data array(((
I attached the VI with string data.
11-06-2012 04:24 AM - edited 11-06-2012 04:26 AM
please run this modified vi (it should stop after capturing 4k of raw data) than click Edit-> Make Current Values Default , save the vi and post it. Than we have some data to play with 😉
Question: Why are you looking for "\A5\5A......." but wrote in your that the data block will start with \FF\FF ??
11-06-2012 05:09 AM
Sorry I have the Labview version 10))
It seems to me that you saved it as version 12))
11-06-2012 05:25 AM
Well, I saved it with buffer data I suppose.
But i stopped it after 10 minutes run.
mmm
11-06-2012 05:34 AM
And I really need to find oit how should I sort the data using my protocol.
Yes you are right, i changed the 5A/A5 to FF, but the signal is not completely looks as noise.
mmm
Trying to find the logic of this VI...
regards
11-06-2012 07:17 AM
here we go ..
11-06-2012 09:11 AM
Thanks a lot)
I have done it and saved it.
I would very happy if you could help me)
cheers