I need to send 16 bits of data through serial UART to LabVIEW. I have 16bits of data frames with 1 start bit, 1 stop bit, and 1 parity bit. Is it possible to change the number of data bits in VISA component of NI LabVIEW to 16bits.By default it is 8 bit. is this impossible change number of data bits to 16 in VISA serial?
1 Answer
\$\begingroup\$
\$\endgroup\$
3
You can copy the contents of the "VISA Configure Serial Port (Instr).vi" and change the serial settings:databits to whatever you want. I sincerely doubt it'll work though. The hardware itself has to support the frame size and I've never heard of a modem supporting larger frames than 10 bits.
-
\$\begingroup\$ I sent 16 bit data frames from FPGA a custom UART component in vhdl and takes data to the PC using a USB to TTL converter. so if I can change the data bits to 16 in VISA is it possible to acquire 16bit data? \$\endgroup\$– oppoCommented Dec 7, 2017 at 16:13
-
\$\begingroup\$ I'd just try it and find out. It's a pretty trivial change. Just copy the innards of the VI i referenced above, change the bit length and use the reference it produces to try to read/write data to the converter. \$\endgroup\$ Commented Dec 7, 2017 at 17:34
-
\$\begingroup\$ @oppo, PC hardware is unlikely to support receiving that. Your FPGA should send two frames of 8 bits. \$\endgroup\$ Commented Nov 4, 2021 at 13:17