IO data for the McePosTable function.
Version history
0.2.0
Changes
- Input
nAbortingMode
- Rename
nPosTableMode
tonMode
- Variable type of
nSmPosTable
fromUINT
toINT
- Input
bReset
show full history
0.1.0-beta
Changes
- first version
Overview
name | type | default | comment |
---|---|---|---|
nRobotNumber | USINT | 0 | input: motion device targeted by this function [0 to 3] |
bSystemReady | BOOL | 0 | input: system ready for running motion commands |
bRun | BOOL | input: run PosTable. Reset PosTable when False | |
bStep | BOOL | input: trigger next step | |
bRecalcQA | BOOL | input: recalculate QA (queueing amount) | |
nAbortingMode | SINT | 0 | input: select aborting mode [0=controlled stop, 1=immediate reset of PosTable] |
nMode | SINT | 0 | input: PosTable operation mode [0=with blending, 1=not blending, 2=single motion (wait for step after each motion)] |
nNrOfCycles | INT | 1 | input: for setting the number of cycles for the PosTable [0=repeat forever, 1=single cycle, >1=n cycles] |
bCustomActionDone | BOOL | input: custom action at standstill done | |
bActionStart | BOOL | output: start action at standstill | |
nActionID | INT | output: action with standstill [0=none, 1-19=built-in action, >19=custom action] | |
nPercentComplete | SINT | output: Percentage of motion that is completed (for active motion command) | |
nStateTime | DINT | output: elapsed time in current state [ms] | |
bIdle | BOOL | output: state machine: idle | |
bBusy | BOOL | output: state machine: busy | |
bWaitForStep | BOOL | output: Wait for user bStep trigger | |
bDone | BOOL | output: PosTable has completed the specified number of cycles | |
bError | BOOL | output: state machine: error | |
nErrorCode | UDINT | 0 | output: state machine error code |
nSmPosTable | INT | 0 | in/out: state machine 1: PosTable |
nIndex | INT | in/out: PosTable index for current motion | |
nLoadIndex | INT | in/out: PosTable index for loading next motion(s) | |
nCycleNr | INT | in/out: number of cycles ran by PosTable |
Details
nRobotNumber
USINT
Used as input
Specifies the motion device targeted by this function.
value | explanation |
---|---|
0-3 | Robot number (use MLxRobotGetProperties to see the mapping). |
bSystemReady
BOOL
Used as input
System ready for running motion commands.
This signal is produced by
MceStartStop
.
bRun
BOOL
Used as input
Run the PosTable trajectory.
In a normal scenario, bRun
needs to stay True
until PosTable has
completed (bDone
).
Setting bRun
to False
will reset the PosTable:
nIndex
andnLoadIndex
are set to0
nCycleNr
is resetbError
is reset
If bRun
is set to False
while the PosTable hasn’t finished yet,
it will abort PosTable and then reset.
The abort behavior is defined by
nAbortingMode
.
bStep
BOOL
Trigger next step. This is typically required when running PosTable step-by-step.
The user is informed by the
bWaitForStep
output.
bRecalcQA
BOOL
Used as input
Manual trigger to recalculate the “queueing amount” (QA).
A use case is if an ActionID was removed while PosTable is running.
By executing a RecalcQA
it will prevent a short standstill of the robot at
the entry where the action was removed.
nAbortingMode
SINT
Used as input
Select how the PosTable will be aborted when
bRun
becomes False
while PosTable was still running.
value | explanation |
---|---|
0 | Controlled stop until standstill. It gently waits until the already buffered motions have finished. This is the prefered way. |
1 | Immediately reset PosTable. This breaks the active motion commands and can result in dangling commands in the MotoLogix command buffer. It would require an MLxReset to clean up things afterwards. |
nMode
SINT
Used as input
Specifies the PosTable operation mode.
A PosTable trajectory would normally be executed using motion blending, resulting in a fast and smooth trajectory. But sometimes (e.g. for testing purposes) you might want to run it without blending or even step-by-step. That is possible by setting the corresponding mode.
Changing mode from blending to another mode will first finish the
already buffered motions before the new mode is visible.
This effect can be seen as synchronizing nIndex
to nLoadIndex
.
value | explanation |
---|---|
0 | With blending (nLoadIndex will be ahead of nIndex ) |
1 | Not blending (nLoadIndex = nIndex ) |
2 | Single motion (wait for step after each motion) |
nNrOfCycles
INT
Used as input
Specifies number of cycles for the PosTable.
A PosTable trajectory would normally be executed just once. But sometimes you might want to run it a specific number of cycles, or even endless.
value | explanation |
---|---|
0 | Repeat forever |
1 | Single cycle |
>1 | n cycles |
bCustomActionDone
BOOL
Used as input
If you are using custom actions then this is the handshake signal to tell PosTable that your custom action has finished. After this signal, PosTable will continue the trajectory.
bActionStart
BOOL
Used as output
State that the robot is in standstill and an ActionID
is in process.
If you are using custom actions then this is the trigger to start your action.
nActionID
INT
Used as output
Current ActionID number, used as interface for running custom actions
which you program yourself outside of McePosTable
.
value | explanation |
---|---|
0 | no active action |
1-19 | active default (built-in) action number |
>=20 | active custom action number |
nPercentComplete
SINT
Used as output
Percentage of the current motion that is completed.
nStateTime
DINT
Used as output
Elapsed time in current state.
Value is in ms
.
bIdle
BOOL
bBusy
BOOL
Used as output
State machine in busy state.
bWaitForStep
BOOL
Used as output
System is waiting for a user
bstep
trigger.
bDone
BOOL
Used as output
PosTable has completed the specified number of cycles.
Stays True
until PosTable is reset by switching
bRun
to False
.
bError
BOOL
Used as output
State machine in error state. For details see
nErrorCode
.
nErrorCode
UDINT
Used as output
Details on the state machine error.
Format aa.bbb
value | explanation |
---|---|
a | number of the state machine (1=first, 2=second etc.) |
b | state where the error occured |
nSmPosTable
INT
State machine 1: Run the trajectory of PosTable
value | explanation |
---|---|
0 | idle, not ready for start |
1 | idle, ready for start |
10-29 | handle motion commands |
30 | waiting before performing action at standstill |
31 | perform action at standstill |
40 | cycle completed |
50 | waiting at end of cycle |
60 | reset cycle |
99 | state machine error |
nIndex
INT
PosTable index for current motion.
State which entry is currently moving the robot.
nLoadIndex
INT
PosTable index of the last loaded motion.
Useful to track the number of motions loaded in advance.
nCycleNr
INT
Number of cycles ran by PosTable.
Source code
Declarations
(*IO data for the McePosTable function*)
TYPE McePosTableIO :
(*
* -----------------------------------------------------------------------------
* Name : McePosTableIO
* Version : 0.2.0
* Date : 2024-03-01
* Author : Rioual
* Family : YaskawaMce
* Organisation : github.com/YaskawaEurope/mlx-examples
*
* -----------------------------------------------------------------------------
* IO data for the McePosTable function
* -----------------------------------------------------------------------------
*)
STRUCT
nRobotNumber : USINT := 0; (*input: motion device targeted by this function [0 to 3]*)
bSystemReady : BOOL := 0; (*input: system ready for running motion commands*)
bRun : BOOL; (*input: run PosTable. Reset PosTable when False*)
bStep : BOOL; (*input: trigger next step*)
bRecalcQA : BOOL; (*input: recalculate QA (queueing amount)*)
nAbortingMode : SINT := 0; (*input: select aborting mode [0=controlled stop, 1=immediate reset of PosTable]*)
nMode : SINT := 0; (*input: PosTable operation mode [0=with blending, 1=not blending, 2=single motion (wait for step after each motion)]*)
nNrOfCycles : INT := 1; (*input: for setting the number of cycles for the PosTable [0=repeat forever, 1=single cycle, >1=n cycles]*)
bCustomActionDone : BOOL; (*input: custom action at standstill done*)
bActionStart : BOOL; (*output: start action at standstill*)
nActionID : INT; (*output: action with standstill [0=none, 1-19=built-in action, >19=custom action]*)
nPercentComplete : SINT; (*output: Percentage of motion that is completed (for active motion command)*)
nStateTime : DINT; (*output: elapsed time in current state [ms]*)
bIdle : BOOL; (*output: state machine: idle*)
bBusy : BOOL; (*output: state machine: busy*)
bWaitForStep : BOOL; (*output: Wait for user bStep trigger*)
bDone : BOOL; (*output: PosTable has completed the specified number of cycles*)
bError : BOOL; (*output: state machine: error*)
nErrorCode : UDINT := 0; (*output: state machine error code*)
nSmPosTable : INT := 0; (*in/out: state machine 1: PosTable*)
nIndex : INT; (*in/out: PosTable index for current motion*)
nLoadIndex : INT; (*in/out: PosTable index for loading next motion(s)*)
nCycleNr : INT; (*in/out: number of cycles ran by PosTable*)
END_STRUCT
END_TYPE