LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DQMH Event Triggered but not working

Solved!
Go to solution

Hello, everyone.
I've been banging my head for days with this problem: I made a VI launching a DQMH Request, heard by a second VI.
The request is correctly generated and received (I put in that ‘one button dialog’ to check and it is indeed executed) but nothing else is executed, it hangs immediately... why?
I'll leave some pictures below to help you understand: the request called is that ‘send command’, which has all the parameters correctly linked, is then received (one button dialog works) but does nothing else, neither the ‘unbundle by name’, nor the ‘addressed to this module?’, I just don't understand why.

 

Thanks in advance

0 Kudos
Message 1 of 6
(433 Views)

You have a LabVIEW Project built "on top of" a tested Framework (your code appears to be based on the LabVIEW "Simple State Machine" Project template, but you reference a DQMH Request, which is based on a different Project Template).  It doesn't work (probably because you make one or more errors in implementation), but you don't attach the Project nor any code from the Project for us to examine and maybe even try to run, with standard debugging tools to see where you made your mistake(s).

 

Pictures of (tiny?) pieces of code are almost useless, particularly because they don't show us the totality of what is happening.

 

What version of LabVIEW are you using?  Many of us are not running the latest versions (my latest is LabVIEW 2021), so you may need to "Save for Previous Version" for us to open and examine your code.

 

Bob Schor

Message 2 of 6
(397 Views)

Are you firing the wait notifier in your "Read" MHL frame? If not, the calling code will sit and wait until the Request and Wait for Reply timeout, which will give it the appearance of hanging. And if you have set a custom timeout of -1, it will wait forever.

 

I agree with Bob, having code to inspect would help in being able to identify the issue much more quickly.

Message 3 of 6
(391 Views)
What version of LabVIEW are you using?  Many of us are not running the latest versions (my latest is LabVIEW 2021), so you may need to "Save for Previous Version" for us to open and examine your code.

I'm using LabVIEW 2018 so there should be no problem for you to examinate it, i'll leave attached the zip code so you both can have a look, i start everything from "Start Digital Controller and FSM.vi", that calls Digital I-O Controller's main and "FSM Main" in Libraries folder

The problem i'm trying to solve is: "Send Command" is fired from "Read" case of FSM, it should get a value from "Digital I-O Controller" but in Digital I-O Controller's DQMH_EVENT_MAIN the event is fired but nothing happens, even if i probe before the "unbundle by name" i get a "not executed" (but the "one button dialog" works, so i know the event was fired)

0 Kudos
Message 4 of 6
(349 Views)

@cpiccoli wrote:


The problem i'm trying to solve is: "Send Command" is fired from "Read" case of FSM, it should get a value from "Digital I-O Controller" but in Digital I-O Controller's DQMH_EVENT_MAIN the event is fired but nothing happens, even if i probe before the "unbundle by name" i get a "not executed" (but the "one button dialog" works, so i know the event was fired)


I can not say what is wrong, but I think I can tell you how to improve your debugging.

 

Placing a probe in a clonable module does not work, because the running instance is a new instance in memory and the probe is placed in "the master copy" (this is my wording, I don't have a better name) of the instance. The probe in "the master copy" will never execute. (Which clone would you expect to show the value in the probe, when you are running e.g. 5 instances of the clone?)

 

You should format the data from the unbundler of the event case in a string and feed the string to your one button dialog. This way you can see when then event is executed and all the data which the event received.

 

Hope this helps.

Message 5 of 6
(326 Views)
Solution
Accepted by topic author cpiccoli

And.. the problem was me and not the code... or at least we can say a 50/50.

I have a folder with all the VIs and i made a clone folder so i can't mess the code... and i took the "Send command" vi from the wrong folder, so obviously the code wasn't working!
Thankfully the fix was easy and fast.

Thanks to you all for the help anyway

Message 6 of 6
(313 Views)