Ethercat HAL driver

More
31 Aug 2015 07:00 - 31 Aug 2015 07:13 #61928 by ftree
Replied by ftree on topic Ethercat HAL driver
Thinking something along these lines. The encoder is directly attached to the ServoPack.

Would the EtherCAT module/driver support feedback through to LinuxCNC from the ServoPack?

Last edit: 31 Aug 2015 07:13 by ftree.

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

More
03 Sep 2015 17:45 #62078 by Oscmol
Replied by Oscmol on topic Ethercat HAL driver

3 videos of my machine running

Servodrives OMRON R88D-KN02H-ECT
Beckhoff EL1014, EL3102






Hi Narogon

This looks really lovely B)

I have 2 Omron drives the same you are using except its 400watts instead.
My plan is to have these to on my lathe and would really like to test this ethercat communication.
I use ethercat alot at my work but have never tried it in Linux cnc.

- Can you maybe tell me more about your application and maybe put up some example file?
- What is your configuration on the Beckhoff I/O node?
- My idea were to put a hand / jog wheel like and MPG on the Beckhoff node and some other I/O for the toolchanger.
- Did you use CX-Drive from omron to tune and set up the drives?

I am thankful for all the information you can tell.

Thanks

Best regards
Oscar

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

More
06 Sep 2015 18:45 - 06 Sep 2015 19:18 #62164 by narogon
Replied by narogon on topic Ethercat HAL driver

Beautifull!!!

Can you put some data about universal joints, rods, etc (manufacturer, models, etc)

Best regards


All the mechanics parts were produced by a local manufacturer at Malaga.
I could specify you the materials and the dimensions if you need them.

3 videos of my machine running


Very Nice! Can you show some details of the upper arms and servo drives as well?


I've attached 3 photos. If you need something more tell me.


Hi Narogon

This looks really lovely B)

I have 2 Omron drives the same you are using except its 400watts instead.
My plan is to have these to on my lathe and would really like to test this ethercat communication.
I use ethercat alot at my work but have never tried it in Linux cnc.

- Can you maybe tell me more about your application and maybe put up some example file?
- What is your configuration on the Beckhoff I/O node?
- My idea were to put a hand / jog wheel like and MPG on the Beckhoff node and some other I/O for the toolchanger.
- Did you use CX-Drive from omron to tune and set up the drives?

I am thankful for all the information you can tell.

Thanks

Best regards
Oscar


My main objective was to replace the NJ501 OMRON controller and the use of the Sysmac Studio software with open source software. Due to this is my master's thesis I added some HID to demonstrate the possibilities of EtherCAT interacting with different brands at same time.

The configuration files are uploaded to my gitHub

I used a EL3102 to read the voltage through the joystick and command the halui jog speed of the X and Y axes.
With the EL1014 I monitor the digital switches for the Z axis.
At last I control the vacuum ejector valves with the digital outputs of one servodriver.

I think you could reach your goal with any problem using Beckhoff nodes.

Yes, I used CX-drive to tune the drives. However, maybe you could achieve this sending the parameters at the moment of the transition from PRE-OP to OP mode.


Best regards!!
And thank you all for your compliments
Attachments:
Last edit: 06 Sep 2015 19:18 by narogon.

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

More
07 Sep 2015 13:44 #62184 by Oscmol
Replied by Oscmol on topic Ethercat HAL driver

My main objective was to replace the NJ501 OMRON controller and the use of the Sysmac Studio software with open source software. Due to this is my master's thesis I added some HID to demonstrate the possibilities of EtherCAT interacting with different brands at same time.

The configuration files are uploaded to my gitHub

I used a EL3102 to read the voltage through the joystick and command the halui jog speed of the X and Y axes.
With the EL1014 I monitor the digital switches for the Z axis.
At last I control the vacuum ejector valves with the digital outputs of one servodriver.

I think you could reach your goal with any problem using Beckhoff nodes.

Yes, I used CX-drive to tune the drives. However, maybe you could achieve this sending the parameters at the moment of the transition from PRE-OP to OP mode.


