Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Re-routing Counter signals

Hi,
I am using the PXI-6229 multifunction DAQmx in my project.
I have a requirement of generating a PWM waveform from PFI 10 and also measuring the duty cycle on of the same waveform on the PFI 12 counter terminal
 
In other words , I want to route counter 0 output to PFI 10 and counter 0/ counter 1 input to PFI 12 and disable the default counter 0 output routing to PFI 12.
 
I understand that by default, M series DAQs route the counter 0 output to PFI 12.
 
I am using the following APIs to achieve this but without success.
 

DAQmxCreateTask() - For creating the task

DAQmxSetCIFreqTerm()

DAQmxSetCOPulseTerm()

DAQmxCreateCOPulseChanFreq() - Creates channels for generating digital pulses

DAQmxCfgImplicitTiming() -

Please help me with an example code to achieve my requirement and let me know if my requirementis possible at all or is there any Hardware limitation

 

Thanks

Shiladitya

0 Kudos
Message 1 of 2
(3,000 Views)

Hello Shiladitya,

It looks like you are using the correct function calls to set the PFI lines for your counter signals.  It is even possible to output a counter signal on one PFI line and then use the same line to measure the signal (i.e generate on counter 0 and route to PFI 12, and then perform counter input on counter 1 with PFI 12 as the source).

If you are generating on 12 and reading on 10 you can either connect the signals externally or create a route between PFI 10 and 12 using the following function:

int32 DAQmxConnectTerms (const char sourceTerminal[], const char destinationTerminal[], int32 signalModifiers);

It is possible that your route may be reserved depending on the timing you have specified for your tasks. What environment are you using for programming (LabVIEW, CVI, C)? What timing source have you used for the tasks? What difficulty/error are your encountering?

Regards,

Jennifer O.
Applications Engineer
National Instruments

0 Kudos
Message 2 of 2
(2,982 Views)