[Etherlab-users] Configuring EL7047 stepper driver

Graeme Foot Graeme.Foot at touchcut.com
Mon Jul 26 03:46:51 CEST 2021


Hi Nicola,

The first thing is don't try to configure slaves via the ethercat command line utility.  You need to run an application (see the examples folder for various example applications).
The second thing is don't try to manually configure each slave by direct SDO calls, there are functions that do all of that for you that you call as part of the application.

The applications first step is to configure the slaves using for example:
  ecrt_master_get_slave
  ecrt_master_slave_config
  ecrt_slave_config_pdos
  ecrt_slave_config_create_sdo_request
  ecrt_slave_config_reg_pdo_entry
  ecrt_slave_config_sdo8 etc
  ecrt_slave_config_dc

A devices default configuration can be retrieved using the "ethercat cstruct" command.  You can then modify it if your slave allows modification.  You can download the slaves esi file from Beckhoff if you want to use a non-standard configuration, using it as a reference to set up your own cstruct data.

Once ready, the application calls ecrt_master_activate() and then calls the following commands (as a minimum) in a realtime loop:
  ecrt_master_receive
  ecrt_domain_process
  ecrt_domain_queue
  ecrt_master_send

The application will bring the slaves up from PREOP to OP, applying the configuration along the way.  If a slave is repowered the master will automatically re-apply the configuration and bring it back to OP.

Regards,
Graeme

-----Original Message-----
From: Etherlab-users <etherlab-users-bounces at etherlab.org> On Behalf Of Fontana Nicola
Sent: Sunday, 25 July 2021 01:02
To: etherlab-users at etherlab.org
Subject: [Etherlab-users] Configuring EL7047 stepper driver

Hi all,

I think this issue is not related to the ethercat software per-se but maybe someone has already met something similar or can point me into the right direction.

I'm trying to configure the EL7047 stepper driver in position controller mode without encoder (by default it is in velocity mode):

    https://www.beckhoff.com/en-en/products/i-o/ethercat-terminals/el7xxx-compact-drive-technology/el7047.html

No matter what: it stays in PREOP state after having configured it.
Whenever I try to put it in SAFEOP/OP I get:

    Failed to set SAFEOP state, slave refused state change (PREOP + ERROR).
    AL status message 0x001E: "Invalid input configuration".

Here is the full script I'm using:

    https://gitlab.com/-/snippets/2153453

It runs successfully and I am sure the settings are changed (I checked them many times). For a couple of parameters, with a datatype smaller than a byte but bigger than boolean, I had to explicitely set the datatype to `uint8`, and AFAIK this is the only thing that "stinks".

The Beckhoff manual keeps reporting TwinCAT screenshots instead of explaining how things work but (1) I do not have access to TwinCAT and (2) I have less than zero interest in depending on a software blob.

Not sure it is relevant, but here is the output of `ethercat sl`:

    0  0:0  PREOP  +  EK1100 EtherCAT-Koppler (2A E-Bus)
    1  0:1  PREOP  +  EL1809 16K. Dig. Eingang 24V, 3ms
    2  0:2  PREOP  +  EL1809 16K. Dig. Eingang 24V, 3ms
    3  0:3  PREOP  +  EL1809 16K. Dig. Eingang 24V, 3ms
    4  0:4  PREOP  +  EL2809 16K. Dig. Ausgang 24V, 0.5A
    5  0:5  PREOP  +  EL2808 8Ch. Dig. Output 24V, 0.5A
    6  0:6  PREOP  +  EL7047 1K. Schrittmotor-Endstufe (50V, 5A)

Ciao.
--
Nicola


-- 
Etherlab-users mailing list
Etherlab-users at etherlab.org
https://lists.etherlab.org/mailman/listinfo/etherlab-users


More information about the Etherlab-users mailing list