External – TML Instructions and Data

Parameters

CADIN        Half of the reference range expressed in internal units, divided by 2SFTADIN. The division result should lead to a value less than 32767. Depending on control mode selected, the reference range can be a:
Position range expressed in position units
Speed range expressed in speed units
Torque range expressed in current units
Voltage range expressed in voltage command units
SFTADINThe smallest power of 2 for which:

               (Half of the reference range in internal units) / 2STFADIN < 32767

AD5OFFReference value expressed in internal units, corresponding to the lower limit of the analogue input. Depending on control mode selected, the reference value can be a:
Position value expressed in position units
Speed value expressed in speed units
Torque value expressed in current units
Voltage value expressed in voltage command units
FILTER1Cutoff frequency for the low-pass filter on analogue input, computed with:

FILTER1 = 32767 * (1 - exp(-fc*T)),

where fc is the cutoff frequency in radians/s

       T is the slow loop sampling period in seconds.

       Remark: For the external torque mode with analogue input read in fast loop, T is the fast loop sampling period in seconds.

LEVEL_AD5Dead-band point in internal units computed with:

LEVEL_AD5=(DB_Point–InputLow)*65472/InputRange

whereDB_Point – is the dead band point expressed in V

       InputLowLimit – is the low limit of the drive/motor analogue input expressed in V

       InputRange – s the drive/motor analogue input range expressed in V.

E_LEVEL_AD5Dead-band range in internal units computed with formula:

E_LEVEL_AD5 = DB_Range * 65472 / InputRange,

whereDB_Range – is the desired dead-band range expressed in V

       InputRange – is the drive/motor analogue input range expressed in V.

UPGRADETML register. When UPGRADE.2=1, a speed limitation may be set in position external mode and an acceleration limitation in speed external mode. When UPGRADE.2=0, speed or acceleration limitation is disabled

CSPD        Maximum speed in position external when UPGRADE.2=1

CACC        Maximum acceleration in speed external when UPGRADE.2=1

 

Variables

AD516-bit unsigned integer value representing the value read from the analogue input. The output of the 10-bit A/D converter is set in the 10 MSB (most significant bits) of the AD5
EREFPTML variable where an external device writes the position reference in external mode on-line. Measured in position units
EREFSTML variable where an external device writes the speed reference in external mode on-line. Measured in speed units
EREFTTML variable where an external device writes the torque reference in external mode on-line. Measured in current units
EREFVTML variable where an external device writes the voltage reference in external mode on-line. Measured in voltage command units
TPOSTarget load position – position reference computed by the reference generator at each slow loop sampling period, when position external mode is performed. TPOS is set function of the analogue input value, with analogue reference or with the EREFP value with online reference. Measured in position units
TSPDTarget load speed – speed reference computed by the reference generator at each slow loop sampling period, when position or speed external mode is performed. In speed control, TSPD is set function of the analogue input value, with analogue reference or with the EREFS value with online reference. Measured in speed units In position control, TSPD is computed as the position variation over a slow loop sampling period. Measured in speed units
TACCTarget load acceleration – acceleration/deceleration reference computed by the reference generator at each slow loop sampling period, when position or speed external mode is performed. Measured in acceleration units
IQREFCurrent reference – updated at each fast or slow loop function of the analogue input value or set with EREFT value, when torque external mode is performed. Measured in current units
UQREFVoltage reference – updated at each fast or slow loop function of the analogue input value or set with EREFV value, when voltage external mode is performed. Measured in voltage command 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
IQ        Motor current – measured in current units

 

Instructions

MODE PE        Set position external mode

MODE GS        Set position external mode with digital referenceMODE SE        Set speed external mode

MODE TES        Set torque external mode with reference read in slow loop

MODE TEF        Set torque external mode with reference read in fast loop

MODE VES        Set voltage external mode with reference read in slow loop

EXTREF 0Set external reference type on-line
EXTREF 1Set external reference type analogue
EXTREF 2Set external reference type digital

UPD                        Update motion parameters and start new motion mode

STOP                Stop motion

Remarks:

In the absence of an external device, EREFP, EREFS, EREFT, EREFV may also be used as TML parameters through which you can set a position, speed, torque or voltage reference in the external mode online. This is a simple way to impose step references
The TML variables EREFP, EREFS, EREFT, EREFV are alternate ways to address the TML variable EREF in which the external devices must place the reference. The new mnemonics have been added to clearly differentiate how EREF is interpreted function of control mode selected:
oPosition control: EREFP = EREF. EREFP is a 32-bit long integer
oSpeed control: EREFS=EREF. EREF is a 32-bit fixed
oTorque control: EREFT = EREF(H). EREFT is a 16-bit integer
oVoltage control: EREFV = EREF(H). EREFV is a 16-bit integer
CSPD and CACC must be positive
The sum between CSPD and CACC values must be maximum 32767.99998 (0x7FFF.FFFF) i.e. the maximum value for fixed number
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 1

// External mode. Read position reference from the analogue input

// Position feedback: 500 lines incremental

// encoder (2000 counts/rev)

MODE PE; //External position

CSPD = 100;// Limit = 3000[rpm]

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

UPD; //execute immediate

 

Programming Example 2

// External mode online. Read speed reference from variable EREFS

// Position feedback: 500 lines incremental

// encoder (2000 counts/rev)

EREFS = 33.3333;// EREFS initial = 1000[rpm]

EXTREF 0;

MODE SE; //External speed

CACC = 0.3183;// Limit = 1000[rad/s^2]

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

UPD; //execute immediate        

See also:

External – TML Programming Details

TML Description