Data Acquisition Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Pie566942.0

Add Triggered Property to DAQmx

Status: New

I'd like to know if a DAQmx Task has been triggered.  Perhaps via task property?

 

triggered.png

 

Thanks,

 

Steve K

2 Comments
Kevin_Price
Proven Zealot

In addition to a property node that can be queried, it'd also be very helpful to add DAQmx Event support for the status of the trigger.

 

Edge or threshold based triggers would latch their status until queried via property node.  For retriggered tasks, the first property node query returning True would then reset the status back to False.  (Analogous to the counter property for querying whether terminal count has been reached.)

 

Each edge trigger would produce one DAQmx Event per trigger edge.  So there'd be only one unless the task is retriggerable.

 

 

Level or state based triggers (such as the pause trigger) would not latch the property node value, they would return the instantaneous status at the time of query.

 

Each level trigger would produce a DAQmx event when transitioning into the "trigger active" state.  For a digital pause trigger set to pause while high, the event would occur on every rising edge of the trigger signal.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
BretRidgel42
Member

I did find that this seems to work.  The "AvailSampPerChan" is 0 until a trigger has happened.  Then it starts counting up as data is collected.  So this just asks if it is greater than 0 indicating a trigger event and then waits for the task to complete.  It does assume you will never have a task in excess of 5 min.  Nothing I do should ever be that long.  You can specify -1 for indefinite, but that seems dangerous. 

 

is triggered.png