Yokka Stars

Processing PLC Input Signals Using ST in CODESYS 3.5

Processing PLC Input Signals Using ST in CODESYS 3.5

Seller: vida78

Price: 5.96 USD

Available. The final price depends on the selected options and is checked before payment.

Product description

How can a controller’s input state be turned into data that the control program can trust? Why is it not enough simply to read a temperature, count pulses, or connect a backup sensor? This textbook explores how to build input processing—from handling an individual signal to designing a structured software layer with validity checks, diagnostics, and selection of the measurement to use.

Across fifteen chapters, the book systematically covers digital, analog, and pulse inputs. Readers are introduced to debouncing, edge detection, time-based state confirmation, and measurement scaling and filtering. Examples involving a temperature channel and a pulse-output flowmeter explain how to convert raw data, calculate physical quantities, work with a hardware counter, and protect accumulated totals against overflow.

Particular attention is given to situations in which a value looks plausible but can no longer be used. Stale data, poor source quality, discrepancies between two sensors, and controller restarts are treated as separate scenarios, each with explicitly defined program behavior. The book shows how to keep a value separate from its validity status, implement redundancy, log switchover events, and validate retained settings.

The material includes ST code examples, data structures, function block interfaces, and test scenarios. The final chapter brings the individual solutions together into a project-level input layer that supplies the process control logic with processed measurements and clear diagnostic information.

This textbook is intended for students, novice PLC programmers, and automation professionals who want to move beyond isolated learning exercises toward a consistent approach to project organization. The main emphasis is not on memorizing instructions, but on understanding where data comes from, the conditions under which it can be trusted, and how the system behaves when those conditions are no longer met.

The code provided is for educational purposes. Before use, it must be compiled, adapted to the target hardware, and tested.

Additional information

A ZIP archive containing all chapters of the textbook in PDF format.

CONTENTS

Chapter 1. How an Input Signal Reaches the PLC Program

1.17. A Detailed Example.

Chapter 2. Debouncing Digital Inputs

2.20. The Filter as a Complete Software Component.

Chapter 3. From Input State to Event

3.21. Counting Completed Passages Rather Than Arrivals.

Chapter 4. Analog PLC Inputs

4.21. Scaling as a Verifiable Conversion.

Chapter 5. Filtering Analog Signals: How to Reduce…

5.21. An Alternative Smoothing Method: A Moving… Filter.

Chapter 6. Input Diagnostics and Data Validity

6.20. Checking Communication: What Exactly the Program Must Verify.

Chapter 7. Organizing the Project’s Input Layer: From Individual Signals to a Data System

7.19. Structures for Processing, Not Just Storage.

Chapter 8. PLC Temperature Inputs

Source Code for the Temperature Processing Function Block…

Chapter 9. PLC Pulse Inputs

9.35. Calculating Liquid Flow Rate from Accumulated Pulses…

9.52. Reaching the Limit and Overflow.

Chapter 10. Input Data Quality and Freshness

10.17. Checking Data Freshness Using an Update Sequence Number.

10.31. A Unified Diagnostic Status for the Input Channel.

Source Code for Generating a Unified Input Channel Status.

Chapter 11. Testing Input Channels

Source Code for the Simulated Data Source.

11.16. Observing Transient Behavior.

Chapter 12. Input Data Consistency: Comparing Two Measurement Channels

Source Code for the Comparison Block.

12.16. Testing Two Channels and the Comparison Block Together.

Chapter 13. Selecting the Active Measurement: Primary and Backup Channels

Source Code for the Selection Block.

13.15. Stable Recovery of the Primary Channel.

13.16. Logging Switchover Events.

13.17. A Circular Switchover Event Log.

Source Code for the Circular Buffer.

Chapter 14. Retaining Settings and Recovering After a Restart

14.17. Example: A Retained Settings Management Block.

Chapter 15. Organizing the Project’s Input Layer

15.17. An Example Structure for the Project’s Input Layer.

Ellipses indicate titles truncated in the original file listing.