11-25-2021 12:17 AM
Actually I am calling sub module from main module. I wanted to stop sub module and start it again from main module. When I am stopping sub module using stop module.vi of sub module, my main module goes to hidden state. Is their way to stop sub module without main module go to hidden
11-25-2021 12:38 AM
What are the modules - are they both singleton, or is the sub module a cloneable perhaps?
11-25-2021 06:00 AM
Both are singleton modules. But also tried with cloneable modules, the result is same
11-25-2021 04:47 PM
What version of LabVIEW and DQMH are you using?
11-25-2021 04:58 PM - edited 11-25-2021 05:00 PM
I just tried a basic example of a module starting/stopping another module, and had no issue with the top module's becoming hidden (using LabVIEW 2020 SP1 f1 32 bit and DQMH 6).
I have however in the past seen similar behaviour using an API Tester to stop/start modules and this caused the API Tester front panel to go hidden - but possibly this was an older version of DQMH/LabVIEW than I am using now. I have not experienced this in quite some time.
11-26-2021 12:55 AM - edited 11-26-2021 01:16 AM
I am using LabVIEW 2020 SP1 32-bit and DQMH 6. I modified start module so that I can call sub module front panel through subpanel reference.
11-26-2021 01:53 AM
Hello Roshan,
That's weird, indeed.
Have you tried to generate a project from the template "DQMH" provided when you install the framework? It demonstrates how to start and stop modules. Even if the start is made from a simple VI it should work the same from a module.
I also want to point out that the screenshot you posted is not the latest Start Module implementation (not the one you should get from a new module created with DQMH 6.0 at least). You run Validate module tool to see if things are ok with your modules.
Hope this will help.
If you can, please share your code so I can look into it and figure out what's happening.
11-26-2021 02:47 AM
Hi Olivier,
The screenshot I posted is not the latest Start Module implementation. I changed it because I want to use subpanel ref and it is working fine, only issue I am facing is when I am stopping sub module using stop module.vi of sub module, my main module goes to hidden state.
11-26-2021 09:39 AM
@Roshan777 a écrit :
Hi Olivier,
The screenshot I posted is not the latest Start Module implementation. I changed it because I want to use subpanel ref and it is working fine, only issue I am facing is when I am stopping sub module using stop module.vi of sub module, my main module goes to hidden state.
I think I get your issue. I'm just saying that before going further, you need to update your start module with the validate module tool because lots of things changed in this part of the framework. You can totally update your code after that to use the subpanel. If your issue is still happening, we won't doubt that it could be due to this outdated Start Module function.
11-29-2021 11:15 AM
I've seen this problem before. If Module A's front panel is displayed in a subpanel in Module B, and you call Stop Module.vi on Module A while its panel is still displayed in the subpanel, then when the Handle Exit.vi is called on Module A, that will cause the panel of Module B to become hidden. This is because when you call the FP.Open method on a VI that is displayed in a subpanel, then whatever state you specify for the FP.Open will be applied to the panel containing the subpanel containing the VI. In this case, the panel state being applied in Handle Exit.vi is 'Hidden', meaning Module A's panel will be hidden. There are two ways to get around the issue:
1. Make sure you remove Module A's panel from the subpanel before calling Stop Module.vi on Module A. This is the preferred solution in my opinion.
2. Modify the Handle Exit.vi for Module A to not call FP.Open (with a state of 'Hidden').