PLC Programming and Automation Control System Design

PLC Control System Schematic

unset

PLC Programming and Automation Control System Design

unsetOpening Introductionunsetunset

Hello everyone, I am Dou Dou! Today we are going to open the magic box of the PLC world. Imagine the robotic arms in factories can precisely grab parts, and automatic doors can sense pedestrians to open and close. All these magical operations are silently commanded by PLCs. Unlike microcontrollers’ “hand-carved” approach, PLCs are more like ready-made intelligent building blocks, allowing us to build automation systems through ladder diagrams. Get your electrician’s pen ready, and let’s go!

unsetunsetThe “Five Senses” and “Limbs” of PLCunsetunset

1.1 The Mystery of Input and Output Points (I/O)

The input points of a PLC are like its eyes and ears, responsible for receiving signals from buttons and sensors; the output points are its hands and feet, controlling actuators like contactors and solenoid valves. For example, in an automatic door system, when the infrared sensor (input X0) detects a person, the PLC sends an open door command to the motor (output Y0).

Note: The common terminal for inputs (COM) usually connects to 0V, while the common terminal for outputs should be selected based on the load voltage; incorrect connections may damage the equipment!

1.2 The “Notebook” in Memory

Inside the PLC, there are various storage areas:

  • M Register (Auxiliary Relay): Temporarily remembers switch states
  • D Register (Data Register): Stores values like temperature, count, etc.
  • T Register (Timer): Records delay times
  • C Register (Counter): Counts the number of products

Painful Lesson: There was a project where the D0 register was reused, causing confusion in production statistics. Everyone must do a good job of address planning!

unsetunsetThe “Lego Principle” of Ladder Diagram Programmingunsetunset

2.1 Basic Logic Construction

Ladder diagrams consist of a left bus (positive power) and a right bus (negative power), with contacts (switches) and coils (loads) forming the logic circuit in between. Remember the three elements:

  • Normally Open Contact: 丨丨 (open when not triggered)
  • Normally Closed Contact: 丨/丨 (closed when not triggered)
  • Output Coil: ( )
|   X0      Y0
|--| |------( )
|   X1      |
|--|/|------|

Note: When X0 is on and X1 is off, Y0 is powered

2.2 Classic Control Case

Automatic stirring system program:

|   X0(Start)    T0          Y0(Motor)
|--| |---------| |----------( )
|               | 30s
|   X1(Stop)    T0
|--|/|---------|/|

Tip: The set value of timer T0 must be converted to time base units (e.g., 100ms×300=30s)

unsetunsetSeven Steps of Automation System Designunsetunset

3.1 Requirement Analysis Stage

Last year, when designing a packaging line for a bakery, I identified these key points:

  1. Determine the mechanical action flow (Push → Weigh → Seal)
  2. Count the I/O points (leave 20% margin)
  3. Select PLC model (Mitsubishi FX3U-32MT)
  4. Draw the electrical schematic
  5. Write the ladder diagram program
  6. On-site debugging (with emergency stop button!)
  7. Write the operation manual

3.2 Hardware Selection Pitfall Guide

  • Transistor Output Type: Suitable for high-frequency switching (e.g., stepper motor control)
  • Relay Output Type: Suitable for high-power loads (but lifespan is about 100,000 cycles)
  • Analog Module: Pay attention to resolution when selecting (is 12bit sufficient?)

Important Reminder: The PLC power supply must have an isolation transformer; there have been painful cases of PLCs being burned out due to lightning strikes!

unsetunsetTypical Problem Diagnosis Roomunsetunset

4.1 Input Signal “Hide and Seek”

Phenomenon: Button pressed but PLC does not respond
Diagnosis Steps:

  1. Use a multimeter to measure input point voltage (should be ≥20V DC)
  2. Check COM terminal wiring
  3. Check the PLC input indicator light status
  4. Confirm if the program address is correct

4.2 Output “Strike” Analysis

Case: A packaging machine suddenly stopped
Finally discovered:

  • Output point Y3 burned out (current overload)
  • Solution: Add an intermediate relay for transition

unsetunsetSafety Protection Mandatory Courseunsetunset

  1. The emergency stop circuit must be hardwired (cannot rely solely on the program!)
  2. Power lines (380V) and control lines (24V) should be routed separately
  3. PLC grounding resistance must be <100Ω
  4. Must back up the program before encryption (don’t ask me how I know)

unsetunsetPractical Training Suggestionsunsetunset

  1. Build a simple traffic light control system (red-yellow-green cycle)
  2. Use a counter to count beer bottle packaging (24 bottles/box alarm)
  3. Design a garage door anti-pinch system (photoelectric + pressure dual protection)
  4. Try to achieve a running light effect using MOV instructions

Debugging Tips: Prepare the following tools:

  • Adjustable power supply (simulates sensor signals)
  • Signal generator (tests high-speed pulses)
  • Insulation resistance tester (check once a month)
Debugging Tool Kit

Next time we will talk about “The Practical Application of PID Control in Constant Temperature Systems”. Remember to leave me a message about the quirky problems you encountered during debugging! See you next time~ (๑•̀ㅂ•́)و✧

Leave a Comment