Hi everyone,
I'd like to give you a bit of background before describing the issue.
In our lab, we've been using the EtherCAT Master library for a while, and so 
far, we've had no issues setting up communication between the master and 
various slave devices. Based on the examples from the GitLab repository, we 
developed a more user-friendly wrapper around the ecrt.h library. Among other 
things, this wrapper ensures that several conditions are met before starting 
PDO read/write operations-for example, it checks that both the master and all 
slaves reach the EC_AL_OP_STATE, and that the domain state counter is correct.
To configure communication, we typically write a class for each slave, which 
includes the structures ec_pdo_entry_reg_t, ec_pdo_entry_info_t, ec_pdo_info_t, 
and ec_sync_info_t. These are filled based on the output of the ethercat 
cstruct command.

In all previous use cases, the slaves supported remapping of the default PDOs 
and didn't contain placeholder entries between PDO registers. However, in our 
current project, we're working with a slave that has:

  *   Fixed PDO mapping,
  *   A relatively large number of PDOs (315), and
  *   Several placeholder entries (57 in total) scattered throughout the PDO 
mapping.
I've defined the structures mentioned above to reflect this layout, including 
the placeholders, and ensured the read/write functions also account for them.
When communication starts, both the master and the slave reach the 
EC_AL_OP_STATE, and the working counter is EC_WC_COMPLETE, as expected. 
However, all PDO readings remain zero, even though they clearly shouldn't be.
I've used both the ethercat update command and TwinCAT to inspect the PDO 
register values, and there doesn't seem to be any initialization or control 
command required to "activate" the slave data. Yet, the values returned by 
ecrt_domain_process() remain null.

Has anyone experienced a similar issue, perhaps related to fixed PDO mappings 
or placeholder entries? Could there be a detail I'm missing when using 
placeholders?

Any help or pointers to previous discussions would be greatly appreciated.
Thanks in advance for your time!
Best regards,

Filippo Zoffoli

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

Reply via email to