Ethercat HAL driver

More
09 Apr 2020 08:32 #163307 by chimeno
Replied by chimeno on topic Ethercat HAL driver
Hello @CORBETT
I don't have the device but if I can help you, to restore the device try this command
sudo ethercat download -p3 --type uint32 0x1011 0x01  0x64616F6C

then examine the device to see what model it is using the command to see if the model corresponds to the device.
sudo ethercat slave -p3 -v

then examine that the default PDOs, using the command.
sudo ethercat pdos -p3 -v
SM2
0x1601
SM3
0x1A01
0x1A02

if all this is correct we start linuxcnc-ethercat and check the status of the device
sudo ethercat slave -p3

if it is OP then we can start to configure the device but it would have to work with the basic configuration

regards
Chimeno
The following user(s) said Thank You: CORBETT

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

More
09 Apr 2020 12:25 #163325 by CORBETT
Replied by CORBETT on topic Ethercat HAL driver
Awesome, super thanks. I will try this later today when I get finished with work.

Thanks for responding, you have helped me in the past and I greatly appreciate it..

Robert

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

More
15 Apr 2020 17:22 #164068 by sqmathlete
Replied by sqmathlete on topic Ethercat HAL driver
Hi,

I'm trying to connect an incremental encoder and a MPG wheel that use 5V which are original to the machine. Is there anyone that uses an EL5101 for this purpose?

Kind regards,
Dan

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

More
16 Apr 2020 00:16 #164099 by CORBETT
Replied by CORBETT on topic Ethercat HAL driver
Dan,

I have a 5101, but have never hooked it up. If it is anything like the 5151 or 5152, you will need pull up resistors to get it working. I used a EL9505 after the EL5151 to get the 5V that I needed for the encoder and then when fed back to the EL5151, I put the pull up resistor in. You will see the top LED's on the terminal flash when rotating the encoder. That is how far I have gotten, as I cannot get any output from the terminal in Halmeter or Halscope. I believe there is a setting that needs to be configured on mine and I am not verse with TwinCAT. Plus my TwinCAT 30 day trial has expired. I have several EL5151's and one 5152, but I find it odd that there is no output in HAL when looking at the pins. Makes me concerned that I may have a bunch of bad terminals, even thought some of them were suppose to be "New".

Robert

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

More
16 Apr 2020 02:59 #164106 by CORBETT
Replied by CORBETT on topic Ethercat HAL driver
Dan,

I put up a couple of pictures of my EL5151 test setup. This is one of many setups that I have used in order to figure out my many problems. You had responded to me a year or two ago about PDO's. If you look at the close ups of the EL5151 you will see where I put the resistor tied from the 24V+ to the trigger side of the encoder A or B. Do not touch the resistors together, they must stay apart and isolated. In my machine they are rubber coated for safety.

Here is a link to the pics of how the resistor is tied in on my setup.

www.flickr.com/gp/185074919@N02/uYQQ0P


I don't know if this will help you any, but it was my 5v trigger problem with Beckhoff's 24V input. My Hurco encoders were 5V, so I used the EL9505 to feed power to the encoder, then used the resistor for triggering the EL5151 input.

I would wire up the EL5101 that I have, but I do not have a differential encoder to test with.

I am curious to see how this works out for you as I have not been able to get output from any of the modules that I have. You can spin the encoder and the LED's will flash crazily on the EL5151 for input, but you get no output from the output pins in HALmeter. It's amazing to barely turn the encoder and you see it flash so many times. I am pretty sure mine are needing re-configuration in TwinCAT. I am positive that I do not have a wiring issue, and I am believe my HAL is correct, so that leaves me with only 2 thoughts which are a configuration that needs to be performed in TwinCAT or worst case its a bad terminal. I would hate to know that all of them are bad that I have acquired over time. I know you understand this better than me so I am hoping you get it working. I was going to contact you way back about your thoughts on this.

Robert

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

More
16 Apr 2020 13:22 #164136 by sqmathlete
Replied by sqmathlete on topic Ethercat HAL driver
Hi Robert,

Nice work around with the pull up resistors. Your solution makes sense since the EL5151 and 5152 require greater than +15V = 1 and less than 5V = 0. From what I can tell there is very little difference in the EL5101 and the EL5151 both have a switchable 16/32 bit counter that you would either set in TwinCat or possibly in your .XML file. What caught my eye was that EL5051 data sheet says that the input signal is a difference signal(RS422), single-ended possible...? I need to dig deeper into this, and have a look at the PDO dictionary before I can say for sure.

I believe there is a setting that needs to be configured on mine and I am not verse with TwinCAT. Plus my TwinCAT 30 day trial has expired. I have several EL5151's and one 5152, but I find it odd that there is no output in HAL when looking at the pins. Makes me concerned that I may have a bunch of bad terminals, even thought some of them were suppose to be "New".


I have come across terminals that don't appear to be working, before you assume that they are no good, reinstall TwinCat to get another 30 days or submit your info for a free license. Then connect the terminals, scan the bus, and reload the default xml files to the devices. Usually that will bring them back to life.

