09-24-2015 01:37 PM - edited 09-24-2015 02:03 PM
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.
09-24-2015 01:40 PM - edited 09-24-2015 01:48 PM
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> ---'
09-24-2015 01:52 PM - edited 09-24-2015 01:54 PM
WTFAYT? An "Event" fires when a user does something or when a Value (Signaling) property is written. You are "Polling" to cause "Events" 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"
09-24-2015 01:58 PM
Sub Vi Added
09-24-2015 02:00 PM - edited 09-24-2015 02:01 PM
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> ---'
09-24-2015 02:04 PM
now please check ... I have added all Sub VIs
09-24-2015 02:05 PM
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.
09-24-2015 02:10 PM - edited 09-24-2015 02:17 PM
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 ^^^^^^^^^^^
Cheers
--------, Unofficial Forum Rules and Guidelines ,--------
'--- >The shortest distance between two nodes is a straight wire> ---'
09-24-2015 02:35 PM - edited 09-24-2015 02:40 PM
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..
09-24-2015 02:40 PM - edited 09-24-2015 02:42 PM
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!