Can DeepSeek Replace PLC Engineers? Here's What It Can and Can't Do - You Need to Know!

I. DeepSeek's "Super Abilities" in PLC Programming
Code Framework Generation and Logic Design Assistance



DeepSeek excels in natural language understanding and logical reasoning, capable of quickly generating code frameworks for PLC programming through instructions.


  • Case 1: Traffic Light Control System
  • Case 2: Multi-device Coordination

    Requirement: "Start and stop 3 conveyor belts in sequence with a 2-second interval, automatically stopping in case of malfunction."

    AI generates a structured text (ST) code framework, annotating key interlock conditions, requiring engineers only to add sensor signal detection logic.

    • Main Loop Logic (using Timer instructions for timing control)
    • Night Mode Switching (triggered via intermediate registers)
    • Fault Detection Logic (alert for signal loss)

    Engineer Input: "Design a traffic light control program for an intersection with red lights for 30 seconds, green for 25 seconds, yellow for 5 seconds, with night mode switching support."

    DeepSeek generates a ladder diagram framework:

    • Engineer Follow-Up: Adjust green light duration based on actual traffic flow and add emergency vehicle priority logic.


Troubleshooting & Documentation Handling


  • Case 3: Frequent Motor Overload Alarms
  • Case 4: Automatic Generation of Commented Documents

    An engineer uploads a blurred ladder diagram code, and DeepSeek automatically completes the comments:

    plaintext
    // Network 1: After the start button is triggered, M0.0 is set, delaying motor start by 5 seconds (to prevent misoperation)
    LD  I0.0  // Start button  
    AN  I0.1  // Emergency stop not triggered  
    TON T37, PT=5000 // 5-second delay  
    =   M0.0

    Input Phenomenon: "The motor triggers overload protection after running for 10 minutes, PLC reports Err-205."

    DeepSeek analyzes possible causes:

    • Hardware: Poor motor cooling (fan failure/high ambient temperature)
    • Program: Acceleration curve too steep (unreasonable S-curve parameter settings)
    • Mechanical: Load stuck (abnormal belt tension)

    Recommended Troubleshooting Steps:
    • Check real-time data from motor temperature sensors
    • Monitor actual current values in the PLC for overlimit conditions
    • Compare AI-generated acceleration curves with actual parameters


Quick Implementation of Algorithms and Formulas


  • Case 5: PID Control Code Generation

    Input Requirement: "Implement temperature PID control in ST language with a setpoint of 80°C, sampling period of 100ms."

    DeepSeek outputs code with parameter explanations:

    plaintext
    PID_Instance(  
      SetPoint := 80.0,  
      ProcessValue := AT%IW102,  // Temperature sensor input  
      Kp := 2.5,  // Proportional gain (needs on-site tuning)  
      Ti := 120,  // Integral time (seconds)  
      Td := 5,    // Derivative time (seconds)  
      CycleTime := T#100ms  
    );


II. DeepSeek's "Shortcomings": Things It Really Can't Do!
Images



Real-Time Hardware Debugging and Signal Processing


  • Case 6: Servo Motor Debugging Failure

    An engineer uses DeepSeek-generated positioning program, but the motor vibrates excessively during operation.

    Root Cause: AI did not consider servo drive stiffness parameters (e.g., Mitsubishi MR-J4's Pn102 parameter), resulting in mismatched position loop gain.

    Solution: Engineer captures encoder feedback signals with an oscilloscope on-site, manually adjusting filter parameters.


Complex On-Site Decision Making


  • Case 7: Production Line Emergency Stop Conflict

    Theoretical Logic: Upon emergency stop, the robot arm stops immediately, conveyor belt stops after a 2-second delay (to prevent material piling).

    Actual Risk: If the conveyor belt stops before the robot arm, it might cause the arm to collide with remaining materials.

    AI Generated Emergency Stop Logic: Incorrect priority setting between robot arm and conveyor belt.

    Engineer Correction: According to ISO 13849 standard, force the robot arm's priority higher than the conveyor belt.


Protocol Integration and Network Communication


  • Case 8: Modbus TCP Communication Timeout

    AI did not account for on-site electromagnetic interference (e.g., from inverters affecting network cables) or configure Siemens S7-1200 PLC's OB86 organization block (for network interruption handling).

    Analysis: DeepSeek's communication code tests fine in the lab but suffers from periodic packet loss at the site.

    Engineer Supplement: Adds signal isolators and manually adds fault reset logic.


Tuning Process Parameters from Experience


  • Case 9: Tension Control in Packaging Machinery

    Challenges: Material elastic deformation with changing roll diameter (e.g., film stretching), friction coefficient fluctuating with temperature.

    AI Theory: Tension = Torque/Roll Diameter

    Field Issue: Engineers add "friction compensation coefficient self-learning" to AI-generated code, with manual fine-tuning via HMI.


III. How Automation Professionals "Collaborate with Machines"?
  • Case 10: Division of Work in Digital Twin Projects

    AI Tasks:
    • Automatically generate basic 3D model parameters from CAD drawings
    • Write simulation code for analog signals (like temperature, pressure)

    Engineer Tasks:
    • Establish OPC UA communication between real PLC and virtual model in TIA Portal
    • Optimize mechanical structure based on virtual debugging results (e.g., reduce cylinder response latency)
  • Case 11: "Hallucinated Answers" by AI Leading to Production Downtime

    Incident: A factory directly uses DeepSeek-generated Profibus-DP slave configuration code, leading to the master not recognizing IO modules.

    Root Cause: AI confuses protocol differences between Siemens S7-300 (DPV1 support) and third-party devices (only DPV0).

    Lesson: Critical protocol configurations must cross-reference hardware manuals (e.g., GSD file for ET200S interface module).


IV. Future Outlook: AI is Not a Replacement, But an Evolution
Scenario Example: AI + Veteran Engineer = Super Engineer


Newcomer's Dilemma: Faced with injection molding clamp force fluctuations, a novice engineer uses DeepSeek to quickly obtain a "template solution":
  • Check pressure sensor zero drift
  • Verify mold parallelism


Veteran's Insight: Adds "hidden tricks" from 30 years of experience:
  • Temporarily increase back pressure during injection (to compensate for viscosity drop due to oil temperature rise)
  • Apply molybdenum disulfide lubricant on mold guide pillars (to reduce sudden friction changes)


Conclusion


The essence of PLC programming is to weave steel and code into a "breathing" intelligent system. DeepSeek can write precise commands, but only human engineers can teach machines how to "gently interact" with the real world.


In the AI era, the real competitive edge comes from using tools to handle the grunt work while you pioneer new avenues in the industry.