InterKOM Technology

<< Click to Display Table of Contents >>

Navigation:  3. Script Language > IPC, InterKOM and Exit Code >

InterKOM Technology

WFM. - Wait-For-Message

Previous Top Next


MiniRobotLanguage (MRL)

 

WFM. Command

Wait For Message

 

 

Intention

 

Wait for a Text-Message sent from another running robot instance, using TWM.

This command is only for advanced use.

 

Hint: You can directly manipulate variables in other running robots, using PRV.

 

 

 

Syntax

 

WFM.P1|P2[|P3]

 

 

Parameter Explanation

 

P1 - Prototypes

 

t - (in) timeout in ms

d - (out) dwdata

h - (out) sender window-handle - must be variable

s - (out) 1/0 if the timeout was flagged

m - (out) Text which has been received

f - (in) filter, if used only sender with these

     communication-handle will be accepted. All other

     messages will be dropped.

 

P2 - Data depending on Prototypes

 

P3 - Data depending on Prototypes

 

Please note that you can get the communication-handle of the actual robot-instance by using the #cbw# Systemvariable.

The most easy way to get the communication handle from the parent-robot is by variable inheritance (see example below).

You can also get a commandline-parameter with the handle from the instance which has started this instance using $cmdl$. This is the way to go if you use a WinRobots compatible robot as father.

 

 

 

Example

 

'**********************************************

' TWM./WFM. - Sample

' Shows that the Parallel-Robot starts with

' all variables as they have been at starting-time

' of the starting robot.

' It can also use all Subroutines in this file.

'**********************************************

VAR.$$INP=0

VAR.$$CMH=#cbw#

PRT. My Name is Robbi $$CMH.

'-----------------------------------------------------------

PRR.

 PRT.I am Parallel-Robot Robbi: #cbw#

 PRT. I am going to send to: $$CMH

 PAU.2

 TWM.#This is my message!#|$$CMH

 PRT.Parallelrobot Ending.

 PAU.12

 END.

PRE.$$RET|0

PRT. I am waiting for a MEssage from Robbi: $$RET

'-----------------------------------------------------------

WFM.md|$$WAI|19

MBX.I got: $$WAI

END.

'-----------------------------------------------------------

 

 

 

Remarks

 

-

 

 

Limitations:

 

Actually WFM. can not receive messages from other, for example WinRobots compatible automation systems. It will only receive messages in the proper message format.

 

 

 

See also:

 

    TWM. - Text-Window-Message

    PRR. - Parallel-Robot-Run

    PRE. - Parallelrobot-Run-End

    PRV. - Parallel-Robot send Variable

    WFV. - Wait-For-VariableChange

    SGS - Set Global Signal (Mutex)