Skip to content

Optional EtherCAT IO, PLC commit helper, and CODESYS library updates - #40

Merged
dalethomas81 merged 17 commits into
mainfrom
dev
Sep 13, 2026
Merged

dalethomas81 merged 17 commits into
mainfrom
dev

Conversation

@dalethomas81

Copy link
Copy Markdown
Owner

Summary

Builders can keep both IO options in the device tree and hot-swap them without a recompile. Optional EtherCAT slaves plus station aliases replace gray-Disable and a new download.

Also adds a one-shot CODESYS script to stamp GVL_Version.sPlcVersion and export ArfBot.xml before commit, bumps system/visu libraries, and stops CNC parser error spam.

EtherCAT IO

  • AR4 stays required (alias 1010).
  • IoOption1 (EK1100 / EL1809 / EL2809) and IoOption2 (EasyCAT IO) are Optional (1020 / 1021 / 1022 / 1030).
  • Existing _20_Io mapping still follows whichever option is present.
  • Both options at once duplicate the same CmdIO map (independent dual IO is not in this PR).
  • Setup docs: AR4 and EasyCAT IO are the same Teensy + EVB-LAN9252-SPI hardware with different firmware (ArfBot.ino vs RemoteIO.ino). Same 32+32 EEPROM; aliases distinguish them.

PLC commit workflow

Codesys/Scripts/PreparePlcCommit.py (Tools → Scripting → Execute Script File):

  1. Stamp sPlcVersion as <tag on main>-<n>-g<sha>[-dirty]
  2. Save ArfBot.project
  3. Export Codesys/ArfBot.xml

Stamp-only / export-only scripts remain. This stamp: v2.2026.37.1-AlarmHistory-23-gb1a767d-dirty.

Other

  • System libraries → 3.5.22.0, visualization libraries → 4.10.0.0
  • CNC command parser error step (stops error spam)
  • Wiki Development Workflow / Installation EtherCAT pages are updated in the wiki repo (push separately)

Tested

  • Hot-swap EK1100 group vs EasyCAT IO with aliases assigned from Scan for Devices
  • PreparePlcCommit.py from Execute Script File (IDE stays open; XML export included)

- added an error step to the cnc command parser to stop error spamming.
- added comments.
Bump system libraries to 3.5.22.0 and visualization libraries to 4.10.0.0.
Name EasyCAT on the AR4 README and link Setup from the project landing page.
Replace disable-unused-IO with a link to the wiki alias and hot-swap procedure.
Same EVB-LAN9252-SPI hardware; ArfBot.ino vs RemoteIO.ino, same 32+32 EEPROM, aliases 1010 vs 1030.
CODESYS script writes sPlcVersion from the latest tag on main plus HEAD count, short hash, and -dirty.
CODESYS IronPython 2.7 rejects UTF-8 arrows without an encoding cookie.
Call git via System.Diagnostics.Process so CODESYS does not report sys.exc_clear deprecation as errors.
One CODESYS script writes sPlcVersion then overwrites ArfBot.xml so a PLC commit is a single Execute Script File.
Host globals are not visible in imported modules, so a NameError hit system.exit and closed the IDE. Bind projects from __main__ and only exit when launched headless.
@dalethomas81
dalethomas81 merged commit 368c1b1 into main Sep 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant