[etherlab-users] WG: possible master problems

Florian Pose fp at igh-essen.com
Tue Mar 9 17:46:33 CET 2010


Hi,

I read the documentation you sent me. 0x1702 and 0x1b01 are the PDO indices,
not the PDO entry indices. Unfortunately the documentation does not give any
information about the PDO entry indices. But since the drive confirms to the
CiA402 profile, the PDO entries are part of the standard, and moreover listed
in the XML device description from the homepage:

<RxPdo Fixed="1" Sm="2">
    <Index>#x1702</Index>
    <Name>Outputs</Name>
    <Exclude>#x1701</Exclude>
    <Exclude>#x1703</Exclude>
    <Exclude>#x1704</Exclude>
    <Exclude>#x1705</Exclude>
    <Exclude>#x1706</Exclude>
    <Exclude>#x1707</Exclude>
    <Exclude>#x1708</Exclude>
    <Entry>
        <Index>#x606b</Index>
        <SubIndex>0</SubIndex>
        <BitLen>32</BitLen>
        <Name>Velocity demand value</Name>
        <DataType>DINT</DataType>
    </Entry>
    <Entry>
        <Index>#x6040</Index>
        <SubIndex>0</SubIndex>
        <BitLen>16</BitLen>
        <Name>Control word</Name>
        <DataType>UINT</DataType>
    </Entry>
</RxPdo>

and

<TxPdo Fixed="1">
    <Index>#x1b01</Index>
    <Name>Inputs</Name>
    <Exclude>#x1b03</Exclude>
    <Exclude>#x1b04</Exclude>
    <Exclude>#x1b05</Exclude>
    <Exclude>#x1b06</Exclude>
    <Exclude>#x1b07</Exclude>
    <Exclude>#x1b08</Exclude>
    <Entry>
        <Index>#x6064</Index>
        <SubIndex>0</SubIndex>
        <BitLen>32</BitLen>
        <Name>Position actual value</Name>
        <DataType>DINT</DataType>
    </Entry>
    <Entry>
        <Index>#x6041</Index>
        <SubIndex>0</SubIndex>
        <BitLen>16</BitLen>
        <Name>Status word</Name>
        <DataType>UINT</DataType>
    </Entry>
</TxPdo>

So the correct domain and PDO data structures must be:

const static ec_pdo_entry_reg_t domain1_regs[] = {
    {DrivePos, Danaher_S400, 0x606b, 0, &off_vel_out},
    {DrivePos, Danaher_S400, 0x6040, 0, &off_vel_cmd},
    {DrivePos, Danaher_S400, 0x6064, 0, &off_vel_in},
    {DrivePos, Danaher_S400, 0x6041, 0, &off_vel_sts},
    {}
};

static ec_pdo_entry_info_t s400_pdo_entries[] = {
    {0x606b, 0, 32},
    {0x6040, 0, 16},
    {0x6064, 0, 32},
    {0x6041, 0, 16},
};

static ec_pdo_info_t s400_pdos[] = {
    {0x1702, 2, s400_pdo_entries},
    {0x1b01, 2, s400_pdo_entries + 2},
};

static ec_sync_info_t s400_syncs[] = {
    {2, EC_DIR_OUTPUT, 1, s400_pdos},
    {3, EC_DIR_INPUT,  1, s400_pdos},
    {0xff}
};

-- 
Best regards,
Florian Pose

http://etherlab.org



More information about the Etherlab-users mailing list