LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

User Event Error 1

Hi everyone,

 

I'm getting a user event error 1 which states that I have an invalid input parameter and I don't know why it is happening. The VI initializes and then waits for 15 seconds for UUT to boot up and if I interupt during this time  by clicking the stop button, the program generates a User Event Error1. However, if I don't interupt during this 15seconds, I'm able to stop the VI without the error message. Not sure if configured my dynamic events in the event structure correctly. Can anyone figure out what I'm doing wrong. I've attached the screenshots and code.

 

Thanks

Download All
0 Kudos
Message 1 of 4
(3,845 Views)

Hi all,

 

I think I've figured out the problem with my code. I configured a separate user event and exit cases resepectively and that fixed the problem.

 

Thanks

0 Kudos
Message 2 of 4
(3,836 Views)

Classic race condition.

 

Your upper loop completes as soon as you press the Exit button and then destroys the event.  Then once the UUT bootup has completed, it tries to send the User Event.  But the upper loop has already destroyed it.

 

The simple solution is to not destroy any of your references until both loops are complete.



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 3 of 4
(3,834 Views)

I'm not able to look at the VI becuase I don't have LabVIEW on this computer but from the image you provided, I would guess that the following happens.

 

When you press exit, your event structure picks up on this and sends an "Exit" command but also stops the event handler loop. With your current dataflow, when the event handler loop stops, you will destroy your event reference. Then when you try to use that reference to fire and event you receive Error 1 because the reference no longer exists.

 

Matt J | National Instruments | CLA
0 Kudos
Message 4 of 4
(3,831 Views)