Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

driver for SR400

I have downloaded the driver for SR400 "Two channel gated photon counter" from NI website. It does not work properly. The vi called "Read.vi", that should read and record the counts works for a couple of seconds and then freezes and the only way to get back control of computer and instrument is to restart everything. Does anyone know of the existance a modified or a working version of this driver?
Thanks
0 Kudos
Message 1 of 8
(6,648 Views)
I have had the same problem. Do you know the solution? have you written a new driver?
0 Kudos
Message 2 of 8
(6,594 Views)
ecoli,

Can you successfully run the example VI that is provided (there is a Read in that example too)? The best bet in figuring out what might be happening is to do an NI-Spy capture. NI-Spy basically logs the low-level driver calls and can help us figure out which part of the code is failing...I would also recommend running the VIs in highlight execution to see exactly where the failure occurs.

NI-Spy Tutorial

Hope that helps!

Craig H.
NI Applications Engineering
0 Kudos
Message 3 of 8
(6,579 Views)
>Can you successfully run the example VI that is provided (there is a Read in that example too)?
No. In highlight mode, quite clearly, the problem comes from the SR400 read subVI, and more precisely from the "wait for RQS" in this subVI (it returns after loads of time a value of "-1").
While using NI SPY, one can see that a ibwait function is run again and again. this ends up with an IBSTOP which returns an EAB0...
then the asynchronous input output is stopped... (I do not really understand but this is substantially what happens)

I have also tried to write a driver myself (in attachement). I basicaly kept the structure of the example. It worked at a moment but now that i modified too many parameters, it does not work anymore. The SR400 systematically returns "data buffer overflow". Do you see what happens?

thanks a lot
0 Kudos
Message 4 of 8
(6,570 Views)
ecoli,

There are a couple of things we can try. Since this instrument driver is a number of years old and since the SR400 is also a bit old we may have a problem running this on more current computer hardware. One thing you could try could be to remove the Wait for RQS.vi and see what happens. Also you could increase the value of the timeout to see if that removes the problem. Could you also attach that NI-Spy capture? That might help me see what's happening under the hood better. Thanks!

Craig H.
NI Applications Engineering
0 Kudos
Message 5 of 8
(6,550 Views)
Did this ever get solved?

I had a very similar problem. When I ran NI-spy the problem went away. I solved it by putting in a short delay inside the "Read channel 'A' Data" and the "Read channel B Data" FOR loops. Just 1 or 2ms does it.

I also removed the top level sequence structure and ran an error wire for execution order on principle.
0 Kudos
Message 6 of 8
(6,401 Views)

I am having the same problems. I am trying to read both channels A and B in a gated mode, triggered by an optical chopper. I don't particularly need to obtain the data quickly, but I do want to obtain it and to get realistic values. I have modified the online VI's to include counting in both channels, using labView 7. I have a USB-GPIB card connecting the SR400 to the Computer. I have put a wait time of a few ms in the read loops but still the data read in LabView, is several periods old, and if I try to read more than one data point at a time I just get the same number repeated, or zero or 6?? It's like all the data is stored in a buffer and Labview just choses the value it wants to display??

Was there ever any solution to this??

Cheers

0 Kudos
Message 7 of 8
(5,593 Views)
Hello,
It could just be that your device is not given sufficient time to gather new data.
Can you try increasing the wait time and lets see if that help.

You could also post up your NI Spy log here.
Christian A
National Instruments
Applications Engineer
0 Kudos
Message 8 of 8
(5,563 Views)