LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

One shot rising and Timer Elapsed Question

Hi,

When I initially start the VI, the time elapsed boolean turns ON then OFF. This is because of the One Shot Falling.

Essentially, what I want to achieve is: If input goes from true to false, wait a second and turn ON the Time has Elapsed boolean, then reset it to false.

 

0 Kudos
Message 1 of 3
(3,195 Views)

Dear Team,

 

     This VI makes no sense to me, and it doesn't get any better when I execute it -- the indicators turn True immediately, no matter whether Input is True or False when this VI runs.

 

     I think there are a couple of things about these functions that you don't understand.  It certainly is not in a position to detect falling (or rising) edges, as there are no loops ...

 

Bob Schor

0 Kudos
Message 2 of 3
(3,157 Views)

TeamHalli,

 

From what I can see, your VI will run ONCE and detect ONE change from TRUE to FALSE on your Input Boolean.  The One Shot Falling With Input VI will detect this change and send a TRUE constant to the Elapsed Time Express VI.  This then starts a timer.  

2 things to note:

 

1. Time between 0 and 1 seconds, the Time has Elapsed Boolean will read TRUE because the Time has Elapsed property (in the Elapsed Time VI) will read FALSE until the time is greater than the Start Time plus Time Target (1 second in this case).  Because you have a NOT node between this property and the Time has Elapsed boolean, this sets this boolean to TRUE.

 

2. Time greater than 1 second, the Time has Elapsed Boolean will read FALSE because the Time has Elapsed property (in the Elapsed Time VI) will read TRUE once the time is greater than the Start Time plus the Time Target (again, 1 second).  

 

To programmatically change this boolean value, I suggest using a sequence structure where your Time has Elapsed boolean is.  I would make sure that this structure includes time delays according to what you want.  At the end of this sequence structure, you can programmatically reset the value of the Time has Elapsed boolean by using a local variable to change it to FALSE again.

 

If this does not help, perhaps I do not fully understand the use of this code.  Could we get some more background information?  Is this only supposed to execute once?  Is this run in a while loop?

 

Cheers,

 

Eric H.

Applications Engineer

National Instruments

Eric
Applications Engineer
National Instruments
0 Kudos
Message 3 of 3
(3,103 Views)