Writing Bits to the Serial Port Instead of Writing ASCII Strings
Primary Software Version: 7.1.1
Primary Software Fixed Version: N/A
Secondary Software: Driver Software>>NI-VISA
I want to be able to directly specify the bits that are written to the serial port, but the serial write function only takes a string input. Simply converting a number to a string doesn't work (i.e. a decimal 0 converted to the ASCII string "0" will write "0011 0000" instead of "0000 0000").
The example code attached shows how to convert an array of bits to a string in the proper way such that they can be written to the serial port. Basically, the bits must be converted to a decimal number, then that number must be converted to an array so that the "byte array to string" function can be used.
LabVIEW 2011 Implementation
KnowledgeBase 1B0AGRVJ: How Can I Convert ASCII Characters to ASCII Codes and Vice-Versa? (LabVIEW)
Report Date: 08/19/2005
Last Updated: 08/13/2014
Document ID: 3OIFGTLA