Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Why does AI task pull counter output low?

Solved!
Go to solution

Attached is a vi that has an analog input task triggered by a counter output. The counter has idle state high, and responds to a front panel button push by making a low pulse of specified duration. This output controls hardware in the system under test and is also used to trigger the AI task. The problem is that starting the AI task pulls the counter output low. I am using a USB-6341  device, for which the counter output is PFI13. I saw some unexpected bahavior of the counter output when looking at it on a scope. I put the counter ouput into the analog input and the resulting trace is shown on the front panel:

Panel.png

 

The counter output line is low because of the AI task, then when the counter output task is started it goes high (the idle state) briefly, then makes the desired low pulse that triggers the AI task, then returns to high. The problem is that it then goes low when the AI task is restarted (not visible on the front panel). I need that line to stay high all the time except during the desired pulse. I found a work-around by internally routing PFI13 to PFI0 and triggering the AI task from PFI0, but I don't understand why the version posted here does what it does. A trigger line should be an input to an AI task, and starting the task should not affect its state!  I thought that the AI task might be using the counter so I tried using a different counter but got the same results.Using a start trigger with no pre-trigger samples didn't make any difference either.

 

Richard

0 Kudos
Message 1 of 2
(3,002 Views)
Solution
Accepted by Richard2950

Hi Richard,

 

The digital lines actually have 3 states:

 

  1. Output high
  2. Output low
  3. High Impedance (Input)

 

When you are using the PFI line for a trigger input, the typical desired state would be high impedance.  X Series cards use an internal ~50 kOhm pull-down resistor, which is pulling the line low when it is configured as an input.  Committing the AI task is what is configuring the PFI line as an input.

 

If you want to trigger the analog task off of the counter output, I'd suggest to use the internal output of the counter without going through the PFI lines.  You'll need to enable Advaned Terminals through the right-click menu on the DAQmx Terminal control/constant:

 

2011-06-17_151804.png2011-06-17_151909.png

 

This way, the counter can continue to output on the PFI line and the AI task will not try to tri-state the PFI line.  You also don't have to make any external connections.

 

 

Best Regards,

John Passiak
0 Kudos
Message 2 of 2
(2,995 Views)