Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Code for FAST 2

As you know,i am working for SR830,There is a GPIB Error which can be resolved by Enabling FAST2 command.It would be nice if you can share the code for it as i do not see one in the drivers or in your webpage.

 

0 Kudos
Message 1 of 91
(5,907 Views)

please explain what you mean. Which code, where to find.

greetings from the Netherlands
0 Kudos
Message 2 of 91
(5,796 Views)

Hey Krupa,

 

I think you are talking about this device:

 

Lock In Amplifier - SR830 and SR810
http://www.thinksrs.com/products/SR810830.htm

 

NI offers a driver on the webpage for this device from stanford research:

 

Stanford Research 830 Lock-In Amplifier - Instrument Driver - National Instruments
http://sine.ni.com/apps/utf8/niid_web_display.model_page?p_model_id=1536

 

Are there any issues with this instrument driver?

 

Regards, Stephan

0 Kudos
Message 3 of 91
(5,754 Views)

Thank You Both for your response.

 

I am using the driver from NI webpage.It is for GPIB,i am converting it to Serial Comm(RS232),for which i am using code from 34401.

I somehow resolved all errors but i am still not able to read values in my Vi when paired with the instrument.

 

So i started debugging but i am spending too much time,not getting any fruitful result.

 

It will be very helpful if you can changed the code to serial comm and share the same.

So i can see if the SW is able to display the values.

 

Please Please PLease...

0 Kudos
Message 4 of 91
(5,744 Views)
Have you done some basic debugging? Check communication with MAX or s program such as putty. You don't even know of your com settings are correct, the cable is correct, etc.
0 Kudos
Message 5 of 91
(5,730 Views)

Some things to check on the instrument:

 

1) The SR830 defaults to GPIB-only. Have you switched it to RS-232?

2) Have you set the baud rate and parity so that your computer and the instrument have the same settings?

3) Is your computer set to use 8 bits per word (that setting can't be changed on the SR830)?

 

As suggested above, see if you can get any response from the instrument from within MAX. Try something simple like a *IDN? query. If you hit the 'Setup' key on the instrument a few times, the display will change to show the last 256 characters recieved by the instrument (in hex codes, unfortunately); even if the computer isn't getting anything useful back from the instrument, you can at least check that the instrument is receiving data. 

 

See pages 4-24 -- 4-25 and pages 5-1 -- 5-2 of the manual.  

0 Kudos
Message 6 of 91
(5,724 Views)

Seems like u have misunderstood.I know the very basics which u have mentioned.I have ensured all these are alredy working fine.

 

I wanted the GPIB driver to be converted to Serial,which i have already doen but is not working as expected.If u can convert and share the code,it will be helpful.

0 Kudos
Message 7 of 91
(5,717 Views)

Just to be absolutely sure that we're all on the same page, you have linked the SR830 to your computer via RS232 and have successfully communicated with it from MAX or a terminal emulator or similar?

 

Looking at the NI driver for the SR-830, it looks to be written using VISA Read/Write/etc. commands, not low-level GPIB. It should be able to just work with a serial link, assuming that you properly configure the serial reference inside MAX (or do it within your LabView code before calling the SR-830 driver code). 

0 Kudos
Message 8 of 91
(5,703 Views)

Thanks for your response.

 

Yes,i have conneccted SR830 to my PC via RS232.In Max,the config is right that i can receive data for ID request.

 

In the driver,after making Visa W/R changes for RS232 with proper baud,parity etc,i am not able to read values in labview though there is some value being displayed in SR830 instrument.

 

I am pretty sure,my code has some bug and i am not able to figure it out.

 

If you can convert to serial comm and share the same,i can check here with it.

0 Kudos
Message 9 of 91
(5,693 Views)

All of the SR830s I have are currently connected via GPIB. I did however find some code I used to diagnose an RS232 issue, which used an SR844 (close relative of the 830, with a very similar command language). If you look at it, you'll see that the actual read/write sequence just consists of standard VISA calls with nothing special about them. You should be able to just fill in the VISA reference for your serial port, set the 'Clear mode' control to 'None', and hit run. 

 

(the code was written to help track down a rarely-recurring bug in the implementation of the Clear operation in one version of NI-VISA Server on OS X, which is why there are some low-level serial calls in one frame of the case statement.)

0 Kudos
Message 10 of 91
(5,686 Views)