Delacor Toolkits Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Feature request: Automate the Helper Loop creation

Highlighted

Have a Create DQMH Helper Loop option in the DQMH menu

 

This is the thread for discussing Delacor adding in the automation of a generic helper loop.

 

First, this suggestion is regarding adding a helper loop to your DQMH module as described by Joerg Hampel in his blog: https://www.hampel-soft.com/blog/dqmh-actors-self-messaging-or-helper-loops/

 

Second, Joerg has a suggestion that would technically cover this request: https://forums.ni.com/t5/Delacor-Toolkits-Discussions/Scripting-API/m-p/3655950.  But I am still suggesting this in order to save "everyone" from repeating the steps necessary to create the updated scripting that would automatically add the helper loop, and instead have that done once by Delacor.

 

Although I think the idea is basically covered, I will just say that I decided to ask for this request when I went to add in yet another helper loop into a different module.  I thought about trying to create a new template, but that would require knowing that I wanted/needed a helper loop before creating the module.  That has not happened for me (it is very likely that I am not planning my modules well enough, but that is a different story).

 

Then I thought about using the scripting tools to create a generic helper loop.  I have not done much with scripting, so that would be a small research project and I don't really have time for that within this projects scope.  That was when I remembered all of the posts thanking Joerg for his helper loop post and realized that there are likely a good percentage of DQMH users that would also like this feature. 

 

Basically the script would add the helper loop, the wake event, the sleep event, and then register for the Stop Module event of the module that was selected to have a helper loop added to it.  Add in the #CodeNeeded note to the Timeout case and possibly #CodeRecommended notes in the sleep/stop cases and that should be good to go.  Oh, and put the requests in a PrivateRequest folder in the project.

 

Let me know what you think.  And if you like this idea, be sure to go and give some Kudo's to this feature request here: https://forums.ni.com/t5/Delacor-Toolkits-Documents/DQMH-Feature-Requests/tac-p/3843370/highlight/tr...

 

 

 

Message 1 of 18
(1,929 Views)
Highlighted

An interim solution would be to write the generic helper loop once (being careful not to include any module specific code) 

 

Then highlight the loop and use this quickdrop shortcut (https://forums.ni.com/t5/Quick-Drop-Enthusiasts/Quick-Drop-Keyboard-Shortcut-Create-Place-VI-Content...) to create a Place VI Contents VI and throw it into a pallette.

 

Then just drop it from the pallettes whenever you need one.

Sam Taggart
CLA, CPI, CTD, LabVIEW Champion
DQMH Trusted Advisor
automatedenver.com
GCentral
Message 2 of 18
(1,915 Views)
Highlighted

Doyles,

 

Thanks for the detailed feature request, we have added it to our wishlist, let's see how it does with kudos and we will look into it after we release DQMH 4.1.

 

Agree with Sam's interim suggestion.

 

As far as the module template creation, that is what we have done internally. For example, we find ourselves creating Serial communication DQMH modules for different projects and we already have a template for a serial device that needs streaming handling. That template already has a helper loop. Like you said, that does require knowing ahead of time that is what we need 😉

 

Thanks,

Fab



Opportunity to learn from experienced developers / entrepeneurs (Steve, Joerg, and Brian amongst them):
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 18
(1,889 Views)
Highlighted

@doyles wrote:

 

Let me know what you think.  And if you like this idea, be sure to go and give some Kudo's to this feature request here: https://forums.ni.com/t5/Delacor-Toolkits-Documents/DQMH-Feature-Requests/tac-p/3843370/highlight/tr... 


I'd give 5 kudos if I could 😉

 

And, I'm sorry to say, I don't find myself using a generic helper loop. I want to see the third (or fourth or fifth) loop directly on the block diagram, I want to have the Register for Event node on the same block diagram as the event structure which then registers for it, and - depending on what is needed - use different mechanisms for transferring data to the helper loop from the MHL. 

 

Maybe I just don't understand how a generic Helper Loop SubVI would help here?

 

Anyway, +5 for the helper loop scripting exactly as you described it.


An opportunity to learn from experienced developers / entrepreneurs (Fab, Steve and Brian amongst them):
DSH Pragmatic Software Development Workshops
Automate the analyzing, testing, documenting, building, packaging and publishing of your projects via CI/CD:
Release Automation Tools for LabVIEW

0 Kudos
Message 4 of 18
(1,881 Views)
Highlighted

@joerg.hampel wrote:


I want to see the third (or fourth or fifth) loop directly on the block diagram, I want to have the Register for Event node on the same block diagram as the event structure which then registers for it, and - depending on what is needed - use different mechanisms for transferring data to the helper loop from the MHL. 

 


 

 

That pretty well describes what I have in mind as well actually.  The different mechanisms to transfer data from the MHL would be specific to the situation, so those would not be installed.  By generic, I was trying to imply only the common components that every helper loop must have.

 

I would want something like this to be on the block diagram of the module I selected to have a helper loop added to:

 

Generic Helper Loop exampleGeneric Helper Loop example

 

Message 5 of 18
(1,877 Views)
Highlighted

Thanks for the link Sam.  That would certainly get the loop onto the block diagram.  But the Wake Helper Loop and Sleep Helper Loop events would still need to be created, the Private Requests folder would need to be created and set to Private scope, the event-request VIs moved to that folder, and all of the scripted cases for the two newly created events in the EHL, MHL, and Tester VI would still need to be deleted.

 

Scripting those actions seems very aligned with the scripting tasks that are already in place within DQMH.  And unless I am mistaken, those steps happen every time anyone wants to use a helper loop.

 

Please let me know if I am missing something in my statements.

0 Kudos
Message 6 of 18
(1,875 Views)
Highlighted

@joerg.hampel wrote:

@doyles

And, I'm sorry to say, I don't find myself using a generic helper loop. I want to see the third (or fourth or fifth) loop directly on the block diagram, I want to have the Register for Event node on the same block diagram as the event structure which then registers for it, and - depending on what is needed - use different mechanisms for transferring data to the helper loop from the MHL. 

 

Maybe I just don't understand how a generic Helper Loop SubVI would help here?


Joerg,

I think Sam explained it on the other post, what he was referring to was creating a generic SubVI and then using a Quick Drop shortcut to place the contents of the subVI directly on the block diagram, essentially ending up with the loop on the same diagram as you want it. 

 


@joerg.hampel wrote: 

Anyway, +5 for the helper loop scripting exactly as you described it.


I guess you will have to create 5 NI.com accounts 😉 just kidding, don't even try it, it can be a nightmare to manage more than one account and it is a pain to merge them... but I digress 😉



Opportunity to learn from experienced developers / entrepeneurs (Steve, Joerg, and Brian amongst them):
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 7 of 18
(1,865 Views)
Highlighted

Have you guys considered "helper loops" built on something different than User Events?  A Tag Channel Wire, for example, can make a helper loop with much less plumbing; no scripting needed.

Message 8 of 18
(1,860 Views)
Highlighted

Personally, I am still working on LV2015 and have not enabled the channel wires.  The plan has been to convert to LV 2017 (maybe 2018) once I get this project in DQMH completed. 

0 Kudos
Message 9 of 18
(1,858 Views)
Highlighted

A Notifier could also be used, pre-2017.

0 Kudos
Message 10 of 18
(1,856 Views)