Ethercat HAL driver

More
5 years 9 months ago #194722 by sqmathlete
Replied by sqmathlete on topic Ethercat HAL driver
Hi,

Way back in April 2020 there was some discussion about the EL5101 incremental encoder. I have finally got around to hooking mine up and I am happy to say that it worked perfectly out of the box. However, I am running the encoder on the spindle of the lathe and I need to be able to monitor the index pulse in order for linuxcnc to synchronise motion while threading.

According to the manual (pg 144) the status of A,B and C inputs can be monitored via 0x6010:09, 0x6010:0A, and 0 x 6010:0B . Is it possible to add these pdo's either by twincat or by modifying the el5101 source file?


Kind regards,
Dan

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

More
5 years 9 months ago #194787 by CORBETT
Replied by CORBETT on topic Ethercat HAL driver
Dan,

Good to see that it worked out the box. I still have been using the 5151's for joint feedback, but want to use the 5101 on the spindle like you are doing so I will be watching to see if you get the index working. I just haven't had time to machine the encoder bracket and physically get the encoder setup on the particular machine that I want to add spindle feedback on as have been working on 2 other setups... otherwise I would be right there with you on the same problem.

Hopefully Albert (Chimeno) or Grotius will help with tweaking the terminal code... as they always help.

Robert

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

More
5 years 9 months ago - 5 years 9 months ago #194952 by chimeno
Replied by chimeno on topic Ethercat HAL driver
Hello @sqmathlete

The EL5101 driver created by linuxcnc-ethercat does not work with the pulse signals A, B, C directly from the device but a counter is created by software, I think you also have an index pin, I attach a register that creates the driver EL5101

hal_bit_t *ena_latch_c;
hal_bit_t *ena_latch_ext_pos;
hal_bit_t *ena_latch_ext_neg;
hal_bit_t *reset;
hal_bit_t *inext;
hal_bit_t *overflow;
hal_bit_t *underflow;
hal_bit_t *latch_c_valid;
hal_bit_t *latch_ext_valid;
hal_bit_t *set_raw_count;
hal_s32_t *set_raw_count_val;
hal_s32_t *raw_count;
hal_s32_t *raw_latch;
hal_u32_t *raw_frequency;
hal_u32_t *raw_period;
hal_u32_t *raw_window;
hal_s32_t *count;
hal_float_t *pos_scale;
hal_float_t *pos;
hal_float_t *period;
hal_float_t *frequency;


Hello @jc2ktr
I hope your controller is working

Hello @bkt
If you have problems with the device signals or missing registration, you can ask the manufacturer for an update and then record a new firmware using TWINCAT3, I hope it works for you soon


Greeting
Chimeno
Last edit: 5 years 9 months ago by chimeno.
The following user(s) said Thank You: bkt

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

More
5 years 9 months ago #194982 by jc2ktr
Replied by jc2ktr on topic Ethercat HAL driver

chimeno wrote:
Hello @jc2ktr
I hope your controller is working

Greeting
Chimeno


Hi @Chimeno

Yes and no :) the axis moves but scaling is still off. Its curious if linuxcncs dro has the right scaling/units the travelled distance is off. When the distance is ok the dro's are off.

Made a break for few days, to clear the head and then i go on the problem again.

Greetings Sven
The following user(s) said Thank You: chimeno

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

More
5 years 9 months ago #195053 by MRBaird
Replied by MRBaird on topic Ethercat HAL driver
the feed back for my ECT was 0.0125. seems to be working so far.

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

More
5 years 9 months ago #195055 by MRBaird
Replied by MRBaird on topic Ethercat HAL driver
I am trying to get a EL3054 to work. I am completely new to Linux so everything is a bit challenging. Do I just modify a similar .H and .C file and add in lcec.conf? Does it compile when its run for the first time or do i have to compile myself?

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

Time to create page: 0.266 seconds
Powered by Kunena Forum