- Posts: 790
- Thank you received: 276
Ethercat HAL driver
- db1981
- Offline
- Platinum Member
-
Less
More
5 years 8 months ago #197958
by db1981
Replied by db1981 on topic Ethercat HAL driver
okay, there are 2 different pieces:
-the generic ethercat driver (part of linuxcnc ethercat) runs at your servo thread
-the generic network card driver for the ethercat master. This driver can have much more jitter then an dedicated driver for your network chip, in an realtime environment.
-the generic ethercat driver (part of linuxcnc ethercat) runs at your servo thread
-the generic network card driver for the ethercat master. This driver can have much more jitter then an dedicated driver for your network chip, in an realtime environment.
Please Log in or Create an account to join the conversation.
- JKAVS
- Offline
- Junior Member
-
Less
More
- Posts: 22
- Thank you received: 0
5 years 8 months ago - 5 years 8 months ago #197976
by JKAVS
Replied by JKAVS on topic Ethercat HAL driver
@db1981
I'm talking about the generic Ethercat driver. The one that needs a custom XML-file but can used with almost any Ethercat device. Somewhere in this thread was concerns that it is not fast enough for servo drives.
I'm talking about the generic Ethercat driver. The one that needs a custom XML-file but can used with almost any Ethercat device. Somewhere in this thread was concerns that it is not fast enough for servo drives.
Last edit: 5 years 8 months ago by JKAVS.
Please Log in or Create an account to join the conversation.
- db1981
- Offline
- Platinum Member
-
Less
More
- Posts: 790
- Thank you received: 276
5 years 8 months ago #197977
by db1981
Replied by db1981 on topic Ethercat HAL driver
That's wrong! there are no speed/cycle time differences between the generic or an special generated ethercat driver.
The following user(s) said Thank You: Nico2017
Please Log in or Create an account to join the conversation.
- JKAVS
- Offline
- Junior Member
-
Less
More
- Posts: 22
- Thank you received: 0
5 years 8 months ago #197978
by JKAVS
Replied by JKAVS on topic Ethercat HAL driver
Maybe I have mixed up the two generic drivers. I browsed the thread back and found a post where it was said that the generic network card driver is slower.
That shouldn't be a problem for me. At least my card is one which should have a specific driver.
That shouldn't be a problem for me. At least my card is one which should have a specific driver.
Please Log in or Create an account to join the conversation.
- bkt
- Offline
- Platinum Member
-
Less
More
- Posts: 1111
- Thank you received: 114
5 years 8 months ago - 5 years 8 months ago #198189
by bkt
Replied by bkt on topic Ethercat HAL driver
I have a big problem, I can't configure my axis, I can make it move smoothly but I can't drive it in velocity mode .... not because there isn't something wrong, but I think it just comes from a lot of confusion that I'm doing ... I use the generic drive speed profile and I can't figure out which parameters compared to the classic mesa 7i77 configuration I have to insert .... I insert an excerpt of my xml to understand the nomenclature .... and an excerpt from the file. hal ....
/* xml */
/* .hal*/
Finally these is a sample find on these infinite post .... there are converted signal ... but if use "scale" into xml file is necessary converter "posActual" signal from/to u32 for perform [JOINT_0]SCALE signal?
/* converted signal sample from these long post */
but if use "scale" into xml file is necessary converter "posActual" signal from/to u32 for perform [JOINT_0]SCALE signal?
I have not found configuration files that could help me to realize the "SCALE" of the encoder signal .... I don't understand how to get there .... is it just a problem of numeric conversions?
Thanks in advances for any help.
bkt
/* xml */
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>
<!-- <sdoConfig idx="607E" subIdx="1"><sdoDataRaw data="E0"/></sdoConfig>
<sdoConfig idx="6091" subIdx="1"><sdoDataRaw data="0375"/></sdoConfig> /* gear ratio param ... but not work ... so I leave it*/
<sdoConfig idx="6091" subIdx="2"><sdoDataRaw data="0010"/></sdoConfig>
<sdoConfig idx="6092" subIdx="1"><sdoDataRaw data="0360"/></sdoConfig>
<sdoConfig idx="6092" subIdx="2"><sdoDataRaw data="0168"/></sdoConfig> /* questo non vĂ settato*/ -->
<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="6077" subIdx="00" bitLen="16" halPin="torActual" halType="float"/>
<pdoEntry idx="606C" subIdx="00" bitLen="32" halPin="velActual" halType="float"/>
<pdoEntry idx="603F" subIdx="00" bitLen="16" halPin="errorStat" halType="float"/>
</pdo>
</syncManager>
<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="-250000" sync1Cycle="0" sync1Shift="0"/>
<watchdog divider="2050" intervals="1000"/>
</slave>
/* .hal*/
Code:
#*******************
# AXIS X
#*******************
setp pid.x.Pgain [JOINT_0]P
setp pid.x.Igain [JOINT_0]I
setp pid.x.Dgain [JOINT_0]D
setp pid.x.bias [JOINT_0]BIAS
setp pid.x.FF0 [JOINT_0]FF0
setp pid.x.FF1 [JOINT_0]FF1
setp pid.x.FF2 [JOINT_0]FF2
setp pid.x.deadband [JOINT_0]DEADBAND
setp pid.x.maxoutput [JOINT_0]MAX_OUTPUT
setp pid.x.error-previous-target true
net x-index-enable <=> pid.x.index-enable
net x-enable => pid.x.enable
net x-pos-cmd => pid.x.command
net x-vel-cmd => pid.x.command-deriv
net x-pos-fb => pid.x.feedback
net x-output => pid.x.output
# these part is ok no need help#
# ---PWM Generator signals/setup--- IN ETHERCAT there is no analog signal generator so I think it can be removed
#setp hm2_5i25.0.7i77.0.1.analogout0-scalemax [JOINT_0]OUTPUT_SCALE
#setp hm2_5i25.0.7i77.0.1.analogout0-minlim [JOINT_0]OUTPUT_MIN_LIMIT
#setp hm2_5i25.0.7i77.0.1.analogout0-maxlim [JOINT_0]OUTPUT_MAX_LIMIT
# enable _all_ sserial pwmgens
# net x-enable hm2_5i25.0.7i77.0.1.analogena
# these signals give me problems .... I have to convert them as it is written in the .hal file that I carry later?
net x-output => hm2_5i25.0.7i77.0.1.analogout0 # and these signal ??
net x-pos-cmd joint.0.motor-pos-cmd => #??
net x-enable joint.0.amp-enable-out => lcec.0.0.driverControl-3
# ---Encoder feedback signals/setup--- I'm unable to scale encoder raw signal
setp hm2_5i25.0.encoder.00.counter-mode 0
setp hm2_5i25.0.encoder.00.filter 1
setp hm2_5i25.0.encoder.00.index-invert 0
setp hm2_5i25.0.encoder.00.index-mask 0
setp hm2_5i25.0.encoder.00.index-mask-invert 0
setp hm2_5i25.0.encoder.00.scale [JOINT_0]ENCODER_SCALE
net x-pos-fb <= lcec.0.0.posActual #these id right or not?
net x-vel-fb <= lcec.0.0.velActual #these id right or not?
net x-pos-fb => joint.0.motor-pos-fb <= lcec.0.0.posActual #these id right or not?
#actualPos is raw and scaled on xml ... so no need I think. Is right?
#net x-index-enable joint.0.index-enable <=> hm2_5i25.0.encoder.00.index-enable
#net x-pos-rawcounts <= hm2_5i25.0.encoder.00.rawcounts
Finally these is a sample find on these infinite post .... there are converted signal ... but if use "scale" into xml file is necessary converter "posActual" signal from/to u32 for perform [JOINT_0]SCALE signal?
/* converted signal sample from these long post */
Code:
Translate X Position Feedback
net RawPositionFeedback0 lcec.0.0.Axis1RxPositionFeedback => x_scale_fb.in
setp x_scale_fb.gain [JOINT_0]PSCALE_INV #invert of below
setp x_scale_fb.offset 0
net xpos-fb joint.0.motor-pos-fb <= x_scale_fb.out
# Translate X Position Command
net xpos-cmd joint.0.motor-pos-cmd => x_scale_cmd.in
setp x_scale_cmd.gain [JOINT_0]PSCALE #invert of above
setp x_scale_cmd.offset 0
net PosCmdX-Scaled x_pos_cmd_u32.in <= x_scale_cmd.out
net PosCmdX-IntOut x_pos_cmd_u32.out => lcec.0.0.Axis1TxPositionCommand
but if use "scale" into xml file is necessary converter "posActual" signal from/to u32 for perform [JOINT_0]SCALE signal?
I have not found configuration files that could help me to realize the "SCALE" of the encoder signal .... I don't understand how to get there .... is it just a problem of numeric conversions?
Thanks in advances for any help.
bkt
Last edit: 5 years 8 months ago by bkt. Reason: some type of error copiing xml
Please Log in or Create an account to join the conversation.
- db1981
- Offline
- Platinum Member
-
Less
More
- Posts: 790
- Thank you received: 276
5 years 8 months ago #198191
by db1981
Replied by db1981 on topic Ethercat HAL driver
Hello,
what servo drives are this?
your configured PDOs look like position mode, but you trying to output an velocity command.
Probably the drive has its own position control loop running, then using an additionaly PID in Linuxcnc is wrong.
what servo drives are this?
your configured PDOs look like position mode, but you trying to output an velocity command.
Probably the drive has its own position control loop running, then using an additionaly PID in Linuxcnc is wrong.
Please Log in or Create an account to join the conversation.
Time to create page: 0.583 seconds