LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need to log serial data including the control characters?

Is there a way to log serial data including the control characters? We think that some of our data is not get through and it seem that Hyper terminal is filtering out some to the data. We need to collect all of the data so we can look thorough it and make sure what is really going on. Thanks In Advance!

0 Kudos
Message 1 of 4
(2,820 Views)
For a complete log I usually process the received (or sent) string, examining each character based on its lexical class (Comparison Palette); for classes 1 and 2, I replace the character with a properly delimited expansion of its ASCII code, then output the processed string to a file. For example, a CR terminated string would read like this:
COMMAND_STRING<13>
or
COMMAND_STRING<0D>
where the angle brackets are used to mark the expansion.
Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 2 of 4
(2,814 Views)
The other thing to be aware of is that the default setting for VISA Configure Serial port is that the Enable Termination character is true. This means that the VISA Read will terminate as soon as the term character is detected. The default term character is x0A or the LF character. If you want to capture everything, set the Enable Termination Character to false. Then, you need to use the VISA Bytes at Serial Port to determine exactly how many bytes to read.
0 Kudos
Message 3 of 4
(2,810 Views)

NI Spy

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 4 of 4
(2,805 Views)