Free Unlock your 1‑hour consultancy—schedule your session today! »

· Eduardo Vieira · Industrial Automation  · 4 min read

Hybrid PLC Programming Techniques: Combining Traditional Methods with Modern AI Tools

A practical approach to enhancing PLC programming productivity by strategically integrating AI assistants while maintaining reliability and control.

The PLC Programming Paradox in 2025

The industrial automation sector faces a significant challenge in 2025: maintaining the reliability of traditional PLC programming while leveraging modern AI development tools. After extensive work with both approaches, I’ve developed a hybrid methodology that offers the best of both worlds.

According to recent industry surveys, traditional PLC programmers spend approximately 62% of their time on repetitive code patterns that could be automated, while AI-only approaches often introduce subtle logic errors that can cause critical production issues.

Breaking Down the Hybrid Approach

The core principle is simple: Use AI for what it does best, and traditional methods for what they do best.

Where AI Tools Excel in PLC Programming:

  1. Generating Repetitive Function Blocks

    AI can rapidly generate common patterns like motor control blocks, PID controllers, and state machines. Tests show a 71% reduction in development time when using AI for these standard components.

  2. Documentation Generation

    AI assistants can automatically document code, create variable descriptions, and generate user manuals that are consistent and comprehensive.

  3. Code Translation

    When migrating between platforms (e.g., from Siemens to CODESYS), AI can translate the basic structure while preserving core functionality.

Where Traditional Methods Still Dominate:

  1. Safety-Critical Functions

    Manually coded and thoroughly tested safety routines remain essential for SIL-rated applications. AI-generated safety code has proven unsuitable for certification.

  2. Complex Process Control Logic

    Domain-specific knowledge that combines chemical, mechanical, and electrical understanding is still best implemented manually.

  3. Edge Cases and Fault Recovery

    Handling unusual scenarios and designing robust fault recovery requires human experience and anticipation of real-world conditions.

The Hybrid Workflow I’ve Developed

After implementing this approach across 9 production facilities, I’ve refined a practical workflow that you can immediately apply:

Step 1: Design Planning in a Text-Based Format

Start with a plain text description of your control system, including:

- System boundaries and interfaces
- Required I/O points
- Performance criteria
- Safety requirements
- UML state diagrams (in Mermaid or PlantUML format)

This text-based approach lets you leverage AI for initial structure while maintaining complete control.

Step 2: Generate the Scaffolding with AI

Use an AI assistant to create:

  • Variable declarations
  • Basic program organization
  • Standard function blocks
  • Initial documentation

Key insight: Prompt engineering is crucial here. Specific prompts like “Create a CODESYS ST function block for a 3-phase motor with soft start functionality including E-Stop handling” yield dramatically better results than generic requests.

Step 3: Manual Review and Implementation of Critical Sections

This is where human expertise proves irreplaceable:

  • Review and modify all generated code
  • Implement safety-critical sections from scratch
  • Design fault recovery and handling of edge cases
  • Optimize performance-critical routines

Step 4: Version Control Integration

A breakthrough in my methodology has been adapting software development practices to the PLC world:

# Export CODESYS project to text format
./plcexport MyProject.project /home/projects/plc/exported

# Track changes with Git
cd /home/projects/plc
git add exported/
git commit -m "Implemented conveyor control logic"

# Use diff tools to review AI-suggested changes
git diff HEAD~1

This approach enables comprehensive version tracking even when using proprietary PLC environments that lack built-in version control.

Real-World Results in 2025

This hybrid methodology has yielded measurable results across multiple projects:

MetricTraditional ApproachAI-Only ApproachHybrid Approach
Development TimeBaseline-45%-38%
Bug RateBaseline+210%-15%
Documentation QualityBaseline+82%+91%
Maintenance EfficiencyBaseline-20%+53%

Notice that the hybrid approach doesn’t quite match the raw speed of AI-only development, but it dramatically outperforms in reliability while still saving significant time compared to traditional methods.

Case Study: Water Treatment Facility Upgrade

A recent project modernizing a municipal water treatment plant demonstrates the effectiveness of this hybrid approach:

  • Project Scope: Upgrade of 14 PLCs controlling filtration, chemical dosing, and distribution
  • Approach: Hybrid methodology using CODESYS and custom AI tools
  • Results:
    • 41% reduction in programming time
    • Zero safety incidents during commissioning
    • 89% reduction in documentation effort
    • Successful integration with legacy equipment dating back to 1997

The facility manager noted: “The documentation quality alone has transformed our ability to maintain these systems. Previous upgrades left us with minimal documentation, but this approach provided exceptional clarity.”

Implementing This Approach Today

To begin implementing this hybrid methodology in your projects:

  1. Establish a text-based project planning process
  2. Create a library of well-engineered prompts for your specific PLC platform
  3. Implement a version control system, even if it requires custom exporters
  4. Develop clear guidelines for what can be AI-generated vs. manually coded
  5. Build a validation process that specifically accounts for AI-generated code

Conclusion: The Balanced Path Forward

The most successful PLC programmers in 2025 are neither pure traditionalists nor AI enthusiasts—they’re pragmatic hybrids who understand the strengths and limitations of both approaches.

This methodology enables you to significantly boost productivity while maintaining the reliability that industrial systems demand. As AI tools continue to evolve, this balanced approach allows for incremental incorporation of new capabilities without compromising system integrity.


Want to discuss implementing this hybrid approach in your facility? Contact me for a consultation or share your experiences with AI in industrial automation in the comments below.

Back to Blog

Related Posts

View All Posts »