beautypg.com

Sample program, 2 instructions, Generating a user-defined error – Omron SYSMAC CP CP1E-N@@D@-@ User Manual

Page 433: Generating a non-fatal system error

background image

2-397

2 Instructions

CP1E CPU Unit Instructions Reference Manual(W483)

F

ailu

re Dia

gn
osis I

n

stru

ctio

ns

2

F

A

L

S

Sample program

Generating a User-defined Error

When CIO 0.00 is ON in the following example, FALS(007) will generate a fatal error with FAL number
31 and execute the following processes.

1. The FALS Error Flag (A401.06) will be turned ON.

2. The corresponding error code (C11F) will be written to A400.

3. The error code and the time/date that the error occurred will be written to the Error Log Area (A100

through A199).

4. The ERR Indicator on the CPU Unit will be lit.

5. The ASCII message in D100 to D107 will be displayed at the Peripheral Device.

Note If a message is not required, specify a constant for S.

Note A400 will contain the error code of the most serious of all of the errors that have occurred, including non-fatal

and fatal system errors, as well as errors generated by FAL(006) and FAL(007).

Generating a Non-fatal System Error

When CIO 0.00 is ON in the following example, FALS(007) will generate Memory Error (User programe
Error). In this case, dummy FAL number 10 is used and the corresponding value (80F1 hex) is stored in
A529.

1. The specified error code (80F1) will be written to A400 if it is the most serious error.

2. The error code and the time/date that the error occurred will be written to the Error Log Area (A100

through A199).

3. The Memory Error Flag (A401.15) will be turned ON.

4. The CPU Unit’s ERR Indicator will light and PLC operation will stop.

5. Memory Error has occured.

M: D100

MESSAGE
LOW VOLTAGE

15

0

57

56

4C

41

45

4C

4F

20

4F

54

47

00

M

N

0.00

D101

D102

D103

D104

D105

D106

D107

Disregarded

31

D100

FALS

MOV

#000A

A529

000A

A529CH

S: D200

D201

#80F1

#0001

0.00

FALS

10

D200

N

S

Matching
values

......Error code: #80F1 (Memory Error Flag)
......Memory Error generating Area: #0001(User Memory)

This manual is related to the following products: