Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Counting TTL pulses within specified integration time

Hi Otis
 
 Thank you very much for the reply .
 
 Yes . The cause of the error you have specified is correct .I think the counters were paired as I use the high frquency 2 counter parameter while creating a period measurement.
 
I have a question regarding the one counter period measurement.
 
 I have routed the counter 7 output (PulseChannelFrequency) internally to the RTSI0 . Then the RTSI 0 is routed internally to the gate of the 3 other counters . FYI : Each of the 3 counters have a One counter low frequency period measurement. The source for the 3 counters will be the APD. The RTSI0 will be internally connected to the gate of the 3 counters .

 

But I get an error in the callback while reading the data .Status code -89137 . Specified route cannot be satisfied,because it requires resources that are currently in use by another route

 COChannel PulseTerminal

Dest Device ev1

Dest Terminal : ctr5gate

 Resources are used by Source Terminal : Ctr7InternalOutput  Destination Terminal :Ctr5Gate 

 Can you please clarify the cause of the error.

Thanks

Mullya

 

0 Kudos
Message 21 of 24
(2,394 Views)
Hi Mullya,

I'm actually out of the office for the next few days, hopefully one of the other "Blue Bars" can help you out before next week.  If you still haven't heard anything back, then drop another message on here sometime next week and I should be back in the office.

Quick question though, are you using DAQmx?  If so, what other signals are you trying to route on the board?

Regards,
0 Kudos
Message 22 of 24
(2,389 Views)

Hi Otis

Thanks for the quick reply . Have a good vacation .

  Yes I'm using DAQMX.

--I have externally connected the signal generator (which simulates the APD) to PFI 19 (ctr 5 source) and routed the input externally from Ctr 5 to Ctr 2,Ctr1 and Ctr 6 source.

- Each Ctr 1,2,5, and 6 generates a one counter period measurement

//i is the number of tasks

measurementTasks[i].CIChannels.CreatePeriodChannel(inCtr,

"BufferedEventCounting"+i,.000000025,53.6, CIPeriodStartingEdge.Rising, CIPeriodMeasurementMethod.LowFrequencyOneCounter,.0001, 4, CIPeriodUnits.Ticks);

- I have Ctr 7 which generates the Pulse train frequency internally connected to the RTSI 0 using

DaqSystem.Local.ConnectTerminals("/Dev1/Ctr7InternalOutput", "/Dev1/RTSI0");

- I have internally connected  the RTSI 0 to the gate of Ctr1,Ctr2,Ctr5 and Ctr6.

DaqSystem.Local.ConnectTerminals("/Dev1/Ctr5Gate","/Dev1/RTSI0" );

//I tried either way by having the source as RTSI0 and the destination as Ctr5Gate and vice versa

- Duplicate count prevention is set.

- Timing is configured implicitly to get continuous sample

- Also set one of the counters to use interrupts and others to use DMA

-I'm using an Arm StartTrigger to start the acquisition at the same time.

measurementTasks[i].Triggers.ArmStartTrigger.ConfigureDigitalEdgeTrigger(

"/Dev1/PFI0", DigitalEdgeArmStartTriggerEdge.Rising);

-Then I set the bit to true and then to false . So that all the counters read the data at the same time.

- While  reading the data I get the above specified error for each of the ctr used .

 I have also posted the problem in another thread . But I have not yet got any reply.

 I'm stuck with this problem and I'm not able to move forward.

 Hope the other "Blue star will identify the problem".

Thanks

Mullya

0 Kudos
Message 23 of 24
(2,382 Views)
Hi Murugan,
 
To keep all this info easy to read through, lets keep this on one thread. That way when others are following this in the future they don't have to bounce between posts. It looks like Ken has already posted back on this question.
 
Thanks!
Andrew S.
National Instruments
0 Kudos
Message 24 of 24
(2,360 Views)