Discussion:
[etherlab-users] What are PDO index and subindex ?
Nesmis
2009-11-28 09:26:41 UTC
Permalink
Hello all,

I'm trying to use ethercat master driver and its library for a
custum-built ethercat slave device, but things don't go easily
because of the lack of knowledge. So, if someone could help
me, it would be great!

I'm trying to write an user-space application by modifying an
sample program(examples/user/main.c), so that it works with my
slave board.

However, as I don't understand what "index" and "subindex" are
in "ec_pdo_entry_info_t" structure. I cannot setup the
"ec_pdo_entry_info_t" data. How can I get "index" and "subindex"
from my slave board?
And another question is, are these indices from CAN Open specification?

Since I didn't have any idea how to get these information, I used
"ethercat" command tool with "reg_write" option to directly write
parameters(SyncManager, FMMU settings, etc) to ESC registers.
Then, I tried to write "0x08" to ALControl (0x120) to change AL status
from PREOP to OP, but the ethercat driver said something like
"slave not configured!".

How can I configure ethercat slaves without setting up "ec_pdo_entry_info_t"
and calling "ecrt_slave_confgi_pdos()"?
Is it possible in the first place?

Thanks in advance,

nes.
Florian Pose
2009-12-15 05:42:11 UTC
Permalink
Hi nes,
Post by Nesmis
However, as I don't understand what "index" and "subindex" are
in "ec_pdo_entry_info_t" structure. I cannot setup the
"ec_pdo_entry_info_t" data. How can I get "index" and "subindex"
from my slave board?
And another question is, are these indices from CAN Open specification?
yes, but they are also defines in the EtherCAT specification.
Post by Nesmis
Since I didn't have any idea how to get these information, I used
"ethercat" command tool with "reg_write" option to directly write
parameters(SyncManager, FMMU settings, etc) to ESC registers.
Then, I tried to write "0x08" to ALControl (0x120) to change AL status
from PREOP to OP, but the ethercat driver said something like
"slave not configured!".
How can I configure ethercat slaves without setting up "ec_pdo_entry_info_t"
and calling "ecrt_slave_confgi_pdos()"?
Is it possible in the first place?
Yes, have a look on the output of 'ethercat pdos' before starting your
application, then you will see the default PDOs/PDO entries your slave
provides. The ecrt_slave_config_pdos() function is necessary to
predefine the PDO layout. This has two reasons: To make the master know
the PDOs before the slave is connected, to calculate the process data
image before the bus is connected, or if you want to change the PDO
layout.
--
Best regards,
Florian Pose

http://etherlab.org
Loading...