LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I create a triggered data recording VI?

So I have a force/torque transducer and I have a basic program already that records the data for a brief amount of time after you tell the VI to run.  I've been trying to modify it so that it triggers when a force is applied to the transducer so that it then begins to record data and display as a graph.I'm having some problems with the triggering.  The trigger works fine, but it only records for as long as the force is applied, not for a set amount of time.  Any ideas how I can do this?

0 Kudos
Message 1 of 8
(3,732 Views)

Why don't you post your VI so we can see how you are doing it now?  Then it might just be possible for us to suggest how to fix your problem.

0 Kudos
Message 2 of 8
(3,714 Views)

Here is my code.  I'll admit the main chunk of it is from the transducer website to record data.  The part I tried adding in to trigger data recording was the "SW Trigger".  Any help would be great.  Thanks.

 

0 Kudos
Message 3 of 8
(3,660 Views)

Hi RK,

 

What device are you using? Some device support analog level triggering where your task starts based on the level of an analog input channel. It looks like you are trying to do some software analog triggering, can you include that VI in your next post. You can probably modify the subvi to get the behavior you  want.

Matt
Applications Engineer
National Instruments
0 Kudos
Message 4 of 8
(3,634 Views)

Here is the Analog Trigger SubVI that I am using in the program.  I sort of see what you are talking about in regards to modifying the subVI to do what I want, but I'm not certain how much of the original VI must be re-written into the subVI to make it work. Thanks for the reply.

0 Kudos
Message 5 of 8
(3,625 Views)

Hi RK,

 

Can you tell me what device you are using? Also, this subvi also has a subvi which is missing. You can probably modify this subvi so that once it does trip you analog level, you ignore the rest of the code and read all samples. You could add a Boolean value and a shift register to keep track of whether or not a threshold has been detected.

Matt
Applications Engineer
National Instruments
0 Kudos
Message 6 of 8
(3,606 Views)

I am using a Nano 17 Transducer from ATI industrial Automation.  I think this is the other subVI you were talking about.

0 Kudos
Message 7 of 8
(3,591 Views)

Hi RK,

 

Thanks for the subv. It doesn’t function like I had expected; it appears like it was written to be used once because it detect a change in level over a threshold. In your top level VI you code use the “Trigger Occurred” Boolean to hide the SW trigger subvi in subsequent iterations of your while loop. That way sample read in that first DAQmx read could be analyzed instead of being ignored.

Matt
Applications Engineer
National Instruments
0 Kudos
Message 8 of 8
(3,566 Views)