Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

VersaTenn III rs232 with Measurement Studio 8

I have a Tenney Sr. with VersaTenn III controller that I need to control via RS232.  I am developing an application to control the VersaTenn III using Visual Basic 2005 and National Instruments Measurement Studio 8 ( VISA ).  When I issue the command "= SP1 100" the controller works fine and sets the Set point to 10.
However, when I issue the command "? SP1" or "? C1" the controller times out and I do not get a returned value.  Is there something I'm missing?  Obviously the baud rate, data bits, parity... are set correctly or the first command would not have worked.
 
But for some reason the controller will not respond when I query for the current Set Point or Actual Temperature.
 
Please Help!
0 Kudos
Message 1 of 7
(4,391 Views)
When I encounter problems like this, I always fire up Hyperterminal and try using that
to control the instrument. This will tell you a lot.

ps  Are you sure the queries are "? SP1" and not "SP1?" which is what I would be expecting.

Message Edited by nyc on 03-04-2006 05:09 PM

0 Kudos
Message 2 of 7
(4,388 Views)

I have tried Hyperterminal and everything works fine...What could possibly be different between Hyperterminal and my Visa setup through Measurement Studio.

 

ps.  yes I am sure about the commands they are correct in my original post.

 

Thanks

0 Kudos
Message 3 of 7
(4,376 Views)
Maybe add more delay between the command and the query for the setpoint and see if that solves the problem.
0 Kudos
Message 4 of 7
(4,369 Views)
Hi hilks,

Does your device require a termination character? Hyperterminal sends a line feed (/r) with your command after you hit the 'Enter' key, but VISA doesn't, and that could explain the timeouts. Try including a termination character (usually '\n' or '\r' depending on your device), and see if that helps.

Thanks,
Ebele O.
National Instruments
0 Kudos
Message 5 of 7
(4,366 Views)

yes it requires a termination character (\r)... How can I create a visa session in VB 2005 with MS 8 to query the device? The comm settings are:

BaudRate 1200, DataBits 7, StopBits 1, Parity Odd, Handshake Xon/Xoff

Command ' ? C1\r'

0 Kudos
Message 6 of 7
(4,344 Views)
Hi Ronnie,

The example found here does basic serial writes and reads in VB6. Take a look at it, and I hope it helps.

Regards,
Ebele O.
National Instruments
0 Kudos
Message 7 of 7
(4,323 Views)