Best regards!!
And thank you all for your compliments


Hi Narogon

Thanks for the feedback.
So you are working with Sysmac also?
I have done some projects in it and just love it.
But for this its not possible to do in sysmac for the cnc part.
Or lets say its not possible yet, maybe in the new NX7 it will be in the future.

- How did you do the configuration for the beckhoff I/O node?
Did you set it up in TwinCat 2 to se the data size?

- Have you tried the new Omron NX I/O system also?

- Can you share your configuration file for Linux and the ethercat?

- Did you set up something special in the drives with CX-drive or its more tuning you have done there?

- Sending parameters at startup will be possible to do, but it will not be my first step as it looks now.
My main goal is to get the drives working properly.

- What kind of computer are you runing your application on?

- Do you use an built-in ethernet card on the motherboard or do you have a separate ethernet card?

Thanks
Oscar
The following user(s) said Thank You: Nico2017

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

More
10 Sep 2015 19:42 #62386 by narogon
Replied by narogon on topic Ethercat HAL driver


Hi Narogon

Thanks for the feedback.
So you are working with Sysmac also?
I have done some projects in it and just love it.
But for this its not possible to do in sysmac for the cnc part.
Or lets say its not possible yet, maybe in the new NX7 it will be in the future.

- How did you do the configuration for the beckhoff I/O node?
Did you set it up in TwinCat 2 to se the data size?

- Have you tried the new Omron NX I/O system also?

- Can you share your configuration file for Linux and the ethercat?

- Did you set up something special in the drives with CX-drive or its more tuning you have done there?

- Sending parameters at startup will be possible to do, but it will not be my first step as it looks now.
My main goal is to get the drives working properly.

- What kind of computer are you runing your application on?

- Do you use an built-in ethernet card on the motherboard or do you have a separate ethernet card?

Thanks
Oscar


No, I have never used Sysmac. Originally the machine was designed to run with it but the license expired. I replaced it with open source software.

I check .chm help files from beckhoff webpage and also I used twincat 2.

No, I haven't check omron NX I/O. I used I/O of the servodrivers and Beckhoff modules.

The configuration file is in github link that I wrote on my last post.

With CX-drive I configure the proposal of some I/O of the servodrivers and tune the PIDs

You must send some parameters on PRE-OP to OP transition. For example the RxPdo and TxPdo. Check my configuration file.

I run it with two diffents computer. An old Pentium 4 and a core 2 duo T7200 laptop. For the desktop computer I had to install an ethernet card.

i hope i have answered your question satisfactorily.

BRegards
The following user(s) said Thank You: Nico2017

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

More
11 Sep 2015 21:07 - 11 Sep 2015 21:08 #62464 by Markux
Replied by Markux on topic Ethercat HAL driver
Hi guys..newbie here, 1st post, nice to meet you all :) .

I recently tried to try the LinuxCNC with Ethercat combo, but I got stuck somewhere along the way so I was hoping to find out exactly where with your help. I should also probably mention that it was also my first month playing around with Linux OS, LinuxCNC and Ethercat, so..it might be that basic chunks are missing in what I do, so I'm sry in advance if the questions are to basic...so, khhmgh :blush: ...here I go:

First of all, here all of the steps I took in order to set up the environment and then I will post the questions:

1. Make a clean installation of Debian Wheezy 2.6 image with a 2.6.4 version of LinuxCNC.

2. Follow the instructions for installing the Ethercat driver described here . Filled in the blanks in the ethercat config file with the MAC address and generic type of driver module. After this modules 'ec_generic' and 'ec_master' are always present in the lsmod list. Commands ethercat master and ethercat slaves seem to be running well.

3. I start LinuxCNC >> open a root terminal >> hal commands of type "show sig, thread, funct, pin" seem to be running well as they display of the corresponding signals, threads (actually just one, the 1ms servo thread), functions, pins etc from LinuxCNC.

