Ethercat HAL configuration for Beckhoff EL7041 without encoder

More
8 years 10 months ago #102750 by Hawkeye
Short update from my side:
Yesterday the Beckhoff EL7041-0000 hit the bottom of the trash bin, as it I had the chance to run my
LinuxCNC config on another EL7041-0000. Looks like my I purchased a broken EL7041 on eBay..!

Anyway, now I have the situation that my 3.0A motor got boiling hot after 30Minutes of try and error.
As far as I can see, the configuration inside EL7041 can remain on factory default settings.
as the internal encoder is active with this settings. Can someone help me setting up an simple
configuration for my X-Axis using internal encoders?

There are some generals questions I have:
- Do I have to setup an encoder (PID-Objects) in hal driver or would it be sufficient to map the variables/signals/values from axis-objects to lcec-objects? Please see github.com/koppi/mk/blob/master/linuxcnc...cnc/koppi-cnc-io.hal and github.com/koppi/mk/blob/master/linuxcnc...pi-cnc/koppi-cnc.hal
- Where is the advantage of using an encoder (internal or external)?
If there was a step failure, it seems not to make any difference to me if I either use an internal or an external encoder,
because the work piece is broken or (out of tolerance) anyway.

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

More
8 years 10 months ago - 8 years 10 months ago #102751 by Allan
Hello Hawkeye

My understanding is that the difference between the internal and external encoder is that the external encoder measures real movement and will prevent mechanical damage and ensure that you are measuring real shaft movement.

I am sorry to learn that you have a damaged 7041.

I am happy to try to help you with your settings. I have attached current copies of the setup files I am using. This is a gantry setup using verion 2.8 with two y-motors.

Allan

File Attachment:

File Name: koppi-cnc-...mp-4.zip
File Size:735.16 KB
Last edit: 8 years 10 months ago by Allan.

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

More
8 years 10 months ago - 8 years 10 months ago #102762 by Hawkeye
Hello Allan,

guess what - you saved me hours of searching with hour last post!
Please see the ini-file on git an compare it to the one you supplied within the zip-container.
The ENC_SCALE definition on git is a negative number, but should be a positive number!

So far so good, I created a setup file for my EL7041 with all the beckhoff internal setup for it.
Can you tell me whether you are using the EL7041 on factory default settings or whether you changed some
of the values (e.g. Feedback type, Acceleation pos., Motor fullsteps, Nominal Voltage, ...)?
I use on my machine 4 Motors (2.5A 1,8°).
Running on lower speed (<700mm/sec) everything seems to be fine.
When I change to higher speeds, the engine seems to stick (seems to run not in a good way).
The motor itself is ok, as I used it with DM556D drivers in the meantime.
DM556D reduces motor power when the driver is active but no movement..
I tried to create this behaviour also with the beckhoff, as my motor is still getting pretty warm.

//edit:
Do you know how to revert the direction of an ethercat axis within hal?
I checked this document linuxcnc.org/docs/html/man/man9/pid.9.html and found the statement:
"If some output is in the wrong direction, negating gains to fix it is a mistake; set the scaling correctly elsewhere instead."
I don't know what to make out of this...

Regards,
Hawkeye (Ben)
Last edit: 8 years 10 months ago by Hawkeye.

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

More
8 years 10 months ago #102771 by Todd Zuercher

Hawkeye wrote: Hello Allan,
Do you know how to revert the direction of an ethercat axis within hal?
I checked this document linuxcnc.org/docs/html/man/man9/pid.9.html and found the statement:
"If some output is in the wrong direction, negating gains to fix it is a mistake; set the scaling correctly elsewhere instead."
I don't know what to make out of this...

Regards,
Hawkeye (Ben)


I don't know anything about Ethercat, but what that quote from manual is referring to is saying, in a normal servo system, if a motor is turning the wrong direction, or an encoder is counting the wrong way; the proper way to reverse them is either in hardware (by switching wires arround), or by changing the sign of the output scale (to reverse the motor direction), or of the encoder scale (to reverse the encoder counting direction). It is also entirely possible that these reversals can be easily accomplished in the servo drive's software, or the Ethercat software.

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

More
8 years 10 months ago #102776 by Allan
Hello Hawkeye

I agree with Ben. If a motor is driving in the wrong direction it is easily resolved by changing the wiring. Here is how: Stepper Motor Wiring

If encoder signals are giving the wrong direction swapping the A and B encoder signals will change the direction.

Are you now able to move motors?

Allan

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

More
8 years 10 months ago #102863 by Hawkeye
Hello Allan,

first of all, sorry for delay..

I am able to move my Z-axis since a couple days.
After you proposed to either change the swap cables or to change configuration, I decided to swap cables.
Old connection order was ABCD, the new is now BACD. With this, I am able to move the Z-Axis into expected direction.

Now, I still have this issue with parameters for the PID controller, as I am not able to move distances of >10mm on higher speed without getting "joint 2 following error".
My motor has the following technical data:
Technical data:
Supply voltage: 4,5V
Current: 2,5A
Step angle: 1,8°
Holding torque: 180 Ncm
Dimensions without axis (LxWxH): 76x57x57mm
Axis (Lxø): 20x6,3 mm
Mounting: 5mm holes, Hole distance 47mm, Flange diameter 38mm

My settings are:
SCALE=160
ENC_SCALE=2560 (200 steps/rev * 64 micro steps / 5mm axis pitch)
P=400
I=0
D=0
FF0=0
FF1=0
FF2=0
DEADBAND=0.0000999
MAX_OUTPUT=48.0

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

Time to create page: 0.307 seconds
Powered by Kunena Forum