Ethercat HAL configuration for Beckhoff EL7041 without encoder

More
8 years 11 months ago - 8 years 11 months ago #102339 by Hawkeye
I am new to this forum and this is my first topic.
Yes, I checked the already existing topics and postings to this, and did not find an answer yet.

In the last months, I build and setup my own cnc router.
Due to continues improvement, I decided to move away from parallel port to beckhof.
All my common input/output signals went already over to beckhof ethercat connectors.
No, I try to move my axis engines over to EL7041 (without extension "-1000").
All seems to be working so far (HAL driver seems to be ok,...), but when I try to move the axis,
LinuxCnc stops with message "joint 2 following error".

Please note that I am using the Beckhoff EL7041 without an encoder.
My engines are still simple 4 connector (A+ A- B+ B-) engines.
I guess at the moment, that EL7041 is waiting for encoder signal, because when I start LinuxCnc machine,
I can see LEDs for RUN, ENCODER, DRIVER, POWER, ENABLE.
And when I try to move the engine, WARNING Led lights up, and ENABLE is getting dark.

My XML-File looks like this:
Code:
<masters> <master idx="0" appTimePeriod="1000000" refClockSyncCycles="1000"> <!-- --> <!-- EK1100 EtherCAT-Koppler (2A E-Bus) --> <slave idx="0" type="EK1100" name="D1"/> <!-- --> <!-- EL1084 4K. Dig. Eingang 24V, 3ms, negativ --> <slave idx="1" type="EL1084" name="D2"/> <!-- --> <!-- EL2008 8K. Dig. Ausgang 24V, 0.5A --> <slave idx="2" type="EL1008" name="D3"/> <!-- --> <!-- EL2008 8K. Dig. Ausgang 24V, 0.5A --> <slave idx="3" type="EL1008" name="D4"/> <!-- --> <!-- EL1008 8K. Dig. Eingang 24V, 3ms --> <slave idx="4" type="EL2008" name="D5"/> <!-- --> <!-- EL1008 8K. Dig. Eingang 24V, 3ms --> <slave idx="5" type="EL2008" name="D6"/> <!-- --> <!-- EL1008 8K. Dig. Eingang 24V, 3ms --> <slave idx="6" type="EL7041-1000" name="D7"/> <!-- --> <!-- EL6614 4 Port Switch (Ethernet, CoE) --> <!--<slave idx="4" type="EL6614" name="D5"/> --> </master> </masters>

My HAL-File looks similar to this:
github.com/koppi/mk/blob/master/linuxcnc...c/koppi-cnc-axis.hal
github.com/koppi/mk/blob/master/linuxcnc...cnc/koppi-cnc-io.hal

Please understand that it feels a bit embarrassing for me if I would show you my HAL file,
as it has suffered hours and hours of try and error (I will clean it up within the next hours).

Thank you,
Hawkeye
Last edit: 8 years 11 months ago by Hawkeye.

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

More
8 years 11 months ago #102348 by db1981
Hello,

it seems you are using an hal file which was generated for an machine with encoders.
In your hal file you are telling x-pid-feedback to use x-pos-feedback which is an encoder connected to
lcec.0.4.enc-pos .
If you have a machine with steppers without feedback, you have to use "simulation" feedback.
I think in your configuration:

#net x-pos-cmd <= axis.0.motor-pos-cmd #
net x-pos-cmd => axis.0.motor-pos-fb #sim
#net x-pos-fb => axis.0.motor-pos-fb #

take a look at some Stepconf hal files.
The following user(s) said Thank You: Hawkeye

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

More
8 years 11 months ago - 8 years 11 months ago #102350 by Hawkeye
After I struggled for hours yesterday, I started a new hal configuration file this morning.
This file is part of my machine configuration which consists of several hal files.

Code:
# # Testfile for defintion of EL7041-0000 without separate hardware encoder # # load position controller PID instances loadrt pid names=z-pid addf z-pid.do-pid-calcs servo-thread setp lcec.0.D7.srv-scale [AXIS_2]SCALE #setp lcec.0.6.enc-pos-scale [AXIS_2]ENC_SCALE #setp lcec.0.D7.srv-min-dc 1 #setp lcec.0.D7.srv-max-dc 2 net z-enable => lcec.0.D7.srv-enable net z-amp-fault <= lcec.0.D7.srv-error net z-vel-cmd => lcec.0.D7.srv-cmd net z-pos-fb <= lcec.0.D7.enc-pos # position controler #setp z-pid.Pgain [AXIS_2]P #setp z-pid.Igain [AXIS_2]I #setp z-pid.Dgain [AXIS_2]D #setp z-pid.FF0 [AXIS_2]FF0 #setp z-pid.FF1 [AXIS_2]FF1 #setp z-pid.FF2 [AXIS_2]FF2 #setp z-pid.deadband [AXIS_2]DEADBAND #setp z-pid.maxoutput [AXIS_2]MAX_OUTPUT net z-enable => z-pid.enable net z-pos-cmd => z-pid.command net z-pos-fb => z-pid.feedback net z-vel-cmd <= z-pid.output # axis interface net z-enable <= axis.2.amp-enable-out net z-amp-fault => axis.2.amp-fault-in #net z-pos-cmd <= axis.2.motor-pos-cmd net z-pos-cmd <= axis.2.motor-pos-fb #net z-pos-fb => axis.2.motor-pos-fb #net z-pos-joint <= axis.2.joint-pos-fb #net z-homed <= axis.2.homed #net z-homing <= axis.2.homing #net z-neg-lim-in => axis.2.neg-lim-sw-in #net z-pos-lim-in => axis.2.pos-lim-sw-in #net z-home-sw-in => axis.2.home-sw-in


To be honest, I am also a bit unsure whether I connected the motor to the EL7041 in the correct way,
as the labeling is different between my old parallel port based step motor amplifier(A+ A- B+ B-) and Beckhoff(A1, A2, B1, B2).
As motor for testing, I use a 23HS8430
Datasheet: images-na.ssl-images-amazon.com/images/I...LTncpIL._SL1147_.jpg
The old connection layout was as follows:
B- = RED
B+ = GREEN
A- = BLUE
A+ = YELLOW


Regards,
Hawkeye
Last edit: 8 years 11 months ago by Hawkeye.

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

More
8 years 11 months ago #102365 by andypugh
Can you describe the system in a bit more detail? Is the PID something that you are putting it?

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

More
8 years 11 months ago #102372 by Allan
My understanding is that EL7041 terminals always have feedback active whether there is an encoder attached or not. By default terminals are set to internal feedback (no external encoder attached). You can read the current setting by issuing an ethercat command from the command line:

ethercat -p 6 upload --type uint8 0x8012 0x08

The 6 in the above command relates to the ethercat address of your terminal. Reading the XML file you attached, your terminal is set to ID = 6. The result of the command: 1 = internal feedback, 0 = external feedback.

To set your terminal to use internal feedback issue the following command:

sudo ethercat -p 6 download --type uint8 0x8012 0x08 1

The parameters of this command are detailed in Bechoff's 7041 PDF documentation on page 197, Feedback type:

7041 documentation

Hoping this helps.

Allan
The following user(s) said Thank You: Hawkeye

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

More
8 years 11 months ago #102377 by Hawkeye
Hello andypugh,

I am not sure whether I understood your question or not,,,
As I am a beginner, please ask a bit more precise, so I have the chance to give you a good answer.

Regards,
Hawkeye

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

Time to create page: 0.070 seconds
Powered by Kunena Forum