Leadshine EL8 Servo Drives - EtherCAT
- DeckelCNC
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 0
29 Nov 2024 21:09 #315586
by DeckelCNC
Leadshine EL8 Servo Drives - EtherCAT was created by DeckelCNC
Hello All,
I am new to linuxcnc and i have been working through installation and getting etherCAT set up.
So far I have / had been sucessful with the basic install and getting Beckhoff units to function. and driving inputs / outputs.I purchased leadshine EL8 servo drives for a 2 axis project i am working on.
Creating my own .xml and .hal i was able to get by beckhoff units into "operational" and the EL8 Drives into "pre-operational," but that was as far as i could get.in the past days i have lost my way (probably with a lack of understanding of fundamentals), and I caved into trying other online .xml examples and got everything in a total mess and couldn't even get back to LinuxCNC to open.I have got my files back to the basic situation of LinuxCNC opening and everything working, but the drives are not going into operational state. i belive its my .hal file. but if i add any cia402 links everything stops working.Is it wrong for me to expect I can make one drive work in LinuxCNC first ? (say the x axis) then add the y axis later ? i was thinking the homing was stopping the drives from going into operational for a time.this is my situation:~$ ethercat slaves
0 0:0 OP + EK1100 EtherCAT-Koppler (2A E-Bus)
1 0:1 OP + EL1008 8Ch. Dig. Input 24V, 3ms
2 0:2 OP + EL1008 8Ch. Dig. Input 24V, 3ms
3 0:3 OP + EL2004 4K. Dig. Ausgang 24V, 0.5A
4 0:4 PREOP + L8EC(COE)I have attched 3 files1)axis_mm-try2.ini
2)TRY.hal
3)ethercat-config.xml
I am new to linuxcnc and i have been working through installation and getting etherCAT set up.
So far I have / had been sucessful with the basic install and getting Beckhoff units to function. and driving inputs / outputs.I purchased leadshine EL8 servo drives for a 2 axis project i am working on.
Creating my own .xml and .hal i was able to get by beckhoff units into "operational" and the EL8 Drives into "pre-operational," but that was as far as i could get.in the past days i have lost my way (probably with a lack of understanding of fundamentals), and I caved into trying other online .xml examples and got everything in a total mess and couldn't even get back to LinuxCNC to open.I have got my files back to the basic situation of LinuxCNC opening and everything working, but the drives are not going into operational state. i belive its my .hal file. but if i add any cia402 links everything stops working.Is it wrong for me to expect I can make one drive work in LinuxCNC first ? (say the x axis) then add the y axis later ? i was thinking the homing was stopping the drives from going into operational for a time.this is my situation:~$ ethercat slaves
0 0:0 OP + EK1100 EtherCAT-Koppler (2A E-Bus)
1 0:1 OP + EL1008 8Ch. Dig. Input 24V, 3ms
2 0:2 OP + EL1008 8Ch. Dig. Input 24V, 3ms
3 0:3 OP + EL2004 4K. Dig. Ausgang 24V, 0.5A
4 0:4 PREOP + L8EC(COE)I have attched 3 files1)axis_mm-try2.ini
2)TRY.hal
3)ethercat-config.xml
Attachments:
Please Log in or Create an account to join the conversation.
- DeckelCNC
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 0
30 Nov 2024 01:38 #315599
by DeckelCNC
Replied by DeckelCNC on topic Leadshine EL8 Servo Drives - EtherCAT
When i try and link a cia402.hal file (below). i am unable to start linuxcnc. (i get lots of errors)
i go through the process of trying to remove the lines that create problems.
but its actually a backwards step from the files i uploaded above. ie everything goes to pre operational (Beckhoff and leadshine drive) by the time i can get linuxcnc to start up.
I have the feeling i am missing a big obvious step, but its not jumping out at me.
i go through the process of trying to remove the lines that create problems.
but its actually a backwards step from the files i uploaded above. ie everything goes to pre operational (Beckhoff and leadshine drive) by the time i can get linuxcnc to start up.
I have the feeling i am missing a big obvious step, but its not jumping out at me.
###########################################################
#
# CIA 402 example snippet Hal
#
###########################################################
###########################################################
# Setup
###########################################################
#loadrt [KINS]KINEMATICS
#loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
loadusr -W lcec_conf /home/edmuser/linuxcnc/configs/sim.axis-1/ethercat-conf.xml
loadrt lcec
loadrt cia402 count=1
loadrt pid names=x-pid
#,y-pid,z-pid
###########################################################
# Functions servo-thread
###########################################################
addf lcec.read-all servo-thread
addf cia402.0.read-all servo-thread
#addf cia402.1.read-all servo-thread
#addf cia402.2.read-all servo-thread
#addf motion-command-handler servo-thread
#addf motion-controller servo-thread
addf x-pid.do-pid-calcs servo-thread
#addf y-pid.do-pid-calcs servo-thread
#addf z-pid.do-pid-calcs servo-thread
addf cia402.0.write-all servo-thread
#addf cia402.1.write-all servo-thread
#addf cia402.2.write-all servo-thread
#addf lcec.write-all servo-thread
#########################################
#nets
#########################################
net emc-enable => iocontrol.0.emc-enable-in
sets emc-enable 1
#config
setp cia402.0.csp-mode 1
setp cia402.0.pos-scale 3600
#from servo(ethercat) to cia402
net x-statusword lcec.0.4.cia-statusword => cia402.0.statusword
net x-opmode-display lcec.0.4.opmode-display => cia402.0.opmode-display
net x-drv-act-pos lcec.0.4.actual-position => cia402.0.drv-actual-position
net x-drv-act-velo lcec.0.4.actual-velocity => cia402.0.drv-actual-velocity
#from cia402 to servo(ethercat)
net x-controlword cia402.0.controlword => lcec.0.4.cia-controlword
net x-modes-of-operation cia402.0.opmode => lcec.0.4.opmode
net x-drv-target-pos cia402.0.drv-target-position => lcec.0.4.target-position
#net x-drv-target-velo cia402.0.drv-target-velocity => lcec.0.4.target-velocity
#from motion to cia
net x-enable <= joint.0.amp-enable-out => cia402.0.enable
net x-amp-fault => joint.0.amp-fault-in <= cia402.0.drv-fault
#net x-pos-cmd <= joint.0.motor-pos-cmd => cia402.0.pos-cmd
#net x-pos-fb => joint.0.motor-pos-fb <= cia402.0.pos-fb
#homing
net x-home-index <= joint.0.index-enable => cia402.0.home
Please Log in or Create an account to join the conversation.
- Aciera
- Offline
- Administrator
Less
More
- Posts: 3946
- Thank you received: 1705
30 Nov 2024 10:11 #315633
by Aciera
Replied by Aciera on topic Leadshine EL8 Servo Drives - EtherCAT
Usually a good idea to share the errors you are getting. Saves people trying to help a lot of time.
The following user(s) said Thank You: DeckelCNC
Please Log in or Create an account to join the conversation.
- kworm
- Offline
- Junior Member
Less
More
- Posts: 24
- Thank you received: 7
30 Nov 2024 17:14 #315665
by kworm
Replied by kworm on topic Leadshine EL8 Servo Drives - EtherCAT
Can you also post the output of "ethercat pdos". It is likely the drives may not have all the PDOs you are referencing configured. Did you use the drive manufacturers software to configure them?
The following user(s) said Thank You: DeckelCNC
Please Log in or Create an account to join the conversation.
- DeckelCNC
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 0
30 Nov 2024 21:42 #315688
by DeckelCNC
Replied by DeckelCNC on topic Leadshine EL8 Servo Drives - EtherCAT
Thank you for the reply's
Kworm : i think i have the pdo's right in the drive Vs the terminal output Vs the .xml ? please let me know if i am not understanding correctly. Thank you for your time.
Aciera (sorry i thought it was better to upload files that made no errors, but not actually working)
i have been reading and come across a post about a Youtuber called Marco Reps ? i thought it would be a idea to apply some of the methods i found in these files. so i have changed things from my first post, and i am now getting errors again / LinuxCNC is not opening. this looks to be the main issue ? EL8_machine.hal:41: Pin 'lcec.0.0.cia-statusword' does not exist
i have included the Error report + the .xml + .hal + .ini
.XML File
.HAL
.ini
Kworm : i think i have the pdo's right in the drive Vs the terminal output Vs the .xml ? please let me know if i am not understanding correctly. Thank you for your time.
Warning: Spoiler!
$ ethercat pdos
=== Master 0, Slave 1 ===
SM0: PhysAddr 0x1000, DefaultSize 0, ControlRegister 0x00, Enable 0
TxPDO 0x1a00 "Channel 1"
PDO entry 0x6000:01, 1 bit, "Input"
TxPDO 0x1a01 "Channel 2"
PDO entry 0x6010:01, 1 bit, "Input"
TxPDO 0x1a02 "Channel 3"
PDO entry 0x6020:01, 1 bit, "Input"
TxPDO 0x1a03 "Channel 4"
PDO entry 0x6030:01, 1 bit, "Input"
TxPDO 0x1a04 "Channel 5"
PDO entry 0x6040:01, 1 bit, "Input"
TxPDO 0x1a05 "Channel 6"
PDO entry 0x6050:01, 1 bit, "Input"
TxPDO 0x1a06 "Channel 7"
PDO entry 0x6060:01, 1 bit, "Input"
TxPDO 0x1a07 "Channel 8"
PDO entry 0x6070:01, 1 bit, "Input"
=== Master 0, Slave 2 ===
SM0: PhysAddr 0x1000, DefaultSize 0, ControlRegister 0x00, Enable 0
TxPDO 0x1a00 "Channel 1"
PDO entry 0x6000:01, 1 bit, "Input"
TxPDO 0x1a01 "Channel 2"
PDO entry 0x6010:01, 1 bit, "Input"
TxPDO 0x1a02 "Channel 3"
PDO entry 0x6020:01, 1 bit, "Input"
TxPDO 0x1a03 "Channel 4"
PDO entry 0x6030:01, 1 bit, "Input"
TxPDO 0x1a04 "Channel 5"
PDO entry 0x6040:01, 1 bit, "Input"
TxPDO 0x1a05 "Channel 6"
PDO entry 0x6050:01, 1 bit, "Input"
TxPDO 0x1a06 "Channel 7"
PDO entry 0x6060:01, 1 bit, "Input"
TxPDO 0x1a07 "Channel 8"
PDO entry 0x6070:01, 1 bit, "Input"
=== Master 0, Slave 3 ===
SM0: PhysAddr 0x0f00, DefaultSize 0, ControlRegister 0x44, Enable 9
RxPDO 0x1600 "Channel 1"
PDO entry 0x7000:01, 1 bit, "Output"
RxPDO 0x1601 "Channel 2"
PDO entry 0x7010:01, 1 bit, "Output"
RxPDO 0x1602 "Channel 3"
PDO entry 0x7020:01, 1 bit, "Output"
RxPDO 0x1603 "Channel 4"
PDO entry 0x7030:01, 1 bit, "Output"
=== Master 0, Slave 4 ===
SM0: PhysAddr 0x1000, DefaultSize 124, ControlRegister 0x26, Enable 1
SM1: PhysAddr 0x1100, DefaultSize 124, ControlRegister 0x22, Enable 1
SM2: PhysAddr 0x1200, DefaultSize 0, ControlRegister 0x64, Enable 1
RxPDO 0x1600 ""
PDO entry 0x6040:00, 16 bit, ""
PDO entry 0x6060:00, 8 bit, ""
PDO entry 0x607a:00, 32 bit, ""
PDO entry 0x60ff:00, 32 bit, ""
SM3: PhysAddr 0x1400, DefaultSize 0, ControlRegister 0x20, Enable 1
TxPDO 0x1a00 ""
PDO entry 0x6041:00, 16 bit, ""
PDO entry 0x6061:00, 8 bit, ""
PDO entry 0x6064:00, 32 bit, ""
PDO entry 0x606c:00, 32 bit, ""
PDO entry 0x6077:00, 16 bit, ""
=== Master 0, Slave 1 ===
SM0: PhysAddr 0x1000, DefaultSize 0, ControlRegister 0x00, Enable 0
TxPDO 0x1a00 "Channel 1"
PDO entry 0x6000:01, 1 bit, "Input"
TxPDO 0x1a01 "Channel 2"
PDO entry 0x6010:01, 1 bit, "Input"
TxPDO 0x1a02 "Channel 3"
PDO entry 0x6020:01, 1 bit, "Input"
TxPDO 0x1a03 "Channel 4"
PDO entry 0x6030:01, 1 bit, "Input"
TxPDO 0x1a04 "Channel 5"
PDO entry 0x6040:01, 1 bit, "Input"
TxPDO 0x1a05 "Channel 6"
PDO entry 0x6050:01, 1 bit, "Input"
TxPDO 0x1a06 "Channel 7"
PDO entry 0x6060:01, 1 bit, "Input"
TxPDO 0x1a07 "Channel 8"
PDO entry 0x6070:01, 1 bit, "Input"
=== Master 0, Slave 2 ===
SM0: PhysAddr 0x1000, DefaultSize 0, ControlRegister 0x00, Enable 0
TxPDO 0x1a00 "Channel 1"
PDO entry 0x6000:01, 1 bit, "Input"
TxPDO 0x1a01 "Channel 2"
PDO entry 0x6010:01, 1 bit, "Input"
TxPDO 0x1a02 "Channel 3"
PDO entry 0x6020:01, 1 bit, "Input"
TxPDO 0x1a03 "Channel 4"
PDO entry 0x6030:01, 1 bit, "Input"
TxPDO 0x1a04 "Channel 5"
PDO entry 0x6040:01, 1 bit, "Input"
TxPDO 0x1a05 "Channel 6"
PDO entry 0x6050:01, 1 bit, "Input"
TxPDO 0x1a06 "Channel 7"
PDO entry 0x6060:01, 1 bit, "Input"
TxPDO 0x1a07 "Channel 8"
PDO entry 0x6070:01, 1 bit, "Input"
=== Master 0, Slave 3 ===
SM0: PhysAddr 0x0f00, DefaultSize 0, ControlRegister 0x44, Enable 9
RxPDO 0x1600 "Channel 1"
PDO entry 0x7000:01, 1 bit, "Output"
RxPDO 0x1601 "Channel 2"
PDO entry 0x7010:01, 1 bit, "Output"
RxPDO 0x1602 "Channel 3"
PDO entry 0x7020:01, 1 bit, "Output"
RxPDO 0x1603 "Channel 4"
PDO entry 0x7030:01, 1 bit, "Output"
=== Master 0, Slave 4 ===
SM0: PhysAddr 0x1000, DefaultSize 124, ControlRegister 0x26, Enable 1
SM1: PhysAddr 0x1100, DefaultSize 124, ControlRegister 0x22, Enable 1
SM2: PhysAddr 0x1200, DefaultSize 0, ControlRegister 0x64, Enable 1
RxPDO 0x1600 ""
PDO entry 0x6040:00, 16 bit, ""
PDO entry 0x6060:00, 8 bit, ""
PDO entry 0x607a:00, 32 bit, ""
PDO entry 0x60ff:00, 32 bit, ""
SM3: PhysAddr 0x1400, DefaultSize 0, ControlRegister 0x20, Enable 1
TxPDO 0x1a00 ""
PDO entry 0x6041:00, 16 bit, ""
PDO entry 0x6061:00, 8 bit, ""
PDO entry 0x6064:00, 32 bit, ""
PDO entry 0x606c:00, 32 bit, ""
PDO entry 0x6077:00, 16 bit, ""
Aciera (sorry i thought it was better to upload files that made no errors, but not actually working)
i have been reading and come across a post about a Youtuber called Marco Reps ? i thought it would be a idea to apply some of the methods i found in these files. so i have changed things from my first post, and i am now getting errors again / LinuxCNC is not opening. this looks to be the main issue ? EL8_machine.hal:41: Pin 'lcec.0.0.cia-statusword' does not exist
i have included the Error report + the .xml + .hal + .ini
RUN_IN_PLACE=no
LINUXCNC_DIR=
LINUXCNC_BIN_DIR=/usr/bin
LINUXCNC_TCL_DIR=/usr/lib/tcltk/linuxcnc
LINUXCNC_SCRIPT_DIR=
LINUXCNC_RTLIB_DIR=/usr/lib/linuxcnc/modules
LINUXCNC_CONFIG_DIR=
LINUXCNC_LANG_DIR=/usr/lib/tcltk/linuxcnc/msgs
INIVAR=inivar
HALCMD=halcmd
LINUXCNC_EMCSH=/usr/bin/wish8.6
LINUXCNC - 2.9.3
Machine configuration directory is '/home/edmuser/linuxcnc/configs/sim.axis-3'
Machine configuration file is 'EL8_machine.ini'
INIFILE=/home/edmuser/linuxcnc/configs/sim.axis-3/EL8_machine.ini
VERSION=1.1
PARAMETER_FILE=linuxcnc.var
TPMOD=
HOMEMOD=
TASK=milltask
HALUI=halui
DISPLAY=axis
COORDINATES=X Y Z
KINEMATICS=trivkins coordinates=XYZ
Starting LinuxCNC...
Starting LinuxCNC server program: linuxcncsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Starting LinuxCNC IO program: io
libnml/buffer/shmem.cc 320: Shared memory buffers toolCmd and toolCmd may conflict. (key=1004(0x3EC))
libnml/buffer/shmem.cc 320: Shared memory buffers toolSts and toolSts may conflict. (key=1005(0x3ED))
libnml/buffer/shmem.cc 320: Shared memory buffers emcError and emcError may conflict. (key=1003(0x3EB))
emc/iotask/ioControl.cc 786: can't load tool table.
Starting HAL User Interface program: halui
linuxcnc TPMOD=tpmod HOMEMOD=homemod EMCMOT=motmod
Found file(REL): ./EL8_machine.hal
Shutting down and cleaning up LinuxCNC...
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments
Debug file information:
Note: Using POSIX realtime
./EL8_machine.hal:41: Pin 'lcec.0.0.cia-statusword' does not exist
55850
Stopping realtime threads
Unloading hal components
Note: Using POSIX realtime
.XML File
Warning: Spoiler!
<masters>
<master idx="0" appTimePeriod="1000000" refClockSyncCycles="5">
<slave idx="0" type="EK1100"/>
<slave idx="1" type="EL1008"/>
<slave idx="2" type="EL1008"/>
<slave idx="3" type="EL2004"/>
<!-- X axis EL8 Servo Drive -->
<slave idx="4" type="generic" vid="00004321" pid="000010c2" configPdos="true">
<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="0"/>
<syncManager idx="2" dir="out">
<pdo idx="1600">
<pdoEntry idx="6040" subIdx="00" bitLen="16" halPin="cia-controlword" halType="u32"/>
<pdoEntry idx="6060" subIdx="00" bitLen="8" halPin="opmode" halType="s32"/>
<pdoEntry idx="607A" subIdx="00" bitLen="32" halPin="target-position" halType="s32"/>
<pdoEntry idx="60FF" subIdx="00" bitLen="32" halPin="target-velocity" halType="s32" />
</pdo>
</syncManager>
<syncManager idx="3" dir="in">
<pdo idx="1a00">
<pdoEntry idx="6041" subIdx="00" bitLen="16" halPin="cia-statusword" halType="u32"/>
<pdoEntry idx="6061" subIdx="00" bitLen="8" halPin="opmode-display" halType="s32"/>
<pdoEntry idx="6064" subIdx="00" bitLen="32" halPin="actual-position" halType="s32"/>
<pdoEntry idx="606C" subIdx="00" bitLen="32" halPin="actual-velocity" halType="s32"/>
<pdoEntry idx="6077" subIdx="00" bitLen="16" halPin="actual-torque" halType="s32"/>
</pdo>
</syncManager>
</slave>
</master>
</masters>
<master idx="0" appTimePeriod="1000000" refClockSyncCycles="5">
<slave idx="0" type="EK1100"/>
<slave idx="1" type="EL1008"/>
<slave idx="2" type="EL1008"/>
<slave idx="3" type="EL2004"/>
<!-- X axis EL8 Servo Drive -->
<slave idx="4" type="generic" vid="00004321" pid="000010c2" configPdos="true">
<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="0"/>
<syncManager idx="2" dir="out">
<pdo idx="1600">
<pdoEntry idx="6040" subIdx="00" bitLen="16" halPin="cia-controlword" halType="u32"/>
<pdoEntry idx="6060" subIdx="00" bitLen="8" halPin="opmode" halType="s32"/>
<pdoEntry idx="607A" subIdx="00" bitLen="32" halPin="target-position" halType="s32"/>
<pdoEntry idx="60FF" subIdx="00" bitLen="32" halPin="target-velocity" halType="s32" />
</pdo>
</syncManager>
<syncManager idx="3" dir="in">
<pdo idx="1a00">
<pdoEntry idx="6041" subIdx="00" bitLen="16" halPin="cia-statusword" halType="u32"/>
<pdoEntry idx="6061" subIdx="00" bitLen="8" halPin="opmode-display" halType="s32"/>
<pdoEntry idx="6064" subIdx="00" bitLen="32" halPin="actual-position" halType="s32"/>
<pdoEntry idx="606C" subIdx="00" bitLen="32" halPin="actual-velocity" halType="s32"/>
<pdoEntry idx="6077" subIdx="00" bitLen="16" halPin="actual-torque" halType="s32"/>
</pdo>
</syncManager>
</slave>
</master>
</masters>
.HAL
Warning: Spoiler!
loadrt [KINS]KINEMATICS
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
loadusr -W lcec_conf /home/edmuser/linuxcnc/configs/sim.axis-3/ethercat-conf.xml
loadrt lcec
loadrt cia402 count=1
loadrt mult2
addf lcec.read-all servo-thread
addf cia402.0.read-all 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
setp iocontrol.0.emc-enable-in 1
#*******************
# AXIS X
#*******************
# --- joint signals for motion
net x-pos-cmd <= joint.0.motor-pos-cmd
net x-vel-cmd <= joint.0.vel-cmd
net x-pos-fb <= joint.0.motor-pos-fb
net x-enable <= joint.0.amp-enable-out
net all-home => joint.0.home-sw-in
# --- connect stepper driver to joint
net x-pos-cmd => cia402.0.pos-cmd
net x-pos-fb => cia402.0.pos-fb
net x-enable => cia402.0.enable
# --- Drive settings
setp cia402.0.csp-mode 1
setp cia402.0.pos-scale 10000
# --- from Drive(ethercat) to cia402
net x-statusword lcec.0.0.cia-statusword => cia402.0.statusword
net x-opmode-display lcec.0.0.opmode-display => cia402.0.opmode-display
net x-drv-act-pos lcec.0.0.actual-position => cia402.0.drv-actual-position
net x-drv-act-velo lcec.0.0.actual-velocity => cia402.0.drv-actual-velocity
# --- from cia402 to Drive(ethercat)
net x-controlword cia402.0.controlword => lcec.0.0.cia-controlword
net x-modes-of-operation cia402.0.opmode => lcec.0.0.opmode
net x-drv-target-pos cia402.0.drv-target-position => lcec.0.0.target-position
net x-drv-target-velo cia402.0.drv-target-velocity => lcec.0.0.target-velocity
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS
loadusr -W lcec_conf /home/edmuser/linuxcnc/configs/sim.axis-3/ethercat-conf.xml
loadrt lcec
loadrt cia402 count=1
loadrt mult2
addf lcec.read-all servo-thread
addf cia402.0.read-all 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
setp iocontrol.0.emc-enable-in 1
#*******************
# AXIS X
#*******************
# --- joint signals for motion
net x-pos-cmd <= joint.0.motor-pos-cmd
net x-vel-cmd <= joint.0.vel-cmd
net x-pos-fb <= joint.0.motor-pos-fb
net x-enable <= joint.0.amp-enable-out
net all-home => joint.0.home-sw-in
# --- connect stepper driver to joint
net x-pos-cmd => cia402.0.pos-cmd
net x-pos-fb => cia402.0.pos-fb
net x-enable => cia402.0.enable
# --- Drive settings
setp cia402.0.csp-mode 1
setp cia402.0.pos-scale 10000
# --- from Drive(ethercat) to cia402
net x-statusword lcec.0.0.cia-statusword => cia402.0.statusword
net x-opmode-display lcec.0.0.opmode-display => cia402.0.opmode-display
net x-drv-act-pos lcec.0.0.actual-position => cia402.0.drv-actual-position
net x-drv-act-velo lcec.0.0.actual-velocity => cia402.0.drv-actual-velocity
# --- from cia402 to Drive(ethercat)
net x-controlword cia402.0.controlword => lcec.0.0.cia-controlword
net x-modes-of-operation cia402.0.opmode => lcec.0.0.opmode
net x-drv-target-pos cia402.0.drv-target-position => lcec.0.0.target-position
net x-drv-target-velo cia402.0.drv-target-velocity => lcec.0.0.target-velocity
.ini
Warning: Spoiler!
[EMC]
MACHINE = EL8_machines
DEBUG = 0
VERSION = 1.1
[DISPLAY]
DISPLAY = axis
EDITOR = gedit
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
ARCDIVISION = 64
GRIDS = 10mm 20mm 50mm 100mm 1in 2in 5in 10in
MAX_FEED_OVERRIDE = 1.2
MIN_SPINDLE_OVERRIDE = 0.5
MAX_SPINDLE_OVERRIDE = 1.2
DEFAULT_LINEAR_VELOCITY = 2.50
MIN_LINEAR_VELOCITY = 0
MAX_LINEAR_VELOCITY = 25.00
CYCLE_TIME = 0.100
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 1
PROGRAM_PREFIX = /home/cnc/linuxcnc/nc_files
INCREMENTS = 5mm 1mm .5mm .1mm .05mm .01mm .005mm
PYVCP = pyvcp_panel.xml
[KINS]
JOINTS = 1
KINEMATICS = trivkins coordinates=XYZ
[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Greyscale Depth Image
PROGRAM_EXTENSION = .py Python Script
PROGRAM_EXTENSION = .nc,.tap G-Code File
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python
[TASK]
TASK = milltask
CYCLE_TIME = 0.010
[RS274NGC]
PARAMETER_FILE = linuxcnc.var
[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
SERVO_PERIOD = 1000000
#HOMEMOD=el8_homecomp
[HAL]
HALFILE = EL8_machine.hal
#HALFILE = xhc-whb04b.hal
POSTGUI_HALFILE = pyvcp_panel.hal
HALUI = halui
[TRAJ]
COORDINATES = X Y Z
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 2.50
MAX_LINEAR_VELOCITY = 25.00
[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
#*** AXIS_X *******************************
[AXIS_X]
MAX_VELOCITY = 25.0
MAX_ACCELERATION = 750.0
MIN_LIMIT = -200.0
MAX_LIMIT = 200.0
[JOINT_0]
TYPE = LINEAR
HOME = 0.0
MIN_LIMIT = -200.0
MAX_LIMIT = 200.0
MAX_VELOCITY = 25.0
MAX_ACCELERATION = 750.0
SCALE = 80.0
FERROR = 1000
MIN_FERROR = 1000
HOME_ABSOLUTE_ENCODER = 2
#HOME = 0
HOME_OFFSET = 0
HOME_SEARCH_VEL = 20.000000
HOME_LATCH_VEL = 10.000
HOME_SEQUENCE = 1
HOME_USE_INDEX = False
HOME_IGNORE_LIMITS = False
HOME_IS_SHARED = 1
#******************************************
MACHINE = EL8_machines
DEBUG = 0
VERSION = 1.1
[DISPLAY]
DISPLAY = axis
EDITOR = gedit
POSITION_OFFSET = RELATIVE
POSITION_FEEDBACK = ACTUAL
ARCDIVISION = 64
GRIDS = 10mm 20mm 50mm 100mm 1in 2in 5in 10in
MAX_FEED_OVERRIDE = 1.2
MIN_SPINDLE_OVERRIDE = 0.5
MAX_SPINDLE_OVERRIDE = 1.2
DEFAULT_LINEAR_VELOCITY = 2.50
MIN_LINEAR_VELOCITY = 0
MAX_LINEAR_VELOCITY = 25.00
CYCLE_TIME = 0.100
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 1
PROGRAM_PREFIX = /home/cnc/linuxcnc/nc_files
INCREMENTS = 5mm 1mm .5mm .1mm .05mm .01mm .005mm
PYVCP = pyvcp_panel.xml
[KINS]
JOINTS = 1
KINEMATICS = trivkins coordinates=XYZ
[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Greyscale Depth Image
PROGRAM_EXTENSION = .py Python Script
PROGRAM_EXTENSION = .nc,.tap G-Code File
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python
[TASK]
TASK = milltask
CYCLE_TIME = 0.010
[RS274NGC]
PARAMETER_FILE = linuxcnc.var
[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
SERVO_PERIOD = 1000000
#HOMEMOD=el8_homecomp
[HAL]
HALFILE = EL8_machine.hal
#HALFILE = xhc-whb04b.hal
POSTGUI_HALFILE = pyvcp_panel.hal
HALUI = halui
[TRAJ]
COORDINATES = X Y Z
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
DEFAULT_LINEAR_VELOCITY = 2.50
MAX_LINEAR_VELOCITY = 25.00
[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100
#*** AXIS_X *******************************
[AXIS_X]
MAX_VELOCITY = 25.0
MAX_ACCELERATION = 750.0
MIN_LIMIT = -200.0
MAX_LIMIT = 200.0
[JOINT_0]
TYPE = LINEAR
HOME = 0.0
MIN_LIMIT = -200.0
MAX_LIMIT = 200.0
MAX_VELOCITY = 25.0
MAX_ACCELERATION = 750.0
SCALE = 80.0
FERROR = 1000
MIN_FERROR = 1000
HOME_ABSOLUTE_ENCODER = 2
#HOME = 0
HOME_OFFSET = 0
HOME_SEARCH_VEL = 20.000000
HOME_LATCH_VEL = 10.000
HOME_SEQUENCE = 1
HOME_USE_INDEX = False
HOME_IGNORE_LIMITS = False
HOME_IS_SHARED = 1
#******************************************
Please Log in or Create an account to join the conversation.
- DeckelCNC
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 0
30 Nov 2024 21:56 #315690
by DeckelCNC
Replied by DeckelCNC on topic Leadshine EL8 Servo Drives - EtherCAT
Just fixed an obvious mistake
net x-statusword lcec.0.0.cia-statusword => cia402.0.statusword
all changed to reflect number idx= 4 from .xml
like the below
net x-statusword lcec.0.4.cia-statusword => cia402.0.statusword
LinuxCNC is now opening but the drive is still in Pre-Operational and not moving the motor.
net x-statusword lcec.0.0.cia-statusword => cia402.0.statusword
all changed to reflect number idx= 4 from .xml
like the below
net x-statusword lcec.0.4.cia-statusword => cia402.0.statusword
LinuxCNC is now opening but the drive is still in Pre-Operational and not moving the motor.
Please Log in or Create an account to join the conversation.
- kworm
- Offline
- Junior Member
Less
More
- Posts: 24
- Thank you received: 7
30 Nov 2024 22:24 #315692
by kworm
Replied by kworm on topic Leadshine EL8 Servo Drives - EtherCAT
Your mappings look ok. I'm not familiar with Leadshine drives but have you tried the drive software? If you can connect it while LinuxCNC is going you may be able to see what is preventing it from going OP. You could also use the software without LinuxCNC running and make sure you can get motion.
The following user(s) said Thank You: DeckelCNC
Please Log in or Create an account to join the conversation.
- DeckelCNC
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 0
30 Nov 2024 22:54 #315695
by DeckelCNC
Replied by DeckelCNC on topic Leadshine EL8 Servo Drives - EtherCAT
Hi kworm !
Everything has been good with the drive, tuning and movements through the drive have worked without issue.
i had to config the PDO's also so that all appeared to work...
using the Leadshine motion studio software
I do see the Control Word = 0x0
and the Status Word is 0x410 so it looks like the LinuxCNC EtherCAT Master is not trying to put the drive into operational ?
Everything has been good with the drive, tuning and movements through the drive have worked without issue.
i had to config the PDO's also so that all appeared to work...
using the Leadshine motion studio software
I do see the Control Word = 0x0
and the Status Word is 0x410 so it looks like the LinuxCNC EtherCAT Master is not trying to put the drive into operational ?
Please Log in or Create an account to join the conversation.
- DeckelCNC
- Offline
- New Member
Less
More
- Posts: 8
- Thank you received: 0
01 Dec 2024 04:49 #315703
by DeckelCNC
Replied by DeckelCNC on topic Leadshine EL8 Servo Drives - EtherCAT
you put me on the right track.....
I was provided with the vendor ID (0x4321) and product ID / code (0x10C2) by the manufacturer.
And these values show in the drive through the software also
using the below terminal input
ethercat slaves -v
the product code was 0x00d0 ???
can anyone provide the reasons for this ? please remember the internal drive value is what the manufacturer stated !
i made this change to the .xml and the drive works.
I was provided with the vendor ID (0x4321) and product ID / code (0x10C2) by the manufacturer.
And these values show in the drive through the software also
using the below terminal input
ethercat slaves -v
the product code was 0x00d0 ???
can anyone provide the reasons for this ? please remember the internal drive value is what the manufacturer stated !
i made this change to the .xml and the drive works.
Please Log in or Create an account to join the conversation.
- kworm
- Offline
- Junior Member
Less
More
- Posts: 24
- Thank you received: 7
01 Dec 2024 15:47 #315738
by kworm
Replied by kworm on topic Leadshine EL8 Servo Drives - EtherCAT
Glad you got it working. That is strange that the product code would be different than what the drive software shows. To me that definitely seems like a bug in the drive firmware or setup software. Looking at the ESI file from Leadshine they only show 0x10c2 - 0x10c6 as product codes for the EL8.
Please Log in or Create an account to join the conversation.
Time to create page: 0.071 seconds