04-08-2010 07:17 AM
Have an AE which has errors:
Init - registers dynamic user events and Runs VI.
Write - Attempts to generate user event to write data to VI which is running (Error 1)
Close - Attempts to retrieve control value (safety cluster_out) from running VI and then close (abort).
The VI gets to run but the generate user event produces an error. I can't figure out why and I doubt this is the proper way to be doing this.
04-09-2010 09:15 AM
04-09-2010 12:02 PM
Hi Battler,
I have a few basic questions that might help me give you some advice. Are you registering your user events anywhere? What does the internal VI look like? Also, what error number and message are you getting?
04-09-2010 12:23 PM
Does the AE go Idle between when it works and when you get the errors?
THe erro code would give a better indication of the nature of the error.
Ben
04-10-2010 02:01 AM - edited 04-10-2010 02:03 AM
The VI which I am calling dynamically (in the top image) has the Quit and the Safety Cluster User events registered to an event structure on it's block diagram.
Init - I create the User events and pass them to the panel of the dynamically called VI.
The Error code is 1 which occurs on the Close case - when trying to read the control data of the dynamically called VI.
04-12-2010 12:45 PM
Battler,
What happens if you register the events in the AE and pass that registry to your subVI?
04-13-2010 07:37 PM
That's what I'm trying to do.
I register the events in subVI by loading their control values. Appears successful (case 1).
The Write case and the Close case return "Error 1" upon attempting to generate user events.
Will post VI asap.
04-14-2010 05:21 PM
I would try registering the events outside of the subVI and passing the registration reference into the subVI. You could then store the reference in a shift register on the AE. This should keep your program from losing track of the reference, which could be causing the error you're seeing. I'd be interested to find out if that corrects the problem.
04-15-2010 01:34 AM - edited 04-15-2010 01:35 AM
If you look closely at the image I have posted ("Init" case) that is exactly what I have done..
04-15-2010 10:37 AM
Hi Battler,
I see that you've created the user events, but registering them involes the Register for Events VI, which is located in the same palette. It looks like a property node but has a satellite icon in the heading. It's very possible I'm missing something. Could you post your main and subVIs so I can take a look at them?
Pardon the messy snippet.
I have another question, too. It looks like you're closing the reference to your subVI in the init frame. Is there a reason this needs to be done?