Performs Serial Write/Read one byte at a time for use cases where certain instruments are incapable of parsing entire strings.
The calling VI, Serial Write and Read One at a Time, is built off of the LabVIEW Basic Serial Read Write Example, with the VISA Write VI replaced with the One at a Time VI.
The One at a Time VI breaks Strings down into single ASCII characters before writing/reading.
LabVIEW NXG 1.0 or compatible
Serial instrument and cable
In the Serial Write and Read One at a Time VI:
1. Select the serial resource and configuration parameters.
2. Select the operations to be performed.
3. Connect the serial port to your device. If no device is available, perform a loopback test by doing one of the following: Short pins 2 and 3 on a RS-232 cable or short pin 4 to pin 8 and pin 5 to pin 9 on a RS-485/422 cable.
4. Run the VI to see the data read. (The "read string" will match the "string to write" if a loopback test was performed.)
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
Hi fiendfyre,
Thanks for taking the time to put this example together for LabVIEW NXG! This code will be an invaluable resource to LabVIEW NXG users looking to interface with Serial instruments and communicate one byte at a time.
I have a few suggestions for your example code, in order to ensure visual and functional consistency between programs which are released to the community. Most of these are minor cosmetic changes, and should be pretty quick to implement:
Let me know once you get a chance to implement these changes, and I'll go ahead and release this example to the Community. Thanks again for your effort in putting this code together!