05-18-2011 08:56 AM
Hi all,
I am new to Labview. As all of us know, there is only GPIB driver for SR830 lock-in amplifier. And I try to convert it to serial. I looked through the forum and I followed some intructions online. I replaced the GPIB functions with Visa functions and have a look at the 34401 to learn how to configure a RS232 driver. But when I run the program, the error happens at the Query ID part which I did not change.
Does anyone know how to make it work?
Also I have a problem with the connection. I use a serial to usb adaptor to connect lock-in to my computer. I am wondering whether I need to modify something in the program to let it know I am using a serial to usb adaptor.
When I directly plug in my serial cable to the computer, there is no response of computer. How can I solve this problem?
So my question is about the program and the connection.
Thank you!!
05-20-2011 12:51 AM
Hi VampIte,
Have you set your SR830 to RS232 either on the device or by using the OUTX command?
What USB to serial adapter are you using?
Have you tried communicating with the SR830 using the VISA Test Panels?
It may be that the USB to serial adapter you are using does not comply with the serial specification.
Regards,
Brandon V.
Applications Engineering
National Instruments
05-20-2011 05:37 AM
Most USB to serial converters work as they should. But they need a driver installed in order to work. You must also find out which alias the system use for that port. And it will change as you change USB port for the converter. Do you have the SR830 manual? If not find it using Google
From the manual we have
COMMUNICATING WITH RS232 The SR830 is configured as a DCE ( transmit on pin 3, receive on pin 2) device and supports CTS/ DTR hardware handshaking. The CTS signal (pin 5) is an output indicating that the SR830 is ready, while the DTR signal (pin 20) is an input that is used to control the SR830's data transmission. If desired, the handshake pins may be ignored and a simple 3 wire interface (pins 2,3 and 7) may be used. The RS232 interface baud rate and parity must be set. These are set with the [Setup] key. The RS232 word length is always 8 bits.
And then
A command to the SR830 consists of a four character command mnemonic, arguments if necessary, and a command terminator. The terminator must be a linefeed <lf> or carriage return <cr> on RS232
If you have not done it start simple. Go to help in toolbar. Then select Find Examples and search for serial. Locate the example "Basic Serial Write and Read.vi" Then use this as your workhorse to test coomands. It could be that you need to modify it somewhat
05-26-2011 03:45 PM
Thanks.
I have set SR830 to RS323 on the device. Em... Could you please tell me what VISA test panels is?
I think the adapter works since originally a senior graduate stuent once used the lock-in and adapter together. But he has graduated and I cannot find him.
I already have installed a driver for it.
I am now wondering whether I can ignore the adapter, and just connect the lock-in directly to the computer throught the serial port. I tried but no response on the computer.
05-31-2011 12:28 AM
Hi Vamplte,
The VISA Test Panel can be accessed through the Measurement & Automation Explorer. Select your COM port under Devices and Interfaces, and there will be a button for VISA Test Panel. The VISA Test Panel will allow you to send and receive messages without having to write code or use a LabVIEW example.
A good place to start is with a serial loopback test. This will let you verify that your serial port is working.
Regards,
Brandon V.
Applications Engineering
National Instruments