Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

GPIB controlled SR844 does not always initialise

Hello,

I want to comunicate with a SR844 Lock-In amplifier via the GPIB-Bus.
What I want to do in particular is to read some of its settings like its Sensitiviy or the Time-constant.
So what I was doing for a start was a simple vi where I put the following sub-vis
- the initialise vi from the SR844 driver pack
- a VISA-Write vi with SENS? as command
- a VISA-Read vi to get the result
- a the close vi from the driver package.

If I run this vi, it sometimes works, but more oftenly it doesn't, and when it doesn't I have the impression that it's mainly due to the initialisation doesn't work.
I tried playing a bit with putting delays at some places, but while having the impression that it got somewhat better, it was far from being stable.
Is this a known problem, and if yes is there a simple solution?

Thanks in advance for any help,
Johannes

0 Kudos
Message 1 of 6
(4,422 Views)
What is the error you are getting?  Is it a timeout?  The Initialize VI is created from a template; the code is fairly standard and should work.  You can try single stepping to isolate the issue, or run NI Spy to capture a log that includes the error.
0 Kudos
Message 2 of 6
(4,413 Views)
Hi Jason,

there are three different things happening when I want to execute my program:

1. It works (yeah, this happens sometimes, but I'd like it to happen always...)
2. It gives an error (error -1074003951 : Identification query failed)
3. It gives no error, but the Read VI, intended to ge the response on my SENS? query gets the response to the IDN? Query, and then on the subsequent run I get the same error as in case 2.

So I think there clearly is a problem with the initilisation vi, and I suppose that there is a problem with the timing, but as this should be THE most important vi of the whole driver package, I'm slightly disturbed that it hasn't be implemented properly.

As I said, I already played with placing delays at different places, but without knowing exactly what I'm doing. Additionally I changed the GPIB bus timing to 2mus, but without any real success.

Thanks for any additional help,
Johannes
0 Kudos
Message 3 of 6
(4,400 Views)

Hello,

Can you run NI Spy to capture a log with when the program is working and one that includes the error?

To see where the problem is occuring.

 

0 Kudos
Message 4 of 6
(4,360 Views)
hi,
i have the same problem, so i wish to know if you find the solution.
regards.
amine
0 Kudos
Message 5 of 6
(4,217 Views)
There have been numerous posts on the difficulty of interfacing to SR instruments. It seems to be a generic problem with their implementation of GPIB. I would suggest you search the instrument control board for references to 'sr'.
0 Kudos
Message 6 of 6
(4,211 Views)