[etherlab-users] Adapting 'user' example for FB1111-014x

Maarten Burghout m.m.burghout at student.utwente.nl
Mon Nov 15 15:23:15 CET 2010


Unfortunately, I'm still trying to establish PDO-exchange between my 
master and a Beckhoff FB1111-014X SPI slave.

Main problem seems to be the absence of pdo-entries in the slave 
configuration. Output of "ethercat cstruct":

------------------------------------------------------------------------
/* Master 0, Slave 0, "FB1111 SPI-Slave"
  * Vendor ID:       0x00000002
  * Product code:    0x04570862
  * Revision number: 0x0258008d
  */

ec_pdo_info_t slave_0_pdos[] = {
     {0x1a00, 0, NULL}, /* Outputs */
     {0x1600, 0, NULL}, /* Inputs */
};

ec_sync_info_t slave_0_syncs[] = {
     {0, EC_DIR_OUTPUT, 0, NULL, EC_WD_DISABLE},
     {1, EC_DIR_INPUT, 0, NULL, EC_WD_DISABLE},
     {2, EC_DIR_OUTPUT, 1, slave_0_pdos + 0, EC_WD_DISABLE},
     {3, EC_DIR_INPUT, 1, slave_0_pdos + 1, EC_WD_DISABLE},
     {0xff}
};
------------------------------------------------------------------------


"ethercat pdos":

------------------------------------------------------------------------
SM0: PhysAddr 0x1000, DefaultSize  128, ControlRegister 0x26, Enable 1
SM1: PhysAddr 0x1080, DefaultSize  128, ControlRegister 0x22, Enable 1
SM2: PhysAddr 0x1100, DefaultSize    0, ControlRegister 0x24, Enable 1
   RxPDO 0x1a00 "Outputs"
SM3: PhysAddr 0x1180, DefaultSize    0, ControlRegister 0x20, Enable 1
   TxPDO 0x1600 "Inputs"
------------------------------------------------------------------------

Seems to me the Output and Input SyncManagers are of size '0' and thus 
disabled. Hence, I cannot map a PDO entry to a PDO. Looking at the XML 
provided by Beckhoff, I notice that both the digital I/O and the uC 
variants of this slave module do have a PDO entry list!

My goal is to put a certain value in a register (arbitrairly which, but 
within the Process Data RAM area), which I will then read over the SPI 
interface (by means of an FPGA, acting as SPI-master). Vice versa I 
would like to have a value, written over SPI in another register, read 
by the same master thread.

Should I modify the ESI descriptive XML, compile a binary sii-file using 
TwinCAT or the EtherCAT Configurator, and download that to the slave 
with the IgH master? Or is there another way to simply put (cyclic of 
course!) a value in a certain registry?

Kind regards,
Maarten Burghout - University of Twente



More information about the Etherlab-users mailing list