Ethercat CSV mode ?

More
03 Oct 2023 09:35 #282145 by akg1904
Ethercat CSV mode ? was created by akg1904
Hi,

I was doing some experiment with ethercat, as I was trying to run my servo drive using CSV mode instead of CSP mode but I didn't succeed.
If somebody have any idea or example of CSV mode in Ethercat can you please share it with me.

Regards
Abhishek

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

More
04 Oct 2023 21:22 - 04 Oct 2023 21:27 #282318 by bkt
Replied by bkt on topic Ethercat CSV mode ?
github.com/sittner/linuxcnc-ethercat/blo...ex/ethercat-conf.xml

instead 1600 and 1A00 use 1602 and 1A02 with necessary register 640 641 etc etc ....

example:

<master idx="0" appTimePeriod="2000000" refClockSyncCycles="1">
<slave idx="0" type="generic" vid="0000003B" pid="38079D3D" configPdos="true">
<sdoConfig idx="6060" subIdx="0">
<sdoDataRaw data="08"/>
</sdoConfig>
<syncManager idx="0" dir="out"> </syncManager>
<syncManager idx="1" dir="in"> </syncManager>
<syncManager idx="2" dir="out">
<pdo idx="1602">
<pdoEntry idx="6040" subIdx="00" bitLen="16" halPin="ControlWord" halType="bit"/>
<pdoEntry idx="607a" subIdx="00" bitLen="32" halPin="TargetPosition" halType="s32"/>
<pdoEntry idx="60xx" subIdx="00" bitLen="8" halPin="vel" halType="s32"/>
</pdo>
</syncManager>
<syncManager idx="3" dir="in">
<pdo idx="1a02">
<pdoEntry idx="6041" subIdx="00" bitLen="16" halPin="StatusWord" halType="bit"/>
<pdoEntry idx="6064" subIdx="00" bitLen="32" halPin="ActualPosition" halType="s32"/>
<pdoEntry idx="6061" subIdx="00" bitLen="8" halPin="ModeOfOperationDisplay" halType="s32"/>
</pdo>
</syncManager>
<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="2000"/>
<watchdog divider="2498" intervals="1000"/>
</slave>
</master>
 
Last edit: 04 Oct 2023 21:27 by bkt.
The following user(s) said Thank You: akg1904

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

More
05 Oct 2023 13:08 #282361 by akg1904
Replied by akg1904 on topic Ethercat CSV mode ?
Hi bkt,

Thanks for the reply,

I did the changes what you suggested, but still I got an error:
" parameter or pin 'cia402.5.csv-mode' not found"

Is there any other changes I need to make for example in HAL file etc.

I have attached my XML and HAL file.

 

File Attachment:

File Name: ethercat-c...05-2.xml
File Size:2 KB

 

File Attachment:

File Name: pre-gui_20...05-2.hal
File Size:3 KB


Regards
Abhishek
Attachments:

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

More
05 Oct 2023 16:34 #282378 by bkt
Replied by bkt on topic Ethercat CSV mode ?

I did the changes what you suggested, but still I got an error:" parameter or pin 'cia402.5.csv-mode' not found"
 

But in your file there are not cia402.5 pin ... you set max 3 cia402 axis .... and set one only ....so is normal that error
loadrt [KINS]KINEMATICS
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS

loadusr -W lcec_conf ethercat-conf.xml
loadrt lcec
loadrt cia402 count=3


addf lcec.read-all          servo-thread
addf cia402.0.read-all      servo-thread

# addf exio.read             servo-thread
addf motion-command-handler servo-thread
addf motion-controller      servo-thread

addf cia402.0.write-all     servo-thread


addf lcec.write-all         servo-thread


or you have modify your hal file before post?

Any how DC sinc row goes at end ..... here an example of one slave:
  <slave idx="1" type="generic" vid="thebest" pid="notso" configPdos="true">
