[etherlab-users] Please Help- Configuration of EL4008 (Analog Output)

Sanya kalani kalani.sanya at gmail.com
Tue Jun 11 18:33:39 CEST 2013


Dear Mr. Schlüter,



I am trying to configure a Slave EL4008 (12-bit Analog Output).

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 checked the
domain. The values are written as per my program but I cannot measure the
voltage on my physical Terminal using a multimeter. This slave supports
distributed clocks, I have not dealt with time issue in my program. Is that
the reason My slave is not updated?  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



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, 0x01, 16}, /* Analog output */
    {0x7010, 0x101, 16}, /* Analog output */
    {0x7020, 0x01, 16}, /* Analog output */
    {0x7030, 0x01, 16}, /* Analog output */
    {0x7040, 0x01, 16}, /* Analog output */
    {0x7050, 0x01, 16}, /* Analog output */
    {0x7060, 0x01, 16}, /* Analog output */
    {0x7070, 0x01, 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 },
    {3, EC_DIR_INPUT, 0},
    {0xff}
};

static unsigned int o_ana_out[8];

const static ec_pdo_entry_reg_t domain_EL4008_regs[] = {
        {AnaOutSlavePos,  Beckhoff_EL4008, 0x7000, 0x11, &o_ana_out[0]},
        {AnaOutSlavePos,  Beckhoff_EL4008, 0x7010, 0x11, &o_ana_out[1]},
        {AnaOutSlavePos,  Beckhoff_EL4008, 0x7020, 0x11, &o_ana_out[2]},
        {AnaOutSlavePos,  Beckhoff_EL4008, 0x7030, 0x11, &o_ana_out[3]},
        {AnaOutSlavePos,  Beckhoff_EL4008, 0x7040, 0x11, &o_ana_out[4]},
        {AnaOutSlavePos,  Beckhoff_EL4008, 0x7050, 0x11, &o_ana_out[5]},
        {AnaOutSlavePos,  Beckhoff_EL4008, 0x7060, 0x11, &o_ana_out[6]},
        {AnaOutSlavePos,  Beckhoff_EL4008, 0x7070, 0x11, &o_ana_out[7]},
{}
};
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20130611/6993680e/attachment-0003.htm>


More information about the Etherlab-users mailing list