Description of the function

The PTC function reads the date and code of the most recent PLC stop, and saves the information in an integer table.

The additional parameters EN and ENO can be configured.

FBD representation

Representation:

LD representation

Representation:

IL representation

Representation:

PTC
ST Stop_Date

ST representation

Representation:

PTC (Stop_Date);

Description of the parameters

The following table describes the output parameters:

Parameter

Type

Comment

Stop_Date

ARRAY [0..4] OF INT

Table of 5 integers containing the date in the first four words (equivalent of %SW54 to %SW57) and the error code in the last word. The error code is the one indicated in the %SW58 system word:

  • 1 = switch from RUN to STOP by the terminal,

  • 2 = stop on software fault (PLC task overflow),

  • 4 = mains power cut,

  • 5 = stop on hardware fault,

  • 6 = stop on HALT instruction.

Example: Stop at 22:53:10 on January 8, 2001. The contents of Stop_Date were as follows:

Stop_Date[0]=16#1000

Stop_Date[1]=16#2253

Stop_Date[2]=16#0108

Stop_Date[3]=16#2001

Stop_Date[4]=16#0006