From dfc3c9657b49b07758470ee21daf81cb543e2171 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Sainz-Maza=20Serna?= Date: Mon, 15 Dec 2025 17:26:20 +0100 Subject: [PATCH 1/2] Add CSV-BlackBox-Writter First version of the project. More info in teh README. --- .../CSV-BlackBox-Writter.projectarchive | 3 ++ CSV-BlackBox-Writter/README.md | 8 ++++ README.md | 46 ++++++++++++++++++- 3 files changed, 55 insertions(+), 2 deletions(-) create mode 100644 CSV-BlackBox-Writter/CSV-BlackBox-Writter.projectarchive create mode 100644 CSV-BlackBox-Writter/README.md diff --git a/CSV-BlackBox-Writter/CSV-BlackBox-Writter.projectarchive b/CSV-BlackBox-Writter/CSV-BlackBox-Writter.projectarchive new file mode 100644 index 0000000..77543a1 --- /dev/null +++ b/CSV-BlackBox-Writter/CSV-BlackBox-Writter.projectarchive @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8e1150728e33fc0f5e2572bc060545497cfa64308c927c0d81ecda71873db265 +size 9863769 diff --git a/CSV-BlackBox-Writter/README.md b/CSV-BlackBox-Writter/README.md new file mode 100644 index 0000000..6ffbbd6 --- /dev/null +++ b/CSV-BlackBox-Writter/README.md @@ -0,0 +1,8 @@ +# CSV-BlackBox-Writter + +This example contains two programs: + +- CSV_Writter_Periodicaly : Writes data periodically into .csv files for later retreive in case of errors. + - This is usefull for example if a user does not want to log into the cloud large data or several signals, but it would like to store locally ( in the device) as some kind of log book. +- Snapshot_Recorder: It uses a circular buffer, storing the last values of a signal "fast" in volatile memory and only write it to a file in an event + - It would be usefull to simulate a snapshot-like recorder, with very fast data beeing saved in case of an accident for example. diff --git a/README.md b/README.md index 4ebde6b..7612068 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,44 @@ -# codesys-examples -CODESYS examples, utilities for a fast initial prototype in a new project +# CODESYS Examples + +A collection of **CODESYS project examples** and utilities to help you quickly prototype and learn. Each example is packaged as a `.projectarchive` and includes a README Markdown file explaining its purpose and usage. + +[What is a projectarchive file?](https://forge.codesys.com/forge/talk/Engineering/thread/f283955619/) + +## Repository Structure + +Each example has its own folder containing: + +```text +example-folder/ +├── example.projectarchive # The actual CODESYS project +└── README.md # Description and instructions +``` + +- **`.projectarchive`** – The CODESYS project file, ready to open. +- **`README.md`** – Explains the example, its purpose, and any setup instructions. + + +## How to Use + +1. Clone this repository +2. Open the `.projectarchive` file in **CODESYS**. +3. Read the `README.md` inside the example folder to understand the example and any setup steps. +4. Modify or combine examples for your own projects. + + +## Contribution Guidelines + +- The main branch is protected to ensure stability. Direct pushes are not allowed. +- Contributions must be made via Pull Requests (PRs). +- Add new examples in separate folders. +- Each folder **must** contain: + - A `.projectarchive` file + - A `README.md` file describing the example +- Use **clear and descriptive folder names** to make examples easy to find. +- PRs will be reviewed before merging to ensure quality and consistency. + + +## Notes + +- Only `.projectarchive` files and `.md` documentation are included. +- This repository is intended to share ready-to-use CODESYS examples with all dependencies included. \ No newline at end of file From 3e3958db06c53d8c89ae3fba4fab70cca083a318 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Sainz-Maza=20Serna?= Date: Mon, 15 Dec 2025 17:42:02 +0100 Subject: [PATCH 2/2] Update README. Fix typos --- CSV-BlackBox-Writter/README.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/CSV-BlackBox-Writter/README.md b/CSV-BlackBox-Writter/README.md index 6ffbbd6..3f4d966 100644 --- a/CSV-BlackBox-Writter/README.md +++ b/CSV-BlackBox-Writter/README.md @@ -1,8 +1,12 @@ -# CSV-BlackBox-Writter +# CSV-BlackBox-Writer This example contains two programs: -- CSV_Writter_Periodicaly : Writes data periodically into .csv files for later retreive in case of errors. - - This is usefull for example if a user does not want to log into the cloud large data or several signals, but it would like to store locally ( in the device) as some kind of log book. +- CSV_Writer_Periodically : Writes data periodically into .csv files for later retrieve in case of errors. + - This is useful for example if a user does not want to log into the cloud large data or several signals, but it would like to store locally ( in the device) as some kind of log book. + - The .csv files are stored under /var/opt/codesys/PlcLogic/CSV_BALCKBOX - Snapshot_Recorder: It uses a circular buffer, storing the last values of a signal "fast" in volatile memory and only write it to a file in an event - - It would be usefull to simulate a snapshot-like recorder, with very fast data beeing saved in case of an accident for example. + - It would be useful to simulate a snapshot-like recorder, with very fast data being saved in case of an accident for example. + - The .csv files are stored under /var/opt/codesys/PlcLogic/CSV_Snapshot + +Since the PlcLogic folder can be accessed from CODESYS IDE, the easier way to retrieve the files is to connect ( over remote machine tunnel) using the CODESYS gateway and IDE. Then navigate to Device --> Files and use the arrows to move files between your PC and the device.