position_deviation_warning(enabled, threshold=0.8)
When enabled, this function generates warning messages to the log when the robot deviates from the target position. This function can be called at any point in the execution of a program. It has no return value.
>>> position_deviation_warning(True)
In the above example, the function has been enabled. This means that log messages will be generated whenever a position deviation occurs. The optional "threshold" parameter can be used to specify the level of position deviation that triggers a log message.
Parameters
enabled: (Boolean) Enable or disable position deviation log messages.
threshold: (Float) Optional value in the range [0;1], where 0 is no position deviation and 1 is the maximum position deviation (equivalent to the amount of position deviation that causes a protective stop of the robot). If no threshold is specified by the user, a default value of 0.8 is used.
Example command: position_deviation_warning(True, 0.8)
- Example Parameters:
- Enabled = True → Logging of warning is turned on
- Threshold = 0.8 80% of deviation that causes a protective stop causes a warning to be logged in the log history file.