LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I 'click' on a "latch" mechanical boolean in an event case?

Since I can't set true of false to the local variable of latch mechanical boolean, how can I click the boolean in an event case?
0 Kudos
Message 1 of 8
(4,207 Views)
Why do you even want a local variable? The indicator itself can be in the value change event.
0 Kudos
Message 2 of 8
(4,200 Views)

Are you trying to trigger the event from another event case? In other words, do you want to simulate pressing the button in an event case that's handling some other event? If so, you have a few options:

  1. Change the mechanical action to "Switch". Then you can write to the Value (signaling) property to trigger the event. If you do this you will have to manually update the value of the button to restore its state. 
  2. Use a hidden control/indicator and write to this control/indicator's Value (signaling) property. The event case handling the clicking of the button would be changed to handle both value change events.
  3. Use User Events. There is an example that ships with LabVIEW that shows you how to create and use User Events. You would register the User Event with the event structure and then change the event case handling the button to also handle the activation of the User Event. 

Without seeing your code I can't tell you which is the easiest/best solution, but options (2) isn't that bad.

0 Kudos
Message 3 of 8
(4,192 Views)

Hi seafood,

 

If i am correct then you are having a problem clicking a button during an event.

This happens because by default the front panel gets locked during an event occurance.

 

To change this go to the 'edit event handled by this case' by right clicking on the case and then uncheck the box at the bottom which reads 'Lock front panel until...'

 

I think this should solve your problem. 

0 Kudos
Message 4 of 8
(4,166 Views)

Hi I need someone to help me out.

I have a screen use the radio option to determine what to process.

When user choose 'Hot soak' option, it should process it (some IOs) and then after seven minutes, it should go back to 'Sample' mode or if user made another choice during that 7 minutes, the back to sample mode is ignored.

At mean time, there is a pressure check is constantly going on. It will send user a message everytime the low pressure happens.

 

I make a simplified test code.

There are two problems with my code:

1. I can't make the value change event work (the second option of the solution posted by smercurio...)

2. The occurrence does not work as I thought it would be. I need to stop the timer if user change to other mode within that 7 minutes period (my test.vi set to 10 seconds).

 

See my attached test.vi (in labview 8.6)

Any comments and suggestions would be very much appreciated.

Thanks!

 

 

0 Kudos
Message 5 of 8
(4,080 Views)

LUX_ wrote:

1. I can't make the value change event work (the second option of the solution posted by smercurio...)

2. The occurrence does not work as I thought it would be. I need to stop the timer if user change to other mode within that 7 minutes period (my test.vi set to 10 seconds).


The value change using a signaling property only works if you actually have an event assigned to that value change. You currently don't! 😮

I am not sure why you complicate things with the occurrence. You don't need it. (the wait for occurence prevents the the loop from e.g. checking the elapsed time). THe code is way too convoluted.

 

I think all you need is one loop utilizing the timeout of the event as wait timer (and one to randomly cause faults). See attached for a rough draft. modify as needed. As you can see, you don't need all these locals and hidden controls.

0 Kudos
Message 6 of 8
(4,045 Views)

Works like a charm!

I never used the timeout on the event loop.

Many many thanks.

 

 

0 Kudos
Message 7 of 8
(4,015 Views)

Hi,

        Can you send the example program in labview 8.5 which solves the problem for latch mechanical boolean in an event case.

 

0 Kudos
Message 8 of 8
(3,832 Views)