LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Timing issues with GPIB-USB controlled instrument

I am trying to use LabView to run and control a Stanford Research SR400 photon counter. I can get the counter to operate perfectly using labview, but the data pulled into labview does not accurately represent the data displayed on the counter, i.e. I get repeated values etc. It appears there is some timing issue with the retrieval of data from the counter into LabView, is this likely to be due to the fact the photon counter is connected to the PC via a NI USB-GBIB connection? Thanks
0 Kudos
Message 1 of 14
(3,463 Views)

Are you missing data, or just repeated values??? Explain what the 'etc' actually is....

What version LV?

Posting the code might help in this instance, there may be a programatic error causing the mismatched data.

________________________________________________________

Use the rating system, otherwise its useless; and please don't forget to tip your waiters!
using LV 2010 SP 1, Windows 7
________________________________________________________
0 Kudos
Message 2 of 14
(3,461 Views)

It is LabView version 7.

Out of ten data points we on average get the first one back a zero, then sets of 4 or five repeated values, whereas the values displayed on the counter are different every time, and are recorded every 100ms

0 Kudos
Message 3 of 14
(3,457 Views)

Can you post it?

I think there might be a problem in how you are reading the data back. Possibly an invalid timeout or other timing issue....

________________________________________________________

Use the rating system, otherwise its useless; and please don't forget to tip your waiters!
using LV 2010 SP 1, Windows 7
________________________________________________________
0 Kudos
Message 4 of 14
(3,450 Views)
As TWGomez said, this sounds like a timing issue. On other instruments I have seen the same kind of effect. It occurred when the the GPIB reads were happening faster than the instrument was updating the data.

Look carefully at the instrument manual. Does the GPIB interface operate at the same speed as the display? Does the output automatically update or do you need to issue a command to force the update? Does the manual specify what gets sent if multiple read requests occur between data updates?

Put a variable delay between the GPIB reads. Adjust the delay until no repeated data is seen. How does the sum of the delay plus the GPIB communication time compare to the instrument update rate?

Lynn
0 Kudos
Message 5 of 14
(3,446 Views)
Hopefully I have attached the VI
0 Kudos
Message 6 of 14
(3,444 Views)

Ok thanks, we have tried putting timing delays in and it has not made all that much difference. I will go through the manual again and check the write speeds. There is definitely something with the timing, I just can't figure it out!

Thanks

0 Kudos
Message 7 of 14
(3,443 Views)
Need the SR400 vi's to tell anything...
________________________________________________________

Use the rating system, otherwise its useless; and please don't forget to tip your waiters!
using LV 2010 SP 1, Windows 7
________________________________________________________
0 Kudos
Message 8 of 14
(3,429 Views)
How are you getting multiple readings? Your VI has no loops or other means of repeating parts of the code?

Lynn
0 Kudos
Message 9 of 14
(3,418 Views)
Im betting its in the last sub vi that is missing...
________________________________________________________

Use the rating system, otherwise its useless; and please don't forget to tip your waiters!
using LV 2010 SP 1, Windows 7
________________________________________________________
0 Kudos
Message 10 of 14
(3,412 Views)