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.

More
23 Jun 2025 19:13 - 23 Jun 2025 19:17 #330766 by PedPEx
I tried a bunch of stuff, this are the results:

1. I tried to set the corresponding PDO assignments via EtherCAT-Configurator once again. It changed the PDO assignment but after a power-cycle the settings were gone.

2. I tried to set the PDO assignment via a InitCMD-XML file. The InitCMDs do not change anything unfortunately. A "ethercat rescan" didn't help either, it just caused more errors in dmesg (output attached)

3. Your linked your software "convertorSdos.exe", i wasn't able to use it properly, it errored out with a "Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object. at Program.Main()" and crashed entirely. I started it with the "Beckhoff_EP5101-0011_config.xml" in the same folder, typed in "c -i" and gave it the absolute path to the before mentioned XML file - what did i do wrong?
Last edit: 23 Jun 2025 19:17 by PedPEx. Reason: forgot dmesg and ec slaves cli output

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

More
23 Jun 2025 19:43 #330770 by endian
Maybe there is an eeprom setup and you will have to overwrite something in the eeprom .. because I can not see any SDOs in the startup list out of SM configuration... From the dmesg you are still tring write SM managers what not exist for them... 

My setup before the translator was ... Active configuration, unplug the TC3 master plug lcec master.. ethercat pdos ... And just rewrite active config then I have exporting the SDO config and everything works everytime..

You are using the TC2 instead TC3 .. there should be problem of crashing because I did the translation over TC3 withe 20other slaves CoE or SoE and it works well... Use just TC3, it is better and it is free... Did drag and drop file to the console? Because you have to insert full path ... I am in the heavy storm right now and I can not check your stuff ... 

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

More
23 Jun 2025 19:48 - 25 Jun 2025 04:27 #330772 by endian
electricity is back here ... last slave is your EP box ... check the config but there is no SDOs setup .. I think you will have to create some over the SDO object and then translate them -> object 0x8000:01 .. 17 
Attachments:
Last edit: 25 Jun 2025 04:27 by endian.

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

Time to create page: 0.114 seconds
Powered by Kunena Forum