Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

visa.NS does not see termination character

Due to our remote test controllers running Windows XP, and the instrument being controlled has no Win7 drivers, I am writing x86 code on an XP machine.

 

I am attempting to control an instument using TCPIP/Socket

 

Outgoing commands work. But, I am getting a timeout when reading or query.

 

Telnet works as does NI-MAX

 

I am writing in VS2005 using visa.NS message based (mbsession)

 

mbsession.TerminationCharacterEnabled = true;

mbsession.TerminationCharacter = 13;

 

Have tried both orders...

 

NI-VISA 5.3

 

Thanks

0 Kudos
Message 1 of 3
(3,275 Views)

I found this documentation about termination characters in NI-VISA: https://www.ni.com/en/support/documentation/supplemental/06/termination-characters-in-ni-visa.html

It uses LabVIEW but the underlying ideas should still be the same.  I don't see any problem with the code you've presented below.  Are you sure that you're sending out a termination character or that it's the right one?  You could try reading the data being sent through the and see if you even see if the termination character even gets sent.

0 Kudos
Message 2 of 3
(3,239 Views)

Have verified that the return message contains the correct termination characters.

 

Finally gave up on visa.NS for TCP/IP (Not enough documentation for beginners!) and I am using TCP/IP sockets instead.

 

 

0 Kudos
Message 3 of 3
(3,176 Views)