- Posts: 790
- Thank you received: 276
Ethercat HAL driver
- db1981
- Offline
- Platinum Member
-
Less
More
5 years 8 months ago #199820
by db1981
Replied by db1981 on topic Ethercat HAL driver
ok, then i will prepare this ...
-which linuxcnc version ?
-debian?
-RIP version oder installed linuxcnc?
-which linuxcnc version ?
-debian?
-RIP version oder installed linuxcnc?
- db1981
- Offline
- Platinum Member
-
Less
More
- Posts: 790
- Thank you received: 276
5 years 8 months ago #199825
by db1981
Replied by db1981 on topic Ethercat HAL driver
@bkt
sorry i am on the "woodway".....
Now i also got an newer EL5151, and both of them old and new run in the test setup without problems. May be there is wrong information in the SII eeprom. writing the coded pdo config is without errors.
So there must be an wrong thing in your config.
please post the ethercat_conf.xml
sorry i am on the "woodway".....
Now i also got an newer EL5151, and both of them old and new run in the test setup without problems. May be there is wrong information in the SII eeprom. writing the coded pdo config is without errors.
So there must be an wrong thing in your config.
please post the ethercat_conf.xml
- bkt
- Offline
- Platinum Member
-
Less
More
- Posts: 1111
- Thank you received: 114
5 years 8 months ago - 5 years 8 months ago #199833
by bkt
Replied by bkt on topic Ethercat HAL driver
@db1981 ... sorry for these questions ... but I can compile only my lcec_el5151_f25.c, lcec_el5151_f25.h, lcec_conf.c and lcec_conf.h ... or is necessary to compile all ?
ok, i read your messages just now. Thank you. But I would like to learn how to compile my ethercat component .... so my request is valid but do not prepare anything I would like to do by myself.
And if the problem is in my bad xml better .... I am attaching everything .... et voilĂ :
these my .hal
tanks a lot.
bkt
ok, i read your messages just now. Thank you. But I would like to learn how to compile my ethercat component .... so my request is valid but do not prepare anything I would like to do by myself.
And if the problem is in my bad xml better .... I am attaching everything .... et voilĂ :
Warning: Spoiler!
Code:
<masters>
<master idx="0" appTimePeriod="1000000" refClockSyncCycles="1">
<slave idx="0" 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="00"/></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="14000"/>
</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.000071429"/>
<pdoEntry idx="606C" subIdx="00" bitLen="32" halPin="velActual" halType="float"/>
</pdo>
</syncManager>
<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="-250000" sync1Cycle="0" sync1Shift="0"/>
<watchdog divider="2050" intervals="1000"/>
</slave>
<slave idx="1" 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="00"/></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="14000"/>
</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.000071429"/>
<pdoEntry idx="606C" subIdx="00" bitLen="32" halPin="velActual" halType="float"/>
</pdo>
</syncManager>
<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="-250000" sync1Cycle="0" sync1Shift="0"/>
<watchdog divider="2050" intervals="1000"/>
</slave>
<slave idx="2" 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="00"/></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="14000"/>
</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.000071429"/>
<pdoEntry idx="606C" subIdx="00" bitLen="32" halPin="velActual" halType="float"/>
</pdo>
</syncManager>
<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="-250000" sync1Cycle="0" sync1Shift="0"/>
<watchdog divider="2050" intervals="1000"/>
</slave>
<slave idx="3" type="EK1100" name="Busklemme"/>
<slave idx="4" type="EL1008"/>
<slave idx="5" type="EL2008"/>
<slave idx="6" type="EL5151" name="Enc0"/>
</master>
</masters>
these my .hal
Warning: Spoiler!
Code:
loadusr -W lcec_conf /home/mine/linuxcnc/configs/3ax/db1981.xml.xml
loadrt lcec
loadrt [KINS]KINEMATICS
setp rotarydeltakins.platformradius 190.00
setp rotarydeltakins.thighlength 340.0
setp rotarydeltakins.shinlength 800.0
setp rotarydeltakins.footradius 74.09
#autoconverted trivkins
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
loadrt conv_u32_float names=cu32f.0,cu32f.1,cu32f.2
loadrt toggle count=1
loadrt encoder num_chan=1
addf lcec.read-all servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf lcec.write-all servo-thread
addf cu32f.0 servo-thread
addf cu32f.1 servo-thread
addf cu32f.2 servo-thread
addf toggle.0 servo-thread
addf encoder.capture-position servo-thread
addf encoder.update-counters servo-thread
net ec-slaves-responding <= lcec.slaves-responding
net ec-link-up <= lcec.link-up
net ec-all-op <= lcec.all-op
net ec_up lcec.state-op => iocontrol.0.emc-enable-in lcec.0.0.driverControl-0 lcec.0.1.driverControl-0 lcec.0.2.driverControl-0
#net ec_up lcec.state-op => iocontrol.0.emc-enable-in
setp encoder.0.position-scale 10
#net x-pos-fb lcec.0.6.enc-pos-scale
#net y-pos-fb lcec.0.6.enc-pos-scale
setp lcec.0.0.driverControl-1 1
setp lcec.0.0.driverControl-2 1
setp lcec.0.1.driverControl-1 1
setp lcec.0.1.driverControl-2 1
setp lcec.0.2.driverControl-1 1
setp lcec.0.2.driverControl-2 1
#net faultReset-All lcec.0.0.driverControl-7 <= esternalCmd => lcec.0.0.driverControl-7 lcec.0.1.driverControl-7 lcec.0.2.driverControl-7
#net faultSignal-0 lcec.0.0.driverStatus-3 => esternalSignal-0
#net faultSignal-1 lcec.0.1.driverStatus-3 => esternalSignal-1
#net faultSignal-2 lcec.0.2.driverStatus-3 => esternalSignal-2
#net faultSignal-3 lcec.0.3.driverStatus-3 => esternalSignal-3
net Xaxe_on joint.0.amp-enable-out => lcec.0.0.driverControl-3
#net Xaxe_on lcec.0.0.driverControl-1
#net Xaxe_on lcec.0.0.driverControl-2
#net Xaxe_on lcec.0.0.driverControl-0
net Yaxe_on joint.1.amp-enable-out => lcec.0.1.driverControl-3
#net Yaxe_on lcec.0.1.driverControl-1
#net Yaxe_on lcec.0.1.driverControl-2
#net Yaxe_on lcec.0.1.driverControl-0
net Zaxe_on joint.2.amp-enable-out => lcec.0.2.driverControl-3
#net Zaxe_on lcec.0.2.driverControl-1
#net Zaxe_on lcec.0.2.driverControl-2
#net Zaxe_on lcec.0.2.driverControl-0
net Xaxe_fb joint.0.motor-pos-fb <= lcec.0.0.posActual
net Xaxe_cmd joint.0.motor-pos-cmd => lcec.0.0.posCommand
net Yaxe_fb joint.1.motor-pos-fb <= lcec.0.1.posActual
net Yaxe_cmd joint.1.motor-pos-cmd => lcec.0.1.posCommand
net Zaxe_fb joint.2.motor-pos-fb <= lcec.0.2.posActual
net Zaxe_cmd joint.2.motor-pos-cmd => lcec.0.2.posCommand
tanks a lot.
bkt
Last edit: 5 years 8 months ago by bkt.
- db1981
- Offline
- Platinum Member
-
Less
More
- Posts: 790
- Thank you received: 276
5 years 8 months ago - 5 years 8 months ago #199836
by db1981
Replied by db1981 on topic Ethercat HAL driver
@bkt
about compiling: you have to compile the complete project, the modules have to be linked. After compiling you only got an lcec_conf and an lcec module.
about you config, nothing seems to be wrong.
please do an "ethercat debug 1" , start linuxcnc, then dmesg and look for all ethercat messages for slave 6.
about compiling: you have to compile the complete project, the modules have to be linked. After compiling you only got an lcec_conf and an lcec module.
about you config, nothing seems to be wrong.
please do an "ethercat debug 1" , start linuxcnc, then dmesg and look for all ethercat messages for slave 6.
Last edit: 5 years 8 months ago by db1981. Reason: post overlab
The following user(s) said Thank You: bkt
- db1981
- Offline
- Platinum Member
-
Less
More
- Posts: 790
- Thank you received: 276
5 years 8 months ago #199854
by db1981
Replied by db1981 on topic Ethercat HAL driver
@bkt in addition
you should also better change your addf lcec.write_all line to the last line of addfs in your hal file.
read the post #199443 on page 115 of this thread.
you should also better change your addf lcec.write_all line to the last line of addfs in your hal file.
read the post #199443 on page 115 of this thread.
The following user(s) said Thank You: bkt
- bkt
- Offline
- Platinum Member
-
Less
More
- Posts: 1111
- Thank you received: 114
5 years 8 months ago - 5 years 8 months ago #199870
by bkt
Replied by bkt on topic Ethercat HAL driver
My ini have debug = 1 ... but noting appears about -p6 slaves on terminal ...
Changing position lcec.write_all command on .hal file give me stability on power on of sistem (previosly sometime one drive not go on OP mode .... now every time ... so thanks).
But no other .... Have you some other ideas? Because linuxcnc axis Gui not detect -p6 slaves at all. On terminal I can see everytime -p6 slaves on PREOP mode.
Changing position lcec.write_all command on .hal file give me stability on power on of sistem (previosly sometime one drive not go on OP mode .... now every time ... so thanks).
But no other .... Have you some other ideas? Because linuxcnc axis Gui not detect -p6 slaves at all. On terminal I can see everytime -p6 slaves on PREOP mode.
Last edit: 5 years 8 months ago by bkt.
Time to create page: 2.553 seconds