guiGetTag (Function)

Top  Previous  Next

Architecture:

NX32L

Firmware version:

1.00.00


This function retrieves the tag value associated with the provided handle.

The tag value is a user defined value that is passed along with certain menus and controls.

 

 

Input:

handle : SYSHANDLE

Handle to get the tag for. This function is currently valid for control and menu handles.

 

Output:

tag : DINT

The value of the tag.

 

Returns: INT

0

- The tag has been retrieved.

-1

- Interface is not open (see guiOpen).

-3

- The handle is not valid.

-11

- The GUI API is not supported.

 

Declaration:

FUNCTION guiGetTag : INT;
VAR_INPUT
   handle : SYSHANDLE;
   tag    : ACCESS DINT;
END_VAR;

 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
VAR
   rc     : INT;
   tag    : DINT;
   handle : SYSHANDLE;
END_VAR;
 
BEGIN
   ...
   // Get the tag value
   rc := guiGetTag(handle := handletag := tag);
   ...
END;
END_PROGRAM;