From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

My start trigger is starting immediately - what is wrong?

Solved!
Go to solution

Newbie, just learning. I have done the NI online training on triggers but is seems to only be a sparse, brief introduction.

 

I have a NI 9205 in a cDAQ-9185 chassis.

I have three channels wired - 0, 1 and 2.

Channel zero has a 5v battery with a switch.

Channel one has a distance laser range finder with 0-10V output.

Channel two has a 5V battery with a switch.

 

I am trying to learn how to trigger data collection when channel 2 goes from 0v to 5 volts. I also want collection to stop when the channel goes from 5V to 0V but I am only trying to trigger a start at this point (walk before I run).

 

I am expecting my chart to not update until I get a transition from 0V to 5V in channel 2. Instead I am getting data immediately when I start the VI.

 

What am I doing wrong?

 

My VI image:

Trigger.png

0 Kudos
Message 1 of 3
(1,011 Views)
Solution
Accepted by topic author flycast

It's pretty subtle, but grab that Trigger property node and expand it upwards to create another field above (and therefore *before*) the ones you have.  Select the property "Trigger Type" and wire in the constant for "Analog Edge".  Otherwise, the task must assume the default Trigger Type of "None".

 

This all assumes that your hardware supports analog edge triggering.  If not, digital edge triggering ought to work, it's supported pretty universally, and you've got the right voltage transition range for it (0-5 V).

 

 

-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).
0 Kudos
Message 2 of 3
(994 Views)

Thanks Kevin!

That was it!

 

 

0 Kudos
Message 3 of 3
(980 Views)