LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

program left mouse click

Solved!
Go to solution

 


@nyc_(is_out_of_here) wrote:

I am trying to add the <Event Message>: User Event to my event structure, but all I am able to get is <My User Event>: User Event.

 

What am I missing?  I am using LV2010.

 

 


My preferred method for initializing my user events is to create a typedefed cluster for my user events. Within this cluster there is a cluster (typedefed) for each user event I would like to use. The elements of the individual clusters are the specific data associated with that event. Wire this cluster into input on the Create User Events VI. Then your event structure will have each user event available. In your code you only have one event (MyEvent) defined.

 

 

I attached a copy of a subVI that I use in my applicatons. I did not attach all of the typedefs associated with it but this would give you the general idea.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 11 of 17
(396 Views)

 


@Richard2950 wrote:

You can use the Property Node with Val(Signaling) property to not only change the value of a control but also to have it trigger an event structure the same as if the control's value was changed on the front panel. Then you can have an Exit button with an event case and execute everything in the case programmatically as well as in response to an actual front panel event. The only caveat is that you can't use the Val (Signaling) property with a Boolean that has latching mechanical action. That is not a big deal, though, and you can reset the button yourself in the event case. See attached simple example that uses the Esc key to mimic a Stop button push.


This certainly is an option. However, user events are more flexible since you can pass data with them. In addition I generally try to decouple of the processing code from the UI as much as possible. In order to do this you need to avoid using property nodes for specific controls/indicators.

 



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 12 of 17
(394 Views)

If you just want two buttons to trigger the same case in the event structure, then add the second button by right-clicking on the event title at the top of the event structure and choosing "Edit events handled by this case", "Add Event" and choose your other button. Then pushing either button will trigger the same case.

0 Kudos
Message 13 of 17
(385 Views)

@Richard2950 wrote:

If you just want two buttons to trigger the same case in the event structure, then add the second button by right-clicking on the event title at the top of the event structure and choosing "Edit events handled by this case", "Add Event" and choose your other button. Then pushing either button will trigger the same case.


Right. I figured it out after I replied to your first post.

 

I edited that post.

 

Thanks again.

 

 

0 Kudos
Message 14 of 17
(381 Views)

@Mark Yedinak wrote:

 


@nyc_(is_out_of_here) wrote:

I am trying to add the <Event Message>: User Event to my event structure, but all I am able to get is <My User Event>: User Event.

 

What am I missing?  I am using LV2010.

 

 


My preferred method for initializing my user events is to create a typedefed cluster for my user events. Within this cluster there is a cluster (typedefed) for each user event I would like to use. The elements of the individual clusters are the specific data associated with that event. Wire this cluster into input on the Create User Events VI. Then your event structure will have each user event available. In your code you only have one event (MyEvent) defined.

 

 

I attached a copy of a subVI that I use in my applicatons. I did not attach all of the typedefs associated with it but this would give you the general idea.


I've attached a very simple VI that I created trying to duplicate your VI. I am using LV2010 but saved it to LV8.0

 

I am unable to create <Event Message>: User Event in the Event Structure.

0 Kudos
Message 15 of 17
(379 Views)

@nyc_(is_out_of_here) wrote:

@Mark Yedinak wrote:

 


@nyc_(is_out_of_here) wrote:

I am trying to add the <Event Message>: User Event to my event structure, but all I am able to get is <My User Event>: User Event.

 

What am I missing?  I am using LV2010.

 

 


My preferred method for initializing my user events is to create a typedefed cluster for my user events. Within this cluster there is a cluster (typedefed) for each user event I would like to use. The elements of the individual clusters are the specific data associated with that event. Wire this cluster into input on the Create User Events VI. Then your event structure will have each user event available. In your code you only have one event (MyEvent) defined.

 

 

I attached a copy of a subVI that I use in my applicatons. I did not attach all of the typedefs associated with it but this would give you the general idea.


I've attached a very simple VI that I created trying to duplicate your VI. I am using LV2010 but saved it to LV8.0

 

I am unable to create <Event Message>: User Event in the Event Structure.


Got it working.

 

Thanks, Mark.

 

Something to add to my LabVIEW toolbox.

 

In case anyone is interested, attached is a very simple example I wrote based on your more elaborate VIs.

0 Kudos
Message 16 of 17
(372 Views)

Try this.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 17 of 17
(366 Views)