4. I prepared a very brief .xml file that as far as I understood should be sufficient for my simple hardware. Here it is:
<masters>
	<master idx="0" appTimePeriod="1000000" refClockSyncCycles="100">
		<slave idx="0" type="EK1100" name="BASE"/>
		<slave idx="1" type="EL1124" name="1124"/>
		<slave idx="2" type="EL2124" name="2124"/>	
			
	</master>
</masters>

5. I run the following commands (:
- halcmd loadusr -W lcec_conf xxxx.xml (the name of the above shown .xml file)
- halcmd loadrt lcec
- halcmd net example halui.estop.is-activated lcec.0.2124.dout-2
- halcmd addf lcec.read-all servo-thread
- halcmd addf lcec.write-all servo-thread (at which the LED on 2124 for dout2 turns on)

after that I get excited :woohoo: that everything works and is all cool, I keep playin on the eSTOP button (the red circle with a huge X on it from the AXIS graphic panel) and the LED turns on and off as intended....that is for the next 2,5,10,sometimes 15 minutes. Then everything blocks :angry: . I mean literally, everything blocks, mouse doesn't work, led stops shining, ctrl+C doesn't work, computer is frozen, can't do anything besides force a shut down. Sometimes an error report gets returned, I tried capturing 2 different outcomes in the pics i attached here.





So...this is definitely the biggest problem I need to solve - understanding why I get this blockage, maybe some of you can recognize the error report and point me to what am I doing wrong. To me looks like a problem of having two clocks that are not synchronized and with time, over say half a million cycles some error accumulates and reaches a value that causes packets to not be sent on time to the slaves and...it kinda all goes south from there...but I'm just taking a wild guess.. Also some additional info:

i) I ran the latency test for a few hours, I arrived at 120 microseconds....which I understand is quite a lot but should let me still use this machine without micro-stepping.
ii) If I add the lcec functions to read and write to my own thread with a period of 2-10 ms, I think the blocking takes longer time to occur.
iii) Following the examples I saw that there is a line "loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES" which when I try to run it says: cant find module '[ECMOT]ECMOT' in /usr/realtime-3.4-9-686-pae/modules/linuxcnc. Could this be causing the prob? How is it possible that all of the other modules mentioned in the examples are where they need to be except for this motion controller that is not in the folder?
iv) I tried also changing the appTimePeriod and the refClockSyncCycles in xml file (which i honestly don't know what exactly they mean :whistle: )..but still blocked and didn't really notice any change in the time it took it to do so.

So....yeah....what do I do? help? anyone? please?

P.S: since I am writing this huge post, I can might as well make a bit longer:
- I also have a problem of having a 7041 that is not recognized when inserted in the .xml file in point 4 in the same way as the 1124 and 2124. Does it maybe need a specific declaration since it is a stepper driver?

Thank you guys in advance, would appreciate any help towards solving this thing.
If you need any additional info, I will be more then happy to provide it.
Marko
Attachments:
Last edit: 11 Sep 2015 21:08 by Markux.

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

More
14 Sep 2015 18:52 #62557 by wazjebk
Replied by wazjebk on topic Ethercat HAL driver
Dear all,

I have exact same problem like Markux. I would be very happy if someone could give us a few ideas what we should try to change etc.

Best regards.

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

More
22 Sep 2015 14:40 - 23 Sep 2015 00:22 #62848 by boyzo
Replied by boyzo on topic Ethercat HAL driver
Hello,

I am thinking to use EL4132 to drive +/- 10V setpoint for IRT SA drive ( www.irtsa.com/spip.php?article2 ). Is there anybody try this?

Regards Bojan
Last edit: 23 Sep 2015 00:22 by boyzo.

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

More
22 Sep 2015 19:50 #62855 by cgc
Replied by cgc on topic Ethercat HAL driver
And how do you read the position?

regards Frank

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

More
23 Sep 2015 00:16 #62867 by boyzo
Replied by boyzo on topic Ethercat HAL driver

And how do you read the position?


Closed loop is between drive and the motor. Then I can send the same encoder signals to EL5151 encoder interface. I did similar configuration using Granit devices VSD/E drive and MESA 5i20 and PWM output..

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

Time to create page: 0.237 seconds
Powered by Kunena Forum