“Variable handle by name” function

IndexGroup: IdxGrp = 0x122300 + Channel ID

Index offset: IdxOffs = 0x46

Handle by name

Transfers the handle belonging to the variable name for access to the variable. With axis-specific variables the handle is dependent on the position (axis index) of the axis to which it is currently assigned in the channel. Therefore, if the axis is assigned to a different axis index by exchange, the handle must again be determined.

With structures such as user-defined V.E variables, the structure element name must be specified. The structure is resolved into its single elements.

Notice

notice

The handle is only valid during controller runtime. It must be read again when the controller is restarted.

Transfer parameter (here with stream offset specified):

0

Variable name with zero termination

where

Contents

Type

Size

Variable name (with instance identifier for axis-specific variables)

STRING

variable, max. 256 bytes

=> stream length max. 256 bytes

Return value (here with stream offset specified):

0

Handle on the variable

where

Contents

Type

Size

Handle on the variable

UNS32

fixed, max. 4 bytes

=> streaming length max. 4 bytes

Application examples

Transfer parameters:

V.E.vartest

0

V.E.vartest variable name

0 zero termination

Return value:

0x2000004

0x2000004 Handle of requested V.E variable