[color=#e74c3c]    <sdoConfig idx="6060" subIdx="0"><sdoDataRaw data="08"/></sdoConfig>
    <syncManager idx="0" dir="out"></syncManager>
    <syncManager idx="1" dir="in"></syncManager>
    <syncManager idx="2" dir="out">[/color]
      <pdo idx="1600">
        <pdoEntry idx="6040" subIdx="00" bitLen="16" halPin="axCmd" halType="float"/>
        <pdoEntry idx="607A" subIdx="00" bitLen="32" halPin="posCommand" halType="float" scale="1444.444444444"/>
        <pdoEntry idx="60FE" subIdx="00" bitLen="32" halType="complex">
            <complexEntry bitLen="1" halPin="out-0" halType="bit"/>
            <complexEntry bitLen="1" halPin="out-1" halType="bit"/>
            <complexEntry bitLen="1" halPin="out-2" halType="bit"/>
            <complexEntry bitLen="1" halPin="out-3" halType="bit"/>
            <complexEntry bitLen="28"/>
        </pdoEntry>
      </pdo>
    </syncManager>
    <syncManager idx="3" dir="in">
      <pdo idx="1A00">
        <pdoEntry idx="6041" subIdx="00" bitLen="16" halPin="axStat" halType="bit"/>
        <pdoEntry idx="6064" subIdx="00" bitLen="32" halPin="posActual" halType="float" scale="0.000692308"/>
        <pdoEntry idx="60FD" subIdx="00" bitLen="32" halType="complex">
            <complexEntry bitLen="1" halPin="in-1" halType="bit"/>
            <complexEntry bitLen="1" halPin="in-2" halType="bit"/>
            <complexEntry bitLen="1" halPin="in-3" halType="bit"/>
            <complexEntry bitLen="1" halPin="in-4" halType="bit"/>
            <complexEntry bitLen="1" halPin="in-5" halType="bit"/>
            <complexEntry bitLen="1" halPin="in-6" halType="bit"/>
            <complexEntry bitLen="1" halPin="in-7" halType="bit"/>
            <complexEntry bitLen="1" halPin="in-8" halType="bit"/>
            <complexEntry bitLen="1" halPin="in-9" halType="bit"/>
            <complexEntry bitLen="1" halPin="in-10" halType="bit"/>
            <complexEntry bitLen="22"/>
        </pdoEntry>  
        <pdoEntry idx="603F" subIdx="00" bitLen="16" halPin="errorStat" halType="float"/>
        <pdoEntry idx="2241" subIdx="00" bitLen="32" halPin="encDiff" halType="float"/>     
      </pdo>
    </syncManager>
    [color=#e74c3c]<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="500000"/>[/color]
   </slave>


in red the important things in right order (syncoshift can be less) .... 6060 register decide for pdos mode usually .... in these case 08 value .... in your case think 06 .... but need to check not sure. Syncmanager row is necessary for IN and OUT think because LWR way to comunicate with master .... plus 1602 and 1A02 PDOs have certain type of register to use ....inserting fewer registers than is the cia402 convention could make your devices "mute", and the same is true when inserting more registers than is the convention. These are things to be tested, it is not the law. However if you follow the cia402 convention and your slaves you will also have no problems.

Now check manuals of your slaves and check cia402 register (SDOs and PDOs) management. If these convention (cia402) is respect, use one slaves or an other brand is quite the same. Problem become from devices that non have these standards (but the ethercat wizards who hang out here on the forum don't find problems anywhere, especially when they know their animals very well).

regards 
 

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

More
05 Oct 2023 16:40 - 05 Oct 2023 16:51 #282379 by bkt
Replied by bkt on topic Ethercat CSV mode ?
an other example with 1601 and 1a01 (in these case some extra SDOs need to set at upload, maybe for you too):


 [code] <slave idx="3" type="generic" vid="000007DD" pid="01" configPdos="true">
    <sdoConfig idx="6060" subIdx="0"><sdoDataRaw data="08"/></sdoConfig>
    <sdoConfig idx="60C2" subIdx="1"><sdoDataRaw data="01"/></sdoConfig>
    <sdoConfig idx="60C2" subIdx="2"><sdoDataRaw data="FD"/></sdoConfig>
    <sdoConfig idx="607E" subIdx="0"><sdoDataRaw data="E0"/></sdoConfig>
    <syncManager idx="0" dir="out"></syncManager>
    <syncManager idx="1" dir="in"></syncManager>
    <syncManager idx="2" dir="out">
      <pdo idx="1601">
        <pdoEntry idx="6040" subIdx="00" bitLen="16" halPin="driverControl" halType="bit"/>
        <pdoEntry idx="607A" subIdx="00" bitLen="32" halPin="posCommand" halType="float" scale="25437,5"/>
      </pdo>
    </syncManager>
    <syncManager idx="3" dir="in">
      <pdo idx="1A01">
        <pdoEntry idx="6041" subIdx="00" bitLen="16" halPin="driverStatus" halType="bit"/>
        <pdoEntry idx="6064" subIdx="00" bitLen="32" halPin="posActual" halType="float" scale="0.000039312"/>
        <pdoEntry idx="606C" subIdx="00" bitLen="32" halPin="velActual" halType="float" scale="1"/>
        <pdoEntry idx="603F" subIdx="00" bitLen="16" halPin="Error" halType="bit"/>
      </pdo>
    </syncManager>
    <dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="250000" sync1Cycle="0" sync1Shift="0"/>
    <watchdog divider="2048" intervals="1000"/>
  </slave>

register 6060 set:[/code]
  • 01 -> profile position mode
  • 03 -> profile velocity mode
  • 04 -> profile torque mode
  • 06 -> homing mode
  • 07 -> interpolated position mode
  • 08 -> CSP
  • 09 -> CSV
  • 0A -> CST
not all is supported in all drive ...

so you must change these row
[code]<sdoConfig idx="6060" subIdx="0"><sdoDataRaw data="08"/></sdoConfig>
[/code]
for CSP
[code]<sdoConfig idx="6060" subIdx="0"><sdoDataRaw data="09"/></sdoConfig>
[/code]
for CSV

before reading the manual ....
Last edit: 05 Oct 2023 16:51 by bkt.

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

More
08 Dec 2023 13:41 #287533 by onceloved
Replied by onceloved on topic Ethercat CSV mode ?
setp cia402.0.csp-mode 1 defaults to csp mode. If you want to use csv mode, change it to 0 instead of setp cia402.0.csv-mode 1

github.com/dbraun1981/hal-cia402
The following user(s) said Thank You: akg1904

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

Time to create page: 0.082 seconds
Powered by Kunena Forum