DQMH Consortium Toolkits Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

fire event within the main application using DQMH?

I am new to DQMH. In my application I have

1. Controller - Reads configuration file and calls respective instrument. Using EHL and MHL (producer/consumer pattern).

2. Power Supply - Gets the event message from controller. Sends the event back to controller.

3. Scope - Gets the event message from controller. Sends the event back to controller.

 

My question:

1. Controller -  How do I invoke an event programmatically within the controller? For example when the broadcast is received by the controller (lets say from Scope), if Scope message status is success then I need to programmatically generate event so that controller can invoke the event (say Next Test) case.


Thanks.

*************************************************
CLD
*************************************************
0 Kudos
Message 1 of 5
(1,338 Views)

If all three entities you describe (Controller, Power Supply, and Scope) are DQMH Modules, then any module can send a request (or register for a broadcast) from any other module. So I guess I don't fully understand the question?

0 Kudos
Message 2 of 5
(1,333 Views)

Hi Ivrat,

 

In your description, for the Power supply and scope modules you state "Gets the event message from controller. Sends the event back to controller."

 

Two questions:

1) Is the controller calling Request and Wait For Reply events from the Power supply and Scope?  If yes, then so far so good.  If no, then could you elaborate what you mean by "Sends the event back to controller"?

2) Assuming you said yes to the previous question, the controller would be eventually receiving a reply from the Power supply and Scope to indicate that the action has been completed, and then the Controller can continue to do the next task.

 

If you're creating a test sequencer here, then I recommend you don't use self-queuing in the MHL to act as a sequencer.  Instead, you'll want a state machine to manage the test sequence.

 

 

Christopher Farmer

Certified LabVIEW Architect and LabVIEW Champion
DQMH Trusted Advisor
https://wiredinsoftware.com.au

0 Kudos
Message 3 of 5
(1,313 Views)

Thank you for all your help.

I used Request messages send from controller. Power supply and scope broadcast the reply back. Currently I am not using "Request and wait for reply events" as controller needs to perform next task after sending events to scope.

 

Although another follow up questions:

When a stop test is selected on controller, all modules (eg.scope, DMM) need to stop their current execution so that next test can be performed. If scope is waiting for trigger then how do I break it out of it before timeout? I am using TDS3052 and its LV driver. 

*************************************************
CLD
*************************************************
0 Kudos
Message 4 of 5
(1,265 Views)
  1. Put a while loop around the Wait for Acquisition complete.
  2. Set the Acquisition timeout to 1 second or less
  3. Pass in a Stop property node, or use a notification method perhaps
  4. If the timeout has occurred, but the Stop msg didn't come through then keep running the while loop.
  5. If the Stop msg does come through, it will only delay for the length of the Acquisition timeout.
  6. Break out of while loop and continue on
Christopher Farmer

Certified LabVIEW Architect and LabVIEW Champion
DQMH Trusted Advisor
https://wiredinsoftware.com.au

0 Kudos
Message 5 of 5
(1,254 Views)