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:
FUNCTIONmdtCurrentX :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;