DQMH Consortium Toolkits Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Tester - Did Init not quite doing as expected

Solved!
Go to solution

Hi,

 

Maybe I should have put this in the suggested changes thread, but I am not sure if people will see this differently from me.

 

I may be wrong here but I suggest a change to the Tester Vi in the "Did Init" user case event. I noticed that whatever you put into the "Did Init Module" Initialized? input you always get the Message Did Init out

 

image.png

 

so the code not be something like this

 

image.png

 

I had also sort of expected that supplying a False into the "Did Init Module" would result in the DQMH module stopping running.  It seems strange to me that you can pass in a fails to init Boolean and yet the module is still running unless you explicitly generate an error. Specifically as the Tester will use that false to update the "Module running?" Boolean to false.

 

I feel that if a false is passed into the Did Init Module it should take care of stopping the module. 

 

cheers 

 

Danny

Danny Thomson AshVire Ltd
0 Kudos
Message 1 of 5
(4,076 Views)

OK,  I have just realized my second point about the "Did Init Module" stopping the DQMH is WRONG and against how things should work.

 

I realized this after implementing to stop within the "Did Init Module" when it struck me it was not needed at all and I can just put it as below.

 

image.png

 

It is up to the Init caller to decide if the Failed to Init reply requires a stop of the DQMH or not, so ignore the second part of my post 🙂 

Danny Thomson AshVire Ltd
0 Kudos
Message 2 of 5
(4,069 Views)
Solution
Accepted by topic author danny_t

Hi Danny,

 

tldr.. We will add your suggestion of changing the "Did Init" text to depend on the "Init?" event node.

 

Longer text, just because I needed to write somewhere this internal debate and this post seemed like the right place for that 😉

 

I have been thinking about this post (I probably should have let you know that I was thinking about it 😉 )...

 

There are two schools of thought, even within Delacor. Some of us think that it is OK to perform other initialization tasks within the DQMH Initialization case,  others think that we should only worry about establishing the communication with the DQMH module itself and create a Request or Request and Wait for Reply for any additional initialization tasks.

 

I have been in both camps, today I am in the second camp. One of the reasons I use DQMH is so I don't have to worry about:

* Starting a Module

* Stopping it when I want it to stop

* Error handling

 

This means I would also not need to worry about stopping and restarting a module that did not start correctly. DQMH modules out of the box do start every single time.

 

That said, I think you are right and we should change the "Did Init" text to depend on whether the "Init?" event node was true or not.

 

Thanks,

Fab

For an opportunity to learn from experienced developers / entrepeneurs (Steve, Joerg, and Brian amongst them):
Check out DSH Pragmatic Software Development Workshop!

DQMH Lead Architect * DQMH Trusted Advisor * Certified LabVIEW Architect * Certified LabVIEW Embedded Developer * Certified Professional Instructor * LabVIEW Champion * Code Janitor

Have you been nice to future you?
0 Kudos
Message 3 of 5
(4,021 Views)

I'd like to add that we're firmly in the second camp, too.

 

We have an explicit "Configure" request for any intialization that is not DQMH but module-specific. The reason for this is timing: Sometimes, we want to load modules first, but tell them to "Configure" when other modules are available, for example, or when other external conditions are met. Also, we have one configuration file per module, which is read in "Configure", so modules can take the responsibility for their configuration data themselves.

 

Eg in our Windows application template, we start all given modules dynamically, and then call the "Configure" request for each of them. 

 

(We have made our examples and templates public/open source. PM me for the link to the repo if you're interested).




DSH Pragmatic Software Development Workshops (Fab, Steve, Brian and me)
Release Automation Tools for LabVIEW (CI/CD integration with LabVIEW)
HSE Discord Server (Discuss our free and commercial tools and services)
DQMH® (The Future of Team-Based LabVIEW Development)


Message 4 of 5
(4,015 Views)

Joerg,

 

I like the configure idea, I like that you have standardized on it as well.

Danny Thomson AshVire Ltd
0 Kudos
Message 5 of 5
(4,007 Views)