How Do I Trigger an Analog Input Task with My Counter Output Task?

Updated Sep 28, 2023

Environment

Driver

  • NI-DAQmx

I have a counter task that generates a continuous pulse train. I also want to trigger a finite analog input task with the pulses from this counter task. How do I do this?

In order to do this, you need to internally route the counter's output signal to trigger the analog input task. This looks like the code below.
  1. Insert the DAQmx Trigger VI into your block diagram and choose the Reference Digital Edge option.
  2. Right click on the edge input and select Create >> Constant. Change this constant to the rising or falling edge.
  3. Right click the source input and select Create >> Constant
  4. Right click the newly created source constant and select I/O Name Filtering...
  5. In the Filter Names dialog, check Include Advanced Terminals and click OK.
  6. Click within the source constant and scroll down. In the list, there should be /device/CtrXInternalOutput. Select the internal output that corresponds to the counter used in the counter task.
  7. Insert a DAQmx Trigger Property Node. Select the property Reference >> More >> Retriggerable.
  8. Wire a true constant to the Ref.Retriggerable Property.