mdtPower (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Device support:

All

Firmware version:

1.02 / 1.00.00


This function controls the power of the MDT. By using this function, the VPL program can switch ON and OFF the MDT.

The mdtPower() function must be called before the MDT can be used

 

By switching the power OFF to the MDT, it is not possible to receive a "PowerUP" key press message.

Please also see the mdtStandby() function.

 

Note:

Only when the mdtOpen has been called with port=1 will the mdtPower() functionality, as described, be available unless the MDT is part of an NMP device.

 

 

Input:                

power : BOOL

TRUE:

Turns the MDT on.

FALSE:

Turns the MDT off.

 

Returns: INT

0

- Success.

-1

- MDT not present or communication error.

-2

- MDT not open.

 

Declaration:

FUNCTION mdtPower : INT;
VAR_INPUT
  power : BOOL;
END_VAR;

 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
VAR
  rc : INT;
END_VAR;
 
BEGIN
  ...
  // Turn MDT on
  rc := mdtPower(power := ON);
  ...
END;
END_PROGRAM;