LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Boolean control with mechanical action configured in Latch mode behaves as if its in Switch mode

Hi,

 

I'm currently using LabVIEW 7.1 to develop my application. I have used an event based architecture in my program.

 

The Boolean controls are placed on a tab structure and based on which is clicked, the appropriate page would be shown. The Boolean controls are configures in a Latch mechanical action.

 

During runtime, I press a button "A" and the event takes me to the new page. When I click the "Back" Boolean button on that page I'm taken back to the previous page. However the button "A" still remains in "ON" rather than latching back to "OFF".

 

Am I doing something wrong here? I'm guessing its something simple that I've missed out.

 

Many thanks for your help.

 

Cheers!

 

Sanka Smiley Happy 

0 Kudos
Message 1 of 7
(3,482 Views)

Hi Sanka,

are your booleans inside the loop? I think the best place is inside the belonging event case. To switch back to the other state, your control has to be read.

 

Mike

Message 2 of 7
(3,478 Views)

And in LV8 the terminal only has to be placed in the event case, not really connected, to switch back automatically. I thing in LV 7 additionally it had to be wired to switch back (am I right?).

greets, Dave

Greets, Dave
0 Kudos
Message 3 of 7
(3,456 Views)
No, I don't think it's ever been a requirement for a control to be wired to anything.
Message 4 of 7
(3,443 Views)
Hey Sanka,

How ru doing?
Hope you're doing fine na.
For your problem, I tried the thing you try to achive with the following techniques:
1. boolean inside event structure: buttons switch back.
2. boolean outside event structure, but inside while loop: buttons switch back.
3. boolean outside while loop: buttons don't switch back.
4. boolean in another while loop: button switch back once another loop update.
In conclusion, I think the best practice is to put a latch button inside its case to make sure it has an appropriate behavior.

Regards, Kate
0 Kudos
Message 5 of 7
(3,425 Views)

I just had the same problem, so i searched and found this thread.

 

My program is a event-driven program, and thus a while-loop outside all cases. By placing the latching button in the loop, but outside the cases it worked for me.

 

I tried it in the case first, and tried to force reads on the button but it didn't work, same with having it outside as a "global" button.

 

It's behaviour is abit tricky.

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 6 of 7
(3,348 Views)

Yamaeda wrote:

I just had the same problem, so i searched and found this thread.

 

My program is a event-driven program, and thus a while-loop outside all cases. By placing the latching button in the loop, but outside the cases it worked for me.

 

I tried it in the case first, and tried to force reads on the button but it didn't work, same with having it outside as a "global" button.


Hi,

 

Your description is incomplete, so we cannot really see what's going on. Can you attach a simplified example that shows the described behavior. SOmething does not sound right.

 

  • How do you "force reads"?
  • What is a "global" button?
  • Describe "while loop outside all cases". Do you mean "while loop outside a single event structure containing multiple cases"?
  • What kind of events are you using for the booleans (mouse down? value changed? etc.)
0 Kudos
Message 7 of 7
(3,342 Views)