Conversation
This is already the default value for 0x8010,0x6
8d98e96 to
5079e43
Compare
0x8010,0x3 configs a monitor on the voltage supplied by the PSU to the motor It has no effect on the motion AFAIK Consequently it is not tied to the motor but to the PSU I.e.: multiple voltages are possible for the same driver+motor combo (lower voltage = smoother motion, higher voltage = higher top speed)
0x8010,0x3 configs a monitor on the voltage supplied by the PSU to the motor It has no effect on the motion AFAIK Consequently it should be safe to define a default value
238c309 to
a8125c7
Compare
3e4b64a to
e90e665
Compare
In preparation for an upcoming unification
e90e665 to
fb2f85c
Compare
| ecmcConfigOrDie "Cfg.EcAddSdo(${ECMC_EC_SLAVE_NUM},0x8010,0x4,450,2)" | ||
|
|
||
| #- Motor full steps count 200 | ||
| ecmcConfigOrDie "Cfg.EcAddSdo(${ECMC_EC_SLAVE_NUM},0x8010,0x6,200,2)" |
There was a problem hiding this comment.
What happens in the case that the drive has first been used in another application where this value already has been changed? Isnt there a risk that the changed value will remain when you take the drive into the new application?
There was a problem hiding this comment.
@mac-kan, for almost all slaves ecmc resets the CoE/SDO registers to factory default at IOC start (addSlave.cmd), and I think 200 steps is default for this register, so it can be removed.
However, this may be a problem for other parameters in your TwinCAT applications, I guess there the CoE/SDO is not set to default, or?
There was a problem hiding this comment.
@anderssandstrom Good point, indeed is should not pose a problem to remove it then!
Yeah, we recommend to save important parameters as startup entries to the terminal. At least that should help cover some of this ground.
a2f09fe to
4e1cb9c
Compare
In preparation for an upcoming unification
4e1cb9c to
ba43795
Compare
In preparation for an upcoming unification
63d252d to
4409f23
Compare
|
I think this is a very good idea. |
Hi @anderssandstrom ,
As per our last meeting this MR is a full review of the motor configurations for the EL7031, EL7037, EL7041, EL7041-0052 and EL7047 drivers.
This should also fix the current issue with the EL7037.
For those not present, summary and rationale are presented below.
The current state of motor configuration has the 1) running current, 2) reduced current and 3) monitor voltage defined in the motor configuration file.
This is problematic because all 3 parameters are application dependent.
I.e.: the same motor/driver combo can run with different currents (higher current = more torque but less smooth) and/or different voltages (higher voltage = higher top speed but less smooth).
Going through the motor configuration files one can notice the parameters were chosen to fit the application of the original author (which may not be a good choice in every case).
After analyzing the 3 parameters via an oscilloscope connected to the output of the drivers I can confirm:
0x8010,0x1) corresponds to the amplitude of the phase current (implemented via PWM)0x8010,0x2) corresponds to the combined DC current of both phases (implemented via PWM)0x8010,0x3) has no effect on the output of the driver to the motor. It only monitors the voltage supplied by the PSU to the driver.Items 1. and 2. are potentially hazardous since misconfiguration may lead to motor damage.
E.g. 1: if values are changed upstream an integrator may inadvertently change the motor current by simply updating to a newer version.
E.g. 2: an integrator may (wrongly) assume the values present on ecmccfg are safe for their particular application.
The following approach was initially considered:
For all motor configuration files: 1) add macros which allow the integrator to change the parameters when invoking
configureSlave.cmd(example below) and 2) set sane default values for all the motors.${SCRIPTEXEC} ${ecmccfg_DIR}configureSlave.cmd "HW_DESC=EL7047, CONFIG=-Motor-Nanotec-ST4118L1804, CFG_MACROS='I_RUN_MA=1000, I_STDBY_MA=500, V_MON_MV=24000'"However we could not reach an agreement on sane values due to the risk of damage to existing applications.
Therefore we decided to implement macros without default values and exit on error if they are not defined by the integrator.
This breaks backward compatibility and will require the integrator to modify the applications when calling
configureSlave.cmd.For this reason I will ask @anderssandstrom to bump the major version (ecmccfg 12?) in case this MR gets approved.
Item 3. does not run into the problems mentioned above since a misconfiguration only leads to a (false) warning by the driver and consequently default values are provided.
Summary of changes:
0x8010,0x6SDO.chkValidVoltageSetOrDie.cmdfunctionality.$V_NOM_MVis provided to configure the voltage monitor while in the driver configuration file.addSlave.cmd.$I_RUN_MAand$I_STDBY_MAare provided to configure the running current and reduced current respectively.0x8010,0xA) values afterwards.Please note I did NOT double check the values against the respective datasheet.
I.e.: if the values were wrong before this MR, they will be wrong after.
Not strictly related to the MR but noteworthy: the resistance (
0x8010,0x4) and inductance (0x8010,0xA) values are ignored when using velocity direct (see "Required parameter settings for the individual operating modes" on EL70x7 manual).From my observations this also applies to the EL70x1.