code:dqmh:generic-networking:how-to-request
42 Howto: Requests
Request and Wait for Reply
How to add a “Request and Wait for Reply” to a Generic-Networking enabled DQMH module
The Notifier helper VIs mentioned below can be found at:
\Generic Networking Example_Source\Libraries\hse-libraries\hse-gennet\hse-gennet.lvlib
Steps needed
-
Add new DQMH Event “Request and Wait for Reply”
-
(in EHL) Add “DQMH-GenNet Add Notifier To Variant.vi” in newly created User Event:
-
Copy “Wait Notifier” from “DQMH-GenNet Add Notifier To Variant.vi” to Clipboard and replace given “Wait Notifier” from “… Argument–cluster.ctl”
-
Wire cluster output to Event Data in and Wait Notifier input terminals of “DQMH-GenNet Add Notifier to Variant.vi”
-
Wire Variant Out terminal of “DQMH-GenNet Add Notifier to Variant.vi” to Message Data input of DQMH Enqueue Message
(in MHL) AddDQMH-GenNet Get Notifier from Variant.vi
-
Replace Variant to Data.vi with “DQMH-GenNet get Notifier from Variant.vi”
-
Wire Wait Notifier output of “DQMH-GenNet Get Notifier from Variant.vi” to replace notifier input of Send Notification
-
Optional: Add
Data To Variant
for reply contents (otherwise it'll be implicit typecast)
Open the Request VI and fix:-
Disconnect DQMH_WAIT_ARG cluster from DQMH_OBTAIN Obtain Notifier.vi
-
Wire a variant constant to element data type input of Obtain Notifier.vi
-
Add Variant to Data to notification output of DQMH_WAIT Wait on Notification.vi and wire DQMH_WAIT_ARG cluster as data type
-
See image below or use “Do something with answer” as template
The screenshots show reworking a
Get FIFO Contents
requestcode/dqmh/generic-networking/how-to-request.txt · Last modified: 2021/05/15 16:14 by joerg.hampel
-