11-25-2014 07:43 AM
Hello,
I have problem that I don't understand tith dynamic event registration.
In my app I have many threads that are initialised when app starts and I switch between them using subpanel.
In one of this modules I want to register some dynamic events to find whitch controll in cluster was pressed.
Why I get error 1001?
I have static reference for all modules in main thread. I start modules but I don't open their FP.
Solved! Go to Solution.
11-25-2014 07:53 AM
Well your image is confusing because you can't run without wiring that reference. But if you did do that then the error comes from the fact that your VI doesn't have a front panel that is open when you register for it. So that control reference doesn't really exists. I mean it exists but you can't reference a control that hasn't been opened.
I think what you'll want to do is open the front panel, but then set it to hidden. Then after the front panel has been opened, and hidden, register for the control event.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
11-25-2014 08:14 AM
Reference was wired, bad quality image or I misclicked something 🙂
Thanks for help.
I made this module to open its FP before registering for that control event. This time it works without error. Problem was that i couldn't set this module into subpanel since it is open.
Thied in that way: init module and make hidden FP, register event, close FP and it seems to be working and it is confusing... What happens when I close FP is it still in memory?
11-25-2014 08:51 AM - edited 11-25-2014 08:52 AM
If it's still running then yes, it is still in memory. I've just done something very similar to you (loading user interface VIs into a subpanel) and did the same method - open the front panel as hidden and then close it before putting it into the subpanel.
12-02-2014 01:44 AM
Dear pawhan,
as the other posters have said, this occurs because LV will not let you register an event for a control that has not be loaded into VI Server via the opening of that control's VI. As a workaround, you will need to open the subVI and hide it before the event registration occurs. As long as the VI is in memory for some reason (open reference or other, here is some more information).
Regards:
12-02-2014 02:27 AM
Thanks guys for help 🙂 Now I understand