pmPowerDown (Function)

Top  Previous  Next

Architecture:

X32 / NX32 / NX32L

Device support:

All

Firmware version:

1.00 / 1.00.00


This powers down the device – similar to PowerDown. The device will wake up with a full reset when the ignition input (please refer to the technical manual of the RTCU) is activated and optionally after a specific time period defined by the time input variable.

A manual reset of the RTCU or restoring the external power will also wake up the RTCU.

 

Input:

time : DINT

Time to power down in seconds. Leave empty if not used.

 

Returns: INT

0

- Success.

1

- Ignition is activated.

2

- Error.

 

Declaration:

FUNCTION pmPowerDown : INT;
VAR_INPUT
  time     : DINT := -1;
END_VAR;

 

 

Example:

INCLUDE rtcu.inc
 
PROGRAM test;
 
BEGIN
  ...
  // Power down and reset after 60 seconds
  pmPowerDown(time := 60);
  ...
END;
 
END_PROGRAM;