Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

multiple termination characters with VISA

I am controllinga serial device that uses the last charachter of the reply string as a status indicator, this means that there are several possible termination characters. Is there any way for VISA to deal with this (other than just letting it time out and seeing what the last characterread was?)
0 Kudos
Message 1 of 4
(3,560 Views)
1) Disable the term character using VISA config serail port.

2a) If fixed length, then specify read correct # of bytes/

2b) If packets are not fixed length, then develop state machine read function that reads one byte at a time and acts accordingly.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 2 of 4
(3,560 Views)
It seems very inelegant writing new code for something that VISA almost does already. But your solution is better than my current method thanks.

John
0 Kudos
Message 3 of 4
(3,560 Views)
VISA only supports one term character "pattern".

It also only supports one byte term characters.

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
(3,560 Views)