Skip to content

add beckhoff gpio role#189

Merged
jwlodek merged 5 commits intoNSLS2:mainfrom
hxu-bnl:elio
Mar 11, 2026
Merged

add beckhoff gpio role#189
jwlodek merged 5 commits intoNSLS2:mainfrom
hxu-bnl:elio

Conversation

@hxu-bnl
Copy link
Contributor

@hxu-bnl hxu-bnl commented Mar 10, 2026

No description provided.

@jwlodek
Copy link
Collaborator

jwlodek commented Mar 11, 2026

@hxu-bnl if you run pixi run lint locally, it should be able to fix a good amount of the linter errors automatically.

@hxu-bnl
Copy link
Contributor Author

hxu-bnl commented Mar 11, 2026

@jwlodek It was tested and ready to review.

@jwlodek jwlodek marked this pull request as ready for review March 11, 2026 21:13
Copilot AI review requested due to automatic review settings March 11, 2026 21:13
@jwlodek jwlodek merged commit 3fa1182 into NSLS2:main Mar 11, 2026
10 checks passed
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for deploying a Beckhoff EK9000 + ELxxxx (ELIO) IOC, including module install metadata and a new elio device role, plus a small cleanup/consistency update for existing roles/modules.

Changes:

  • Added new installable module definitions for ek9000 and elio, including dependency chaining to modbus.
  • Introduced a new elio device role (schema, example config, startup template, and Ansible task to install it).
  • Updated the mdrive role substitution template to use SYS_IOC, and set deploy_ioc_template_root_path for mdrive.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
roles/install_module/vars/modbus_bb9fa05.yml Removes executable from the modbus module metadata.
roles/install_module/vars/elio_cc756ab.yml Adds module metadata for the ELIO IOC module and its dependency on ek9000.
roles/install_module/vars/ek9000_60e62b5.yml Adds module metadata for the EK9000 module and its dependency on modbus.
roles/device_roles/mdrive/templates/asynRecord.substitutions.j2 Switches generated P macro to use SYS_IOC and aligns pattern formatting.
roles/device_roles/elio/templates/base.cmd.j2 Adds ELIO IOC startup commands (EK9000 config + terminal loop).
roles/device_roles/elio/tasks/main.yml Installs the ELIO base.cmd into the IOC boot directory.
roles/device_roles/elio/schema.yml Adds initial schema for elio device role environment.
roles/device_roles/elio/example.yml Adds a sample elio IOC configuration with terminals + environment.
roles/deploy_ioc/vars/mdrive.yml Sets deploy_ioc_template_root_path to the required module path for mdrive.
roles/deploy_ioc/vars/elio.yml Adds deploy defaults for the new elio role/module.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


epicsEnvSet("POS",{{ elio[0] }})
epicsEnvSet("MODEL","{{ elio[1] }}")
epicsEnvSet("Dev","{$(DEV)_$(POS)}")
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

epicsEnvSet("Dev","{$(DEV)_$(POS)}") sets the Dev env var with literal {} braces around the expanded value. Nothing else in the repo uses this {...} form for env var composition, and the resulting $(Dev) will include braces when passed into ek9000ConfigureTerminal / dbLoadTemplate, which is likely unintended and can break generated PV names/macros. Consider composing this as $(DEV)_$(POS) (no braces), or otherwise ensure the downstream templates explicitly expect braces.

Suggested change
epicsEnvSet("Dev","{$(DEV)_$(POS)}")
epicsEnvSet("Dev","$(DEV)_$(POS)")

Copilot uses AI. Check for mistakes.
HOST: str()
NUM_TERMS: int()
PREFIX: str()
ENGINEER: str()
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The template iterates over ioc.terminals, but the role schema doesn't define/require a terminals field. This allows invalid configs to pass schema validation and then fail at render time when ioc.terminals is missing. Add a terminals entry to the schema (e.g., a non-empty list of 2-item tuples/lists: position + model) to make the role interface self-validating.

Suggested change
ENGINEER: str()
ENGINEER: str()
terminals: list()

Copilot uses AI. Check for mistakes.
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.

3 participants