LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

hadware trigger to boolean

I have seen many examples for using a hardware trigger to start data acquisition, but I want to use a hardware trigger to start the recording of data to a file (acquisision has already started).  Essentially I want to take the trigger information and use it as a boolean to indicate whether I am taking data or not.  How would I impliment this?  Are there any helpful examples?
 
Thanks.
--Robert
0 Kudos
Message 1 of 6
(3,443 Views)

Are you refering to something like what is described in this link?

http://forums.ni.com/ni/board/message?board.id=170&message.id=190267

RayR

0 Kudos
Message 2 of 6
(3,441 Views)
Will the trigger outside the loop be able to trigger something inside the loop?  Lets say I have a Write to Measurement File Express VI and I want to use the trigger to create a true or false for the "enable" input to the VI.  So, if I put the hardware trigger to true, the VI will write to the file and if false, the VI will not write to a file.  I wasnt sure if a trigger outside of the loop could initiate things inside of the loop (using while loop, not for loop as in the linked example).
 
Sorry, but I am new to triggering.  And thanks for the quick reply.
--Robert
0 Kudos
Message 3 of 6
(3,438 Views)
Unfortunately I do not have LV installed on this PC, so I couldn't open the VI.
 
You should be able to place the trigger within the loop.  However, be careful not to activate the writing to the file unnecessarily at each iteration. 😉
A proper State Machine or Event Structure architecture would assure you to accomplish that.  Or at minimum, a Case Structure which selects (activates) the appropriate trigger to when writing to the file is appropriate.
 
Short answer:  yes, you should be able to trigger within the loop.
 
RayR
0 Kudos
Message 4 of 6
(3,433 Views)

I will work on that then.  Thanks for your help.

--Robert

0 Kudos
Message 5 of 6
(3,427 Views)

Let me know how it goes. 

RayR

0 Kudos
Message 6 of 6
(3,409 Views)