Introduction to PLC controllers  on-line FREE!

Development systems
Contact us

APPENDIX C  PLC diagnostics


 C.1 Diagnostic functions of PLC

 C.2 Non-fatal errors

 C.3 Fatal errors

 C.4 User defined errors

 C.5 Failure alarm - FAL(06)

 C.6 Severe Failure alarm - FALS(07)

 C.7 MESSAGE - MSG(46)

 C.8 Syntax errors

 C.9 Algorithm for finding errors in the program



The whole work of PLC controller can be represented with a diagram shown on the following page. After turning on the power, PLC is first initialized (clearing IR, SR i AR areas, presetting system timers and checking I/O lines), and if no errors were detected, monitoring process, program execution, calling the I/O lines and serving the peripheral devices starts to occur in cycles.

C.1 Diagnostic functions of PLC

PLC controller features additional functions that make locating errors easier. Errors can be divided into two categories according to severity :

1. Fatal errors are severe and they prevent PLC controller from operating until their cause is located and solved.
2. Non-fatal errors are those that do not prevent PLC controller from operating. After detecting one or more non-fatal errors, program execution will continue. Nevertheless, it is necessary to correct these errors as soon as possible.

C.2 Non-fatal errors

When one of these errors takes place, indicators POWER and RUN will be on, and the indicator ERR/ALM will blink. Upon locating non-fatal error, manual for the given PLC controller should be consulted and the flags checked in order to understand the cause of a problem and correct the error.

C.3 Fatal erros

When any of the fatal errors take place, PLC controller stops operating and all outputs are shut down. PLC controller cannot be put back to work until the controller is turned off and then turned back on, or until it is switched to PROGRAM mode via peripheral device and the fatal error corrected. With these errors, indicators ERR/ALM are on, while the RUN indicator remains off. It is necessary to check the error flag in the manual of the given PLC in order to locate the cause of the problem and to correct the error.

C.4 User defined errors

There are three instructions for user to define his own errors or messages. FAL(06) causes non-fatal error, FAL(07) causes fatal error, while MSG(46) sends a message to program console or to the host computer connected to the PLC controller.

C.5 Failure alarm - FAL(06)

Instruction FAL(06) generates the code of non-fatal error that took place to provide the information on the possible cause of the problem for the programmer. Upon execution of the instruction FAL(06) following events take place:

1. Indicator ERR/ALM will blink, while PLC continues to work.
2. Two-digits BCD number of instruction FAL (01 do 99) is written from SR253000 to SR25307.

Same number must not be assigned to both FAL and FALS instructions. To delete the code of an error, error should be corrected and FAL 00 instruction executed.

C.6 Severe failure alarm - FALS(07)

Instruction FALS(07) generates the code of fatal error that took place. In this case the following happens:

1. Program stops and all outputs are shut down.
2. Indicator ERR/ALM is turned on.
3. Two-digit BCD number (01 do 99) of instruction FALS is written from SR 253000 to SR25307.
4. If memory card with RTC is used, part of the memory where the presence of error is recorded will also contain numbers of FALS instruction and exact time when error took place.

Numbers of FALS instruction can be assigned to certain states. Same number must not be assigned to both FAL and FALS instructions. To delete FALS error, PLC controller must be in PROGRAM mode, cause of error solved and then error code deleted.

C.7 Message - MSG (46)

MSG(46) is used for printing messages on program console display. Message cannot exceed 16 characters, and it appears when specified condition is fulfilled.

C.8 Syntax errors

During the program check with operation Program Check, syntax errors are detected. There are three levels of program check at user’s disposal. By selecting the level, types of errors to be checked for are selected. The following table shows types of errors, corresponding messages that appear on display and explains all of syntax errors. Zero level check searches for errors of A, B and C type. First level check searches for errors of A and B type, while the second searches only for errors of type A.


Type Message Meaning and the appropriate action
A ????? Program is damaged by creating non-existing function in the code. Re-enter your program.
CIRCUIT ERR Number of logical blocks doesn't match the instructions of logical blocks. Check the program.
OPERAND ERR Entered constant is not in allowed range. Change the constant so that it fits in the proper range.
NO END INSTR Program is missing the instruction END(01). Add END(01) to the last address of the program.
LOCN ERR Instruction is in the wrong place of the program. Check what the instruction demands and correct the mistake.
JME UNDEFD Instruction JME(04) is missing the instruction JMP(05). Correct the number of jump and add the correct JME(04) instruction.
DUPL Same number of jump or subroutine is used twice in the program. Correct the program so that each number is used only once. 
SBN UNDEFD Instruction SBS(091) is programmed for non-existing subroutine. Correct the number of subroutine or create the missing one.
STEP ERR STEP(08) with the number of section and STEP(08) without the number of section are used illegally. Check the demands of instruction STEP(08) and correct the mistake. 
B IL-ILC-ERR IL(02) and ILC(03) are not used in pair. Check if every instruction IL(02) has its corresponding ILC(03). This message will also appear in case that multiple IL(02) instructions were used with single ILC(03) instruction. Check if that's exactly what you wanted...
JMP=JME ERR JMP(04) and JME(05) are not used in pair. Before proceeding, check if the program is written exactly the way you wanted.
SEN-RET ERR If the address of instruction SBN(92) is displayed, there are two different subroutines with the same number. Change one of the numbers or delete one of the subroutines in question. If the address of instruction RET(93) is displayed, RET(93) wasn't used appropriately. Check the demands of this instruction and correct the mistake.
C COIL DUPL Same bit is controlled by more than one instruction (for example, OUT, OUT NOT, DIFU(13), KEEP(11), SFT(10)...). Although certain instructions allow this, you should check the demands of specific instructions, make sure that the program is correct or rearrange the program so that each bit is controlled by single instruction.
JMP UNDEFD JME(05) is used without JMP(04) with the same number of jump. Add the instruction JMP(04) with the same number or delete JME(05) that is not used.
SBS UNDEFD There is a subroutine that is not called by SBS(91). Add subroutine call to an appropriate place in the program or delete the subroutine.

C.9 Algorithm for finding errors in the program


Previous page Table of contents Next page

© C o p y r i g h t  2 0 0 3. m i k r o E l e k t r o n i k a. All Rights Reserved. For any comments contact webmaster.