Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Capture quadrature encoder position on rising and falling edge using PCI-6602

The 6602 does support internal routing for most counter signals (refer to the device routes in Measurement and Automation Explorer).  However, the A, B, and Z encoder terminals are hard-coded on this device.

 

 

Best Regards,

John Passiak
0 Kudos
Message 11 of 12
(2,725 Views)

OK,

Thats what I figured.

Based on my experimentation I have found that I am able to configure the sample clock for the various encoder counters to come from PFIxx.

 

For example this works:

 

DAQmxCfgSampClkTiming (  cthCounter1EncoderPosition,            // TaskHandle Task_Handle,
                                           "/Dev1/PFI1",                                   // char Source[],
                                          1000.0,                                             // float64 Rate, 
                                          DAQmx_Val_Rising,                          // int32 Active_Edge,
                                          DAQmx_Val_FiniteSamps,                 // int32 Sample_Mode,
                                          NUM_ENCODER_SAMPS                 // uInt64 Samples_Per_Chan
                                       );

 

Thanks for the help with this,

Kirk

0 Kudos
Message 12 of 12
(2,721 Views)