Jump to content

User event being ignored


Recommended Posts

All,

 

Attached is 2012 labview code that uses a producer loop to tell a consumer loop to fire a dynamic event.

 

If it is run with execution highlight on, the event is recognized by the event structure in the producer loop.

 

If highlight is turned off (full speed run) the event is either not firing or is not being recognized.

 

I have put a 1 ms wait in the consumer loop to delay the firing of the event, and it then works.

 

I thought that event were supposed to be queued so that they could not be lost.  Could someone look at the code I posted and tell me if I am missing something? I tried communicating this to NI but they didn't seem concerned.

 

Thanks,

Michael

 

LV_EventIssue.zip

Link to comment
Move Register Events outside the loop - it should only be done once.

 

I'd just be guessing to explain why this works, but perhaps the re-registration will not contain a previously generated Event (in the case of no Delay).

 

I would say it is because this is not re-registering at all, but creates a new registration at every iteration (because register refnum is not wired into the registration node). This code is leaking references at each iteration of the upper loop (check Desktop Execution Trace Toolkit)

 

Just follow the suggestion from Greg and move the registration out of the loop and you should be fine.

 

/J

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.