mgkandziora2 Posted April 9, 2014 Report Share Posted April 9, 2014 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 Quote Link to comment
GregSands Posted April 10, 2014 Report Share Posted April 10, 2014 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). Quote Link to comment
Mellroth Posted April 10, 2014 Report Share Posted April 10, 2014 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 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.