[etherlab-users] Invalid watchdog configuration
Mathias Thiele
thiele.mathias at googlemail.com
Wed Oct 19 20:11:30 CEST 2016
Thank you both for your answers. Indeed configuring the sync managers
helped. Now - thank you for that info Gavin - I am also configuring the
pdos itself to prevent errors. I got the slave to turn into Op-Mode, but it
won't react to values I send to him. I got the slave to work with TwinCAT,
so I suspect it's due to slave specific configurations which are present in
the Vendor-XML handed to us but are not present in the eeprom.
Vendor given xml looks like this:
------------------------------------------------------------
----------------------------
<Info>
<Mailbox>
<Timeout>
<RequestTimeout>100</RequestTimeout>
<ResponseTimeout>2000</ResponseTimeout>
</Timeout>
</Mailbox>
</Info>
<GroupType>Q.Series Module</GroupType>
<Fmmu>Outputs</Fmmu>
<Fmmu>Inputs</Fmmu>
<Fmmu>MBoxState</Fmmu>
<Sm MinSize="64" MaxSize="128" DefaultSize="64" StartAddress="#x1000"
ControlByte="#x26" Enable="1">MBoxOut</Sm>
<Sm MinSize="64" MaxSize="128" DefaultSize="64" StartAddress="#x1080"
ControlByte="#x22" Enable="1">MBoxIn</Sm>
<Sm StartAddress="#x1100" ControlByte="#x44" Enable="1">Outputs</Sm>
<Sm StartAddress="#x207E" ControlByte="#x00" Enable="1">Inputs</Sm>
<Mailbox>
<CoE SdoInfo="1" PdoUpload="1"/>
<FoE/>
</Mailbox>
<Dc>
<OpMode>
<Name>DcOn</Name>
<Desc>DC active</Desc>
<AssignActivate>#x0300</AssignActivate>
<CycleTimeSync0 Factor="1">0</CycleTimeSync0>
<ShiftTimeSync0>0</ShiftTimeSync0>
</OpMode>
</Dc>
<ESC>
<Reg0400>25000</Reg0400>
<Reg0420>100</Reg0420>
</ESC>
<Eeprom>
<ByteSize>2048</ByteSize>
<ConfigData>080C0204C8000000000000000000</ConfigData>
</Eeprom>
</Device>
----------------------------------------------------------
The xml-dump given by "ethercat xml":
<?xml version="1.0" ?>
<EtherCATInfo>
<!-- Slave 1 -->
<Vendor>
<Id>1290</Id>
</Vendor>
<Descriptions>
<Devices>
<Device>
<Type ProductCode="#x0000bf69" RevisionNo="#x00030000">Q.bloxx-EC
A109</Type>
<Name><![CDATA[Q.bloxx-EC A109]]></Name>
<Sm Enable="1" StartAddress="#x1000" ControlByte="#x26"
DefaultSize="64" />
<Sm Enable="1" StartAddress="#x1080" ControlByte="#x22"
DefaultSize="64" />
<Sm Enable="1" StartAddress="#x1100" ControlByte="#x4"
DefaultSize="0" />
<Sm Enable="1" StartAddress="#x207e" ControlByte="#x0"
DefaultSize="0" />
<RxPdo Sm="2" Fixed="1" Mandatory="1">
<Index>#x1600</Index>
<Name>OutMap: Ch1</Name>
<Entry>
<Index>#x7000</Index>
<SubIndex>1</SubIndex>
<BitLen>16</BitLen>
<Name>Ch1_0</Name>
<DataType>UINT16</DataType>
</Entry>
</RxPdo>
<RxPdo Sm="2" Fixed="1" Mandatory="1">
<Index>#x1601</Index>
<Name>OutMap: Ch02</Name>
<Entry>
<Index>#x7010</Index>
<SubIndex>1</SubIndex>
<BitLen>16</BitLen>
<Name>Ch02_0</Name>
<DataType>UINT16</DataType>
</Entry>
</RxPdo>
<RxPdo Sm="2" Fixed="1" Mandatory="1">
<Index>#x1602</Index>
<Name>OutMap: Ch03</Name>
<Entry>
<Index>#x7020</Index>
<SubIndex>1</SubIndex>
<BitLen>32</BitLen>
<Name>Ch03_0</Name>
<DataType>UINT32</DataType>
</Entry>
</RxPdo>
<RxPdo Sm="2" Fixed="1" Mandatory="1">
<Index>#x1603</Index>
<Name>OutMap: Ch04</Name>
<Entry>
<Index>#x7030</Index>
<SubIndex>1</SubIndex>
<BitLen>32</BitLen>
<Name>Ch04_0</Name>
<DataType>UINT32</DataType>
</Entry>
</RxPdo>
<TxPdo Sm="3" Fixed="1" Mandatory="1">
<Index>#x1a00</Index>
<Name>InMap: Ch1</Name>
<Entry>
<Index>#x6000</Index>
<SubIndex>1</SubIndex>
<BitLen>16</BitLen>
<Name>Ch1_0</Name>
<DataType>UINT16</DataType>
</Entry>
</TxPdo>
<TxPdo Sm="3" Fixed="1" Mandatory="1">
<Index>#x1a01</Index>
<Name>InMap: Ch02</Name>
<Entry>
<Index>#x6010</Index>
<SubIndex>1</SubIndex>
<BitLen>16</BitLen>
<Name>Ch02_0</Name>
<DataType>UINT16</DataType>
</Entry>
</TxPdo>
<TxPdo Sm="3" Fixed="1" Mandatory="1">
<Index>#x1a02</Index>
<Name>InMap: Ch03</Name>
<Entry>
<Index>#x6020</Index>
<SubIndex>1</SubIndex>
<BitLen>32</BitLen>
<Name>Ch03_0</Name>
<DataType>UINT32</DataType>
</Entry>
</TxPdo>
<TxPdo Sm="3" Fixed="1" Mandatory="1">
<Index>#x1a03</Index>
<Name>InMap: Ch04</Name>
<Entry>
<Index>#x6030</Index>
<SubIndex>1</SubIndex>
<BitLen>32</BitLen>
<Name>Ch04_0</Name>
<DataType>UINT32</DataType>
</Entry>
</TxPdo>
</Device>
</Devices>
</Descriptions>
</EtherCATInfo>
---------------------------------------------------
So I configured the pdos with the information given by "ethercat cstruct"
and "merged" some of the information given by the xml given to us.
Specifically I took the <DC>-Part from the xml and translated it into:
ecrt_slave_config_dc(sc, 0x0300, 0, 0, 0, 0);
For the <ESC>-Part:
ecrt_slave_config_watchdog(sc, 25000, 100);
Is there something I am missing which could be essential for the slave to
work?
Greetings,
Mathias
Am Dienstag, 18. Oktober 2016 schrieb Gavin Lambert :
> On 18 October 2016 22:38, quoth Mathias Thiele:
> > I do not configure pdos beause the slave does not support that according
> to the output given by "ethercat slaves":
>
> FWIW, this does not prevent you from configuring the PDOs (as far as the
> Etherlab code is concerned), it just means that the configuration that you
> specify must exactly match what the slave provides. Essentially you are
> telling Etherlab what PDO content you are *expecting*.
>
> There are some advantages to doing this:
>
> - If the slave turns out to have different content for some reason (eg.
> an incompatible previous or future version), you will get a clear error
> instead of getting corrupted data.
> - The application can start before the network is actually online; once
> the slaves boot then they will automatically be configured and the
> application doesn't need to be restarted. (Assuming that the app properly
> responds to the working counter or other incomplete/offline data
> indications, of course.)
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20161019/cdab5544/attachment-0004.htm>
More information about the Etherlab-users
mailing list