Skip to content
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

Documentation update #212

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@ tools
hugo/content/source/

*.pyc

.hugo_build.lock
29 changes: 20 additions & 9 deletions hugo/content/manual/axis/axisYaml.md
Original file line number Diff line number Diff line change
Expand Up @@ -291,14 +291,16 @@ input:
## output
Two outputs can be utilizes with `ECMC`.

{{% notice info %}}
The brake output was moved to the `drive` key, as it is directly coupled to the drive state.
{{% /notice %}}

optional
- `health`: sum parameter for axis health
- `brake`: brake output

```yaml
# output:
# health: '' # Ethercat entry for health output
# brake: 'ec0.s42.binaryOutput07' # Ethercat entry for brake output
```

## homing
Expand Down Expand Up @@ -339,25 +341,34 @@ Soft limits to propagate to the motorRecord.

optional

- `enable`: enable soft limits.
- `forward`: soft limit in the forward direction
- `backward`: soft limit in the backward direction
- `enable`: global enable of soft limits.
- `forwardEnable`: forward on/off.
- `forward`: soft limit in the forward direction.
- `backwardEnable`: backward on/off.
- `backward`: soft limit in the backward direction.

```yaml
# softlimits:
# enable: false
# forward: ''
# backward: ''
# enable: true
# forwardEnable: true # optional switch for forward direction
# forward: 300.0
# backwardEnable: true # optional switch for backward direction
# backward: 25.0
```

## monitoring
Three entities can be monitored, (1) lag, aka following error, (2) target, aka in position, (3) velocity.

{{% notice info %}}
It is highly advisable to always use the `lag` and `attarget` monitoring fo closed-loop axis.
It is highly advisable to always use the `lag` and `target` monitoring fo closed-loop axis.
Failure to do so, will most likely results in unexpected behaviour.
{{% /notice %}}

{{% notice info %}}
The `monitoring` key, **must** be included in the config, despite all features being optional.
It's a means to let the integrator think twice to skip it all together.
{{% /notice %}}

optional

- `lag`
Expand Down
27 changes: 15 additions & 12 deletions hugo/content/manual/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,45 +94,48 @@ In order to manually set `binaryOutput01` to `1` at startup, the following can b

##### adding a physical motor axis
Axis configuration will is explained in details [here](../axis).
The preferred way to confuser axes is with the `yaml` based configuration.
It unifies the way, (1) physical axes, (2) virtual axes and (3) synchronization is handled.
It is theoretically possible to use a mix of `yaml` and classic configuration, but this is untested.

* yaml config
```bash
${SCRIPTEXEC} ${ECMC_CONFIG_ROOT}loadYamlAxis.cmd, "FILE=./cfg/ax1.yaml, DEV=${DEV}, DRV_SLAVE=4, ENC_SLAVE=3, ENC_CHANNEL=01"
```
* classic config
```bash
epicsEnvSet("DEV", "STEST-MYDEVICE")
${SCRIPTEXEC} ${ECMC_CONFIG_ROOT}configureAxis.cmd, "CONFIG=./cfg/axis_1"
```
* yaml config
```bash
${SCRIPTEXEC} ${ECMC_CONFIG_ROOT}addAxisYaml.cmd, "FILE=./AM8111_CSV_minimum.yaml, ECMC_TMPDIR=/tmp/"
```

##### adding a virtual motor axis
```bash
${SCRIPTEXEC} ${ecmccfg_DIR}configureVirtualAxis.cmd, "CONFIG=./cfg/axis_11_virt"
${SCRIPTEXEC} ${ECMC_CONFIG_ROOT}configureVirtualAxis.cmd, "CONFIG=./cfg/axis_11_virt"
```

##### adding synchronization
```bash
${SCRIPTEXEC} ${ecmccfg_DIR}applyAxisSynchronization.cmd, "CONFIG=./cfg/axis_1_sync"
${SCRIPTEXEC} ${ecmccfg_DIR}applyAxisSynchronization.cmd, "CONFIG=./cfg/axis_11_sync"
${SCRIPTEXEC} ${ECMC_CONFIG_ROOT}applyAxisSynchronization.cmd, "CONFIG=./cfg/axis_1_sync"
${SCRIPTEXEC} ${ECMC_CONFIG_ROOT}applyAxisSynchronization.cmd, "CONFIG=./cfg/axis_11_sync"
```

##### loading a PLC from file
The PLC functionionality is exmplained in detail here.
The PLC functionality is explained in detail here.
ECMC PLCs can be loaded from classical PLC files, from pure yaml files or from a yaml/PLC hybrid.
* classic PLC-file
```bash
${SCRIPTEXEC} ${ecmccfg_DIR}loadPLCFile.cmd, "PLC_ID=0, FILE=./plc/homeSlit.plc, SAMPLE_RATE_MS=100"
${SCRIPTEXEC} ${ECMC_CONFIG_ROOT}loadPLCFile.cmd, "PLC_ID=0, FILE=./plc/homeSlit.plc, SAMPLE_RATE_MS=100"
```
* pure yaml based PLC
```bash
${SCRIPTEXEC} "${ECMC_CONFIG_ROOT}loadYamlPlc.cmd" "FILE=./plc1.yaml, ECMC_TMPDIR=/tmp/"
${SCRIPTEXEC} ${ECMC_CONFIG_ROOT}loadYamlPlc.cmd "FILE=./plc1.yaml"
```
* yaml definition, with classic PLC-file, Note: `file` key in yaml config will overwrite anything in the `code` key!
```bash
${SCRIPTEXEC} "${ECMC_CONFIG_ROOT}loadYamlPlc.cmd" "FILE=./plc1File.yaml, ECMC_TMPDIR=/tmp/"
${SCRIPTEXEC} ${ECMC_CONFIG_ROOT}loadYamlPlc.cmd "FILE=./plc1File.yaml"
```

#### go active
```bash
${SCRIPTEXEC} ${ecmccfg_DIR}setAppMode.cmd
${SCRIPTEXEC} ${ECMC_CONFIG_ROOT}setAppMode.cmd
```
3 changes: 0 additions & 3 deletions scripts/jinja2/loadYamlPlc.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@
#- halt the ioc startup in case od an error
on error halt

#- halt the ioc startup in case od an error
on error halt

# Step 1: Get Filename (need to check if filename contains other macros also). Bascally run the filename in this iocsh
ecmcFileExist("${FILE}",1)
epicsEnvSet(FILE_TEMP_BASE,${ECMC_TMP_DIR}${FILE})
Expand Down
Loading