10-19-2011 04:19 PM
I used to dynamically start the enclosed VI and place it in a Sub Panel. It started perfectly.
Now I want to start multiple instances of this VI and have each front panel open and available to the user for interaction. However, now when I start this VI I get error 1001 in the clone at the Register for events node in the initialization sequence. The front panel of the clone is open, so what is the problem?
10-20-2011 03:50 PM - edited 10-20-2011 03:51 PM
Hello,
Here is a link to General Labview Error Codes
1001 is an error that the front panel is not open, it seems odd that the error is being thrown if the front panel is open, it might be getting thrown earlier in your code, and then only showing up later. You could try making sure the front panel is open before the rest of your code executes, and see if that fixes it.
I cannot execute your code because it has a lot of dependencies not included in your post. But making sure the front panel is open before registering front panel events should fix it.
Regards,
Matt
10-26-2011 04:54 PM
error problem fixed, however ...
The front panel for both the clone and the originating VI are open and running. Plus "Register for Events" only applies to the original VI. I don't want the original VI to be open and I want "Register for Events" to apply to the clone. Is this possible in LabVIEW? I've included the subVI that starts the clone.
10-27-2011 03:05 PM
Register for Events needs to be called in each sub-vi you spawn, for it to handle its own events. I don't believe you are able to close the main VI if you have events registered, as it will cause errors. So no, I don't believe what you are asking is possible in LabVIEW.
Regards,
Matt
10-28-2011 01:21 PM
okay, can I just get a reference to the main VI; don't open its front panel, don't run it. If I have to open the front panel, hide it so the user can't see it. Spawn a clone, as needed, and register events for the clone? How would I spawn a clone without using Run VI method?
10-31-2011 05:14 PM
Hi faustina,
I think I may have found an example that can help you in the developer community: https://decibel.ni.com/content/docs/DOC-10832
Just hide your front panel with a transparency accessed by property nodes.
Jason L