LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using event structure for tab control

Hi,
I am using event structure to control the "controls and indicators" in the tab control pages. The controls on the tab control are not responding while i am executing the vi.
Can any body help me in this regard.
Please go through the attached vi.
 
Regards,
Padma
 
0 Kudos
Message 1 of 5
(4,835 Views)
Hi Padma,

this is expected/default behaviour!

When you crreate or edit an event you will find a checkbox at the bottom of the dialog window: "Lock front panel until event completes".
Uncheck this and you can edit your controls while the event is processed.
But:
An event should never take that long to process! Read the context help for event structures!
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 5
(4,823 Views)
While what you say is true, the real issue is that there are no event handling cases for the controls. The controls themselves can still change values, so they're not locked, but if you're expecting the change in value to be propagated to the indicator that's next to them, you need to add an event case to handle a change in the value of the control. You do not need to create dynamic events for the controls. All you need to do is add an event case for the "Value Change" event.

If you wish to use dynamic events the way you did, then you need to add a case to handle the "<ControlsOnPage>: Value Change" event. However, this will require that you deal with control references, since that's all that you will get in that case, unless you use local variables. And if you're going to use local variables, you're better off just creating an event case for the control directly, rather than using dynamic events.
0 Kudos
Message 3 of 5
(4,793 Views)

While both comments above are correct, I think you are approaching a simple issue way too complicated. In this case, all you need is three event cases (plus one for stop).

  1. Knob: value change
  2. Gauge: value change
  3. Meter: value change
  4. Stop: value change

It is really irrelevant for the code to know what the current tab page is, so the tab terminal does not really need to be used at all in the code. If one of the values change, the indicator should get updated. That's all! 🙂

0 Kudos
Message 4 of 5
(4,781 Views)

Hi All,

Thank You so much.

It's working.

I have just created 4 event cases as per ur suggestion

1.Knob case

2. Gauge case

3. Meter case

4.Stop case

My requirement has been fulfilled.

Thanks a lot.

0 Kudos
Message 5 of 5
(4,758 Views)