From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

DQMH Consortium Toolkits Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Adding a CML/helper loop module to standard DQMH project

Solved!
Go to solution

Hi,

This is a pretty basic question - but I've not managed to track down the answer so far. The world of DQMH is new to me (but looks great!), so apologies for any dumb questions!

 

I'm setting up a DQMH based project (my first) using the standard DQMH project template. I'm learning as I go, but thanks to videos and blogs things are starting to make sense  (Thanks to Fabiola, Joerg and Tom) .

 

As I go through, I realise that one of my modules would benefit from a helper loop to run some continuous DAQ.

I could add a helper loop manually to the module that needs it, but being lazy, I thought it made sense to add one using the DQMH tools.

 

The CML DQMH project template contains a suitable module template.

 

What I can't figure out, is how to get the cml helper loop example from the CML project template into my existing project.

 

Please could anyone point me towards the right resource, or drop some hints on how best to do this?

 

Thanks

Ian

0 Kudos
Message 1 of 32
(2,696 Views)
Solution
Accepted by _Ian_

You have to add the helper loop manually. But there is already an accepted feature request for this. So you have that to look forward to.

Message 2 of 32
(2,683 Views)

Thank you.

That's no bad thing - it makes me learn how to set it up properly.

And also means that I wasn't completely failing in my hunt for suitable resources! 🙂

 

Having said that, in the more generic case, I assume that individual modules should be reusable in future projects.

Is this achieved by creating custom templates?

(And I assume that the reason we can't do this with the CML example is that its module library isn't currently available for us to access in order to do that)

 

Thanks

Ian

0 Kudos
Message 3 of 32
(2,655 Views)

@_Ian_ wrote:

Having said that, in the more generic case, I assume that individual modules should be reusable in future projects.

Is this achieved by creating custom templates?


exactly 👍

Message 4 of 32
(2,642 Views)
Solution
Accepted by _Ian_

@Ludwig72  a écrit :

@_Ian_ wrote:

Having said that, in the more generic case, I assume that individual modules should be reusable in future projects.

Is this achieved by creating custom templates?


exactly 👍


Just a bit of clarification on the custom template feature.

IMO, you create a template when you want to use a module as a starting point for new module development.

For example, you can create a module that has requests to insert and remove the main.vi in a sub panel. Each time you want to create a module with this feature, you add it starting with this template instead of one of the provided ones.

 

A reusable module is more a module with a specific purpose you want to use in different applications without modifying it.

For example, a module that logs events in a file. In this case, I wouldn't use a custom template. I would just copy/paste it from its original location or add it as a submodule in my project repository or any other way to handle a reusable library.

 

In all cases, remember that those "reusable" must not be coupled with other modules/resources if you want to avoid headaches.


Olivier Jourdan

Wovalab founder | DQMH Consortium board member | LinkedIn |

Stop writing your LabVIEW code documentation, use Antidoc!
Message 5 of 32
(2,570 Views)

Thank you Olivier, I hadn't appreciated that difference.

 

You correctly spotted that I was confusing the two - reusable modules are currently of more interest to me as I become more familiar with DQMH generally.

 

When you say 'just copy/paste', would that follow these basic steps:

  • Copy the module folder (e.g. 'my logging module') from the 'Libraries' folder of my earlier DQMH project, and paste it into the Libraries folder of my new project.
  • Drag the *.lvlib file (e.g. my logging module.lvlib) into the modules list of my new project.
  • Drag the 'Test my logging module.vi' into the Testers virtual folder of my new project.
  • Carry on as normal

 

I'll try it and see if it works - if so, thats probably the answer that I was looking for - allowing me to reuse an existing module with a helper loop so I don't have to create it each time. I thought that the process may have been more involved than that! 

 

Thanks

Ian

0 Kudos
Message 6 of 32
(2,534 Views)

@Olivier-JOURDAN wrote:

In all cases, remember that those "reusable" must not be coupled with other modules/resources if you want to avoid headaches.


Developing uncoupled modules is challenging. This requires thinking in layers and using the reusable modules as base layers. Or are there other approaches?

0 Kudos
Message 7 of 32
(2,530 Views)

@Ludwig72 wrote:
Developing uncoupled modules is challenging. This requires thinking in layers and using the reusable modules as base layers. Or are there other approaches?

We've done loooots of wrapping DQMH in LVOOP recently for a huge customer project, to avoid static linking between different regions in our application. 




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 8 of 32
(2,515 Views)

@_Ian_  a écrit :

When you say 'just copy/paste', would that follow these basic steps:

  • Copy the module folder (e.g. 'my logging module') from the 'Libraries' folder of my earlier DQMH project, and paste it into the Libraries folder of my new project.
  • Drag the *.lvlib file (e.g. my logging module.lvlib) into the modules list of my new project.
  • Drag the 'Test my logging module.vi' into the Testers virtual folder of my new project.
  • Carry on as normal

You got it!

 

If your module is not coupled with other code. All the code is in the folder module (and the vi.lib for the DQMH-related code).


Olivier Jourdan

Wovalab founder | DQMH Consortium board member | LinkedIn |

Stop writing your LabVIEW code documentation, use Antidoc!
Message 9 of 32
(2,502 Views)

Thanks everyone - a great set of answers.

Its always pleasing when things turn out to be more straightforward than expected!😀

 

Thanks also for the extra comments around coupling - I suspect thats something that comes with experience and practice! My current application is relatively simple so I might manage to make one or two modules reusable (and the others are unlikely to need to be reusable).

 

Ian

0 Kudos
Message 10 of 32
(2,461 Views)