LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do i Send 8 and 16 bit unsign int througth the serial port

8 and 16 unsigned int througth the serial port
0 Kudos
Message 1 of 3
(1,555 Views)
The serial port sends and receives string data, so in order to send 8 and 16 bit UINTs, you must flatten them to strings. If you make a cluster containing the 8 and 16 bit UINTs and pass the cluster through the "Flatten to String" function located in the Advanced > Data Maniplulation palette, you will have a string fit for wiring to the VISA write of your serial port (or the serial write VI).

An alternative is to build an array of U8 and use the "Byte Array to String" function. Note that 2 U8 elements in an array = 1 U16. You can split a U16 into two U8s by using the "Split Number" function located in the same section you found the "Flatten to String" function.

Dan Press
www.primetest.com
0 Kudos
Message 2 of 3
(1,555 Views)
And How may pass 16 bit to my dac (datasheet attached) which desires serial data from 4 line (fig.8a pag.12) using parallel port (TTL compatible required)?
Any advice will be appreciated.

Paolo
0 Kudos
Message 3 of 3
(1,555 Views)