= Assign a 16-bit value to a TML variable or a memory location from another axis or group of axes |
Syntax
Operands VAR16x: integer variable VAR16x Axis/Group:
dm: data memory operand TypeMem: memory operand. One of dm (0x1), pm (0x0) or spi (0x2) values (VAR16x): contents of variable VAR16x, representing a 16-bit address of a variable Binary code
Remark: If the TML variables from the remote axis are user variables, these must be declared in the local axis too. Moreover, for correct operation, these variables must have the same address in both axes, which means that they must be declared on each axis on the same position. Typically, when working with data transfers between axes, it is advisable to establish a block of user variables that may be the source, destination or pointer of data transfers, and to declare these data on all the axes as the first user variables. This way you can be sure that these variables have the same address on all the axes. The memory location can be of 3 types: RAM for data (dm), RAM for TML programs (pm), EEPROM SPI-connected for TML programs (spi). One instruction uses a 9-bit short address for the source variable. Bit value X specifies the destination address range: All predefined or user-defined TML data are inside these address ranges, hence these instructions can be used without checking the variables addresses. However, considering future developments, the TML also includes assignment instructions using a full address where the destination address can be any 16-bit value. In this case destination variable is followed by “,dm”.
Example1 int VarLoc, VarExt; ... [15]VarExt, dm = VarLoc;
Example2 int VarLoc, pVarExt; ... [G8](pVarExt), dm = VarLoc;
Example3 int VarLoc, pVarExt; ... [G8](pVarExt+), dm = VarLoc;
|