LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

serial help

OK, I have to read numbers (32 bit) coming from my serial port (COM2).
And I have to build aa array with them.
Can someone give me something working?
Thank
0 Kudos
Message 1 of 2
(2,716 Views)
Hi,
you must use functions from "Functions->Instrument I/O->Serial" palette.
The idea is to do the next steps:

1.Open serial VISA session with specified COM port parameters.

2.Read specified number of data bytes from COM port.

3.Convert data from string format to array of I32 words with the help of "Functions->Advanced->Data Manipulations->Type Cast.vi"

4.Close VISA session.

The example is attached.

Also you may take a look at built-in LV examples.
Select from LV menu the next item:
"Help->Examples...->I/O Interfaces->Serial Communication->........."

Good luck.

Oleg Chutko.
Message 2 of 2
(2,716 Views)