Change the PLC operating mode by using one of the following methods:
·Click the RUN button for RUN mode or the STOP button for STOP mode.
·Select the PLC > RUN menu command for RUN mode or select the PLC > STOP menu command for STOP mode.
·Manually change the mode switch located on the PLC.
·Insert a STOP instruction in your program.
To control the RUN/ STOP mode with STEP 7-Micro/WIN 32 software, a communication path must exist between STEP 7-Micro/WIN 32 and the PLC. Also, the PLC hardware mode switch must be set to TERM or RUN. Setting the mode switch to TERM (terminal) does not change the PLC operating mode, but it does allow STEP 7-Micro/WIN 32 to change the PLC operating mode. The status LED on the front of the PLC indicates the current mode of operation.
PLC Operating Mode Details:
The PLC has two modes of operation: STOP and RUN modes. In STOP mode, you are able to create/ edit your program. Execution of your program is not performed in STOP mode. However, in the RUN mode, your program is executed. In addition, in RUN mode you are able to create, edit, and monitor the operation of the program and data. Debugging aids are provided to enhance the ability to trace the operation of the program and identify programming problems.
Debugging aids such as first and multiple scan functions can be used in STOP mode, and result in a STOP to RUN mode change for the prescribed number of scans.
Fatal errors are stored by the PLC operating system and force a mode change from RUN to STOP mode. If the PLC has detected a fatal error, a mode change from STOP to RUN is not allowed while the fatal error condition persists. Non-fatal errors are stored by the PLC operating system function and are available for inspection, but they do not cause a mode change from RUN to STOP.
In STOP mode, the PLC is in a semi-idle state. Execution of the user program is discontinued; input updates are performed; user interrupt conditions are disabled. The following diagram depicts the timeline that the PLC follows in the STOP mode.
In the event that communication interrupts are occurring, the PLC receives the messages and executes the requests as appropriate. While the PLC remains in the STOP mode, I/O value changes are made to the image register. One exception to this is the force function that overrides I/O value changes to the image register. While in STOP mode, you are able to load, upload, or delete the user program memory.
In the event that one or more devices are trying to communicate with the PLC through the communication port, the PLC responds to each request in turn. The PLC does not attempt to prevent the actions of one communicator from interfering with the actions of another communicator. All necessary precautions to guard against such interference must be provided by your system design.
Self-diagnostic checks include periodic checks of the operating system EEPROM, I/O module status checks and I/O expansion bus integrity check performed on each access to expansion I/O.
In RUN mode, the PLC reads inputs, executes your program, writes outputs, responds to communications requests, updates intelligent modules, performs internal housekeeping chores, and responds to your interrupt conditions. Fixed scan times for the RUN mode execution cycle are not supported by the PLC. These actions (except for your interrupts) are serviced according to priority in the order in which they occur. This execution cycle is called the scan cycle and is shown below.
Each scan cycle begins by reading the current value of the input bits and writing these values to the input image register. Input bits having no corresponding physical input, but which are in the same byte as bits with physical inputs, are zeroed in the image register on each input update cycle, unless they are forced.
After reading the inputs, your program executes starting with the first instruction and proceeding until the end instruction. Upon reaching the end instruction, the PLC checks to see if the intelligent modules of the system need to be serviced. If they do, then the message is read and buffered for the next phase of the cycle.
During the message processing phase of the scan cycle, messages that have been received from the communications port are processed. Completed responses are set aside for transfer to the communications requester at the appropriate time.
Self-diagnostic checks include periodic checks of the operating system EEPROM and the user program memory as well as I/O module status checks.
Finally, the output image register values are written to the output modules. This completes one scan cycle.
Write – Force Outputs in STOP
Program Edit in RUN Mode
Application User Reference
Getting Started Contents