2. Sequencer (SQO/SQC)
SQO (Sequential Output) traverses pre-set data files through step pointers and outputs different bit patterns to physical ports using masks. This is more intuitive than complex ladder diagram interlocking logic. SQC (Sequential Comparison) is commonly used for step confirmation, which compares the input state with the reference mask and uses the FD (Find) bit to determine whether the current step is completed.
3. Bottom layer handshake for block transfer (BTR/BTW)
When communicating with special I/O modules such as servo drives and smart meters, BTR/BTW is the only bridge. It asynchronously exchanges data with scanners (such as 1747-SN) through M0/M1 files as buffers. The handshake timing in the control block is extremely strict: EN (enable) is set by the program, ST (start) and DN (finish) are set by the hardware scanner, and the program must immediately clear EN after detecting DN, otherwise the next transmission will be blocked.
Chapter 7: The Art of PID Closed Loop Control
The PID instruction is the most complex monolithic instruction in SLC 500, with its 23 word control block hiding a lot of control details.
1. Independent integer algorithm
Unlike PLC-5 or ControlLogix which use floating-point PID, the PID of SLC 500 is completely integer operated, and the internal variable range is forcibly limited to 0-16383. This means that all analog inputs (such as 3277-16384 corresponding to 4-20mA) must first be scaled to this range through SCL or SCP commands.
2. Anti integral saturation and hand automatic undisturbed switching
When the output is limited, if no measures are taken, the integral term will accumulate infinitely, resulting in the output still being unable to fall back after the deviation is eliminated (i.e. integral saturation). The SLC 500 achieves hardware level anti saturation through OL (output limiting enable) and CL bits. At the same time, in manual mode (AM=1), the algorithm will automatically adjust the integral sum to ensure that when switching back from manual to automatic, the control variable (CV) will not undergo step jumps, achieving true disturbance free switching.
3. Selection of Timing Mode and STI Mode
Although PID supports internal scheduled updates, this mode is not recommended in circuits with strict requirements due to the jitter of the scanning cycle. The best practice is to place the PID into an STI subroutine that strictly matches the cycle with the 'Loop Update' parameter to obtain a deterministic control cycle.
Chapter 8: Fault Diagnosis and System Robustness Design
1. Deep mining of status files
S: The six characters contain the code for the last major malfunction. For example, error code 0020 usually points to an unprocessed mathematical overflow; Error code 0036 indicates that the PID parameter is out of bounds. By using the user fault subroutine (file 3 or specified file), it is possible to record the fault context before the processor crashes, and even attempt a soft reset for non fatal errors.
2. Communication diagnosis of I/O module
For remote I/O (RIO) networks, use G files (dedicated I/O module data) to monitor the module's network access and disconnection status. For local expansion racks, the disconnection situation is determined by checking the specific position of the input image (if supported by the module), rather than relying on simple cascade logic.
3. Defense design for power failure
Although SLC 500 has power failure protection function, the worst-case scenario should be assumed during design. Use S: 1/15 (first scan position) to forcibly initialize key control positions (such as hydraulic start permission position, safety door status) during each power on, to avoid dangerous actions after restart due to data flipping at the moment of power failure.
