LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview communication with the serial port?

I'm in need of a way to send a single customizable bite to the serial port with labview. Does anyone know where I can learn how to do this?
0 Kudos
Message 1 of 3
(3,016 Views)
There are a couple of shipping examples of serial communication. They are called LabVIEW <-> Serial.vi and Serial Communication.vi. There are other examples and tutorials that can be found here. There have also been several hundred questions regarding serial posted to this forum in just the last year. You can do a search. Put simply, you use the functions on the Instrument I/O to configure the serial port and write to it.
0 Kudos
Message 2 of 3
(3,016 Views)
Hello,

You can simply define the data byte in bits by actually specifying 1s and 0s in LabVIEW with a numeric control; here's how:

0. drop a numeric control on a front panel

1. right click on it and choose Properties to display the properties dialog box

2. click the Format and Precision tab
- select binary from the list
- place a check mark in the "Use minimum field width" checkbox
- specify a width of 8
- select "Pad with zeros on the left" from dropdown box; this will display the binary representation of a byte
- click Ok to close the dialog box

3. Now, to write the byte to the serial port using the VISA Write function, all you have to do is type cast the byte to type string.

See the attached screen shot.

Best Regards,


JLS
Best,
JLS
Sixclear
0 Kudos
Message 3 of 3
(3,016 Views)