10-10-2006 03:19 PM
Hi Kenn
Thanks for the information about the source of the ArmTrigger.
Regarding One Counter Period Measurement as specified by you in your previous posting
Route your the output of the counter you want to use to a RTSI line. Then route from that down to each of the gates. This should work in a one counter period measurement. Or simply connect them externally with wires.
I have routed the counter 7 output 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 the APD. The RTSI0 will be internally connected to the gate of the 3 counters .
But still I get the error specified in the previous posting.
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
Why doesnt it work even for one counter low frequency period measurement?
Thanks
Murugan
10-12-2006 01:10 PM
10-12-2006 02:14 PM
--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 .
gateTask.COChannels.CreatePulseChannelFrequency(
"/Dev1/Ctr7", "GateSignal", COPulseFrequencyUnits.Hertz, COPulseIdleState.Low, 0,10000, .5); - I have externally connected the Ctr7 output to the gate of Ctr1,Ctr2,Ctr5 and Ctr6.- Timing for the Ctr7 is configured implicitly to get continuous sample
- Duplicate count prevention is set for Ctr1,Ctr2,Ctr5,Ctr6
- Timing is configured implicitly to get continuous sample for the rest of the Counter input
- I have aslo 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.
The event counts I get are 809,889,888 instead 3 4 4 etc.
So I have tried both the ways. If I internally connect through the RTSI I get the error specified in my previous post.
If I connect it externally I get the wierd count as specified above. Please explain.
Thanks
Murugan
10-13-2006 09:56 AM
10-16-2006 10:03 AM
Hi Kenn
I disconnected all the connection and tried with a single counter .
Counter 0:
-Source - APD 30 KHZ (signal generator)
-Gate - output of Ctr6 (10 KHZ continuous pulse train)
But still I get the same results. I connected the signals from the source and the gate of Counter 0 to the oscilloscope and verified the signal. It appears to be correct. The count is supposed to be 2 or 3. But using a period measurement with single counter low frequency I get the counts to be 2667 2666 2667 2667 2666 2667 2667 2666
I'm getting stuck with this for a long time. Any early help will be appreciated.
Thank you
Mullai JK
10-16-2006 11:24 AM
10-16-2006 02:10 PM
Hi Kenn
Thank you very much for the quick reply.
Your suggestion worked out . I specified the Counter time base source to counter 0 source (PFI39) . But I didnt specify the counter time base rate as it will be unknown (APD).
I also set the PeriodTerminal for the Counter 0 to be the output of Counter 6 /PFI12 . I got the correct counts.
I also did the same with 6 other counters . It was able to get the correct counts.
By setting up the period terminal to be the output of the Counter 6/PFI12 to all other counters I didnt have the need to externally connect the wires to all the counter gates.
Thanks a lot Kenn. I really appreciate your help.Now I'm able to move forward with the next step.
Thank you
Murugan
10-18-2006 10:37 AM
Hi Kenn
I have a quick question.
I am acquiring the continous data asynchronously by specifiying the Available Samples Per Channel in the BeginReadMultiSampleInt32.
I get the AvailableSamplesPerChannel in my read call back .It acquires data first time. When I stop the acquisition and try to acquire data next time I get an error specifying
"You only can get the specified property while the task is reserved, committed or while the task is running. Reserve, commit or start the task prior to getting the property. Property: NationalInstruments.DAQmx.DaqStream.AvailableSamplesPerChannel Task Name: _unnamedTask Status Code: -200983 "
Why do I get this error ? I dispose each task before I start teh next one.
Thanks
Murugan
10-18-2006 11:36 AM
10-18-2006 11:55 AM
Hi Kenn
I'm through with the error I specified in my earlier posting.
Thank you
Murugan