LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple user events

Hello every body

i'm using user event to generate two events i do not understand why my programm doesn't work when i use two user events 

Download All
0 Kudos
Message 1 of 4
(2,740 Views)

I don't understand why you are causing an event within the same loop.  None of that code makes sense.  In general, a dynamic event should be created and registered before the loop with the event structure and the event should be destroyed after the loop is complete.

 

As far as your other VIs, you should use a feedback node or unregistered shift registers to hold your value for C instead of using a local variable.  Look up a Functional Global Variable.


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
0 Kudos
Message 2 of 4
(2,727 Views)

hello thx 

but i can't get what do you mean i need a short example if u can 

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

You have a race condition, you probably generate the event before it's registered. Wire the error wire from Register to Generate to make sure it registers first.

Also, Create event should be done outside of the loop.

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 4 of 4
(2,633 Views)