Since plc is installed, configured, and programmed by humans, many artificial errors in use may occur. PLC manufacturers usually provide a lot of tools to find out these errors. These errors can be divided into the following categories:
Fatal error
These errors will cause the PLC to leave the Run mode and enter the Fault mode (similar to the situation caused by a hardware fault). Fatal errors typically occur when the PLC is powered on or when the program is executed. Some programming and configuration problems (such as watchdog timer timeout, attempting to run a program that does not exist, etc.) can also cause fatal errors.
When the PLC enters the fault mode, it turns the fault LED on and turns off all outputs to OFF (or freezes in their previous state). The PLC also stores a fault code in memory that the programmer can read. The code determines the cause of the fault. After the problem is solved, the fault state is cleared, the PLC power is turned off and then turned on, and the operation mode is re-entered.
Today's PLCs usually save a detailed description of several recent faults and allow programmers to write faulty programs that can be run in the event of a fatal fault. We described the fault process in Chapter 9, and in this chapter we mainly discuss how to find and Use the fault code.
Non-fatal failure
A non-fatal fault is a fault that the PLC can detect, but does not cause the PLC to leave the run mode. Some detectable hardware problems, such as low backup battery voltage, only lead to non-fatal failures. Non-fatal faults can also be caused by configuration and programming errors, such as the execution of a timed interrupt routine being delayed by the operation of a higher priority program, or an arithmetic operation that is too large to be stored in the specified target memory. Number, and so on.
Non-fatal faults cause the PLC to set the relevant status bits or write the associated error code to memory. When the result is too large or too small to be saved, the data word processing instruction will set the arithmetic flag in memory to 1. The user program should check these status bits or codes and respond, as the PLC will continue to execute the program as if no errors occurred. Some non-fatal error status bits have been discussed in the previous sections, and we will discuss others in this chapter.
Programming or configuring logic errors
These errors are not automatically detected by the PLC, but can be checked by the fault detection command in the program or the program monitoring function of the programming unit.
Examples of logic errors include a user setting one bit to OFF instead of ON, two user programs trying to control the same output, or structured programming bypassing a required program, and so on.
Early PLCs were designed to not allow logic errors, such as two rungs controlling one output, or jump instructions to jump to the front of the program, etc., but the user needed more flexibility, so even if these security measures were cancelled . Some programming units provide warnings when programmers write the above-mentioned logic statements with potential errors, but programmers can ignore them.
The programming language includes a simple debugging tool: the instruction to prematurely terminate the scan loop, so that the program can be checked in a period of time; causing a fatal or non-fatal error, causing the PLC to stop immediately in some cases; and others especially in the debugger An instruction for a problem. Standard instructions such as counters can be temporarily inserted into the program to record the number of times the event occurred. The programming software also includes debugging tools, such as monitoring and changing data memory when the user program is executed, forcing the I/O mapping bit to turn on or off to observe how the program responds; recording short-term changes of a particular bit or special word, These trends are then displayed using historical trend graphs; when a particular bit is in use, a cross-reference list is generated for all places in the program; and a search tool can find a particular address in the program or the location of the instruction in the program.
Puff Bar XXL,Puff XXL, Puff xxl 1600, Puff XXL 1600puffs,Puff Bar XXL 1600puffs
Nanning Nuoxin Technology Co., LTD , https://www.nx-vapes.com