LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

peculiar problem in dynamic event, which is registering randomly

Hello,

 

I am using a dynamic event to pass a data (variant) to a vi which i call dynamically. reference of the event is stored in LV2G.

so both main and called vi can access. data when written to the generate user event vi is triggering event at random time when executed.

I am attaching snapshot of the vi which i used to register event.

One interesting thing i noticed is if i put a probe in the error out of the generate user event vi then event will start triggering.

 

Need help. I am struggling to get a solution.

 


Regards,

Vibin

0 Kudos
Message 1 of 8
(3,347 Views)

@VSphilip wrote:

data when written to the generate user event vi is triggering event at random time when executed.


Could you write it in diffrenet way? I cannot understand that. Are there other events to handle? Are they firing?

 

Could you attacht whole VI? it is hard to say anything from this snapshot.

0 Kudos
Message 2 of 8
(3,311 Views)

Hi Vibin,

 

Are you trying to say that the  events (what ever event it is) are not generated or registered unless you probe the error wire?

 

if you probe--the events are registered

 

and if you dont probe-- the event s go undetected??

0 Kudos
Message 3 of 8
(3,300 Views)

Hello Arju89,

 

Yes that is what happened.

If I probe error wire  coming out of Generate User Event.vi then event is triggering.

If I am not probing no event is triggering.

 

 Capture.PNG

0 Kudos
Message 4 of 8
(3,292 Views)

It seems to me that the problem must be occurring inside the sub-VI in the middle of your Block Diagram called User Event (orange and yellow).  Also, I don't see the Event Structure -- could the problem be there?

 

Can you bundle up more code (perhaps as a Project) and include a Zip file so we can see everything all at once?  It would help to understand the origin of your problem.

 

Bob Schor

0 Kudos
Message 5 of 8
(3,278 Views)

Post any code you have on the issue.  There may be something simple that will fix the problem.  It sounds a lot like a race condition.


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 6 of 8
(3,269 Views)

I am using same dynamic event to send another data to the vi.

from another while loop.

ie. writing data to generate user event from two loops in which one is triggering event and other is not.

will this cause race condition.

 

0 Kudos
Message 7 of 8
(3,260 Views)

Possibly.  Post your code, please.

 

BS

0 Kudos
Message 8 of 8
(3,228 Views)