Nanotec N6 EtherCAT drive

Scope and status

This page describes the ecmccfg and ecmccomp support for the Nanotec N6-1-1-1-S EtherCAT drive with FIR-v2508 firmware. The supplied ESI is PLC_N6-1-1-1-S_2508-B1072143_N6-1-1-1-S.xml.

Relevant files are:

  • hardware/Nanotec/ecmcN6-1-1-1-S.cmd
  • db/Nanotec/ecmcN6-1-1-1-S.substitutions
  • qt/ecmcN6-1-1-1-S.ui
  • qt/ecmcN6-1-1-1-S_expert.ui
  • ecmccomp component type N6, implemented by N6_2PH_STEPPER.cmd

The N6 hardware configuration and panels are currently marked untested. Commission with conservative current settings and verify every safety-related input and drive reaction on the actual machine.

Motor configuration

The ecmccomp configuration supports a generic two-phase open-loop stepper. The main component macros are:

MacroMeaningDefault or limit
I_MAX_MARated/run phase current in mARequired, drive limit 6000 mA
I_STDBY_MAStandstill phase current in mARequired
STEPSFull steps per mechanical revolutionMotor value, normally 200
INV_DIRInvert position and velocity direction0
I2T_MAX_MSMaximum-current duration100 ms
CURR_RED_DLY_MSDelay before standstill-current reduction1000 ms
N6_POS_UNITCiA-402 object 0x60A80x00B50000
N6_VEL_UNITCiA-402 object 0x60A90x00B50300
N6_IO_24VSelect 24 V inputs and +UB outputs1
N6_INPUT_PULLUPSelect input pull-up instead of pull-down0

U_NOM_MV, R_COIL_MOHM, and L_COIL_UH are accepted for compatibility with generic motor definitions. They are validated where applicable but are not written to the N6 for open-loop stepper operation. The resistance and inductance fields at 0x3380 belong to sensorless feedback and are not the ordinary open-loop stepper winding parameters.

For example:

I_MAX_MA=200,I_STDBY_MA=100,STEPS=200,INV_DIR=0

produces the following current settings:

ObjectValueResult
0x6075200Rated/run current 200 mA
0x607310001000 per mille, maximum current 200 mA
0x3219:021000Wait 1000 ms at zero setpoint
0x3219:03500500 per mille, standby current 100 mA

Standby reduction is automatic in open-loop mode when the commanded velocity in 0x60FF remains zero for the time in 0x3219:02. No additional enable bit is required.

The N6 does not provide motor overload or motor overtemperature protection in this open-loop setup. Nanotec also notes that sinusoidal commutation can cause a winding current up to sqrt(2) times the configured value for a period of time. Confirm whether the motor data-sheet current is the applicable bipolar phase-current rating and perform a temperature endurance test.

Position and velocity scaling

The default unit objects select the native, highest-resolution units:

0x60A8 = 0x00B50000  # encoder increments
0x60A9 = 0x00B50300  # encoder increments per second

For an open-loop two-phase stepper, ecmccomp sets:

pole pairs = STEPS / 4
increments per revolution = pole pairs * 65536
                          = STEPS * 16384

For a 200-step motor:

pole pairs                = 50
increments per revolution = 3276800
degrees per increment      = 360 / 3276800
                           = 45 / 409600

Use the same numerical scaling magnitude for encoder position and drive velocity:

position: increments        * 45/409600 = degrees
velocity: increments/second * 45/409600 = degrees/second

The time dimension remains unchanged, which is why position and velocity use the same conversion factor. Their resulting engineering units are different. Direction may additionally be inverted with INV_DIR or at axis level.

Cyclic PDO mapping

The N6 supports configurable PDO mappings, but 0x1C13 has only four TxPDO assignment slots. Do not assign 0x1A04 or later as a fifth TxPDO: writing 0x1C13:05 aborts with 0x06090011, followed by Invalid input configuration.

The additional input entries are therefore packed into 0x1A03:

