mdtGotoXY (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Device support:

All

Firmware version:

1.02 / 1.00.00


Sets the current write position. This is the position where the next write to the display will take place.

To get the actual range of (x,y) for the connected MDT, it is recommended to call mdtProfile().

 

Input:                

x : INT (1..28)

X position (column) - 1 is leftmost.

 

y : INT (1..11)

Y position (row) - 1 is topmost.

 

Returns: INT

1

- Position outside display.

0

- Success.

-1

- MDT not present or communication error.

-2

- MDT not open.

 

Declaration:

FUNCTION mdtGotoXY : INT;
VAR_INPUT
  x : INT;
  y : INT;
END_VAR;

 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
VAR
  rc : INT;
END_VAR;
 
BEGIN
  ...
  // Move current position
  rc := mdtGotoXY(x := 15, y := 4);
  ...
END;
END_PROGRAM;