03-30-2018 10:31 AM
Hello, LabVIEW developers who use DQMH (need to come with a term... DQMHers?),
Last month I taught at the NI office in the UK. One of the attendees, Douglas, has been looking into DQMH for a while. He told me that what finally made it click was this presentation http://bit.ly/fabniweek2015_2 and its related videos. What he said was "What made it click. Was when you had more than one module running in the app. You explained how to do it in the application.
All the previous videos you'd explain other aspects of how to do this and that. But never building an app with more than one module."
By the way, another good video of someone building an application with more than one module would be Darren's presentation at NI week last year where he built a full application from 0 to executable in less than an hour... live! http://bit.ly/rapidDQMH
Others have told me that they have a hard time figuring out where to start or get misled by opening the project template, going to the Main Application, seeing a state machine and assuming that DQMH is just another State Machine. By the way, the purpose of the Main application of that project is to show that the calling code does not have to be a DQMH module.
This led me to this post. I would like to learn from you about what made DQMH click for you? Was there a specific presentation, video, part of the documentation, just jumping and doing a project, a blog post, a post in this forum,...
I hope you share with us what did the trick. This way, when others stumble into this post, they might have an easier time figuring out where to start. We could also include the top "DQMH Starting Points" as a blog post or in the DQMH documentation.
Thanks in advance and happy wiring,
Fab
04-02-2018 10:37 AM - edited 04-02-2018 11:37 AM
When did DQMH ‘Click’ for me?
Honestly, not sure there was just one click. I will start with a bit of background.
I learned about and started to use Actor framework around 2011/2012 for a project at a company I was working for at the time. It was a new approach at the time and it seemed to work well for my needs, however for a beginning developer it was bit too complex. In this instance that was ok because it was just me.
I changed to a new company in 2013, here I had to program to the customers comprehension, it was while I was working for this new job that Fab told me about DQMH, try it she said, give me your feedback. Unfortunately I was working with a customer that had something in place and was targeting a different approach. One of my coworkers at the company I was employed at had also created a framework. We had talked about it a few times and it was his go to, as it should be since he created it.
In 2017, I started at a new company, one of my tasks was to find a useful architecture for all levels. I remembered my conversation with Fab and DQMH. I watched a couple videos she had done. I installed the DQMH Package and I started to check it out. I did what everyone does, start with the template. I messed around with that a bit, saw the state machine in the example and realized that was one example of how you could create a main.vi for it
My first module was a spin on a datalogger class I had created, by using a DQMH Clone, I could do more with my already useful class. My second module was based off of a simple DAQmx Module I had created, now this is where I found more flexibility, I made a DQMH Clone to handle my DAQmx Tasks, I had a design that used XML for the information to configure a DAQ task and utilized that, Great now I have cloned tasks, I added a Module I call my DAQ Processor, I send any DAQ Writes or reads to the Processor, it determines which task it is and executes the function. (That’s 3 clicks)
Wow, this is powerful, yet I can have some beginners look and understand the architecture, they don’t even need to see my code, they can grab the module and put it anywhere. (Click #4)
I am always a proponent of code reuse and while I have always wanted to build my own architecture, I have found that DQMH works for my needs and currently I have no reason to reinvent the wheel.
So I had several clicks, some came after using it and I still find other ways and more efficient ways to use the first 2 clone modules I have created. I presented to our local user group last year on DQMH, then did a short presentation on an idea recently, it was a different spin on a multi UI design uses DQMH, but that is still in the works
04-25-2018 07:34 PM
I was hoping we would get more answers to this question. I wanted to get ideas on how to better structure the DQMH Documentation.
I added the videos Douglas suggested to the documentation and we added a couple of new videos. More details on the DQMH 4.0 Documentation Change History
If you come across other videos, posts, presentations, etc that help you, please add them to this discussion so others can benefit too.
Happy wiring,
Fab
05-25-2018 09:17 AM
Just saw the new documentation.. I like it.
My take is that DQMH makes you go out from the traditional state machine thinking into a modular base REST api style that lets you breakout the code more easily.
For documentation, I would like to see more examples on how to approach and structure my application to use it with DQMH. Like for example If i am going to use like 3 insturments. do i make a module for each instrument or do i make a module for the 3 instruments?
looks like in the last post you did that hehe https://delacor.com/tips-and-tricks-for-a-successful-dqmh-based-project/
05-31-2018 08:19 AM
@buton wrote:
Like for example If i am going to use like 3 instruments. do i make a module for each instrument or do i make a module for the 3 instruments?
I have done this. For me, I created a DQMH Module for the Instrument type. then in the DQMH Module, I would have a Class for the instrument base then a child class for each instrument base on the function. So far this has worked well, However, I am now working on other systems where I have 2 or 3 of the same equipment in one system so I will more then likely do the same but the DQMH will be a Cloneable. (which I probably should have done for all of them, but I will forge forward with what I have done already and might change them in the future.
I have found that from the stand point of code reuse smaller dedicated modules work for me