Chapter 5 PLC basics

PLC Programming Basics

5.1 SLC 5/01 CPU

  • Indicators: Various status indicators for Solid Logic Controller (SLC) models (e.g., SLC 5/01, SLC 5/02).

    • CPU FAULT: Indicates a fault in the CPU.

    • FORCED VO: Indicates forced output operation.

    • BATTERY LOW: Indicates low battery status.

Processor Memory Organization

  • The memory structure consists of various areas with specific roles.

    • Tag-Based Memory: Data assigned a variable called a tag, allowing program development using tag names.

    • Rack-Based Memory: Addresses derived from rack number and I/O module slot.

5.2 File Structure

  • Program Files: Stores the ladder logic programming. It occupies most of the memory.

  • Data Files: Stores:

    • Input and output status

    • Processor status

    • Various bits and numerical data organized by type.

I/O Address Format

  • The format is essential for addressing devices in the SLC family:

    • Example: I:1/2 indicates input at rack 1, slot 2.

5.3 Program Scan Cycle

  • The processor reads inputs and energizes/de-energizes outputs according to the user program during each scan.

    • Factors affecting scan time:

      • Processor speed

      • Ladder length

      • Instruction type

      • Program conditions

5.4 PLC Programming Languages

  • Ladder Diagram: Most common, mimics relay logic.

  • Instruction List: Series of basic logic gate functions.

  • Functional Block Diagram: Instructions as blocks wired together.

  • Sequential Function Chart: Program split into steps with parallel branches.

  • Structured Text: High-level language for complex procedures.

5.5 Relay Type Instructions

  • Examine If Closed (XIC): Functions like normally open relay contacts. Seq. bit corresponds to input status.

  • Examine If Open (XIO): Functions like normally closed relay contacts. Evaluates for open status.

  • Output Energize (OTE): Similar to relay coil, energizes output based on a condition.

5.6 Instruction Addressing

  • Assign addresses to inputs/outputs in the program.

  • Ensure I/O connection is correct in the diagram.

5.7 Branch Instructions

  • Create parallel paths of instructions, evaluating multiple conditions.

  • Used to avoid redundant instructions and speed up processor scan time.

5.8 Internal Relay Instructions

  • Internal Outputs: Used for logic requiring more contacts than allowed in a rung.

  • Facilitates complex logic solutions without direct field device control.

5.9 Programming Process

  • Tools like RSLogix used for programming PLCs.

  • Ladder Logic Diagram reflects a wired relay system.

    • Logic continuity is highlighted to show real-time status.

5.10 Modes of Operation

  • Program Mode: For entering/editing programs; allows file uploads/downloads.

  • Run Mode: Executes user programs.

  • Test Mode: Monitors without energizing outputs.

  • Remote Mode: Allows remote changes between program and run modes via PC.