It does seem odd that you can see the EL5151 working but nothing on the EL5101. If the EL5101 has an equal process image to EL5151 than you would expect to be able to see everything working in HAL, if not than I think that you would need to create the driver file for that terminal. Chimeno is the expert in this. However, if the terminal is not set up correctly in TwinCat than this may be misleading path.

You can spin the encoder and the LED's will flash crazily on the EL5151 for input, but you get no output from the output pins in HALmeter


Unfortunately, I don't have one of these terminals but my guess is that you would not see the individual signals i.e. pins but a s32 or float number that represents the count/frequency/period? Again, I have to dig deeper into the manual but I would think that there are at least a few pdo's available...

I think your on the right track, get Twincat set up again and go from there. I will try to acquire an EL5101 in the mean time.

Dan
The following user(s) said Thank You: chimeno, CORBETT

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

More
17 Apr 2020 01:56 #164220 by CORBETT
Replied by CORBETT on topic Ethercat HAL driver
Dan,

Thanks as I get to finally help someone that has helped me, even though my help is limited.

Yeah I am already back on the TwinCAT option as I think that is the best next way to go at this point. I may need some help in the future if I get stuck.

Also, yes Albert (Chimeno) is the man, he has done a lot for all of us. Plus Grottius deserves credit also. Albert has added a lot of terminals to the list which is awesome as I have some that he added. Plus he has tried helping me recently, which is most appreciated.

You may want to kick this idea around. A MPG wheel is not super critical on speed as with an encoder. I don't know what you are doing for your computer, but I have temporarily put in a DB25 PCIe card to get my encoder feedback in order to run the machine. I can't get a lot of speed, but it works. SO when I get the EL5151's working for the encoder feedback, I am going to flip the DB25 setup to my MPG as that is way cheaper than doing the beckhoff terminal. All you have to have is a DB25 card which is cheap and a C10 Breakout Board for the encoder input. Plus with that setup you can do several encoder inputs whereas with the Beckhoff route you would need several terminals either 51's or 52's. Just a thought....

If you are wanting to test a EL5101, I can send you mine to play with. I would like to get it back at some point, but you are welcome to try it out. That way you can see if it will work before you sink the money into one. These things are freaking expensive and I have been lucky to catch what I have so far at decent prices.
The following user(s) said Thank You: chimeno

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

More
18 Apr 2020 14:52 #164466 by sqmathlete
Replied by sqmathlete on topic Ethercat HAL driver
Robert,

You are correct an El5051 is not necessary for an MPG wheel. I use an EL1124 which uses a a fast CMOS input for this purpose and accepts 5V. However the factory encoder on my lead screw is also 5V, an oddball size, and way pricier than a terminal. Which, by the way I picked up on ebay for a semi-reasonable price. Very kind of you to offer to send me yours. Will let you know when it arrives.

Dan

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

More
18 Apr 2020 18:43 #164482 by CORBETT
Replied by CORBETT on topic Ethercat HAL driver
Dan,

I will have to check out your way with the EL1124 as a input. I have two of them set after a EL9505 as my input for proximity switches on each axis. My Hurco Mill uses 5 volt 3 wire proximity switches, and the EL1124 works perfect for this instead of using relay's and EL1008 terminal.

Back in April of 2019 I tried both the EL1004 and EL1008 with a simple incremental encoder hooked up to see if they would work as a cheaper alternative to the EL5151's. Neither of them worked as they both have a 3ms filter, so therefore they never see the "pulses" coming from the encoder. I was hoping the filter could be bypassed in TwinCAT, but never pursued that route. I never thought it would work, but someone on the internet claimed it did so I tried with no avail. Plus that person never provided pictures or video of this working, which had me skeptical from the beginning.

I will be watching to see your progress, when I get time I will tinker with the EL1124 idea as that would be a great alternative in price.

Thanks,
Robert

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

More
18 Apr 2020 20:12 - 18 Apr 2020 20:40 #164501 by chimeno
Replied by chimeno on topic Ethercat HAL driver
Hello @CORBETT @SQMATHLETE,
thanks so much for the compliments, although I'm just trying to help in any way I can.


I am attaching a couple of pictures of how to restore the image saved in the eeprom of the device, you have to be careful if you make a mistake it can destroy the device and it cannot be reconfigured,
1 - "ethercat" tab of the device
2 - "advanced settings" tab
3 - "ESC ACCESS" tab
4 - "EPROM" tab
5 - "HEX EDITOR" tab
6 - "download from list" tab
7 - select the device
8 - "Ok" ... recording image.


then I attach different screenshots from now of my device EL5101-0000, the device works witht the default configuration, although I have tested it in linuxcnc-ethercat with different configuration modes
- in normal mode Ok
<slave idx="2" type="EL5101" name="EL5101"/>
- in DC-MODE mode Test phase Ok
requires a new program or also if you can do it with generic mode


greeting
Chimeno
Last edit: 18 Apr 2020 20:40 by chimeno. Reason: Photo, Edit
The following user(s) said Thank You: tommylight, CORBETT

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

Time to create page: 0.161 seconds
Powered by Kunena Forum