Variables
Wandelscript supports building complex expressions with multiple operations and brackets. Why? Robot programs often depend on the robot's environment and geometrical properties and thus work with mathematical operations as first-class citizens.
To calculate values at runtime, define the value with an expression with =
.
Global
To make Wandelscript more concise and easier to read, global variables can be set.
There are also several predefined global variables with a special meaning. Their names start with a double '_'
to indicate that they have a special meaning. Some of these special varaibles have predefined function counterparts with which they can be adjusted. These functions provide a more stable interface to set the special variables and therefore using them is the recommended way.
The following overview shows the predefined global variables currently supported:
Variable | Description |
---|---|
__tcp_velocity (float) - velocity(value) | The maximum velocity a robot movement should reach at the TCP. The default value of infinity (inf ) signifies that the robot is allowed to move at his maximum velocity. |
__tcp_acceleration (float) - acceleration(value) | The maximum acceleration the robot is allowed to employ at the TCP. The default value of infinity (inf ) signifies that the robot is allowed to accelerate as much as he can. |
__blending_radius (float) - blending(value) | The blending radius which is applied to the robot movements. The default blending radius right now is 0. |
__default_orientation (string) - set_default_orientation(value) | The default orientation strategy that is used in a motion from a source pose to a target pose. The default orientation strategy is "last" which has the effect that each motion takes the orientation from the last motion as long there is no new orientation specified. The first pose of the robot program needs to have a orientation specified. It can also be set with the function set_default_orientation(value) . Right now, only "last" is supported as orientation strategy. |