LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

boolean question

 

Is there a way to make my boolean control return back to false position only when the control is read in the program?  To detect a boolean button event, I have to make sure that my program is at an even structure to wait for the event or I am polling fast enough, right? 

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 1 of 7
(3,585 Views)

If your Boolean is inside the event structure, it will return to the false state.

 

Don't understand your comment "I have to make sure that my program is at an even structure to wait for the event or I am polling fast enough, right". Event structures have nothing to do with polling and you don't run your program up to an event structure. There is no waiting before an event will be captured.

Message 2 of 7
(3,580 Views)

A boolean control will return to false when it is read by the program if you select the correct mechanical action.

 

You want either "latch when released" or "latch when pressed".

 

I also don't understand your second sentence. Do you have a simple example that illustrates what you want to do?

 

Yes, a latched boolean should be inside it's event to ensure it gets read by the code soon after pressing. A program should always be designed to immediately handle events. This means events should not be hidden in potentially inaccessible locations such as case structures, sequences or other code segments that are not in the dataflow. This also means that event cases should be able to finish quickly so the event is ready to handle the next action. Any longer operations (e.g. containing interactive while loops, etc.) don't belong inside an event case but should be done in a parallel loop, such as in a queued state machine.

Message 3 of 7
(3,568 Views)

Thank you guys.  I think I just have to play around with different scenerio. 

------------------------------------------------------------------

Kudos and Accepted as Solution are welcome!
0 Kudos
Message 4 of 7
(3,508 Views)

Hi jyan72211,

 

If you feel that the answer satisfies you... Just make it as a solution. So that other can kow the thread got closed or not...

And it is also a kind of appreciation instead of saying Thanks...

 

<<Kudos are welcome>>

0 Kudos
Message 5 of 7
(3,485 Views)

This is what I have done so far for the thin paches. what I need now is to work out the start and length from the Array of integers.

0 Kudos
Message 6 of 7
(3,434 Views)

 


@983w7 wrote:

This is what I have done so far for the thin paches. what I need now is to work out the start and length from the Array of integers.


 

To answer the boolean question:

TRUE

 

SCNR

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 7 of 7
(3,407 Views)