MC_GearInPos
This function block commands a gear ratio between the position of the slave and master axes from the synchronization point onwards.
Syntax
Definition:
FUNCTION_BLOCK MC_GearInPos
VAR_INPUT
Master : Type_Master1D;
Slave : Reference To AXIS_REF;
Execute : BOOL;
RatioNumerator : LREAL;
RatioDenominator : UDINT;
MasterSyncPosition : LREAL;
SlaveSyncPosition : LREAL;
Velocity : LREAL;
Acceleration : LREAL;
Deceleration : LREAL;
Jerk : LREAL;
BufferMode : EBufferMode;
ReactionToMasterError : EReactionToMasterError;
ReactionToSlaveError : EReactionToSlaveError;
AllowedSlaveSyncDirections : ESyncDirection;
END_VAR
VAR_OUTPUT
InSync : BOOL;
SyncState : EGearInPosSyncState;
Busy : BOOL;
Active : BOOL;
CommandAborted : BOOL;
Error : BOOL;
ErrorId : UDINT;
MasterHasError : BOOL;
END_VAR
Inputs
Name | Type | Default | Description |
|---|---|---|---|
Master | Type_Master1D |
| Reference to the master axis |
Slave | Reference To AXIS_REF |
| Reference to the slave axis |
Execute | BOOL |
| Trigger the command with rising edge. |
RatioNumerator | LREAL | 1.0 | Gear ratio numerator |
RatioDenominator | UDINT | 1 | Gear ratio denominator |
MasterSyncPosition | LREAL | #Invalid | Position of master axis where master and slave axis are synchronized. |
SlaveSyncPosition | LREAL | #Invalid | Position of slave axis where master and slave axis are synchronized. |
Velocity | LREAL | #Maximum | Maximum velocity during synchronization ([PosUnit]/s, positive) |
Acceleration | LREAL | #Default | Maximum acceleration during synchronization ([PosUnit]/s^2, positive) |
Deceleration | LREAL | #Default | Maximum deceleration during synchronization ([PosUnit]/s^2, positive) |
Jerk | LREAL | #Default | Maximum jerk during synchronization ([PosUnit]/s^3, positive) |
BufferMode | EBufferMode | Aborting | Chronological sequence of the command |
ReactionToMasterError | EReactionToMasterError | TriggerSlaveError | Reaction if an error occurs in the master while this command is active. |
ReactionToSlaveError | EReactionToSlaveError | TriggerMasterError | Reaction if an error occurs in the slave while this command is active. |
AllowedSlaveSyncDirections | ESyncDirection | TowardsSlaveSyncPosition | Allowed directions for establishing initial synchronization |
Outputs
Name | Type | Description |
|---|---|---|
InSync | BOOL | True if SyncState == InSync (slave coupled to the master AND master has passed its master sync position). |
SyncState | Synchronization state. See EGearInPosSyncState for details. | |
Busy | BOOL | Function block is not finished and new output values are to be expected. |
Active | BOOL | Function block has active control on the axis. |
CommandAborted | BOOL | Command is aborted by another command. |
Error | BOOL | Error occurred within function block. |
ErrorId | UDINT | Error identifier |
MasterHasError | BOOL | Master is in error state. |
Ergänzungen zu ReactionToSlaveError und ReactionToMasterError
Grundsätzlich gilt bei einem Fehler der Slave-Achse:
- Slave-Achse: Die Kopplung wird aufgelöst und die Reaktion ist abhängig vom Fehlertypen.
- Master-Achse: Die Master-Achse meldet einen Fehler und folgt einer Stopprampe der MC oder führt ihre laufende Bewegung ohne Beeinflussung fort.
Bei einem Fehler der Master-Achse gilt:
- Master-Achse: Reaktion ist abhängig vom Fehlertypen.
- Slave-Achse: Die Slave-Achse meldet einen Fehler und folgt einer Stopprampe der MC oder den Sollwerten der Master-Achse.
Ausführliche Informationen sind im Kapitel Fehlerverhalten dokumentiert.
Versionsinformation
- TwinCAT Standard >= v3.1.4026.23.1
- TF5500 MC3 Base >= v4.0.6