Skip to content

Commit

Permalink
restructure manual
Browse files Browse the repository at this point in the history
  • Loading branch information
anderssandstrom committed Sep 12, 2024
1 parent 8582d2c commit 1a5bc18
Show file tree
Hide file tree
Showing 24 changed files with 88 additions and 61 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
+++
title = "PLC"
title = "PLC cfg"
weight = 15
chapter = false
+++
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
+++
title = "PLC best practice"
title = "best practice"
weight = 10
chapter = false
+++
Expand Down
File renamed without changes.
10 changes: 10 additions & 0 deletions hugo/content/manual/general_cfg/_index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
+++
title = "general cfg"
weight = 7
chapter = false
+++

## [startup.cmd](startup)
## [data storage](data_storage)
## [iocsh utils](iocsh_utils)
## [ecmc command reference](ecmc_command_reference)
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
+++
title = "configuration"
weight = 7
title = "ecmc command reference"
weight = 20
chapter = false
+++

## [startup.cmd](startup)
## [Data Storage](data_storage)
## [iocsh Utils](iocsh_utils)
## [ecmc Command Reference](https://epics-modules.github.io/ecmc/files.html)
## [ecmc command reference](https://epics-modules.github.io/ecmc/files.html)
* [ethercat](https://epics-modules.github.io/ecmc/ecmcEthercat_8h.html)
* [motion](https://epics-modules.github.io/ecmc/ecmcMotion_8h.html)
* [general](https://epics-modules.github.io/ecmc/ecmcGeneral_8h.html)
* [misc](https://epics-modules.github.io/ecmc/ecmcMisc_8h.html)
* [plc](https://epics-modules.github.io/ecmc/ecmcPLC_8h.html)

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
+++
title = "iocsh utilities"
weight = 20
weight = 17
chapter = false
+++

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
+++
title = "axis"
title = "motion cfg"
weight = 10
chapter = false
+++
Expand All @@ -9,7 +9,7 @@ chapter = false
ECMC has two types of axes, (1) physical axes, aka joints, and (2) virtual axes, aka end effector.
Both types are classes in ECMC, the physical axis is a super-set of the virtual axes, as the latter lacks the hardware.

### [axis yaml config](axisYaml)
### [yaml config](axisYaml)
Since v7, axes can be configured with yaml-files.
This is a huge improvement over the classic configuration based on EPICS environment variables.
For backward compatibility the classical configuration is still supported.
Expand All @@ -19,15 +19,15 @@ From v8+ yaml files are linted for syntactic errors, observe the iocsh for warni
Additionally the schema of the yaml file is checked by Cerberus.
This check will point out errors in the structure of the configuration as well as certain type errors.

### [axis plc yaml config](axisPLC)
### [plc yaml config](axisPLC)
Syncronization configurations

### [Scaling](scaling)
### [scaling](scaling)
Configuration of scaling

### [Direction](direction)
### [direction](direction)
Defining the direction of motion

### [Homing](homing)
### [homing](homing)
Configuration of homing

File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
+++
title = "axis best practice"
title = "best practice"
weight = 30
chapter = false
+++
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
11 changes: 7 additions & 4 deletions hugo/content/manual/troubleshooting/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,20 @@ chapter = false
Due to the complexity an EtherCAT bus topology can assume, troubleshooting can be challenging.
This guide should provide the basic means to diagnose simple errors and is by no means complete!

### [general problems](general)
For motion related issues, a very short troubleshooting guide is provided [here](motion).

### [command line interface](ethercatcli)
A very powerful tool is provided through the command line.
See a summary, incl. some examples of what possible [here](ethercatcli).

### [general problems](general)
### [motion](motion)
For motion related issues, a very short troubleshooting guide is provided [here](motion).

### [troubles with motion](motion)
For motion related issues, a very short troubleshooting guide is provided [here](motion).
### [drive tuning](tuning)
Tune drive control loops

### [troubles with hardware](hardware)
### [hardware](hardware)
For hardware related issues, a very short troubleshooting guide is provided [here](hardware).

### [manual motion](manual)
Expand Down
2 changes: 1 addition & 1 deletion hugo/content/manual/troubleshooting/ethercatCLI.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
+++
title = "ethercat command line interface"
weight = 15
weight = 13
chapter = false
+++

Expand Down
26 changes: 24 additions & 2 deletions hugo/content/manual/troubleshooting/hardware.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
+++
title = "hardware"
weight = 13
weight = 16
chapter = false
+++

### over current protection el9227-5500, el9221-5000
### 1. [over current protection](#over current protection)
### 2. [el7041 error/warning](#el7041 error/warning)
### 3. [latency issues](#latency issues)

### over current protection
In the standard setup at PSI over current protection modules are used to feed 24V to both the ethercat communication bus (E-bus) and the power bus of the ethercat slaves. If the over current protection is not enabled then the ethercat slaves will not receive power.

First time, (and only first time), a system is in use, the overcurrent modules needs to be enabled in order to allow current to flow. Enabling is done by push buttons in the LED area of the module. The long horizontal LEDs are in fact buttons that can be used to activate or tripp the over current protection.
Expand Down Expand Up @@ -126,6 +130,24 @@ ${SCRIPTEXEC} ${ecmccomp_DIR}applyComponent.cmd "COMP=Motor-Generic-2Phase-Stepp
For the EL703x drives the nominal voltage must be set to 24V (ecmccomp handles this automatically).
{{% /notice %}}

### EL70x1 Tuning
For EL70x1 stepper drives the following parameters can be tuned:
* 8011:07 Ka factor
* 8011:08 Kd factor
* 8011:01 Kp factor
* 8011:02 Ki factor

** 8011:07 Ka and 8011:08 Kd factor: **

8011:07 Ka factor / 8011:08 Kd factor are “current boosts” during acceleration/deceleration.
Default they are set to 100% which is way too high for most applications. Start by setting these parameters to 0.

** 8011:01 Kp and 8011:02 Ki factor: **
This is the current loop settings and this is also what affect the performance. The higher you set these registers, the stiffer the control loop.
For most applications it is important to keep a ration of 40:1.
Default is 400 / 10, if you want a stiffer loop, then change to f ex 800 / 20 and onwards.
Increase until the motor misbehaves and go back to a safe setting.

### latency issues

High latency, more than 10% of the ethercat cycle time, can in worse case result, in lost ethercat frames, which of course is not an ideal situation. High latency of teh ecmc_rt thread can be related to:
Expand Down
2 changes: 1 addition & 1 deletion hugo/content/manual/troubleshooting/manual.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
+++
title = "manual motion"
weight = 16
weight = 17
chapter = false
+++

Expand Down
43 changes: 7 additions & 36 deletions hugo/content/manual/troubleshooting/motion.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ weight = 14
chapter = false
+++

### 1. [both_limits error](#both_limits error)
### 2. [position lag error, (following error), tuning](#position lag error (following error))
### 3. [latency issues](#latency issues)
### 4. [drive refuse to enable](#drive refuse to enable)

## both_limits error
The "BOTH_LIMITS" error can be related to that limits switches are not powered with 24V. As standard at PSI, limts are feed from 24V outputs, normally an EL2819 terminal. Basically the ouptputs needs then to be set to 1 in order to power the switches. Check the schematics in order to find out which output that powers the switches for a certain axis and then use one the following approaches to set it to 1:

Expand All @@ -21,7 +26,7 @@ By using the commad Cfg.WriteEcEntryEcPath(ec\<master\_id\>.s\<slave\_id\>.binar
ecmcConfigOrDie "Cfg.WriteEcEntryEcPath(ec0.s5>.binaryOutput02,1)"
```

## position lag error (following error):
## position lag error (following error)
A position lag error is normally genereated in the following situations:
1. The motor torque is too low, making it hard for the motor to keep up with the setpoint.
2. The scaling factors are wrong resulting in that the feed forward part of the controller is not working well.
Expand All @@ -45,31 +50,13 @@ One way to test if the scaling is correct is to set all controller parameters (e
### 3. the velocity setpoint is too high resulting in stall
If a stepper motor stalls because of too high velocity there's a few thing that can be done in order to improve the ability to reach higehr velocities:
1. Add a damper: This is nromally very effichient but not always possible.
2. Tune controller parameters (both position loop in ecmc andn the controller loops in the drive)
2. Tune controller parameters (both position loop in ecmc andn the controller loops in the drive), see hardware/tuning
3. If possible, test to increase or reduce current (make sure you do not burn the motor if increasing).

{{% notice warning %}}
Before increase current to the motor, make sure that both motor and drive can handle the higher current. Extra care needs to be taken for vaccum applications.
{{% /notice %}}

#### tuning
For EL70x1 stepper drives the following parameters can be tuned:
* 8011:07 Ka factor
* 8011:08 Kd factor
* 8011:01 Kp factor
* 8011:02 Ki factor

** 8011:07 Ka and 8011:08 Kd factor: **

8011:07 Ka factor / 8011:08 Kd factor are “current boosts” during acceleration/deceleration.
Default they are set to 100% which is way too high for most applications. Start by setting these parameters to 0.

** 8011:01 Kp and 8011:02 Ki factor: **
This is the current loop settings and this is also what affect the performance. The higher you set these registers, the stiffer the control loop.
For most applications it is important to keep a ration of 40:1.
Default is 400 / 10, if you want a stiffer loop, then change to f ex 800 / 20 and onwards.
Increase until the motor misbehaves and go back to a safe setting.

### 4. velocity higher than allowed by driver
For EL704x stepper drives are default setup to maximum veleocity range of +-2000fullsteps/s. The 16bit velocity setpoint that are sent to the drive correspons to this range. Bascially trying to write a higehr value than that will saturate the velocity setpoint resulting in that the required speed is not achived, resulting in position lag error. The speed range for the EL704x can however be changed by setting SDO 8012:05:
```
Expand All @@ -94,19 +81,3 @@ Possible reasons:
5. Motion axis in error state. Some errors prevent the axis from being enabled. Check axis error state
6. Drive hardware enable input not set high (valid for EP7211-0034, EL70xx if special cfgs).
7. Axis object configured with external interlock (yaml->input.interlock).

## force manual motion
{{% notice warning %}}
This procedure is for experts only. You run the risk of destroying expansive devices! Limit switches are _not_ obeyed! YOU HAVE BEEN WARNED!
{{% /notice %}}
In case the hardware is fine, the cables are checked, human error is mostly excluded, or the system used to work but doesn't work any longer, directly writing to the drive is possible.

For this however, the IOC needs to be reconfigured to _not_ link the hardware to an axis!
1. Edit the startup script and comment out the axis, just leave the slave configuration.
2. restart the IOC
3. check the PVs for the drive in question (slave 7 in this case)
4. `dbgrep "*s007*"`
5. There should be two PVs ending with, `-Drv01-Cmd` and `-Drv01-Spd`
6. Set `-Drv01-Cmd` to `1` and check the amplifier did enable, if you don't know how to check for an enabled amplifier, you should not use this command!
7. After the amplifier is engaged, write a small number to `-Drv01-Spd`. Dependinf on the scaling, the number might be in the range of 1..1000.
8. Observe the encoder, or in case of open-loop, the device itself.
25 changes: 25 additions & 0 deletions hugo/content/manual/troubleshooting/tuning.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
+++
title = "hardware"
weight = 15
chapter = false
+++

### EL70x1 Tuning

For EL70x1 stepper drives the following parameters can be tuned:
* 8011:07 Ka factor
* 8011:08 Kd factor
* 8011:01 Kp factor
* 8011:02 Ki factor

#### 8011:07 Ka and 8011:08 Kd factor:

8011:07 Ka factor / 8011:08 Kd factor are “current boosts” during acceleration/deceleration.
Default they are set to 100% which is way too high for most applications. Start by setting these parameters to 0.

#### 8011:01 Kp and 8011:02 Ki factor:
This is the current loop settings and this is also what affect the performance. The higher you set these registers, the stiffer the control loop.
For most applications it is important to keep a ration of 40:1.
Default is 400 / 10, if you want a stiffer loop, then change to f ex 800 / 20 and onwards.
Increase until the motor misbehaves and go back to a safe setting.

0 comments on commit 1a5bc18

Please sign in to comment.