Ethercat HAL driver
Hello @jc2ktr,
Well, the first thing is to reconfigure the driver in TWINCAT3, that it works in OP and you can move the engines, I attach the program in TWINCAT3 with the modified PDOs according to linuxcnc-ethercat, now you will have to configure the rest yourself, compare and see if you help.
I attach an image of where to change the PDOs, if you change the operating mode you will also have to change them.
I attach an image of where you have the configuration in blue, it is configured in mode 8, (position) you will have to read the manual to see the different modes to see which one interests you the most
Greeting
Chimeno
Hello @ Chimeno,
i´ve tried today to get my Drive in OP-State under Linux without Succes
I opend your TwinCAT Project and tried to Compare it with mine, which i will add to my Post also.
What i don´t understand at the moment is, do i have to add every single PDO entry to the PDO Content list in TwinCAT which i want to use under LinuxCNC? For Example the ControlWord includes more than one entries. Do i have to add every single one to the list?
The at the moment Preferred mode is #8 The CSP-Mode. At the moment it is more important that the configuration works somehow.
In the long term i will then See if its suitable.
Thanks
Please Log in or Create an account to join the conversation.
Well, if we get it!!i´ve tried today to get my Drive in OP-State under Linux without Succes
In my project I need to register PDO.I opend your TwinCAT Project and tried to Compare it with mine, which i will add to my Post also.
You just have to add the PDOs you need to use, for example: within theWhat i don´t understand at the moment is, do i have to add every single PDO entry to the PDO Content list in TwinCAT which i want to use under LinuxCNC? For Example the ControlWord includes more than one entries. Do i have to add every single one to the list?
1600
6040 control word
6060 operation mode
607a target position
60ff tarjet velocity
it is best to leave the EC60 device by default, one way to do it is with TWINCAT3, add a new device (don't read it) just register again the default form that comes with TWINCAT3, it should work again and take it to OP then you can use the file of the user @MRBaird that uses the generic form
Greeting
Chimeno
Please Log in or Create an account to join the conversation.
Hello @jc2ktr
it is best to leave the EC60 device by default, one way to do it is with TWINCAT3, add a new device (don't read it) just register again the default form that comes with TWINCAT3, it should work again and take it to OP then you can use the file of the user @MRBaird that uses the generic form
Greeting
Chimeno
Hello @Chimeno,
I tried to remove the device and add a new device, hope i´ve done it the right way, made Screenshots of how i´ve done it.
The question is, should i activate the Configuration in TwinCAT or is it enough to add it.
Thanks for your patience with me
Please Log in or Create an account to join the conversation.
If you have to configure the device and activate it, you should have it in NC mode, the device has to go to OP and be able to move the motor.I tried to remove the device and add a new device, hope i´ve done it the right way, made Screenshots of how i´ve done it.
The question is, should i activate the Configuration in TwinCAT or is it enough to add it.
Don't worry, I'm like you too, and at the beginning everything costs a lot to understand and work.Thanks for your patience with me
Greeting
Chimeno
Please Log in or Create an account to join the conversation.
Hello @jc2ktr
If you have to configure the device and activate it, you should have it in NC mode, the device has to go to OP and be able to move the motor.I tried to remove the device and add a new device, hope i´ve done it the right way, made Screenshots of how i´ve done it.
The question is, should i activate the Configuration in TwinCAT or is it enough to add it.
Don't worry, I'm like you too, and at the beginning everything costs a lot to understand and work.Thanks for your patience with me
Hi @Chimeno,
i am back under LinuxCNC, most of my EC-Slaves are OP only my ECT-Drive still don't do anything.
Started LinuxCNC and enabled the Machine, after that i've done a dmesg see attachment.
After starting the Ethercat bus it tells me following:
[ 1502.144042] EtherCAT ERROR 0-main-7: Failed to set SAFEOP state, slave refused state change (PREOP + ERROR).
[ 1502.148059] EtherCAT ERROR 0-main-7: AL status message 0x0036: "DC Sync0 Cycle Time".
and later then
[ 1741.894170] EtherCAT ERROR 0-main-7: Failed to set SAFEOP state, slave refused state change (PREOP + ERROR).
[ 1741.898181] EtherCAT 0: Slave states on main device: PREOP, OP + ERROR.
[ 1741.898183] EtherCAT ERROR 0-main-7: AL status message 0x0036: "DC Sync0 Cycle Time".
[ 1741.906199] EtherCAT 0-main-7: Acknowledged state PREOP.
don't know at the moment what this messages try to tell me
Greeting
Chimeno
Please Log in or Create an account to join the conversation.
can you publish the .xml configuration file? I'll take a look at it
After studying a little, mode 8 is position by synchronism therefore the way to act is this:
0x1A00 TXPDO1
-the status register is 0x6041
-the position is 0x6064
0x1600 RXPDO1
-the control register is 0x6040
-register 0x6060 send operation mode 8
-send position to register 0x607A
Greeting
Chimeno
Please Log in or Create an account to join the conversation.
i added my .XML as attachment.
Please Log in or Create an account to join the conversation.
Could it be that registers of more than one bit cannot be registered in bit mode?
you rectified the file you can try??
I am also not very clear about the SDO record in that format is correct, I think it is better to configure the value by PDO and simply register it with HAL
setp lcec.0.7.opmode 8
also the
appTimePeriod
Greeting
Chimeno
Please Log in or Create an account to join the conversation.
- RobinTheunis
- Offline
- New Member
- Posts: 1
- Thank you received: 0
We have converted our cnc router to ethernet. But we are struggeling quite a bit with the tuning of our machine.
The machine running internal feedback, so no encoders on the stepper motors. We have kept the original drives and used EL2521 to generate the STEP and DIR signals.
The problem that we see is when we increase the MAX_ACCELERATION above a certain point, we are seeing oscillations in the movement. Only decreasing the P values will remove these oscillations which will increase the following error.
Does anyone have an example on a working config for EL2521 or knows what we are doing wrong?
I have included our configs
Please Log in or Create an account to join the conversation.
Hello @jc2ktr
Could it be that registers of more than one bit cannot be registered in bit mode?
you rectified the file you can try??
I am also not very clear about the SDO record in that format is correct, I think it is better to configure the value by PDO and simply register it with HALsetp lcec.0.7.opmode 8
also thevalue should be equal to the servo thread valueappTimePeriod
Greeting
Chimeno
Hi @Chimeno,
thanks for your help, that did it, i got all the slaves OP. Can enable the drive and readout the actpos.
But when i try to jog de Axis does not move. Somewhere i missed something to connect in my HAL file.
Please Log in or Create an account to join the conversation.