Ethercat HAL driver

More
28 Aug 2014 13:16 #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
28 Aug 2014 14:16 - 28 Aug 2014 14:17 #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: 28 Aug 2014 14:17 by bigalex.

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

More
28 Aug 2014 15:01 #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
28 Aug 2014 15:39 #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
28 Aug 2014 16:32 #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
28 Aug 2014 16:44 #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.

More
28 Aug 2014 18:20 - 28 Aug 2014 18:46 #50390 by cgc
Replied by cgc on topic Ethercat HAL driver
Hi Alex,
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.

download.schneider-electric.com/files?p_...n_Manual_V105_EN.pdf

regards
Frank
Last edit: 28 Aug 2014 18:46 by cgc.

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

More
28 Aug 2014 19:51 #50394 by bigalex
Replied by bigalex on topic Ethercat HAL driver
Hi Frank.

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 ?

Regards

Alex

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

More
29 Aug 2014 16:33 #50449 by cgc
Replied by cgc on topic Ethercat HAL driver

If the position loop is closed locally on the servo drive means that you are using an open loop configuration , isn't it ?

It is not an open loop, "motion" is the setpoint-generator, like a stepper system with position encoder.

The CAN profile used from the CANOpen master is the 302 ?

yes

Haven't you tried to use the position closed loop from LCNC and command the servo drives in velocity mode ?

no, I think, small loop is better.

When you are jogging the axis means that LCNC is sending position target as well as during a G code movement ?

yes, all functions are running, G-Code movement, manual movement, home running .....

regards
Frank
The following user(s) said Thank You: bigalex

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

More
29 Aug 2014 22:32 #50482 by bigalex
Replied by bigalex on topic Ethercat HAL driver
Hi Frank.
Thank you so much for the clear answers.

Ragards

Alex

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

Time to create page: 0.164 seconds
Powered by Kunena Forum