General Concept of Handshake
Each function of a module can be started with a handshake on two nodes, ready and request
(Table 1). A function can also be started with a single write to its
execute method instead, see
Execute methods. The handshake of all
LumiScan applications is described in Handshake; LumiScan
Calibration follows its sequence exactly.
| Address | Description |
|---|---|
|
Read-Only. Set by the module: |
|
Writable. Set by the client to start the function. |
<module address> is hdvisionsystems/lumiscan-calibration/<module name>, and the function name
is transform or reset. A function’s inputs are under <module address>/input/ and its results
under <module address>/output/. For each function’s nodes, see
Table 2.
Running a function
-
Wait until
control/<function name>/readyistrue. -
If the function has inputs, write them, for example
input/x-coordinateandinput/y-coordinate. -
Set
control/<function name>/requesttotrue. -
Wait until
control/<function name>/readyisfalse: the module has seen the request. -
Set
control/<function name>/requesttofalse. -
The module runs the function.
-
When the function has finished,
control/<function name>/readyistrueagain. -
Read
control/status/code, and the results underoutput/.
%% The ready/request handshake. Rendered by Mermaid in the browser; edit and preview at https://mermaid.live sequenceDiagram autonumber participant C as Client (PLC or program) participant M as Module M-->>C: ready = true: the function can be started C->>M: request = true M-->>C: ready = false: the request was seen C->>M: request = false Note over M: runs the function M-->>C: ready = true: the function has finished C->>M: read control/status/code and output/
Good to know:
-
The module waits for
requestto fall for as long as it takes. It has no timeout, because a request stilltrueafter one would be read as a new request. -
A reset requested while a transform waits for its
requestto fall takes precedence: the transform is dropped, and the reset runs next. -
An error status stays on
control/status/codeuntil the next request.
|
Make sure that only one process writes A program that cannot coordinate with others can use the |