From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Dialog ring and Event structure

Hi,

In my application, i am using a Dialog Ring from
classic control.The dialog ring has around 15-17
items in it.based on the user selection i am
calling a sub vi.

i am using a Event structure and using the event
on "value change".

we are able to call the sub vi when ever the user
changes the value, we are not able to call on the
existing value.

for example..if the dialog ring contains A to F
when ever user changes to the new value,the
required code is execuuted.say from Ato B or C,D,E,F.

if the current state is A, to call the sub vi for the
A...we have to change to B or others and then to A
then A code gets called and executes.

when the excution begins and the A is the default state
on click how can i execute the code that belongs to A

could you please suggest any way to slove the problem.

rags
0 Kudos
Message 1 of 7
(3,268 Views)
Hi

Usually I solve this issue just by placing a simple "---" element on first position. So the user has to choose another element, which then starts the appropriate sub-vi.

Hope this helps.

Thomas
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 2 of 7
(3,264 Views)
Hi Thomas

Thank you for the suggestion....

rags
0 Kudos
Message 3 of 7
(3,259 Views)
This happens because selecting 'A' when it already is'A' is not a "Value Change".

I usually include as the first selection in the ring/list/enum something "Make a Selection". Then I reset the ring to this first state after each Case has run so the next selection will always fire the "Value Change" event.

Ed


Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
Message 4 of 7
(3,246 Views)
Without seeing your code it is not entirely clear as to what you are trying to do. Do you want to continuously run the loop with one setting of the ring until the value has changed, and then run the loop with that setting? If so then you should use a case structure instead of an event structure. Otherwise, the answers that you have been given will work. Another potential solution would be to set the initial value and trigger an event on the first iteration of the loop.
0 Kudos
Message 5 of 7
(3,233 Views)

hey.. i'm new in this field.. but the try.zip actually solved one of the fundamental doubts i was facing... thanks a lot.

0 Kudos
Message 6 of 7
(2,776 Views)

Perhaps something like this would be helpful.

0 Kudos
Message 7 of 7
(2,748 Views)