LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

event structure not working properly Please suggest the proper solution

Dear Sir, 

  

I have design code for Event structute but it is not working properlly ... Please suggest where is the problem.

 

I am tring to Design a event structure with 3 events (mouse click or External Boolen indicator) that should run  whenever it arrives.

When I am tring by using boolen Button then it is working. when I was toggle it by Local variable it not executing.

 

please suggest solution please remember event (Input) should be three Boolen input.  

 

 

0 Kudos
Message 1 of 20
(7,562 Views)

Please include the subVI you use to trigger the mouse events.

 

What is the purpose of this? Common practice is to only use one event structure in a VI and you could add a Mouse Down event to the event structure.

By the way, your top loop will never end because you haven't wired a timeout value.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 2 of 20
(7,554 Views)

WTFAYT?  An "Event" fires when a user does something or when a Value (Signaling) property is written.  You are "Polling" to cause "Events" Smiley Surprised  and why would you require a 100mSec time between event responses?  Get rid of the wait.... the event structure will wait for events just fine all by itself.  Then get rid of the other loop entirely by changing the mechanacal action of the boolean controls to "Latch when released"

 


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 20
(7,530 Views)

Sub Vi Added

0 Kudos
Message 4 of 20
(7,516 Views)

That subVI has more subVIs... so still doesn't help. But like I said above, just use the event structure you already have to trigger the mouse down event.

Pane > Mouse > Mouse Down

 

Do that, along with what Jeff said, and you should be dandy.

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 5 of 20
(7,511 Views)

now please check ... I have added all Sub VIs

0 Kudos
Message 6 of 20
(7,500 Views)

Also remember that signaling value property nodes will fire even if the value is the same. You are firing 3 events with every true case.

 

Seems the wrong architecture overall. Since you are polling anyway, the event structure seems useless! Just wire everything in the lower loop and get rid of the upper loop and the local variables.

 

0 Kudos
Message 7 of 20
(7,496 Views)

 

Your "left" value change event is linked to the wrong "left". You have two controls with the same exact name, which makes it easy to mix them up.

 

Like altenbach said, you are triggering all of the events instead of just one at a time.

You can create separate case structures around each one if you want to fix this, but really you should just use a single event structure for all of it. Get rid of the Mouse Event VI completely.

                                                                                                                                                                                               ^^^^^ Do this ^^^^^^^^^^^

 

 

EventOrder 2.png

Cheers


--------,       Unofficial Forum Rules and Guidelines                                           ,--------

          '---   >The shortest distance between two nodes is a straight wire>   ---'


0 Kudos
Message 8 of 20
(7,491 Views)

Thank you, now I am going close to the solution... one more thing Value signaling firing continuously "1" I want only 1 time execution of event structure.  When I try Local Variable It don't work.. 

0 Kudos
Message 9 of 20
(7,469 Views)

You should not trigger a signaling change when the values is true, but whenever the values is different than before.

 

It still boggles the mind why you even use events or the upper loop. All you need is a polling loop as follows (or similar). Keep it simple!

 

 

 

...and why is your front panel maximised to the screen? That so very annoying!

0 Kudos
Message 10 of 20
(7,456 Views)