Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Help with photon counter data acquisition using LabView 12

Solved!
Go to solution

Yes, that VI should work with a PCI-6023E as well.

 

 

Best Regards,

John Passiak
0 Kudos
Message 11 of 23
(8,912 Views)

Hi John,

 

I was hoping that you would respond to my question. Thanks for that.

 

I am a bit puzzled though with your response given that  when I am trying to use your routine with my card, it appears that my card does not give me the option of "Dev1/Ctr1InternalOutput". Is this because my card has only 2 counters that does not support counter output?

 

Thanks,

 

Foti

 

 

 

 

0 Kudos
Message 12 of 23
(8,901 Views)

No, it's probably due to the default I/O name filtering on the Terminal controls.  See here.

 

 

Best Regards,

John Passiak
0 Kudos
Message 13 of 23
(8,888 Views)

Thanks John for the tip.

 

By the way, the counter 0 has to be connected to my APD signal? Right?

 

What do I connect to the Photon Input (PFI)?

 

Foti

0 Kudos
Message 14 of 23
(8,858 Views)

The input terminal (gate) of the period measurement on counter 0 is connected to the internal output of the other counter.

 

The APD signal should be used as the timebase (source) for the period measurement--the terminal is labelled "Photon Input (PFI)" in the example.  On the 6023E, PFI 8 (pin 37) is used to route the counter 0 source.

 

 

Best Regards,

John Passiak
0 Kudos
Message 15 of 23
(8,844 Views)

I was searching through ni forums to learn more how NI DAQ cards can be used for pulse counting. I am very new to this topic and need to educate myself how to do photon counting using LabView.

I came across to your earlier discussion about this topic. Here you explained how to use the Counter Edges example vi. I have no experience with this type of measurements.Could you please clarify in more details why in that vi two input terminals Counter and InputTerminal have to be specified ? My naive understanding is that one can use just one channel (counter) on a DAQ card to count the input pulses in the SIngle point (on demand) edge counting. For other modes (i refer here as an example to NI DAQ 6212 manual) some triggers might be used as well. In this basic vi example which operation mode is assumed ? The detector input is connected to the counter (Dev.../ctr..), right? What is connected to the Input Terminal? trigger? 

 

Also could you please elaborate more about how to reset terminals as you pointed earlier to use the CountReset to bin the data.

 

thanks!

 

best,

Alex

0 Kudos
Message 16 of 23
(6,034 Views)

The example posted by John_P1 in msg #8 would be a good starting point to try out.

 

Yes, you only need one channel (counter) to do on-demand edge counting on a 6212 board.  The software config still requires you to identify which one with a Counter input.

 

Further, counters have many operating modes and can be configured to respond to signals that are physically wired to PFI terminals.  Depending on the mode and your wiring, it may be necessary to specify anywhere from 0 to 3 of these terminals in the software configuration.  One signal increments the count.  Another signal could be used as a sample clock.  Another may act as a trigger.

 

The example in msg #8 approaches binning in a way that may not be immediately intuitive, but is a very nice use of the flexibility counters provide.  The data will come out with each sample representing an equal-sized bin of time, and the sample values will be the # of pulses seen within that bin alone.  No post-processing is needed.  Nor does it require the CountReset capability that was introduced with X-series boards, but would not be supported on the 6212 you referenced.

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy coming to an end (finally!). Permanent license pricing remains WIP. Tread carefully.
0 Kudos
Message 17 of 23
(6,028 Views)

Dear Kevin,

thanks for your feedback.

When i connect a signal generator output (freq 100Hz, duration 5ms) to one of the USB6212 inputs (that corresponds to Counter 0 or1), i can count the edges from NI MAX. It is simple and straightforward. But i need to bin the data (as the original post 's author had described). When i used the example Count Edges vi with the signal generator connected to either Ctr0 or Ctr1 (nothing on neither PFI), the edge count did not change its value (in no trigger mode). If the generator was connected to one of PFIs, then the count showed some values. In this case nothing was connected to the Ctr0 and Ctr1. I have no idea what and how it counted..

After spending some time playing with the VI from msg#8 i still dont understand what it is supposed to do.

In that VI two counters, Dev1/ctro0 and Dev1/ctr1, are used. But what is their purpose? Based on the author description they should work as some sort of internal trigger to bin the data measured on the Photon Input (PFI) channel (it is to where the signal from a detector should be connected, right?). But how counters Ctr0 and Ctrl1 bin the data? are they wired together (physically) ?

I took a signal generator (freq 100Hz, duration 5ms) and wired to one of my USB6212 PFIs. When i run the vi, the error popped up saying:

"Error -200279 occurred at DAQmx Read (Counter 1D U32 1Chan NSamp).vi:250001. Possible reason(s):

The application is not able to keep up with the hardware acquisition.

Increasing the buffer size, reading the data more frequently, or specifying a fixed number of samples to read instead of reading all available samples might correct the problem.

Property: RelativeTo
Corresponding Value: Current Read Position
Property: Offset
Corresponding Value: 0

Task Name: _unnamedTask<A4>"

 

Is it because 6212 does not support it?

 

regards,

alex

0 Kudos
Message 18 of 23
(6,005 Views)

Hi Kevin.

I cannot fully follow what you are saying.

I use a pulse generator (freq 100Hz, duration 5ms) instead of a detector for testing. When the generator is connected to one of USB6212 Ctrs, i can easily read the pulses from NI MAX.

Trying the same with the basic Count Edges vi (in no trigger mode), does not work: the count indicator is not changing. But if the generator is connected to one of PFIs (and nothing is on neither Ctr0 nor Ctr1), the vi is counting (something). I do not understand what is the purpose of counter than if PFIs can be used for counting as well.

In the VI from message 8, what is the purpose to use two counters? Based on the author description, they should do some internal trigger function. But how is it implemented? Are both counter wired together physically? This vi is not working if i connect my signal generator output to one of PFIs:

(Error -200279 occurred at DAQmx Read (Counter 1D U32 1Chan NSamp).vi:250001; Possible reason(s):

The application is not able to keep up with the hardware acquisition.

Increasing the buffer size, reading the data more frequently, or specifying a fixed number of samples to read instead of reading all available samples might correct the problem.

Property: RelativeTo
Corresponding Value: Current Read Position
Property: Offset
Corresponding Value: 0

Task Name: _unnamedTask<A8> )

 

Is it because 6212 does not support some of the used in that vi counting modes? I am totally lost.

 

regards,

alex

0 Kudos
Message 19 of 23
(6,012 Views)

Following up.

There is an example of VI for pulse counting posted here

which seems to be serving the same objective as the VI from message#8. But again, what should be connected to the counter inputs,Counter Timebase Source,Counter - Count Edges Terminal, and etc.

I would highly appreciate any comments about details how those vi work.

 

thanks,

alex

0 Kudos
Message 20 of 23
(6,009 Views)