Electronic Camming – Related TML Instructions and Data

Parameters

CSPD                Maximum speed in slave mode when UPGRADE.2=1

CAMOFFCam offset. The input in the cam table before applying the scaling MPOS0 is computed by subtracting cam offset from the master position. Measured in master position units
CAMSTARTPointer to cam table start address in RAM memory. When several cam tables are loaded in RAM, CAMSTART indicates which one is used. You can switch between cam tables by setting CAMSTART to the start address of another cam table. CAMSTART is automatically set by the INITCAM command, which copies the cam table from the EEPROM to the RAM memory

CAMX                Cam input correction factor. Cam input X (TML variable CAMINPUT) is:

X = CAMINPUT = MPOS0 * CAMX

where MPOS0 = MREF - CAMOFF

CAMY                Cam output correction factor. Cam table output Y is:

Y = f(X) * CAMY

MASTERRESMaster resolution used by slave(s) (long) Measured in master position units.
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.
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, a speed limitation may be set on slave. When UPGRADE.2=0, the speed limitation is disabled

ACR                Auxiliary Control Register – includes several TML programming options. When ACR.12 = 0, the camming is relative. When ACR.12 = 1, the camming is absolute. When ACR.2 = 0, the external reference is quadrature encoder. When ACR.2 = 1, the external reference is pulse & direction

Variables

MREF        Master position received or computed by the slave(s). Measured in master position units
MSPD        Master speed computed by the slaves. Measured in master speed units
MPOS0        Master position on the slave(s) after subtracting cam offset CAMOFF.  Measured in master position units
CAMINPUT Cam table input
APOS2        Master 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
TPOS        Target position – position reference computed by the reference generator at each slow loop sampling period. Measured in position units
TSPD        Target 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_MTActual 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 CS        Set electronic camming slave mode

SGM                Set electronic gearing/camming master mode

RGM                Reset electronic gearing/camming master mode

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

INITCAM LoadAddress, RunAddress        Copy a cam table from EEPROM starting with LoadAddress to RAM starting with RunAddress. Both values are unsigned integers

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:

CSPD must be positive
In order to activate the TUM1 mode, execute the TML instruction TUM1 AFTER the MODE CS command and BEFORE the UPD command. When MODE CS 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 camming slave. Master position is read from 2nd

// encoder inputs. Master resolution : 2000 counts/rev

 

CAMSTART = 0xF000; //Initialize CAM table start address

EXTREF 2; // master position read from P&D or 2nd encoder

CAMOFF = 200; //Cam offset from master

CAMX = 0.5; //Cam input correction factor

CAMY = 1.5; //Cam output correction factor

MASTERRES = 2000; // master resolution

MODE CS; //Set electronic camming slave mode

TUM1; //Set Target Update Mode 1

SRB ACR, 0xEFFF, 0x0000; //Camming mode: Relative

UPD; //execute immediate

See also:

Electronic Camming – TML Programming Details

TML Description