11-29-2012 09:08 AM - edited 11-29-2012 09:17 AM
Hello All,
I am programming in Labview from two months... starter... I a want to use a event structure in my case, So I started with examples and had a problem understanding one.
This is the example I am talking about labview\examples\general\dynamicevents.llb\dynamicallr register for events.vi
1) In the blockdiagram , outside while loop , can you please explain the three inputs given to the thrre propertis under Register event property node ???
2) Why to use shift registers for sending the Register events into while loop ? Why dosent a tunnel works in this case ?
3) Inside the event event strucure why we have again include 'Register event' property node and how to give reference to its properties ?
4) In the while loop, event case 1 Mouse down event , mouse down property is left free, but mouse move was connected to sone refernce, how does this works ???
I would be glad if can refer me some literature about his event structures
Thank you
Regards
Neo
Solved! Go to Solution.
11-29-2012 09:34 AM
@Neo6 wrote:
1) In the blockdiagram , outside while loop , can you please explain the three inputs given to the thrre propertis under Register event property node ???
These are references. The first is a reference to a VI. The other two are an array of references to the controls in the current VI.
@Neo6 wrote:
2) Why to use shift registers for sending the Register events into while loop ? Why dosent a tunnel works in this case ?
Because what is being registered is changed inside of the structure. You need to save this registration in the shift register or you will be registered back to the original registration.
@Neo6 wrote:
3) Inside the event event strucure why we have again include 'Register event' property node and how to give reference to its properties ?
The writer is dynamically changing what controls/VI the events are registered for.
@Neo6 wrote:
4) In the while loop, event case 1 Mouse down event , mouse down property is left free, but mouse move was connected to sone refernce, how does this works ???
As the comment states, there is not change to what controls the mouse down and mouse up events are registered to. If you don't wire anything to them, they keep what was in the event registration wire.
11-29-2012 09:37 AM
11-30-2012 02:55 AM
HI @Gerd , @ crossrulz,
Thank you for the reply, I will go through it and report you back
Thank you once again
Regards
Neo
11-30-2012 11:58 AM - edited 11-30-2012 12:00 PM
Hi Crossrulz,
Now I can understand the logic behind mouse, up down events, But I have still more to go
1)In event structure, in Mouse move event, Can you please explain me how the refernce is connected to property node, what reference willit get from shift register ? and what is logic behind it ?? What is need to connect its output again to shift register ??
2)In mouse down event, What is need of control reference to tunnel via event structure and end with shift register ?
3)In mouse up event why 'not refnum constsnt' is tunneled and terminate with shift register on while loop ?
what all I know about shift registers is, it store a value on for loop whichis useful for iteration ....... If you think I need more knowledge on shift registers prior to this example, please refer to me to good literature, Or I will be glad if you can asnswer my questions
Thanks and Regards
NEO
11-30-2012 12:27 PM
Neo6 wrote:
1)In event structure, in Mouse move event, Can you please explain me how the refernce is connected to property node, what reference willit get from shift register ? and what is logic behind it ?? What is need to connect its output again to shift register ??
2)In mouse down event, What is need of control reference to tunnel via event structure and end with shift register ?
3)In mouse up event why 'not refnum constsnt' is tunneled and terminate with shift register on while loop ?
This VI was written so that it could have more controls and automatically work with them. Think about the sequence of things to happen.
I modified the example here so you can see how it works with multiple controls.
12-03-2012 03:39 AM
Hi Crossrulz,
Thanks for your patience..... 90% clear... I will the execute the program and report you back.
Thankyou very much
Regards
Neo
12-03-2012 06:11 AM
Hello Crossrulz,
I executed the vi. I have few more questions
1)At the very begining, when I hit the run, what all the events available for the event structure in the while loop ? (If I understand correctly, all the events associated with front pannel controls and mouse move are available since they are registered outside the loop . Am I correct ????)
2)Along with all the pannelcontrol events, there is also one mouse move event is already registered outside the while loop and sent to the event structure, but again inthe 'Mouse down' event we are again registering the 'mouse move' event and storing in shift register. What is the difference between registering outside while loop and Registering inside the 'mouse down' event structure ? If registering inside a event structure is updating the already existing event or is it filling the empty position for the Event structure ????
If it is updating process , what are the parameters it is updating in the already existing event ?
Regards
Neo.
12-05-2012 10:01 AM
Hello Crossrulz,
Waiting for your reply for tmy ybove questions
Thank you
Regards
Neo
12-05-2012 10:09 AM
@Neo6 wrote:
1)At the very begining, when I hit the run, what all the events available for the event structure in the while loop ? (If I understand correctly, all the events associated with front pannel controls and mouse move are available since they are registered outside the loop . Am I correct ????)
Technically, all of the events are available. It is just a matter of what objects will cause the events. Initially, the Mouse Move event is registered to a NULL VI. Since there isn't one of those around, the event won't happen. The Mouse Up and Mouse Down were associated with all of the controls on the front panel. So if the mouse went up or down on a control, the event would fire.
Neo6 wrote:
2)Along with all the pannelcontrol events, there is also one mouse move event is already registered outside the while loop and sent to the event structure, but again inthe 'Mouse down' event we are again registering the 'mouse move' event and storing in shift register. What is the difference between registering outside while loop and Registering inside the 'mouse down' event structure ? If registering inside a event structure is updating the already existing event or is it filling the empty position for the Event structure ????
We are simply updating what object can cause the event. Inside of the Mouse Down event, we say that the current VI can cause a Mouse Move event.