Ethercat HAL driver
it dosnt exist a CanOpen driver for LinuxCNC, but with this way, it is possible to use CanOpen servos
Almost every industrial servo drive has a CanOpen interface.
I am working on a integration of a LinMot E1130 with CanOpen. It runs, but still not good enough.
They are not so easy of use as the Lexium drives.
You get a smart solution.
I use the Schneider Electric Lexium32 in CanOpen with the Lexium Motion Controller LMC058 up to 6 axis with the CanOpen Fieldbus Interface DS402 Profile.
I was wondering the possibility to use this class of drives with LCNC (as you said the CanOpen interface is included as a standard but EtherCAT interface is an option with a certain cost) and your solution seems to be a good option.
Can you tell me , more or less , the cost of the Beckoff components you used just to economically compare it with other options.
Thanks for share your work with us.
from the actual Beckhoff price list:
EK1100 (Ethercat buscoupler) : 98 Euro
EL6751 (Ethercat-CanOpen IF) : 314 Euro
EL1018 (4 digital In, 24V, 10µs) : 35 Euro
EL2004 (4 digital Out, 24V 0.5A) : 26 Euro
I think, integrate drives with DS402 is not complicate.
The prices are not high and the solution is quite "clean".
One question raise up related to the PDO that are exchanged with the Lexium 05 drives.
Which PDOs are you using or how are they formatted ?
You said :
The servos has fix PDOs with a size of 48 bits, first 16 bits is the command register last 32 bits the (target)position.
But lcec has only 32 single bits or s32 or u32.
I have changed lcec_conf.c (line 990) and lcec_generic.h (line 24) to 48 single bits. This is my interface to hal.
Then, I have written a small comp to convert the 48 single bits to command register and (target)position.
So what CAN profile are you using ?
Did you get the position feeback from the motor encoder via PDO ?
How did you setup the drives (into the drive configuration) to accept your commands ?
at startup (LCNC), i send via SDO the velocity (0x6081), the acceleration(0x6083), the deceleration(0x6084), then I switch the drive in position mode (0x6060,01)
Every cycle, LCNC send a new target-position from the trajectory planer via axis.x.motor-pos-cmd to the drive (via RxPDO2, fix mapped to 0x607A) and this will reach this new position with the parametric acc (max) and speed (high). Like a stepper drive.
Every cycle the drive send the real position to LCNC (via TxPDO2, fix mapped to 0x6064) to axis.x.motor-pos-fb.
Every cycle I toggle the NewSetPoint bit in the control word (via RxPDO2, fix mapped to 0x6040). The position mode need this.
I setup in the drive the CanBaudRate, the CanAdress, the gearfactor and the motorspecific parameter.
Unfortunately, I can not switch the drive in position mode at default. So I must do that with the SDO-commands.
yes, this is correct.
The servodrive is in position mode, the close loop is in the drive. You tune the loop in the servoamplifier.
LCNC provide only the targets, the setpoints (in small steps)
But, for a spindle drive, you can also use a drive in velocity mode.
I have look in the doku for the Lexium32, I think, it is the same interface, it will running with the same configuration.
Yes the Lexium32 should work as Lexium05.
If the position loop is closed locally on the servo drive means that you are using an open loop configuration , isn't it ?
The CAN profile used from the CANOpen master is the 302 ?
Haven't you tried to use the position closed loop from LCNC and command the servo drives in velocity mode ?
When you are jogging the axis means that LCNC is sending position target as well as during a G code movement ?
It is not an open loop, "motion" is the setpoint-generator, like a stepper system with position encoder.
no, I think, small loop is better.
yes, all functions are running, G-Code movement, manual movement, home running .....