LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

confused by Create User Event

Solved!
Go to solution

I haven't done much User Events.

 

According to the LabVIEW Help,

The input for the Create User Event function is an individual element or a cluster whose name becomes the name of the user event and whose data type defines the data type for the event.

 

In the VI I have inherited, the original programmer has wired a error in (no error) cluster to the Create User Event.

What does this do?

 

 

 

 

0 Kudos
Message 1 of 7
(3,503 Views)
Solution
Accepted by topic author nyc_(is_out_of_here)

@nyc_(is_out_of_here) wrote:

What does this do?


Allows somebody to send error information using a User Event.

 


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 7
(3,499 Views)

My guess would be that he is generating the event in the consumer loop. In this way if a error occurs in the consumer loop you can tell the producer to perform some kind of action. I was just experimenting with this design. edit: beat me to it. lol 

Now Using LabVIEW 2019SP1 and TestStand 2019
Message 3 of 7
(3,492 Views)

@GovBob wrote:

My guess would be that he is generating the event in the consumer loop. In this way if a error occurs in the consumer loop you can tell the producer to perform some kind of action. I was just experimenting with this design. edit: beat me to it. lol 


That is what he is doing. He is processing the error even in the producer loop and generating the error event in the consumer loop.

0 Kudos
Message 4 of 7
(3,472 Views)

@crossrulz wrote:

@nyc_(is_out_of_here) wrote:

What does this do?


Allows somebody to send error information using a User Event.

 


Thank you for the explanation. However, he isn't using any of that error information. He simply is wiring a True to stop the producer loop.

 

 

Can you explain why the Dynamic Events Terminal is not wired through?

 

 

0 Kudos
Message 5 of 7
(3,470 Views)

nyc wrote:

Thank you for the explanation. However, he isn't using any of that error information. He simply is wiring a True to stop the producer loop.

 

 

Can you explain why the Dynamic Events Terminal is not wired through?


So that allows the consumer loop to stop the producer loop in the event of an error.  That's very smart on their part.

 

The Dynamic Events Terminal only needs wired up inside of the Event Structure if the registered event references get changed.  By default, they keep their registered event references the same.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 6 of 7
(3,452 Views)
The example you posted also shows why you should be careful about how you format the data that you use with an event. The way he did it gets the error data through the event, but it comes out as 3 separate values -- it is no longer an error cluster. However if you take the error cluster and put it inside another cluster first, it will show up in the event data as an error cluster.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 7 of 7
(3,410 Views)