Electronic Gearing – Related TML Instructions and Data

Parameters

CACC                Maximum acceleration in slave mode when UPGRADE.2=1

SLAVEIDThe axis or group ID to which the master sends its position. When group ID is used, the SLAVEID is set with group ID value + 256.
GEAR        Slave(s) gear ratio value. Negative values means opposite direction compared with the master

GEARMASTER        Denominator of gear ratio

GEARSLAVENumerator of gear ratio. Negative values means opposite direction compared with the master

MASTERRES        Master resolution used by slave(s) Measured in master position units

MPOS0Initialization parameter. Must be set by the master with a non-zero value before enabling the master mode, if the slaves are already set in electronic gearing.
OSR        TML register. When OSR.15=1, the master sends the position reference. When OSR.15=0, the master sends the actual load position
UPGRADETML register. When UPGRADE.2=1, an acceleration limitation may be set on slave. When UPGRADE.2=0, the acceleration limitation is disabled
ACR        Auxiliary Control Register – includes several TML programming options. When ACR.2 = 0, the external reference is quadrature encoder. When ACR.2 = 1, the external reference is pulse & direction

Variables

MREFMaster position received or computed by the slave(s). Measured in master position units
MSPDMaster speed computed by the slaves. Measured in master speed units
APOS2Master position computed by the slaves from pulse & direction or quadrature encoder inputs. At power-on it is set to 0. May be set to a different value, before starting the master. Measured in master position units
TPOSTarget position – position reference computed by the reference generator at each slow loop sampling period. Measured in position units
TSPDTarget speed – speed reference computed by the reference generator at each slow loop sampling period. Measured in speed units
TACCTarget acceleration – acceleration/deceleration reference computed by the reference generator at each slow loop sampling period. Measured in acceleration units

APOS_LD        Actual load position. Measured in position units. Alternate name: APOS

ASPD_LD        Actual load speed – measured in speed units

APOS_MT        Actual motor position. Measured in motor position units.

ASPD_MT        Actual motor speed. Measured in motor speed units. Alternate name: ASPD

Instructions

EXTREF 0        Get master position via a communication channel

EXTREF 2        Compute master position from pulse & direction or quadrature encoder signals

MODE GS        Set electronic gear slave mode

SGM                Set electronic gear master mode

RGM                Reset electronic gear master mode

REG_ON        Enable superposed mode

REG_OFF        Disable superposed mode

SETSYNC value        Send synchronization messages at the time interval indicated by the 16-bit value. Measured in time units

TUM1        Target Update Mode 1 (TUM1). Generates new trajectory starting from the actual values of position and speed reference (i.e. don’t update the reference values with load/motor position and speed)

TUM0                Target Update Mode 0 (TUM0). Generates new trajectory starting from the actual values of load/motor position and speed (i.e. updates the reference values with load/motor position and speed)

UPD                Update motion parameters and start new motion mode

STOP        Stop the motion

SRB                Set/reset bits from a TML data

Remarks:

Do not change GEAR, GEARSLAVE and GEARMASTER during slave operation
CACC must be positive
In order to activate the TUM1 mode, execute the TML instruction TUM1 AFTER the MODE GS command and BEFORE the UPD command. When MODE GS is executed, it automatically sets TUM0 mode. However, as the new motion mode becomes effective only after the UPD command, a TUM1 command will overwrite the TUM0 mode
Under TUM0 mode, at the UPD command TPOS=APOS_LD and TSPD=ASPD_LD. In open loop control of steppers, TUM0 is ignored as there is no position and/or speed feedback
In setup configurations where there is no transmission ratio between the motor and the load, it is supposed that these are directly connected. In these cases: APOS_MT=APOS_LD and ASPD_MT=ASPD_LD

Programming Example

//Electronic gearing. Master position is received via //communication channel inputs.

//Master resolution: 2000 counts/rev

 

// On slave axis (Axis ID = 1):

GEAR = 0.3333; // gear ratio

GEARMASTER = 3; //gear ratio denominator

GEARSLAVE = 1; //gear ratio numerator

EXTREF 0; // master position got via communication channel

MASTERRES = 2000; // master resolution

REG_ON; //Enable superposition

MODE GS; //Set as slave, position mode

TUM1; //Set Target Update Mode 1

SRB UPGRADE, 0xFFFF, 0x0004; //UPGRADE.2 = 1

CACC = 0.9549; //Limit maximum acceleration at 3000[rad/s^2]

UPD; //execute immediate

 

// On master axis:

SLAVEID = 1;

SGM; //Enable Master in Electronic Gearing mode

SRB OSR, 0xFFFF, 0x8000; // OSR.15=1 -> Send Position Reference

[1]MPOS0 = TPOS;

UPD; //execute immediate

SETSYNC 20; //Send synchronization messages every 20[ms]

See also:

Electronic Gearing – TML Programming Details

TML Description