LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

data acquisition via serial port

Here is my problem please help!
There is a handmade device which will send serial data in countinous strem to laptop COM port at 115,2 kBaud. My recieving vi should check trough incoming data 24bait at a time then this 24 bait chunk is divied into 12 words and finally each word is displayed on separate chart! Also I need to save all that data (measurement time ~10min) to file.
I started writing this program month ago ( my first contact with LV), now I am getting a feeling that LV is not capable doing this!
If anybody is intrested helping me I may send the code produced so far!

Tõnu Leemet
0 Kudos
Message 1 of 4
(3,069 Views)
This should not be a problem as long as you don't ever drop data. It sounds like you need a loop that performs serial reads, adds the data to an array, and then parses the array, breaking the data into 12 groups. One thing to keep in mind is that serial data is start bit, data bits, parity (optional), then stop bit(s). So if you're sending 24 bits of data, you really need to be sending 30:

start
8 bits
stop
start
8 bits
stop
start
8 bits
stop

While configuring COM1 for 8,N,1,115200. Also make sure your device is sending RS-232 voltages, which should be < -3V and > +3V at the receiver (COM1) per RS-232 spec.

Hope this helps!
0 Kudos
Message 2 of 4
(3,069 Views)
To the contrary, Labview is absolutely capable of that and would probably be
my first choice of tool!

An easy solution might be to read data from the serial port with the VISA
drivers, convert the the datatype to something more useful (array of
booleans to access bit-by-bit), split up the data accordingly, and finally
display.

Please post the specific problems you are having and we can try to give you
some advice. It's always hard when it's your first contact with a language.

-joey

"tonule" wrote in message
news:506500000008000000B3810000-1042324653000@exchange.ni.com...
Here is my problem please help!
There is a handmade device which will send serial data in countinous
strem to laptop COM port at 115,2 kBaud. My recieving vi should check
trough
incoming data 24bait at a time then this 24 bait chunk is
divied into 12 words and finally each word is displayed on separate
chart! Also I need to save all that data (measurement time ~10min)
to file.
I started writing this program month ago ( my first contact with LV),
now I am getting a feeling that LV is not capable doing this!
If anybody is intrested helping me I may send the code produced so
far!

Tõnu Leemet
0 Kudos
Message 3 of 4
(3,069 Views)
Hello!

This is my code! I`m doing something wrong, what is it!
Please comment!

Tonu
Download All
0 Kudos
Message 4 of 4
(3,069 Views)