Event-Driven PLC Programming for Fast Response

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing programmable logic controllers (PLCs) based on scan cycles suffer from slow response to events, complex and poorly structured user applications due to the need for integrated event detection and handling within a single program, leading to difficulties in maintenance and performance.

Innovation Solution

An event-driven programming method and controller architecture that registers and prioritizes events, stores event handler programs, and uses an event queue to manage and execute event handlers in a modular and efficient manner, allowing for user-defined and customized event handling.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If scan cycle programming method is used, then the controller can execute user application programs, but the response speed to events is slow

Engineering Contradiction:
Improveresponse speed to eventsVSAvoidtime delay in event response
Core Design Contradiction:
SpeedVSLoss of time

Solution Approach 1:

The patent segments the monolithic user application program into multiple independent event handler program sections, each dedicated to handling specific event types. This segmentation allows the controller to jump directly to relevant event handlers when events occur, rather than executing through the entire scan cycle program sequentially, thereby significantly improving response speed and reducing event handling delay.

Inventive Principle:
Principle #1Segmentation

2Ease of operation

If scan cycle programming method is used, then the controller can handle various events, but the user application structure is complicated and poorly structured

Engineering Contradiction:
Improveease of programmingVSAvoidapplication program structure complexity
Core Design Contradiction:
Ease of operationVSDevice complexity

Solution Approach 1:

The patent divides the user application into distinct event handler program sections (e.g., input event handlers, output event handlers, communication event handlers, diagnostic event handlers) that can be independently written, tested, and maintained. Each section handles a specific type of event, eliminating the need to integrate all event processing logic in a single monolithic program, thus simplifying the overall application structure and improving readability.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces an event queue as an intermediary data structure between event detection and event handling. Events are detected by the event detector, stored in the event queue with their respective event identifiers, and then processed by the corresponding event handlers. This intermediary mechanism decouples event detection from event handling, allowing for more modular and maintainable program structure.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Ease of repair

If scan cycle programming method is used, then the controller can process events, but the maintenance difficulty increases

Engineering Contradiction:
Improveease of maintenanceVSAvoidprogram integration complexity
Core Design Contradiction:
Ease of repairVSDevice complexity

Solution Approach 1:

By organizing the program into separate event handler sections for different event types (input, output, communication, diagnostic, system events), the patent enables developers to locate, modify, and debug specific event handling logic without affecting other parts of the system. This modular structure significantly reduces maintenance difficulty compared to integrated scan cycle programs where changes require careful consideration of global program flow.

Inventive Principle:
Principle #1Segmentation

4Speed

If event-driven programming is implemented, then the response speed improves, but the controller architecture becomes more complex

Engineering Contradiction:
Improveevent response speedVSAvoidcontroller architecture complexity
Core Design Contradiction:
SpeedVSDevice complexity

Solution Approach 1:

The patent implements event-driven programming by segmenting the controller into distinct functional modules: event detector module for detecting events, event queue module for storing events with identifiers, and event handler module for executing corresponding program sections. While this modular architecture is more complex than traditional scan cycle design, it provides significant advantages in response speed and program maintainability, with each module having a clear, single responsibility.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS9665412B2Programmable logic controller and event-driven programming method thereof
Publication Date: 2017.05.30 SCHNEIDER ELECTRIC IND SAS
  • US9665412B2 patent drawing
  • US9665412B2 patent drawing
  • US9665412B2 patent drawing

AI summary

The present invention provides an event-driven programming method of programmable logic controller (PLC), including: registering at least one event to be detected; storing at least one event handler segment corresponding to the at least one event to be detected respectively; detecting the occurrence of the at least one event to be detected; adding the detected event into an event queue; extracting events from the event queue; and executing the event handler segment corresponding to the extracted event.