Problems switching PDO assignments (EP5101-0011)

More
22 Jun 2025 16:09 #330705 by PedPEx
Hello all :D

i'm trying to implement a Beckhoff EP5101-0011 incremental encoder input into LinuxCNC with its 32bit counter. I need to read glass scale inputs with around 520 mm in length and a resolution of 1 µm. For that i need atleast 19 bit, and its standard PDO assignment with the "compact" 16bit encoder-value doesn't cut it. 

I can easily change the PDO assignment in the EtherCAT-Configurator application and the EP5101 activates the 32bit counter, after reconnecting the LinuxCNC machine it is also able to use the bigger counter, but after power cycling the device, it defaults back to the 16bit counter. So i tried to set the correct PDO assignments via SDO uploads, but that did also not work, it doesn't want to change in the "big counter mode" via LinuxCNC. 

It also complained about the other SDO uploads (settings), but that's a problem for later.
What exactly do i have to change, to initialize the encoder input to its 32bit PDO setting?

Thank you in advance for your help :)
<!-- EP5101 - Incr. Encoder Input -->
        <slave idx="9" type="generic" vid="0x00000002" pid="0x13ed4052" name="0571_EP5101">
            <!-- configure counter for 32bit -->
                <sdoConfig idx="1C12" subIdx="1"><sdoDataRaw data ="00 16"/></sdoConfig>  <!-- switch to 32bit RxPDO assign-->
                <sdoConfig idx="1C13" subIdx="1"><sdoDataRaw data ="00 1A"/></sdoConfig>  <!-- switch to 32bit TxPDO assign-->
            <!-- overall configuration -->
                <!-- Enable C reset -->
                <sdoConfig idx="8000" subIdx="01"><sdoDataRaw data ="01"/></sdoConfig>
                <!-- Enable extern reset -->
                <sdoConfig idx="8000" subIdx="02"><sdoDataRaw data ="01"/></sdoConfig>
                <!-- Enable up/down counter -->
                <sdoConfig idx="8000" subIdx="03"><sdoDataRaw data ="01"/></sdoConfig>
                <!-- Gate polarity -->
                <sdoConfig idx="8000" subIdx="04"><sdoDataRaw data ="01 00 00 00"/></sdoConfig>
                <!-- Disable filter -->
                <sdoConfig idx="8000" subIdx="08"><sdoDataRaw data ="01"/></sdoConfig>
                <!-- Enable micro increments -->
                <sdoConfig idx="8000" subIdx="0A"><sdoDataRaw data ="00"/></sdoConfig>
                <!-- Open cicruit detection A -->
                <sdoConfig idx="8000" subIdx="0B"><sdoDataRaw data ="01"/></sdoConfig>
                <!-- Open cicruit detection B -->
                <sdoConfig idx="8000" subIdx="0C"><sdoDataRaw data ="01"/></sdoConfig>
                <!-- Open cicruit detection C -->
                <sdoConfig idx="8000" subIdx="0D"><sdoDataRaw data ="00"/></sdoConfig>
                <!-- Reversion of rotation -->
                <sdoConfig idx="8000" subIdx="0E"><sdoDataRaw data ="00"/></sdoConfig>
                <!-- Extern reset polarity -->
                <sdoConfig idx="8000" subIdx="10"><sdoDataRaw data ="01 00 00 00"/></sdoConfig>
                <!-- Frequency window -->
                <sdoConfig idx="8000" subIdx="11"><sdoDataRaw data ="10 27"/></sdoConfig>
                <!-- Frequency scaling -->
                <sdoConfig idx="8000" subIdx="13"><sdoDataRaw data ="64 00 00 00"/></sdoConfig>
                <!-- Period scaling -->
                <sdoConfig idx="8000" subIdx="14"><sdoDataRaw data ="64 00 00 00"/></sdoConfig>
                <!-- Frequency resolution -->
                <sdoConfig idx="8000" subIdx="15"><sdoDataRaw data ="64 00 00 00"/></sdoConfig>
                <!-- Period resolution -->
                <sdoConfig idx="8000" subIdx="16"><sdoDataRaw data ="64 00 00 00"/></sdoConfig>
                <!-- Frequency wait time -->
                <sdoConfig idx="8000" subIdx="17"><sdoDataRaw data ="40 06"/></sdoConfig>
            <!-- configure SyncManagers -->
            <syncManager idx="0" dir="in"/>
            <syncManager idx="1" dir="out"/>
            <syncManager idx="2" dir="out">
                <!-- ENC RxPDO-Map Control -->
                <pdo idx="1601">
                    <!-- Enable latch C -->
                    <pdoEntry idx="7000" subIdx="01" bitLen="1" halPin="enable-latch-C" halType="bit"/>
                    <!-- Enable latch extern on positive edge -->
                    <pdoEntry idx="7000" subIdx="02" bitLen="1" halPin="ena-latch-ext-on-pos_edge" halType="bit"/>
                    <!-- Set counter -->
                    <pdoEntry idx="7000" subIdx="03" bitLen="1" halPin="set-counter" halType="bit"/>
                    <!-- Enable latch extern on negative edge -->
                    <pdoEntry idx="7000" subIdx="04" bitLen="1" halPin="ena-latch-ext-on-neg_edge" halType="bit"/>
                    <!-- Set counter value -->
                    <pdoEntry idx="7000" subIdx="11" bitLen="32" halPin="set-counter_value" halType="u32"/>
                </pdo>
            </syncManager>
            <syncManager idx="3" dir="in">
                <!-- ENC TxPDO-Map Status -->
                <pdo idx="1a01">
                    <!-- Latch C valid -->
                    <pdoEntry idx="6000" subIdx="01" bitLen="1" halPin="latch-c-valid" halType="bit"/>
                    <!-- Latch extern valid -->
                    <pdoEntry idx="6000" subIdx="02" bitLen="1" halPin="latch-extern-valid" halType="bit"/>
                    <!-- Set counter done -->
                    <pdoEntry idx="6000" subIdx="03" bitLen="1" halPin="set-counter-done" halType="bit"/>
                    <!-- Counter underflow -->
                    <pdoEntry idx="6000" subIdx="04" bitLen="1" halPin="counter-underflow" halType="bit"/>
                    <!-- Counter overflow -->
                    <pdoEntry idx="6000" subIdx="05" bitLen="1" halPin="counter-overflow" halType="bit"/>
                    <!-- Status of input status -->
                    <pdoEntry idx="6000" subIdx="06" bitLen="1" halPin="status-of-input-status" halType="bit"/>
                    <!-- Open circuit -->
                    <pdoEntry idx="6000" subIdx="07" bitLen="1" halPin="open-circuit" halType="bit"/>
                    <!-- Extrapolation stall -->
                    <pdoEntry idx="6000" subIdx="08" bitLen="1" halPin="extrapolation-stall" halType="bit"/>
                    <!-- Status of input A -->
                    <pdoEntry idx="6000" subIdx="09" bitLen="1" halPin="status-A" halType="bit"/>
                    <!-- Status of input B -->
                    <pdoEntry idx="6000" subIdx="0a" bitLen="1" halPin="status-B" halType="bit"/>
                    <!-- Status of input C -->
                    <pdoEntry idx="6000" subIdx="0b" bitLen="1" halPin="status-C" halType="bit"/>
                    <!-- Status of input gate -->
                    <pdoEntry idx="6000" subIdx="0c" bitLen="1" halPin="status-gate" halType="bit"/>
                    <!-- Status of extern latch -->
                    <pdoEntry idx="6000" subIdx="0d" bitLen="1" halPin="status-ext_latch" halType="bit"/>
                    <!-- Sync error -->
                    <pdoEntry idx="1c32" subIdx="20" bitLen="1" halPin="sync-error" halType="bit"/>
                    <!-- TxPDO State -->
                    <pdoEntry idx="1800" subIdx="07" bitLen="1" halPin="TxPDO-state" halType="bit"/>
                    <!-- TxPDO Toggle -->
                    <pdoEntry idx="1800" subIdx="09" bitLen="1" halPin="TxPDO-toggle" halType="bit"/>
                    <!-- Counter value -->
                    <pdoEntry idx="6000" subIdx="11" bitLen="32" halPin="counter_value" halType="u32"/>
                    <!-- Latch value -->
                    <pdoEntry idx="6000" subIdx="12" bitLen="32" halPin="latch_value" halType="u32"/>
                </pdo>
            </syncManager>
        </slave>
Attachments:

Please Log in or Create an account to join the conversation.

More
22 Jun 2025 16:26 #330708 by Hakan
I don't know anything about this device, but it doesn't hurt do a "ethercat rescan" after you made changes to the device.

Please Log in or Create an account to join the conversation.

More
22 Jun 2025 17:48 #330711 by endian
in the lower left corner you has the 2 check boxes ... check both and do the restart solution and activate solution ... 

everything should be written in the local memory ... but maybe you will probably need the initCmds file 

do not forget to activate DC .. because it is not active from default .. just SM synchro

if you are lazy, just use the console   to generate right configuration ... double click on the .exe ... then "c -i" enter .. then drag and drop your full master config export... 

Please Log in or Create an account to join the conversation.

Time to create page: 0.063 seconds
Powered by Kunena Forum