From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Serious bugs in the SR400 gated photon counter LabVIEW drivers

The gating SR400 can be configured in several different ways. You probably noticed that if you manually set it in a certain way, 1 of the parameters has ***** and cannot be changed. I wrote Gate.VI (SubVI) to be used in any of it's modes (CW, gated, scanning gate) where the one parameter specific to the counting mode cannot be modified. So, if you set it CW, which requires use of the internal trigger, and thus the gate width depends only on TSET. None of the other gate parameters (gate width, gate delay, gate step) can be configured in CW mode. Since I could not figure how to disable the appropriate parameter when a certain mode was selected, it's up to the user to know this. Bad form on my behalf.

So, if you want to count over 1 ms, then TSET should be 1E4, 2 ms would be 2E4, etc - the internal trigger is based on a 10 MHz clock, so 1 second is 10E6 or 1E7. Then, in CW mode, the SR400 will integrate over TSET, then wait the dwell time, then integrate over TSET again, dwell... It will do this until it reaches N periods. Unfortunately, 2000 points is ~30 minutes in your case.
0 Kudos
Message 11 of 28
(2,025 Views)
Thankyou for the quick reply. Yes, I though that this would be the case with CW mode in your VI. As I mentioned before, I am using the
setup 2.VI which already includes the gate.vi from the Sub VI. I even tried to use the gate.vi from the sub vi folder alone, but for some reason, I am just not able to change the TSET, it always reverts back to 1E+7.

Also, lets say I use it in CW mode and just record 2000 points, then my output file should just have 2000 points right, but it has something else, do u know why. I am setting the following parameters:
No of Periods = 1
Scan End Mode = start
count mode = A, B for T preset
Channel T input = 10MHZ
Am I doing anything wrong here ?
0 Kudos
Message 12 of 28
(2,021 Views)
I usually have Scan End Mode set to Stop - I don't remember exactly what the difference is. But, I think the program was set to append the data to file, so you'll get more than 2000 points. The x value is basically the index of the data array in the output file.
0 Kudos
Message 13 of 28
(2,013 Views)

Hi, is there anyway of getting your VI for the SR400 so that it will work in LabView 7?

Thanks

0 Kudos
Message 14 of 28
(1,886 Views)
Is there anyway of opening any of these posted VI's which fix the bugs in the SR400 in LabView 7.0 if they have been developed in v7.1.1 or higher? I am really struggling to get something which will read in a gated way on channels A and B as instructed by an external trigger, and I can't even open these VI's to see what you guys have done to rectify the problems in your systems!
0 Kudos
Message 15 of 28
(1,858 Views)
I can look to see if I can save them as version 7.0. I just have to dig them out and play around with it.
0 Kudos
Message 16 of 28
(1,849 Views)
That would be great, cheers
0 Kudos
Message 17 of 28
(1,844 Views)
I converted most of my SR400 VIs to version 7.0. As far as I know, they should work - should being the key word. I did receive a couple errors in the conversion process, but I don't know if it will affect anything.

I broke it down into 2 parts. There is a folder containing all the Sub VIs for instrument setup and control. You should be to access all of the features and configurations that are possible with the SR400 - gate scanning, discriminator scanning, etc. The sub VIs are pretty simple: Flush the IO buffer (I would get errors otherwise), send a command or query to the instrument, and await a response for a query.

The VIs in the main folder are utilities that I've created from the sub VIs - setup the instrument, check the progress of a scan, save data, etc. There is no main program that does everything. I broke it down into pieces that look more like big sub VIs. These are not eloquent by any sort of the imagination, but they got the job done for me.

Also, these are GPIB only. I have since learned to use VISA resources, but have not corrected the files here, and I apologize for that.

With that being said, I hope they work "as is" for you. If you know the instrument and have the manual, it shouldn't be terribly difficult to use or modify for your personal usage.
0 Kudos
Message 18 of 28
(1,830 Views)
That is brilliant thanks so much!
0 Kudos
Message 19 of 28
(1,811 Views)

Hey, I am trying to program SR400 in labview recently. But I am beginner for labview. I need  to external trigger the photon counter continually(in 20Hz), and send data to computer every 10 pulses, then clear and recount again. My gate is fixed and no dwell time. Do you have some programm that have no dwell time?

  I really appreciate your help.

0 Kudos
Message 20 of 28
(1,208 Views)