Special I/O – Related TML Instructions and Data (Firmware version FAxx)

Parameters

DIGIN_ACTIVE_LEVEL        Sets active levels for enable and limit switch inputs as follows:

Enable input (#16/ENABLE) – bit 15: 0 – low, 1 – high
Limit switch input for negative direction (#24/LSN)  - on bit 14: 0 – low, 1 – high
Limit switch input for positive direction (#2/LSP)  - on bit 13: 0 – low, 1 – high

LSACTIVE        When set to a non-zero value, disables limit switch inputs capability to protect against accidental moves outside a defined working area. In this case, the limit switch inputs are treated like 2 extra general-purpose inputs

CDEC                Command deceleration for quick stop mode. Measured in acceleration units

ICR        Interrupt Control Register. The TML interrupts can be enabled or disabled by setting or resetting the corresponding bits from this register

ACR        Auxiliary Control Register. If ACR.1 = 1 the drive/motor is set to start automatically after power-on with an external reference. If ACR.3 = 1 there is a specific request to execute AXISON at recover from disable status. In both cases, an AXISON is executed when enable input goes from inactive to active status.

Variables

CAPPOSPosition captured when programmed transition occurs on 1st capture/encoder index input. Measured in motor position units, except the case of stepper motors, when it is measured in position units
CAPPOS2Position captured when programmed transition occurs on 2nd capture/encoder index input. Measured in position units when load position is captured, or in master position units when master position is captured
APOS2Master position computed by the slaves from pulse & direction or quadrature encoder inputs. Measured in master position units
TPOSTarget position – position reference computed by the reference generator at each slow loop sampling period. Measured in position units

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

APOS_MT        Actual motor position. Measured in motor position units.

Instructions

!CAP                Set event on capture inputs

ENCAPI0        Enable 1st capture/encoder index input to detect a high to low transition

EN2CAPI0        Enable 2nd capture/encoder index input to detect a high to low transition

ENCAPI1        Enable 1st capture/encoder index input to detect a low to high transition

EN2CAPI1        Enable 2nd capture/encoder index input to detect a low to high transition

!LSN                Set event on negative limit switch input

!LSP                Set event on positive limit switch input

ENLSP0        Enable positive limit switch input to detect a high to low transition

ENLSN0        Enable negative limit switch input to detect a high to low transition

ENLSP1        Enable positive limit switch input to detect a low to high transition

ENLSN1        Enable negative limit switch input to detect a low to high transition

DISCAPI        Disable 1st capture/encoder index input to detect transitions

DIS2CAPI        Disable 2nd capture/encoder index input to detect transitions

DISLSP        Disable positive limit switch input to detect transitions

DISLSN        Disable negative limit switch input to detect transitions

UPD!Update the motion mode and/or the motion parameters when the programmed event occurs
STOP!Stop motion with the acceleration/deceleration set in CACC, when the programmed event occurs
WAIT! value16Wait until the programmed event occurs. If the command is followed by value16, the wait ends after the time interval specified in this 16-bit integer value. Value16 is measured in time units

SRB                Set/reset bits from a TML data

Programming Example

//Stop motion on next encoder index

ENCAPI1; //Set event: When the encoder index goes low->high

!CAP;

STOP!;//Stop the motion when event occurs

WAIT!;//Wait until the event occurs

CPOS = CAPPOS; // new command position = captured position

CPA; //position command is absolute

MODE PP;

TUM1; //set Target Update Mode 1

UPD; //execute immediate

!MC; WAIT!; //wait for completion

 

See also:

Special I/O – TML Programming Details

TML Description