Converting an Existing DQMH Event
To convert an existing event:
Go to Tools>Delacor>DQMH>Event>>Convert DQMH Event….
- Select the DQMH Module containing the event you wish to convert. This drop down menu will only list valid DQMH modules found within the project.
- Specify the event you wish to convert. This drop down menu will let you select between all the request events in the module.
- Note that several requests are considered part of the DQMH core, and cannot be converted:
- Core Requests:
- Show Module Panel.vi
- Hide Module Panel.vi
- Get Module Execution Status.vi
- Stop Module.vi
- Specify the new type of event, for now, the only option is to convert from a Request to a Request and Wait for Reply event.
- Note that any custom code within the Event VI will be overwritten. Ensure you have copied any custom code from this VI before clicking OK. The Event VI is the VI named after the request event that you chose to convert.
- Also note that a new frame will be added to the Message Handling Loop of the module Main VI for the specified event. The Module Main VI will be broken until you remove the old frame. This is doen so you can copy any code you want to preserve from the old frame to the new frame.
- Click OK and the specified event will be converted to the new type.
- In the DQMH Module Main.vi:
- Open the block diagram and find the event frame configured for this request.
- Verify that the request event is now a request and wait for reply event and has a Wait for Notifier and a Wait for Reply node and they are both wired to the bundle message data.
- There are now two cases associated with <request name> in the MHL case structure, one will have a #Code_Review_Todo tag indicating that the Delacor tools converted this request into a request and wait for reply and that you need to copy any custom code from this case to the new case. Once you have moved any custom case, right-click on the case structure, and select Delete This Case.
- Go to the new case associated with <request name> in the MHL case structure and verify that the error argument is wired and that the code behaves as expected.
- Right click on the reply argument cluster and open the associated typedef. Edit the <request name>(Reply Payload)--cluster.ctl to include the arguments you want the request and wait for reply to return.
- Save the reply payload cluster and complete the code within the MHL case.
- In the Tester VI:
- Open the block diagram and find the event frame configured to test calling this request.
- Decide how you want to display the new reply and whether you want to wire the new wait for reply (T) input.