LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error 1 at Generate User Event

Solved!
Go to solution

I am trying to develop an application to turn 3 air valves on and off with time in between activations using a process that runs in the background. I am attempting to use user events to communicate to the background process which sequence of actuations to run at a given time. The problem I have run into is that I get error 1 from the generate user event function in the main program loop. I have read through all of the Nuggets, help files, and discussion posts I can find and I think that I understand how user events work and how to implement them. Or I thought I did. I can't find the issue in this program.

 

Can anyone help?

 

I have attached the project folder (zipped). The main program is called Black Hole Control, and the process loop that would run in the background is called sequence.

 

Thanks in advance,

 

Chuck

0 Kudos
Message 1 of 14
(4,725 Views)

It looks like you are generating a user event before you create the event.

 

By the way, nice architecture. 

>

"There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
0 Kudos
Message 2 of 14
(4,717 Views)
Solution
Accepted by topic author Chuck60148

I made a slight change to your sequence and the error seemed to go away. 

 

 

>

"There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
0 Kudos
Message 3 of 14
(4,715 Views)

Can't believe I missed that. I must need a break from this. Now that the error is gone, what would prevent the event structure from picking up the generated event? I can watch the data flow through the generate event function (it's a little annoying not being able to verify that an actual event is generated), but the event structure never seems to notice.

0 Kudos
Message 4 of 14
(4,702 Views)

Which event?  The code you posted only appears to handle one of the three events you created.

0 Kudos
Message 5 of 14
(4,699 Views)

The '<StateCtrl>: user event'. I have not implemented the others yet. I want to get this one working first as I consider it to be the most important one.

0 Kudos
Message 6 of 14
(4,695 Views)

The code you posted has Timer Status setup for a user event.  Have you changed this?

0 Kudos
Message 7 of 14
(4,692 Views)

Yes. I decided that using a reference to the LED indicators would link the indicators more closely to the timers. The StateCtrl & ProgramStop user events are still used. Also, I have not yet coded a generate event function for either of the other 2 user events, I am trying to get the StateCtrl event working first since it is the most important event.

0 Kudos
Message 8 of 14
(4,670 Views)

Can you post the updated code so someone can see if they can reproduce the behavior you're seeing?

0 Kudos
Message 9 of 14
(4,667 Views)

Here is the latest version of the code...

0 Kudos
Message 10 of 14
(4,660 Views)