mdtCurrentX (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Device support:

All

Firmware version:

1.02 / 1.00.00


This function will return the x-coordinate of the current position.

 

Input:                

None.

 

Returns: INT

Current x-coordinate

-1

- MDT not present or communication error.

-2

- MDT not open.

 

Declaration:

FUNCTION mdtCurrentX : INT;

 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
VAR
  x : INT;
  y : INT;
END_VAR;
 
BEGIN
  ...
  // Get curent position
  x := mdtCurrentX();
  y := mdtCurrentY();
  ...
END;
END_PROGRAM;