LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read ECG Raw data from microcontroller

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....

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


Message 11 of 20
(1,315 Views)

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

 

0 Kudos
Message 12 of 20
(1,255 Views)

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 😉

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 13 of 20
(1,244 Views)

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.

 

 

 

 

 

 

 

 

 

0 Kudos
Message 14 of 20
(1,234 Views)

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 ??

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 15 of 20
(1,227 Views)

Sorry I have the Labview version 10)) 

It seems to me that you saved it as version 12)) 

0 Kudos
Message 16 of 20
(1,223 Views)

Well, I saved it with buffer data I suppose. 

But i stopped it after 10 minutes run. 

mmm

 

 

0 Kudos
Message 17 of 20
(1,222 Views)

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

 

0 Kudos
Message 18 of 20
(1,220 Views)

here we go ..

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 19 of 20
(1,215 Views)

Thanks a lot) 

 

I have done it and saved it.

 

I would very happy if you could help me) 

 

cheers 

 

 

 

0 Kudos
Message 20 of 20
(1,213 Views)