[etherlab-users] API for enabling/disabling sync managers of a slave

Mohsen Alizadeh Noghani m.alizad3h at gmail.com
Mon Oct 1 11:09:13 CEST 2018


I still haven't been able to enable sync managers (and thus change the
state to SAFEOP)
Currently, I'm executing this code
<https://github.com/mohse-n/L7N_EtherLab/blob/master/simple_test.c>, which
is basically the user example.
Output of $ethercat xml of the slave is:

<?xml version="1.0" ?>
<EtherCATInfo>
  <!-- Slave 0 -->
  <Vendor>
    <Id>30101</Id>
  </Vendor>
  <Descriptions>
    <Devices>
      <Device>
        <Type ProductCode="#x00000000" RevisionNo="#x00000002">L7N</Type>
        <Name><![CDATA[L7N]]></Name>
        <Sm Enable="1" StartAddress="#x1000" ControlByte="#x26"
DefaultSize="128" />
        <Sm Enable="1" StartAddress="#x1400" ControlByte="#x22"
DefaultSize="128" />
        <Sm Enable="0" StartAddress="#x1800" ControlByte="#x24"
DefaultSize="0" />
        <Sm Enable="0" StartAddress="#x1c00" ControlByte="#x20"
DefaultSize="0" />
        <RxPdo Sm="2" Fixed="1" Mandatory="1">
          <Index>#x1601</Index>
          <Name>2nd Receive PDO Mapping</Name>
          <Entry>
            <Index>#x6040</Index>
            <SubIndex>0</SubIndex>
            <BitLen>16</BitLen>
            <Name>Controlword</Name>
            <DataType>UINT16</DataType>
          </Entry>
          <Entry>
            <Index>#x607a</Index>
            <SubIndex>0</SubIndex>
            <BitLen>32</BitLen>
            <Name>Target Position</Name>
            <DataType>UINT32</DataType>
          </Entry>
        </RxPdo>
        <TxPdo Sm="3" Fixed="1" Mandatory="1">
          <Index>#x1a01</Index>
          <Name>2nd Transmit PDO Mapping</Name>
          <Entry>
            <Index>#x6041</Index>
            <SubIndex>0</SubIndex>
            <BitLen>16</BitLen>
            <Name>Statusword</Name>
            <DataType>UINT16</DataType>
          </Entry>
          <Entry>
            <Index>#x6064</Index>
            <SubIndex>0</SubIndex>
            <BitLen>32</BitLen>
            <Name>Position Actual Value</Name>
            <DataType>UINT32</DataType>
          </Entry>
        </TxPdo>
      </Device>
    </Devices>
  </Descriptions>
</EtherCATInfo>


On Wed, Sep 26, 2018 at 3:02 AM Gavin Lambert <gavin.lambert at tomra.com>
wrote:

> You typically don’t need to explicitly disable a sync manager; you simply
> don’t refer to it or any PDOs it contains, and then it will not be included
> in the domain’s data.
>
>
>
> Alternatively, you can configure the sync manager but then list zero PDOs
> for it, to explicitly set the PDO Assign register for that SM to 0 (for
> slaves that support flexible assignment).  Note that you should not enable
> the SM watchdog if you’re setting it to have zero PDOs.
>
>
>
> It sounds like you should probably read the documentation for the EtherCAT
> protocol and for the Etherlab master in particular.
>
>
>
> *From:* Mohsen Alizadeh Noghani <m.alizad3h at gmail.com>
> *Sent:* Wednesday, 26 September 2018 04:52
> *To:* Gavin Lambert <gavin.lambert at tomra.com>; etherlab-users at etherlab.org
> *Subject:* Re: [etherlab-users] API for enabling/disabling sync managers
> of a slave
>
>
>
> Thanks Gavin.
>
>
>
> 1- Would
>
> ecrt_slave_config_sync_manager(sc, 2, EC_DIR_OUTPUT, EC_WD_ENABLE )
>
> enable Sync Manager 2 of slave sc?
>
> 2- How can I disable it then? I doesn't seems the function provides an
> option to enable/disable.
>
>
>
> Best,
>
> Mohsen
>
>
>
>
>
> On Tue, Sep 25, 2018 at 2:40 AM, Gavin Lambert <gavin.lambert at tomra.com>
> wrote:
>
> You need to write an application, and then use
> ecrt_slave_config_sync_manager or ecrt_slave_config_pdos to configure the
> Sync Managers for each slave.
>
>
>
> *From:* Mohsen Alizadeh Noghani
> *Sent:* Tuesday, 25 September 2018 02:29
> *To:* etherlab-users at etherlab.org
> *Subject:* [etherlab-users] API for enabling/disabling sync managers of a
> slave
>
>
>
> Hello everyone.
>
>
>
> Is there a function call that I can use for enabling a particular sync
> manager of a slave?
>
> For example, I'd like to enable sync manager 2 of slave 1.
>
>
> Best,
>
> Mohsen
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.etherlab.org/pipermail/etherlab-users/attachments/20181001/0b68889c/attachment-0002.htm>


More information about the Etherlab-users mailing list