Ethercat HAL driver

More
12 years 2 months ago #50376 by cgc
Replied by cgc on topic Ethercat HAL driver
Hi Alex,
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.

Regards
Frank

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

More
12 years 2 months ago - 12 years 2 months ago #50377 by bigalex
Replied by bigalex on topic Ethercat HAL driver
Hi Frank.
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.

Regards

Alex
Last edit: 12 years 2 months ago by bigalex.

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

More
12 years 2 months ago #50378 by cgc
Replied by cgc on topic Ethercat HAL driver
Hi Alex,
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.

regards
Frank

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

More
12 years 2 months ago #50380 by bigalex
Replied by bigalex on topic Ethercat HAL driver
Hi Frank.

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 ?


Regards

Alex

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

More
12 years 2 months ago #50383 by cgc
Replied by cgc on topic Ethercat HAL driver
Hi Alex,
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.

regards
Frank

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

More
12 years 2 months ago #50385 by bigalex
Replied by bigalex on topic Ethercat HAL driver
Hi Frank.
So in this way how did you set up the LCNC PID for the closed loop positioning ?
The position loop should be closed within the drive isn't it ?
Otherwise you should command the drive in velocity mode.

Regards

Alex

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

Time to create page: 0.511 seconds
Powered by Kunena Forum