05 May 2016
System functions in RCML are available in RCML environment via system module. These functions are accessed in the same way as the external functions of the module, specifying “system” name.
The system module has the following functions:
- system.input – a function of reading a number from a string resulting through standard input. The line read should consist of digits and optionally of the sign + or -. Then, it is converted to a number, which is returned as a result of function call. This function has no parameters.
- system.echo – a function of data output transferred as arguments to the standard output. It can have any variable number of parameters including the numbers and string constants.
- system.set – a function of change in RCML environment system parameters. It has two arguments: the name of a system parameter and its new value. The name of a system parameter is defined by a string constant, and the new value of this parameter depends on the system parameter specified. Now there is only one system parameter in RCML environment:
- “behavior” – function execution behavior by default. The second parameter is the mode flag, character ~ or #. See Section "Batch Data Transmission to Robots" for details about execution modes.
- system.sleep – a temporary pause in the program execution process. It has one numeric parameter – the pause time in milliseconds.
- system.hand_control – enabling manual control for a robot. This function transfers the robot in hand control mode by the said control module. Execution of the main program for the period of hand control is suspended. This function has a variable number of parameters:
- First parameter – a special variable associated with the appropriate physical robot. Mandatory parameter;
- Second parameter – a string constant – control module name. Mandatory parameter;
- Third parameter – a string constant - robot axis;
- Fourth parameter – the name of control device axis as a string constant or an expression that will set the values for robot axis specified in the previous parameter.
- Fifth and sixth, seventh and eighth, etc. parameters are always set in pairs: robot axis and the source of values for it.
- system.send_package – a command to send the accumulated command package to robots. The only parameter is the flag for the mode of execution of commands from the package, ~ or #. Read more about this function in Section "Specifying Function Execution Modes".