Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Termination Character in VISA Read

Hi,

 

My VISA simulator sent out custom message starts with '&&' and ends with termination character '!!\n'.

For example, my sample message is

&&

24234

7867

!!

 

So if I set termination character as '\n' I am reading line by line. To read the whole message I have to read multiple times. So I want to know whether we can set termination character of VISA read to '!!\n' so that I read whole message in a single read all the time.

 

In VISA simulator (which is not developed by me), message is read and shown in GUI only if send '!!\n'. I am not sure how its handled internally. So wanted to check VISA read part.

 

TIA,

Arya Stark

 

 

0 Kudos
Message 1 of 2
(592 Views)

As far as VISA is concerned, the Termination Character is a single Character (1 byte).  For this situation, I will just read the lines until the desired line was read and then pass on those to the processing loop.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 2
(581 Views)