TwinCAT 3 PLC Data Logging Enhancement

Job ID: 39398316

Budget: €8 – €30 EUR

I need to enhance my TwinCAT 3 PLC project by improving data logging capabilities, specifically for sensor data from pressure sensors.

I'm currently working on a Task that logs window and door sensor states (open/closed) into a CSV file using a function block called FB_Windows_Doors. The logging logic is based on a step-machine structure using an iStep variable to control when to start and stop recording. The issue I'm facing now is that the recording starts correctly when triggered, but it never stops, and I’m unable to access or read the recorded CSV data afterward. I need help debugging this issue and improving the existing code in both function blocks so that the CSV logging works reliably and the data can be properly accessed and read later.
Related categories: Electrical Engineering PLC