[etherlab-users] Configuration of Beckhoff Analog termimal EL4008 via CAPI

Sanya kalani kalani.sanya at gmail.com
Tue Jun 4 17:02:38 CEST 2013


Deall All,



I m trying to Configure EL4008 analog terminal by Beckhoff using CAPI. When
I insmod my application then all the LEDS on the terminal glow and I am
unable to control it or change its status. My system works completely fine
for Digital terminals so there is no problem in the setup. I feel the
Problem is in Configurations of Pdo’s or size of bits . The size of the pdo
bit for digital clamp is 1 bit for analog it is 2. What should I do? What
mistake am I committing?  Please Advise.

My system details are as follows-



EtherCAT – 1.5

Etherlab- 1.3

Linux- Open suse

Linux Kernel- 2.6.37.6 or 2.6.37.1.-1.2



Code-



#define Beckhoff_EK1101 0x00000002, 0x044d2c52

#define Beckhoff_EL4008 0x00000002, 0x0fa83052



#define BuscouplerPos  0,0



#define AnaOutSlavePos  0,2


ec_pdo_entry_info_t slave_EL4008_pdo_entries[] = {
    {0x7000, 0x11, 16}, /* Analog output */
    {0x7010, 0x11, 16}, /* Analog output */
    {0x7020, 0x11, 16}, /* Analog output */
    {0x7030, 0x11, 16}, /* Analog output */
    {0x7040, 0x11, 16}, /* Analog output */
    {0x7050, 0x11, 16}, /* Analog output */
    {0x7060, 0x11, 16}, /* Analog output */
    {0x7070, 0x11, 16}, /* Analog output */
    };

ec_pdo_info_t slave_EL4008_pdos[] = {
    {0x1600, 1, slave_EL4008_pdo_entries +0 }, /* RxPDO-Map OutputsCh.1 */
    {0x1601, 1, slave_EL4008_pdo_entries +1 }, /* RxPDO-Map OutputsCh.2 */
    {0x1602, 1, slave_EL4008_pdo_entries +2 }, /* RxPDO-Map OutputsCh.3 */
    {0x1603, 1, slave_EL4008_pdo_entries +3 }, /* RxPDO-Map OutputsCh.4 */
    {0x1604, 1, slave_EL4008_pdo_entries +4 }, /* RxPDO-Map OutputsCh.5 */
    {0x1605, 1, slave_EL4008_pdo_entries +5 }, /* RxPDO-Map OutputsCh.6 */
    {0x1606, 1, slave_EL4008_pdo_entries +6 }, /* RxPDO-Map OutputsCh.7 */
    {0x1607, 1, slave_EL4008_pdo_entries +7 }, /* RxPDO-Map OutputsCh.8 */
};


ec_sync_info_t slave_EL4008_syncs[] = {
    {0, EC_DIR_OUTPUT, 0},
    {1, EC_DIR_INPUT, 0},
    {2, EC_DIR_OUTPUT, 8,slave_EL4008_pdos + 0 ,EC_WD_ENABLE },
    {3, EC_DIR_INPUT, 0},
    {0xff}
};

static unsigned int o_ana_out[8],  bo_ana_out[8];

const static ec_pdo_entry_reg_t domain_EL4008_regs[] = {
        {AnaOutSlavePos,  Beckhoff_EL4008, 0x7000, 0x11,
&o_ana_out[0],&bo_ana_out[0]},
        {AnaOutSlavePos,  Beckhoff_EL4008, 0x7010, 0x11,
&o_ana_out[1],&bo_ana_out[1]},
        {AnaOutSlavePos,  Beckhoff_EL4008, 0x7020, 0x11,
&o_ana_out[2],&bo_ana_out[2]},
        {AnaOutSlavePos,  Beckhoff_EL4008, 0x7030, 0x11,
&o_ana_out[3],&bo_ana_out[3]},
        {AnaOutSlavePos,  Beckhoff_EL4008, 0x7040, 0x11,
&o_ana_out[4],&bo_ana_out[4]},
        {AnaOutSlavePos,  Beckhoff_EL4008, 0x7050, 0x11,
&o_ana_out[5],&bo_ana_out[5]},
        {AnaOutSlavePos,  Beckhoff_EL4008, 0x7060, 0x11,
&o_ana_out[6],&bo_ana_out[6]},
        {AnaOutSlavePos,  Beckhoff_EL4008, 0x7070, 0x11,
&o_ana_out[7],&bo_ana_out[7]},
{}
};



Regards,

Sanya
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20130604/98c7d6cd/attachment-0002.htm>


More information about the Etherlab-users mailing list