10-31-2022 08:59 AM
Hey Fancy Folk,
First, I already posted this in the general LV forums, but thought posting it here as well could be beneficial since I think it’s a DQMH-Windows interaction that’s causing my code to freeze. https://forums.ni.com/t5/LabVIEW/DQMH-Front-Panel-Freezing-when-loading-previous-save-file/td-p/4263...
I’m having an issue with a DQMH module initializing a secondary module which causes my FP to freeze until the load is complete. Once the secondary module is launched and sends its "did init" broadcast, the main module performs a check for previous save in the main module's MHL. During this process, the FP freezes halting all user events being handled by the main module’s EHL. Once the load is complete, the main module's EHL then reads all of the events sent to the main DQMH module and updates the FP very quickly.
I am by no means an expert in DQMH and may have laid out my modules poorly with regards to who is responsible for what. However, I’m at the point now where I think it’s an issue with how LabVIEW interacts with Windows but I’ve been known to be wrong before.
Background:
The basic idea for my code is that I have a durability module that launches an ai module and 3 station modules which each launch their own sub-modules. These station modules and their submodules are copies of the cloneable module while the durability and ai modules are singletons.
The durability module is registered for the ai module’s broadcast and will rebroadcast the data to a station module in the EHL if the station is enabled.
When a station is enabled, the durability module launches the station then waits on the init of the station to self-enqueue a durability message to launch a load previous save routine in the durability module. Note, the loading of the previous save is done in the durability module's MHL and not the EHL. I originally had the loading in the EHL and I was freezing the FP since I blocked execution of the EHL from reading and rebroadcasting the ai data. With the MHL doing the legwork of loading a previous save, the EHL should be free to continue to send data to the FP and my station submodules However, that is not the case. Below are some images of the block diagram regarding how a station is started and what happens when the "station did init" event is fired off.
Below are the MHL Vi’s in the “Launch station Post Initialization” case that aren’t requests to other DQMH modules along with the FP for the popup message.
What I’ve tried:
As I previously stated, I originally had the code in the MHL in the EHL’s “station module did init” EHL case. I changed that up to free up the EHL so it could continue to receive the ai module’s broadcasts. From there, I’ve tried basic probing of the MHL on the error line to see when the error path was ran to get a basic “this is where the holdup is” via the probe’s timestamp. It appears that the holdup is when I run the “check if previous save file exists” vi. I’m starting to think that when LabVIEW interacts with Windows to get the file names then queries the return against the key (*SerialNumber*.tdms), that it takes priority over the EHL of the DQMH. Has anyone else noticed this issue?
Potential work arounds:
I am assuming people will ask for the code and I don't know how I can share it without heavily redacting a bunch of stuff. I'll do what I can regarding sharing what code people ask for.
Any advice is more than welcome,
Matt
11-01-2022 07:33 PM
Hi Matt_AM,
May I suggest two things:
1) Re-post the images but in higher res - those images in your post are difficult to read.
2) Run AntiDoc on your application and share the hierarchy diagram so we can see the modules and their relationships.