05-11-2010 06:17 PM
I am currently triggering an Analog Read with a digital trigger using a 0-5v shaft encoder as the digital source. I am running LV 8.2.1, DAQmx 9.0, and a PCI-6259. I am using a VI I wrote that is very similar to the "Acq&Graph Voltage-Ext Clk.vi", and using the encoder A-pulse connected to PFI8 as the clock source for the Sample Clock vi. The only major difference is using the Z-trigger AI channel as a software reset inside the While Loop with the DAQmx AI Read. Currently, the Sample Clock only allows either reading the falling or rising edge of PFI8, so I only get one sample per A-pulse.
I need to double the Analog Read rate for a given shaft rpm and encoder, so I need to read on both rising and falling edges of the encoder A-pulse. Can the Sample Clock be reconfigured to Change Detection and still read the PFI8 port for both rising and falling as physical channel inputs, or do I need to configure a Digital Input Task/Change Detection for a single line, and use the "ChangeDetectionEvent" as the source for the AI Sample Clock? Can the DAQmx Timing/Change Detection still use the signal into PFI8, or must I use DI ports, and what DI ports must I use?
Thanks in advance!
Solved! Go to Solution.
05-12-2010 10:57 AM
Hi Turbosaurus,
Unfortunately the sample clock for analog input can only be configured for either rising or falling. The Change Detection timing option does have inputs for a rising edge and falling edge source (which can be the same line), however, the official Change Detection timing option can only be used as the timing engine for digital and counter tasks, and are not compatible with analog tasks.
However, you are absolutely correct in that you can create a dummy DI task using Change Detection, and then use the ChangeDetectionEvent for the sample clock source for your analog input.
For the source of the Change Detection rising and falling edges you should be able to use any line of Port 0.
05-12-2010 11:06 AM
Thanks, Eric. Just to be sure; so I need to move the encoder trigger signal from PFI8 to any line in port 0?
Do you see any problem with leaving the signal connected to PFI8 and jumpering it to P0.8? I have more than one program, (others still use PFI8 as single edge trigger) and I don't want the end user to keep having to move hardware lines!
05-13-2010 04:59 PM
05-13-2010 05:02 PM
05-13-2010 06:03 PM