LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with second frame in flat sequence, it is not taking boolean inputs in to the while loop

sir, i rectified it. i have created a feedback node and initialized to 0,  at the selector for the false condition. now its fixed.

 

regards

 

0 Kudos
Message 21 of 26
(526 Views)

Oh, Just make life a bit easier on yourself

12_BDJJBMOD.png

 

Now lets discuss it:  There are two event frames.  Stop2 Value change (Writes TRue to the conditional terminal) and this one shown configured to fire on Start or Stop value change and those booleans are "Latch when released"

 

Clicking Start enters the False case (Since the Control ref of the event source is not equal to a control ref of the Stop boolean) and we pass Time of the event out to the Feedback node.  Press Stop And we flow throught the true case, calculate the time in mSeconds between the two events, update the mSec Elapsed indicator and re-set the feedback node to 0.


"Should be" isn't "Is" -Jay
0 Kudos
Message 22 of 26
(526 Views)

then what about the gate 1 and gate 2 sensor status chcecking and servo control. will it also be included in the event structure as an event 'gate 1, gate 2 , value changed' . but still a problem if semsors of any the gate malfunction and we get a boolean 1 but in reality train does not pass gate 1 or 2. how we prevent the code to run gate 1 gate 2 check unless speed get calculated.

0 Kudos
Message 23 of 26
(514 Views)

@ dkfire: i thought the problem is rectified but as i introduced the feed back node the time is not clearing if we press start button for the next time . if i am keeping the selector false condition to 0 constatnt, the result is not holding and showing infinity speed and time in sec as 0. how to avoid this ?

0 Kudos
Message 24 of 26
(498 Views)

Sir i came to know the problem, its because of mechanical action of the boolean buttons. when i change them to switch when pressed the problem arises, iis there any way to avoid this problem because i use ir sensors in place of start and stop buttons. they will remain active until the train crosses the ir sensor so the physical action is like "switch when pressed".

 

regards

0 Kudos
Message 25 of 26
(478 Views)

@vejella463 wrote:

Sir i came to know the problem, its because of mechanical action of the boolean buttons. when i change them to switch when pressed the problem arises, iis there any way to avoid this problem because i use ir sensors in place of start and stop buttons. they will remain active until the train crosses the ir sensor so the physical action is like "switch when pressed".

 

regards


Switch until released  is the action you are describing.  In such a case you need  the "new value" of the control to drive a case inside the value change event.


"Should be" isn't "Is" -Jay
0 Kudos
Message 26 of 26
(465 Views)