LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

User Event

Thanks, I will download and study this.  I have opened a technical support case on this.  While you may be free to decline this idea, I've looked at "tutorials" from as far back as 2004 and they are commented as not tutorials and incomplete.  This is an area that needs serious step-by-step documentation, more than an annotated example.

0 Kudos
Message 11 of 23
(2,599 Views)

The example you provided is certainly the clearest I've seen so far.  Is it actually possible for these two loops to be running at the same time or is that just a convention for the purposes of the example? 

 

My understanding of what I see here is:

Three events are created with refnums associated with "High" "Equal" and "Low"

The three events are registered to be a list of events to watch out for (queued events?) and associated with the single Event Structure.

An instance of the event "High" is generated when the lower loop is TRUE.

The generation of that event triggers the <High>:User Event case of the Event Structure.

The events are subsequently unregistered, at which point the Event Structure would no longer respond to generated instances of the events, assuming it were possible to access the Event Structure without re-registering the events.

The events are finally "destroyed" so that the refnum itself becomes an invalid reference.

 

Is this substantially correct?

0 Kudos
Message 12 of 23
(2,609 Views)

Additional inference:

Data input to the Generate User Event function, either an individual element or a cluster, becomes available to the associated Event Structure Case via the Data Node which bears the name of the original element or cluster used to define the event in the associated Create User Event function.  The data value(s) will be the value at the moment the User Event is generated.

 

Correct?

0 Kudos
Message 13 of 23
(2,604 Views)

> The example you provided is certainly the clearest I've seen so far.  Is it actually

> possible for these two loops to be running at the same time or is that just a

> convention for the purposes of the example? 

 

These two loops running at the same time is in fact the assumed use case for Events -- you have one process that generates events and another process that handles them. If both the generation and the handling were in the same loop, there's probably a better architecture to use that leaves events out entirely.

 

> My understanding of what I see here is:

<snip>

> Is this substantially correct?

 

Yes, though I want to clarify one point. See below...

> An instance of the event "High" is generated when the lower loop is TRUE.

> The generation of that event triggers the <High>:User Event case of the Event Structure.

 

The generation of that event puts the event in the Event Structure's queue. The next time that structure executes, it takes the next waiting event out of the queue. That event might not be the High event -- there may be other events ahead of it in the queue. If there's nothing in the queue, the Event Structure goes to sleep and waits for an event to be put into the queue (which may include the Timeout event).

 

You've got the hang of it. So... now we can better ask the question... how should the help be changed to convey this information better?

 

 

0 Kudos
Message 14 of 23
(2,602 Views)

> Additional inference:

> Data input to the Generate User Event function, either an individual element

> or a cluster, becomes available to the associated Event Structure Case via

> the Data Node which bears the name of the original element or cluster used to

> define the event in the associated Create User Event function.  The data

> value(s) will be the value at the moment the User Event is generated.

>

> Correct?

 

Yes.

0 Kudos
Message 15 of 23
(2,601 Views)
I'd like to send you a one page file that shows what I would like to see, but I cannot see a way to send an attachment from here. Could you provide an email address?
0 Kudos
Message 16 of 23
(2,595 Views)

Now that this discussion has been moved to the main forums, you can now attach files to your replies, so go ahead and post it here.

0 Kudos
Message 17 of 23
(2,572 Views)

I, for one, think this was an excellent question. I found TonP's dynamic event registration nugget helpful for my understanding.

Now Using LabVIEW 2019SP1 and TestStand 2019
0 Kudos
Message 18 of 23
(2,564 Views)

The attached is a combination of the well-annotated example from Aristos and my sequential notes about the process.

0 Kudos
Message 19 of 23
(2,540 Views)
0 Kudos
Message 20 of 23
(2,535 Views)