Axis Identification

In multiple-axis configurations, each axis (drive/motor) needs to be identified through a unique number – the axis ID. This is a value between 1 and 255. If the destination of a message is specified via an axis ID, the message is received only by the axis with the same axis ID. The axis ID is initially set at power on using the following algorithm:

a.With the value read from the EEPROM setup table containing all the setup data.
b.If the setup table is invalid, with the last axis ID value read from a valid setup table
c.If there is no axis ID set by a valid setup table, with the value read from the hardware switches/jumpers for axis ID setting
d.If the drive/motor has no hardware switches/jumpers for axis ID setting, with the default axis ID value which is 255.

Remark: If the axis ID read from a valid setup table is 0, the axis ID is set with the value read from the hardware switches/jumpers or in their absence according with d)

Typically, the axis ID is kept constant during operation at the value established during the setup phase. However, if needed, you can change the axis ID to any of the 255 possible values, using the TML instruction AXISID, followed by an integer value between 1 and 255.

Apart from the axis ID, each drive has also a group ID. The group ID represents a filter for multicast messages. The destination of a multicast message is specified via a group ID. When a multicast message is received, each axis compares the group ID from the message with its own group ID. If the axis group ID has a bit in common with the group ID from the message, the message is accepted. The group ID is an 8-bit integer value. Each bit corresponds to one group: bit 0 – group 1, bit 1 – group 2… bit 7 – group 8. Hence a drive/motor can be programmed to be member of up to 8 groups. When a TML command is sent to a group, all the axes members of this group will receive the command. For example, if a drive/motor has the group ID = 11 (1011b), it is member of groups 1, 2 and 4 and will receive the messages sent any of these groups.

For each drive/motor you can:

Set its group ID using the TML instruction GROUPID
Add new groups to its group ID using the TML instruction ADDGRID
Remove groups from its group ID using the TML instruction REMGRID.

Remarks:

You can read at any moment the actual values of the axis ID and group ID of a drive/motor from the Axis Address Register AAR
By default all the drives are set as members of group 1.
A broadcast to all the axes means to send a message with the destination group ID = 0

 

Variables

AAR TML register (Axis Address Register). Contains the Group ID in the 8MSB and the Axis ID in the 8LSB

 

Instructions

AXISID value                Set axis ID = value. Value is an 8-bit integer between 1 and 255                

GROUPID (1,3,5,..)        Set group ID = value. Value is an 8-bit integer, where:

Bit 0 is set to 1, if (group) 1 occurs in the parenthesis, else it is set to 0
Bit 1 is set to 1, if (group) 2 occurs in the parenthesis, else it is set to 0
Bit 7 is set to 1, if (group) 8 occurs in the parenthesis, else it is set to 0  
ADDGRID (2,4,6…)Add the groups from parenthesis to the Group ID. The corresponding bits from Group ID will be set to 1
REMGRID (2,5…) Remove the groups from parenthesis from the Group ID.  The corresponding bits from Group ID will be set to 0

Programming Example

AXISID 10;                // set axis ID = 10

GROUPID (2,3);        // set group ID = 6 (110b) i.e. bits 1, 2 = 1

ADDGRID (4);        // add group 4. Group ID = 14 (1110b) i.e. bits 1, 2, 3 = 1

REMGRID (2,4);        // remove groups 2 and 4. Group ID = 4 (100b) i.e. bit 2 = 1

// AAR = 40Ah i.e. group ID = 4 and axis ID = 10 (Ah)

 

See also:

Communication Protocols – RS232 & RS485

Communication Protocols – CAN

TML Description