LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

problem with '0A', ascii code LF(line feed).

For example, if I send 8 bytes continuously via RS232 to Labview,that is each channel send one byte. and get the data from Labview to display the 8 channels' signals.
But sometimes the signals displayed on LabVIEW are not displayed according to the order as I expected. for example, if the order should be:
PortA,PortB,PortC. Sometimes it would be PortB, PortC...
I check this problem carefully by creating indicators on LabVIEW to view at what value does this happen, I discovered that if it meets D'10', that is LF(line feed) in Ascii, this problem will happen. It means it ignores the rest of the bytes if it meets D'10', LF(line feed)in Ascii.I am wondering whether LabVIEW recognize data received as Ascii format or not.
If
it can recognize data as other format, this problem will be solved.

Thanks for your help.
0 Kudos
Message 1 of 3
(3,322 Views)
Your problem is probably because of the way you've used the VISA Configure Serial Port. If you look at that function, you should see that the default is Enable Termination Character and the default termination character is xA (d10 or LF). VISA Read will automatically terminate when the character is detected. Change Enable Termination Character to false and things should work better.
Message 2 of 3
(3,322 Views)
Thanks a lot!
0 Kudos
Message 3 of 3
(3,322 Views)