4

SVCREQ #29: Read Elapsed Power Down Time

Use the SVCREQ function #29 to read the the amount of time elapsed between the last power-down and the most recent power-up. The SVCREQ output is always set to ON, and the output block of information (see below) starts at the address given in parameter 3 (PARM) of the SVCREQ function.

Note

This function is available only in the 331 or higher CPUs.

This function has an output parameter block only. The parameter block has a length of 3 words.

Power-Down Elapsed Seconds (low order)

Power-Down Elapsed Seconds (high order)

100 Microsecond ticks

address

address + 1

address + 2

The first two words are the power-down elapsed time in seconds. The last word is the remaining power-down elapsed time in 100 microsecond ticks (which is always 0). Whenever the PLC can not properly calculate the power down elapsed time, the time will be set to 0. This will happen when the PLC is powered up with CLR M/T pressed on the HHP. This will also happen if the watchdog timer times out before power-down.

Example:

In the following example, when input %I0251 is ON, the Elapsed Power-Down Time is placed into the parameter block, and the output coil (%Q0001) is turned on. The parameter block is located at %R0050.

 

_____

 

%I0251

%Q0001

—— ———

SVC_——————————————————————————————————————————————————————————( )—

 

REQ

 

 

CONST -FNC

 

+0029

 

 

%R0050 -PARM

 

_____

 

 

 

 

4-164

Series 90-30/20/Micro Programmable Controllers Reference Manual–September 1998

GFK-0467K

Page 245
Image 245
GE 90-30/20/Micro manual Svcreq #29 Read Elapsed Power Down Time