Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx (USB6210, C interface) gated edge count problem

Our application needs to
(1) provide a gating pulse for an external device
(2) to monitor the number of pulses returned from that device when gated.

We want to use the USB6210 using the DAQmx C functions for that.
So, I set up the gating pulse. That works. The output looks good on a scope.
- DAQmxCreateTask
- DAQmxCreateCOPulseChanFreq using ctr0
- DAQmxCfgImplicitTiming
- DAQmxStartTask

I also set up ctr1 for Edge Counting
- DAQmxCreateTask
- DAQmxCreateCIcountEdgesChan using ctr1

Now, I think I have to route the output of the gating pulse to the gate of ctr1.
The manual says that should be possible (8-27)
However, DAQmxExportSignal to ctr1gate leads to an error:
Specified route cannot be satisfied, because it requires resources that are currently in use by another route.
Property: DAQmx_CI_PulseWidth_Term
Property: DAQmx_CI_PulseWidth_StartingEdge
Source Device: Dev1
Source Terminal: PFI2
Required Resources in Use by
Task Name: gatingpuls
Source Device: Dev1
Source Terminal: Ctr0InternalOutput
Destination Device: Dev1
Destination Terminal: Ctr1Gate
Task Name: pulszaehler
Status Code: -89137


DAQmxConnectTerms doesn't help either:
Specified route cannot be satisfied, because it requires resources that are currently in use by another route.
Property: DAQmx_CI_CtrTimebaseActiveEdge
Source Device: Dev1
Source Terminal: 80MHzTimebase
Destination Device: Dev1
Destination Terminal: Ctr1Source
Required Resources in Use by
Source Device: Dev1
Source Terminal: PFI3
Destination Device: Dev1
Destination Terminal: Ctr1Source
Task Name: pulszaehler
Status Code: -89137


I thought of wiring the output to the PFI where the gate is but that gives me the problem how to define the gating input PFI for ctr1.

 

Which functions shall I use to obtain the desired functionality?

Thanks,

Niels

0 Kudos
Message 1 of 3
(3,302 Views)

Hi Niels,

 

i can imagine that the error comes because your device not support these feature. See followings links:

 

http://digital.ni.com/public.nsf/allkb/B3A73388A3968E0F86257156007F7E3E?OpenDocument

http://digital.ni.com/public.nsf/allkb/A7A4024278353BF7862570230072C6E1?OpenDocument

 

Attached here a file with screenshot about possible device routes. You can test a simulated pci 6210 - when the error comes not than not for usb.

As workaround you can give a signal to a pin (output) and read it on an other pin as input as trigger source - the manual of device (pin assignments)

tell you what pfi line is what pinnumber. Hope this helps

 

Best Regards

 

Johann

Message 2 of 3
(3,287 Views)

Hi Johann,

 

thanks, that sounds as if it could do the trick. I will try to wire the ctr0 output to the ctr1 gate and then I'll find out how to switch on external gating.

 

Best regards

 

Niels

0 Kudos
Message 3 of 3
(3,280 Views)