LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to re-scan AI Read?

According to the docs, when doing a software trigger, AI Read is scanned to check for the trigger condition - and you can re-scan AI Read to check for a different condition....

What I need to do is software trigger so that I get a trigger if (A > 0.3) or (B > 0.3) or (C > 0.3)

The docs seem to imply that it is possible - but give no clues....
0 Kudos
Message 1 of 2
(1,287 Views)
What you need to do is a continuous scan. The AI Read will have to be in a while loop that runs 3 times (for A > .3, b > .3, and C > . 3) On the conditional retrieval input of the AI Read VI, you'll need to check what the iteration of the loop is, and set the conditions of the read for the appropriate channel. This will read the buffer, and return the buffer if the trigger condition exists. If the trigger condition exists, exit the while loop (because you have data now). On any AI Reads following the trigger condition, if you want to continuously read the data, you'll have the AI Read with no conditional retrieval.

Next, you'll have to specify to the AI Read VI WHERE to get the data from the buffer. This is key, because if you don't, it will move
the read marker in the buffer, and on the next iteration, it won't be scanning the same data for a different trigger condition.

Therefore, you'll need to wire a read position to the AI Read. check out the attached VI, and I think you'll get the idea.

Mark
0 Kudos
Message 2 of 2
(1,287 Views)