GET_ADDR Function

GET_ADDR(tag)

This function is used in SEND_CMD and SEND_CMD_MULTI to obtain the integer value of a register address for command parameters requiring an address such as a master register or status block.

Parameters

tag

Specifies the register whose address is desired.

Return Value

Returns a value that can be stored in a REAL, DINT, or DWORD, or directly used as the register address parameter in SEND_CMD or SEND_CMD_MULTI.

Remarks

This function returns the address of a register in integer format: N = file * 4096 + element.

Examples

Example 1: Store a register address in a variable and then use that address to specify the master register in a gear command.

MasterReg := GET_ADDR(_Axis[2].ActPos);

SEND_CMD(1, CMD.GEAR_ABSOLUTE, MasterReg, 0.0, 10.0, 0.0, 10.0, 0.0)

Example 2: Get a register address directly in the SEND_CMD.

SEND_CMD(1, CMD.GEAR_ABSOLUTE, GET_ADDR(_Axis[2].ActPos), 0.0, 10.0, 0.0, 10.0, 0.0);

 

See Also

SEND_CMD Function | SEND_CMD_MULTI Function | Standard Functions


Send comments on this topic.

Copyright © 2026 Delta Computer Systems, Inc. dba Delta Motion