libethercat - an embeddable realtime EtherCAT-master library
Communicate with EtherCAT slaves attached to a Network interface.
Loading...
Searching...
No Matches
ec_slave Struct Reference

Data Fields

osal_uint32_t slave
 Slave index in EtherCAT master array.
 
osal_int16_t auto_inc_address
 physical bus address
 
osal_uint16_t fixed_address
 virtual bus address, programmed on start
 
osal_uint16_t type
 value of EC_REG_TYPE
 
osal_uint8_t sm_ch
 number of sync manager channels
 
osal_uint8_t fmmu_ch
 number of fmmu channels
 
osal_uint32_t ram_size
 ram size in bytes
 
osal_uint16_t features
 fmmu operation, dc available
 
osal_uint16_t pdi_ctrl
 configuration of process data interface
 
osal_uint8_t link_cnt
 link count
 
osal_uint8_t active_ports
 active ports with link
 
osal_uint16_t ptype
 ptype
 
osal_int32_t pdelay
 propagation delay of the slave
 
int entry_port
 entry port from parent slave
 
int parent
 parent slave number
 
int port_on_parent
 port attached on parent slave
 
int sm_set_by_user
 sm set by user
 
ec_slave_sm_t sm [LEC_MAX_SLAVE_SM]
 array of sm settings
 
ec_slave_fmmu_t fmmu [LEC_MAX_SLAVE_FMMU]
 array of fmmu settings
 
int assigned_pd_group
 Process data group this slave is assigned to.
 
ec_pd_t pdin
 input process data
 
ec_pd_t pdout
 output process data
 
osal_size_t subdev_cnt
 count of sub devices
 
ec_slave_subdev_t subdevs [LEC_MAX_DS402_SUBDEVS]
 array of sub devices
 
ec_mbx_t mbx
 EtherCAT mailbox structure.
 
eeprom_info_t eeprom
 EtherCAT slave EEPROM data.
 
ec_dc_info_slave_t dc
 Distributed Clock settings.
 
ec_state_t expected_state
 Master expected slave state.
 
ec_state_t act_state
 Actual/Last read slave state.
 
osal_mutex_t transition_mutex
 Lock for state transition pending.
 
osal_bool_t transition_active
 Flag is state transition is currently active.
 
struct ec_init_cmds init_cmds
 EtherCAT slave init commands.
 
worker_arg_t worker_arg
 Set state worker thread arguments.
 
osal_task_t worker_tid
 Set state worker thread handle.
 

Field Documentation

◆ fmmu

array of fmmu settings

These are the settings for the fielbus management units of the EtherCAT slaves. The size of the array is fmmu_ch.

◆ init_cmds

struct ec_init_cmds ec_slave::init_cmds

EtherCAT slave init commands.

This is a list of EtherCAT slave init commands. They should be addes to the list by ec_slave_add_init_cmd. An init command is usefull to make slave specific settings while setting the state machine from INIT to OP.

◆ pdin

ec_pd_t ec_slave::pdin

input process data

This is the complete input process data of the EtherCAT slave. Parts of it may also be accessed if we have multiple sub devices defined by the slave (subdevs)

◆ pdout

ec_pd_t ec_slave::pdout

output process data

This is the complete output process data of the EtherCAT slave. Parts of it may also be accessed if we have multiple sub devices defined by the slave (subdevs)

◆ sm

array of sm settings

These are the settings for the sync managers of the EtherCAT slaves. The size of the array is sm_ch.

◆ sm_set_by_user

int ec_slave::sm_set_by_user

sm set by user

This defines if the sync manager settings are set by the user and should not be figured out by the EtherCAT master state machine. If not set, the master will try to generate the sm settings either via a available mailbox protocol or the EEPROM.

◆ subdev_cnt

osal_size_t ec_slave::subdev_cnt

count of sub devices

An EtherCAT slave may have multiple sub devices defines. These may be e.g. multiple Sercos drives per slave, multiple CiA-DSP402 axes per slave, ...

◆ subdevs

array of sub devices

An EtherCAT slave may have multiple sub devices defines. These may be e.g. multiple Sercos drives per slave, multiple CiA-DSP402 axes per slave, ...

◆ worker_arg

worker_arg_t ec_slave::worker_arg

Set state worker thread arguments.

These arguments are used for worker thread when threaded startup is used.

◆ worker_tid

osal_task_t ec_slave::worker_tid

Set state worker thread handle.

Handle to spawned worker thread if threaded startup is used.


The documentation for this struct was generated from the following file: