Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

USB GPIB card slow data retrieval

Hi, I am trying to operate the SRS SR400 photon counter using LabView 7 with a new NI USB-GPIB card to interface the PC and SR400.
I have an optical chopper as the external trigger and I am using both channels A and B in a gated way.
Basically I can get the photon counter to operate perfectly with LabView, in terms of setting it's parameters and getting it to count, but if I collect only one data point at a time in Labview, the data displayed is that recorded on the photon counter 7 counts previously.
If I ask LabView to record say ten counts, I generally get 9 of the same number repeated (the same number which appeared on the SR400 7 counts previously) and the a random 0 or 6. I thought the problem was due to some buffering or handhsaking issue, but I'm relatively new to LabView and can't figure it out, and now I'm thinking it may be due to the USB interface as I have previously only ever used PCI-GPIB cards. Has anybody else experienced any similar problems? Any help will be greatly appreciated! The code I'm using is attached
 
Attachment AllThatStuff.vi (76 kb)
Attachment SR400 Read_e2.vi (130 kb)
0 Kudos
Message 1 of 3
(3,465 Views)
Unfortunately I do not have the SRS SR400 or the subVIs that you are using, but let's see if we can troubleshoot this.

Have you tried running your code using a PCI-GPIB card to see if it makes a difference? I suspect that this shouldn't because what you are seeing here is completely separate from the GPIB interface.

Where do you ask LabVIEW to record ten counts? Is this the period#? What this does is that it is reading from the buffer that number of times, but have you instructed your SR400 to record the correct number of counts? It is possible that you might have set a different number of counts on your SR400, and LabVIEW is reading old data off the SR400 buffer.

Let me know if the above makes sense.
Rasheel
0 Kudos
Message 2 of 3
(3,446 Views)

Hi thanks for your suggestions, it seems that labview was not asking the SR400 to reset the counters between runs so the buffers were just filling up, and eventually a "buffer overload" message appears. Luckily, several people before me had had similar experiences, so I have now managed to resolve the problem I think. Thanks for your help.

Kelly

0 Kudos
Message 3 of 3
(3,443 Views)