set_workpiece_weight(weight=0.0, cog=[0.0,0.0,0.0], cog_ref=DR_CUR_TCP, add_up=DR_REPLACE, start_time=None, transition_time=None)
Features
In addition to the tool weight/center of gravity at the end of the robot, set the weight/center of gravity of the work piece and other information. The weight and center of gravity of the entire payload is reflected by combining the set tool weight/center of gravity and the work piece's weight/center of gravity. It can be used in applications where the type of workpiece is frequently varied or the weight needs to be dynamically changed.
Caution
- Workpiece weight change is allowed only when both Collision Detection and TCP SLF Violation check are mute or deactivated during Auto Mode.
- In the current version, Collision Detection considers the function mute when Collision Sensitivity is overridden to 0 and TCP SLF considers the function mute when the TCP SLF Limit is overridden to the maximum. This override can be set using Collision Sensitivity Reduction Zone and Custom Zone.
- Otherwise, trigger an SS1 protective stop unless the workpiece weight is set to zero.
- If the robot stops due to an error and needs to be manually restored, place the robot in the desired position in the Recovery Mode and unload the workpiece through Servo On and I/O operation while the corresponding zones are activated in Auto Mode.
- When changing the set tool weight, the workpiece weight is initialized to 0.
Parameters
Parameter Name | Data Type | Default Value | Description |
---|---|---|---|
weight | int | 0 | Weight [kg] |
cog | list(float[3]) | [0, 0, 0] | Center of gravity of the workpiece (x, y, z) [mm] |
cog_ref | int | DR_CUR_TCP | Reference coordinates of center of gravity position, DR_CUR_TCP : TCP coordinates, DR_FLANGE : FLANGE coordinates, |
add_up | int | DR_REPLACE | DR_REPLACE(0): Replace workpiece DR_ADD(1): Add workpiece DR_REMOVE(2): Remove workpiece |
start_time | float | None | Starting time of changing workpiece weight [sec] |
transition_time | float | None | Transition time of changing workpiece weight [sec] |
Note
- Workpiece weight cannot exceed the maximum payload weight (margin 10%) for each model. The same is true for the weight of total payload.
- The length (x, y, z) of the center of gravity of the workpiece cannot exceed 1000 mm. The same is true for the length of the center of gravity of the entire payload.
- It is possible to change the weight of the workpiece after the set time through start_time.
- Transition_time allows you to gradually change the weight of the workpiece through transition_time.
- When using the set_tool and set_workpiece_weight functions in succession, you must use the wait(transition_time) function as much as transition_time between them. Otherwise, there may be errors in the weight change.
Return
Value | Description |
---|---|
0 | Success |
Negative value | Error |
Exception
Exception | Description |
---|---|
DR_Error (DR_ERROR_TYPE) | Parameter data type error occurred |
DR_Error (DR_ERROR_VALUE) | Parameter value is invalid |
DR_Error (DR_ERROR_RUNTIME) | C extension module error occurred |
DR_Error (DR_ERROR_STOP) | Program terminated forcefully |
Example
# Replace 1 kgf workpiece weight at the origin of the current TCP frame
set_workpiece_weight(1)
# Add 0.5 kgf workpiece weight at the origin of the current TCP frame. In total, 1.5kgf
set_workpiece_weight(0.5, add_up=DR_ADD)
# Remove 0.1 kgf workpiece weight at [0, 0, 10] in the current TCP frame. In total, 1.4kgf
set_workpiece_weight(0.1, [0, 0, 10], add_up=DR_REMOVE)
# Remove 0.1 kgf workpiece weight at [0, 0, 10] in the flange frame. In total, 1.3kgf
set_workpiece_weight(0.1, [0, 0, 10], DR_FLANGE, DR_REMOVE)
# Reset. And the weight transition is being occurred after 0.1 sec for 0.2 sec
set_workiece_weight(0, start_time=0.1, transition_time=0.2)