DQMH Consortium Toolkits Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

How to stop sub module from main module without main module getting hidden

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

0 Kudos
Message 1 of 10
(2,588 Views)

What are the modules - are they both singleton, or is the sub module a cloneable perhaps?

Christopher Farmer

Certified LabVIEW Architect and LabVIEW Champion
DQMH Trusted Advisor
https://wiredinsoftware.com.au

0 Kudos
Message 2 of 10
(2,583 Views)

Both are singleton modules. But also tried with cloneable modules, the result is same

0 Kudos
Message 3 of 10
(2,562 Views)

What version of LabVIEW and DQMH are you using?

Christopher Farmer

Certified LabVIEW Architect and LabVIEW Champion
DQMH Trusted Advisor
https://wiredinsoftware.com.au

0 Kudos
Message 4 of 10
(2,537 Views)

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.

 

Christopher Farmer

Certified LabVIEW Architect and LabVIEW Champion
DQMH Trusted Advisor
https://wiredinsoftware.com.au

0 Kudos
Message 5 of 10
(2,534 Views)

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.

 

Roshan777_1-1637910950306.png

 

0 Kudos
Message 6 of 10
(2,521 Views)

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.


Olivier Jourdan

Wovalab founder | DQMH Consortium board member | LinkedIn |

Stop writing your LabVIEW code documentation, use Antidoc!
0 Kudos
Message 7 of 10
(2,512 Views)

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.

0 Kudos
Message 8 of 10
(2,503 Views)

@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.


Olivier Jourdan

Wovalab founder | DQMH Consortium board member | LinkedIn |

Stop writing your LabVIEW code documentation, use Antidoc!
0 Kudos
Message 9 of 10
(2,488 Views)

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').

0 Kudos
Message 10 of 10
(2,470 Views)