-
Notifications
You must be signed in to change notification settings - Fork 18
add beckhoff gpio role #189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| --- | ||
| deploy_ioc_use_common: true | ||
| deploy_ioc_required_module: elio_cc756ab | ||
| deploy_ioc_template_root_path: "{{ deploy_ioc_required_module_path }}" | ||
| deploy_ioc_make_autosave_files: true | ||
| deploy_ioc_executable: elio | ||
| deploy_ioc_device_specific_env: | ||
| EPICS_DB_INCLUDE_PATH: "$(ELIO)/db" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| --- | ||
|
|
||
| gpio_ex1: | ||
| type: "elio" | ||
| terminals: | ||
| # POS, MODEL | ||
| - ["1", "EL3068"] | ||
| - ["2", "EL4008"] | ||
| - ["3", "EL1808"] | ||
| - ["4", "EL1808"] | ||
| - ["5", "EL2808"] | ||
| - ["6", "EL2808"] | ||
| - ["7", "EL3068"] | ||
| - ["8", "EL1124"] | ||
| - ["9", "EL2124"] | ||
|
|
||
| # SYS and DEV: used to generate prefix for each device | ||
| # PREFIX: used for IOC-specific PVs | ||
| # HOST may be an IP address or host name | ||
| # EK9K: port name | ||
| # NUM_TERMS: total terminal numbers | ||
| environment: | ||
| SYS: "XF:31ID1-ES" | ||
| DEV: "GPIO:1" | ||
| EK9K: EK9K1 | ||
| HOST: 10.69.58.101 | ||
| NUM_TERMS: 9 | ||
| PREFIX: "XF:31ID1-CT{IOC:GPIO1}" | ||
| ENGINEER: "H. Xu" # Your name/contact info |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| --- | ||
|
|
||
| type: enum("elio") | ||
| environment: | ||
| SYS: str() | ||
| DEV: str() | ||
| EK9K: str() | ||
| HOST: str() | ||
| NUM_TERMS: int() | ||
| PREFIX: str() | ||
| ENGINEER: str() | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| --- | ||
| # Tasks for Beckhoff EL EK9000 and ELXXXX terminals | ||
|
|
||
| - name: Install base.cmd | ||
| ansible.builtin.template: | ||
| src: templates/base.cmd.j2 | ||
| dest: "{{ deploy_ioc_ioc_directory }}/iocBoot/base.cmd" | ||
| mode: "0664" | ||
| owner: "{{ host_config.softioc_user }}" | ||
| group: "{{ host_config.softioc_group }}" |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,19 @@ | ||||||
| ## Register all support components | ||||||
| dbLoadDatabase("{{ deploy_ioc_template_root_path }}/dbd/{{ deploy_ioc_executable }}.dbd") | ||||||
| {{ deploy_ioc_executable }}_registerRecordDeviceDriver(pdbbase) | ||||||
|
|
||||||
| # Configure the low level communication port | ||||||
| ek9000Configure("${EK9K}", "${HOST}", 502, ${NUM_TERMS}) | ||||||
| dbLoadRecords("{{ deploy_ioc_template_root_path }}/db/ek9000_status.db","P=$(SYS){$(DEV)},EK9K=$(EK9K)") | ||||||
|
|
||||||
| # Configure terminal | ||||||
| {% for elio in ioc.terminals %} | ||||||
| ############ Config for elio #{{ loop.index }} - {{ elio[0] }} - {{ elio[1] }} ############ | ||||||
|
|
||||||
| epicsEnvSet("POS",{{ elio[0] }}) | ||||||
| epicsEnvSet("MODEL","{{ elio[1] }}") | ||||||
| epicsEnvSet("Dev","{$(DEV)_$(POS)}") | ||||||
|
||||||
| epicsEnvSet("Dev","{$(DEV)_$(POS)}") | |
| epicsEnvSet("Dev","$(DEV)_$(POS)") |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| --- | ||
|
|
||
| ek9000_60e62b5: | ||
| name: "ek9000" | ||
| url: "https://github.com/slac-epics/ek9000" | ||
| version: 60e62b5 | ||
| module_deps: | ||
| - modbus_bb9fa05 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| --- | ||
|
|
||
| elio_cc756ab: | ||
| name: "elio" | ||
| url: "https://github.com/NSLS2/elio-ioc" | ||
| version: cc756ab | ||
| module_deps: | ||
| - ek9000_60e62b5 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,4 +3,3 @@ modbus_bb9fa05: | |
| name: modbus | ||
| url: "https://github.com/NSLS2/modbus" | ||
| version: "bb9fa05" | ||
| executable: modbusApp | ||
There was a problem hiding this comment.
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 aterminalsfield. This allows invalid configs to pass schema validation and then fail at render time whenioc.terminalsis missing. Add aterminalsentry to the schema (e.g., a non-empty list of 2-item tuples/lists: position + model) to make the role interface self-validating.