DirectionPDOObjectecmc entry
Output0x16000x6040:00driveControl01
Output0x16000x6060:00modeControl01
Output0x16020x60FF:00velocitySetpoint01
Output0x16030x60FE:01binaryOutputArray01
Input0x1A000x6041:00driveStatus01
Input0x1A000x6061:00modeActual01
Input0x1A010x6064:00positionActual01
Input0x1A020x606C:00velocityActual01
Input0x1A030x60FD:00binaryInputArray01
Input0x1A030x60E4:03positionActualInc01
Input0x1A030x60E4:04positionActualSSI01
Input0x1A030x603F:00errorCode01
Input0x1A030x6077:00torqueActual01

The incremental and SSI velocity objects 0x60E5:03/04 are intentionally not mapped. Objects 0x33A0 and 0x33B0 configure the incremental and SSI interfaces; they are not the cyclic position values. The attached encoder’s resolution and protocol still require device-specific SDO configuration.

Exposed EPICS process variables

The dedicated N6 panels use the following main PVs:

PV suffixContent
Drv01-VelActMain actual velocity
Drv01-TrqActActual torque, scaled by 0.1 percent
Drv01-StatCiA-402 statusword
Drv01-ErrCodeCiA-402 error code from 0x603F
Enc01-PosActMain motor position from 0x6064
Inc01-PosActIncremental-interface position
SSI01-PosActSSI-interface position
BI01-ArrComplete 32-bit 0x60FD input word
BO01-ArrComplete 32-bit 0x60FE:01 output word
BO01-Arr-RBOutput-word readback

N6-specific database templates use a 0xFFFFFFFF asyn mask. The generic binary-array templates use only 0xFFFF and must not be substituted here, because the N6 physical I/O bits are above bit 15.

Digital inputs and ecmc limit handling

The configuration explicitly writes 0x323A:01=1 and 0x323A:02=0. The inputs therefore use 24 V thresholds with pull-down wiring. The voltage-level selector is shared with the outputs, so outputs 1 through 3 use +UB rather than 5 V. Override these values with N6_IO_24V and N6_INPUT_PULLUP only when the connected electrical interface requires it.

BI01-Arr exposes two kinds of signals:

BitMeaning
0N6 internal negative-limit function
1N6 internal positive-limit function
2N6 internal home function
3N6 internal interlock function
16Physical input 1
17Physical input 2
18Physical input 3
19Physical input 4
20Physical input 5
21–23Other/reserved routed sources in this variant
24Physical input 6

For normal ecmc handling, use physical bits 16 through 20 and 24. For example, ecmc can use bit 16 as the negative axis limit and bit 17 as the positive axis limit.

Object 0x3242 controls the N6 internal input routing. Its factory values for subindices 1 through 4 are zero, meaning that the internal NLS, PLS, home and interlock bits are sourced from constant zero. This leaves the physical inputs available as ordinary inputs and lets ecmc implement the reaction.

0x3242 is savable. A drive previously configured by another application may not have its factory routing. To guarantee ecmc-only handling, verify or write 0x3242:01, :02, :03, and :04 to zero. Merely exposing BI01-Arr does not connect its physical bits to the ecmc axis limits; configure the axis interlocks explicitly.

If internal drive handling is deliberately enabled, 0x3701 selects the reaction. The factory value -1 only records the limit position. Values 1 and 5 use the normal deceleration ramp; values 2 and 6 use the quick-stop ramp. This internal behavior is separate from ecmc limit handling.

Digital outputs

BO01-Arr maps the complete 0x60FE:01 word:

BitMeaning
0Brake output control
16Physical output 1
17Physical output 2
18Physical output 3

Output routing is configured in 0x3252. The factory mapping routes outputs 1 through 3 to 0x60FE:01 bits 16 through 18. As with input routing, verify saved settings on a drive that may have been configured previously.

Useful commissioning checks

Adjust master and slave position as required:

ethercat upload -m1 -p0 --type uint32 0x3202 0
ethercat upload -m1 -p0 --type int32  0x60FF 0
ethercat upload -m1 -p0 --type uint32 0x6075 0
ethercat upload -m1 -p0 --type uint16 0x6073 0
ethercat upload -m1 -p0 --type uint16 0x3219 2
ethercat upload -m1 -p0 --type uint16 0x3219 3
ethercat upload -m1 -p0 --type int16  0x3701 0

Expected for open-loop standstill are 0x3202=0 and 0x60FF=0.