PLC Compile and Run-Time Errors

Compile and run-time errors are non-fatal errors. Non-fatal errors can degrade some aspect of the performance of your PLC, but do not render the PLC incapable of executing the user program or updating the I/O.

·Run-time errors are non-fatal errors detected in RUN mode, and reflected in special memory (SM) bits that your program can monitor and evaluate. (See PLC Non-Fatal Error Memory Locations for more information about these SM bits.) At startup, the PLC reads the I/O configuration and stores this information in the SM memory. During normal operation, the I/O status is periodically updated and stored in the SM memory. If the PLC detects a difference in the I/O configuration, it sets the configuration-changed bit of the module-error byte; the I/O module will not be updated until this bit is reset. For the PLC to reset this bit, the module I/O must once again match the I/O configuration stored in the system data memory.

·Run-time programming errors are non-fatal error conditions created by you or your program while the program is being executed. An example of this is an indirect-address pointer, which was valid when the program compiled, modified by program execution to point to an out-of-range address. Use the PLC > Information… command to determine what type of error has occurred.

·You can correct run-time programming errors only by modifying the user program. The run-time programming errors are cleared at the next transition from STOP to RUN mode.

·Compile errors (or program-compile errors) are detected at download as the PLC compiles the program. If there is a compile error, the compile halts, and the previous program (which is known to be valid since it previously compiled) is retrieved. All of these steps occur while the PLC is in STOP mode. Compile errors can be displayed using the PLC > Information… command.

Error Code Run-Time Programming Problem (Non-Fatal)
0000 No error
0001 HSC box enabled before executing HDEF box
0002 Conflicting assignment of input interrupt to a point already assigned to an HSC
0003 Conflicting assignment of inputs to an HSC already assigned to input interrupt or other HSC
0004 Attempted execution of ENI, DISI, or HDEF instruction in an interrupt routine
0005 Attempted execution of a second HSC/PLS with the same number before completing the first HSC/PLS in an interrupt routine conflicts with HSC/PLS in main program
0006 Indirect addressing error
0007 TODW (Time of Day Write) or TODR (Time of Day Read) data error
0008 Maximum user subroutine nesting level exceeded
0009 Execution of a XMT or RCV instruction while a different XMT or RCV instruction is in progress on Port 0
000A Attempt to redefine an HSC by executing another HDEF instruction for the same HSC
000B Simultaneous execution of XMT/RCV instructions on Port 1
000C Clock cartridge not present
000D Attempt to redefine pulse output while it is active
000E Number of PTO profile segment was set to 0
000F * Illegal numeric value encountered in compare contact instruction
0091 Range error (with address information); check the operand ranges
0092 Error in the count field of an instruction (with count information); verify the maximum count size
0094 Range error writing to non-volatile memory with address information
009A Attempt to switch to Freeport mode while in a user interrupt

*The compare contact errors are the only errors that generate both fatal and non-fatal error conditions.

The reason for the generation of the non-fatal error condition is to save the program address of the error.

Error Code Compile Errors (Non-Fatal)
0062 Duplicate usage of a positive edge number
0063 Duplicate usage of a negative edge number
0080 Program is too large for the CPU to generate executable code; please reduce the program size
0081 Stack underflow; split the network into multiple networks
0082 Illegal instruction; check instruction mnemonics
0083 Missing MEND, or instruction is not allowed in main program; add MEND instruction or remove incorrect instruction
0084 Reserved
0085 Missing FOR; add FOR instruction or delete NEXT instruction
0086 Missing NEXT; add NEXT instruction or delete FOR instruction
0087 Missing Label (LBL, INT, SBR); add the appropriate label
0088 Missing RET or instruction not allowed in a subroutine; add RET to the end of the subroutine or remove incorrect instruction
0089 Missing RETI or instruction not allowed in an interrupt routine; add RETI to the end of the interrupt routine or remove incorrect instruction

008A Reserved
008B Reserved
008C Duplicate Label (LBL, INT, SBR); rename one of the labels
008D Illegal Label (LBL, INT, SBR); ensure that the number of labels allowed has not been exceeded
0090 Illegal parameter; verify the allowed parameters for the instruction
0091 Range error (with address information); check the operand ranges
0092 Error in the count field of an instruction (with count information); verify the maximum count size
0093 FOR/NEXT nesting level exceeded
0095 Missing LSCR instruction (Load SCR)
0096 Missing SCRE instruction (SCR End) or disallowed instruction before the SCRE instruction
0097 User program contains both unnumbered and numbered EU/ED instructions
0098 Run-time edit attempted on a program with unnumbered EU/ED instructions
0099 Too many hidden program segments

See Also:

PLC Non-Fatal Error Memory Locations