mdtProfile (Functionblock)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Device support:

All

Firmware version:

1.07 / 1.00.00


mdtProfile returns the profile of the MDT connected.

 

Input:                

None.

 

Output:

type : INT

0

- No MDT connected.

1

- MDT-100 connected.

2

- MDT-200 connected.

3

- NMP connected.

 

version : INT

Version number of the firmware in the MDT. Version will be scaled by 100 - version 3.00 will be returned as 300.

 

pos_max_x : INT

The maximum x position.

 

pos_max_y : INT

The maximum y position.

 

Declaration:

FUNCTION_BLOCK mdtProfile;
VAR_OUTPUT
  type     : INT;
  version   : INT;
  pos_max_x : INT;
  pos_max_y : INT;
END_VAR;

 

 

Example:

INCLUDE rtcu.inc
 
VAR
  mdtInfo : mdtProfile;
END_VAR;
 
PROGRAM MDTExample;
 
...
 
BEGIN
  ...
  mdtInfo();
  IF mdtInfo.type > 0 THEN
    DebugMsg(message:="MDT connected!");
    DebugFmt(message:="  Type=\1",v1:=mdtInfo.type);
    DebugFmt(message:="  Ver= \1",v1:=mdtInfo.version);
    DebugFmt(message:="  MaxX=\1",v1:=mdtInfo.pos_max_x);
    DebugFmt(message:="  MaxY=\1",v1:=mdtInfo.pos_max_y);
  END_IF;
  ...
END;
END_PROGRAM;