IO data for the MceActualPositions function.
Version history
0.1.0
Changes
- first version
Overview
| name | type | default | comment |
|---|---|---|---|
| bUseFeedbackPosition | BOOL | 0 | input: use feedback- instead of command position (for ServoFloat motions) |
| bPosUpdating | BOOL | output: position reading active | |
| nLockTarget | SINT | 0 | input: lock specific robot/frame (0=disabled, 10=R1 world, 12=R1 uf, 20=R2 world, 22=R2 uf, 30=R3 world, 32=R3 uf, 40=R4 world, 42=R4 uf) |
| nSmActualPosition | UINT | 0 | in/out: state machine 1: getting actual position information |
| aPositions | ARRAY [0..3] OF MceActualPositionData | output: actual positions per robot | |
| aTcpSpeeds | ARRAY [0..3] OF REAL | output: actual TCP speed [mm/s] (requires S2C1702=1) |
Details
bUseFeedbackPosition
BOOLUsed as input
By default, the system returns the actual command position, which is fine for most applications. However, if you are running a ServoFloat motion, you might want to read the feedback position.
bPosUpdating
BOOLUsed as output
Position reading active.
nLockTarget
SINTThis variable can be used to temporarily lock the sequence on a specific robot and frame to get the fastest TCP position and speed updates.
This stops the TCP position updates of all other robots and frames.
| value | explanation |
|---|---|
| 0 | disabled |
| 10 | first robot (R1), world frame |
| 12 | first robot (R1), active user frame |
| 20 | second robot (R2), world frame |
| 22 | second robot (R2), active user frame |
| 30 | third robot (R3), world frame |
| 32 | third robot (R3), active user frame |
| 40 | fourth robot (R4), world frame |
| 42 | fourth robot (R4), active user frame |
nSmActualPosition
UINTState machine 1: Getting actual position information from the MotoLogix system.
| value | explanation |
|---|---|
| 0 | idle |
| 10 | read TCP position in world |
| 20 | read TCP position in active user frame |
aPositions
ARRAY [0..3] OF MceActualPositionDataUsed as output
Actual positions per robot.
Check the data type for more information.
aTcpSpeeds
ARRAY [0..3] OF REALUsed as output
Actual TCP speed per robot, in mm/s.
This requires parameter S2C1702=1.
TCP speed is only applicable for manipulators (e.g. R1).
Source code
Declarations
(*IO data for the MceActualPositions function*)
TYPE MceActualPositionsIO :
(*
* -----------------------------------------------------------------------------
* Name : MceActualPositionsIO
* Version : 0.1.0
* Date : 2022-02-24
* Author : deGroot
* Family : YaskawaMce
* Organisation : github.com/YaskawaEurope/mlx-examples
*
* -----------------------------------------------------------------------------
* IO data for the MceActualPositions function
* -----------------------------------------------------------------------------
*)
STRUCT
bUseFeedbackPosition : BOOL := 0; (*input: use feedback- instead of command position (for ServoFloat motions)*)
bPosUpdating : BOOL; (*output: position reading active*)
nLockTarget : SINT := 0; (*input: lock specific robot/frame (0=disabled, 10=R1 world, 12=R1 uf, 20=R2 world, 22=R2 uf, 30=R3 world, 32=R3 uf, 40=R4 world, 42=R4 uf)*)
nSmActualPosition : UINT := 0; (*in/out: state machine 1: getting actual position information*)
aPositions : ARRAY [0..3] OF MceActualPositionData; (*output: actual positions per robot*)
aTcpSpeeds : ARRAY [0..3] OF REAL; (*output: actual TCP speed [mm/s] (requires S2C1702=1)*)
END_STRUCT
END_TYPE