Ethercat HAL driver
Well I finally got my ECT-60 scaled. I am using 5mm pitch leadscrew so 300RPM = 1500mm/M. After rereading the manual i noticed that Target Velocity and Target Position are in pulses!!! LinuxCNC uses machine units. So at 4000 pulses per revaluation from the manual I get 800 pulses for 1mm. I don't know why 4000 pulses because the motor description say 1000 count encoder. my guess is microstepping in the drive.
<!-- Target Position -->
<pdoEntry idx="607a" subIdx="00" bitLen="32" halPin="TargetPosition" halType="float" scale="800"/>
<!-- Target Velocity -->
<pdoEntry idx="60ff" subIdx="00" bitLen="32" halPin="TargetVelocity" halType="float" scale="800"/>
I have this test drive at the office. Have not tried at home with multiple drives.
Thanks for the information, so that means that my ballscrew with 6mm pitch has a scale of 4000/6 = 666.666...
Hm i will try it tomorrow.
Seems a good start.
May i ask you how scaled the feedback from the ECT?
Scroll down to the middle of the page, there is the explanation why 1000 pules of the quadrature encoder make 4000 counts, servo drives do not use microstepping.I don't know why 4000 pulses because the motor description say 1000 count encoder. my guess is microstepping in the drive.
www.dynapar.com/technology/encoder_basics/quadrature_encoder/
The ETC60 is not a Servo, it is a Closed-Loop Stepper with EtherCAT interface from my understanding.
Right the disk has 1000 increments but from counting the rising and falling edges on 2 channels you get 4000 counts per revolution.
Please Log in or Create an account to join the conversation.
- sqmathlete
- Offline
- Premium Member
- Posts: 118
- Thank you received: 17
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
Attachments:
Please Log in or Create an account to join the conversation.
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.
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
Please Log in or Create an account to join the conversation.
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
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- sqmathlete
- Offline
- Premium Member
- Posts: 118
- Thank you received: 17
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,
Yes, the encoder is updated at a much faster rate internally. By scaling the frequency appropriately, velocity in rpm or rev/s can be calculated quite easily...or at least close enough for the spindle. I was all messed up in the scaling
This satisfies the first requirement for coordinated motion,
net spindle-velocity encoder.3.velocity => spindle.0.speed-in
Chimeno, you are a very skilled wizard that knows what he is doing, I do not. So at this point, I am not sure if I am willing to risk bricking the terminal by rewriting the eprom. I'm going to see if I can figure out how to satisfy
net spindle-position encoder.3.position => spindle.0.revs
Will keep you posted.
As always thanks for you generous help!
Kind regards,
Dan
Attachments:
Please Log in or Create an account to join the conversation.
- sqmathlete
- Offline
- Premium Member
- Posts: 118
- Thank you received: 17
Sorry, my mistake there are three parts to satisfying coordinated motion. Spindle speed in rpm and rev/sec can be calculated from the frequency, as described earlier. It is this part that I don't understand
net spindle-index-enable encoder.3.index-enable <=> spindle.N.index-enable
Kind regards,
Dan
Please Log in or Create an account to join the conversation.
Chimeno, you are a very skilled wizard that knows what he is doing, I do not. So at this point, I am not sure if I am willing to risk bricking the terminal by rewriting the eprom. I'm going to see if I can figure out how to satisfy
I think I was wrong in my last post, the EEPROM topic is for the user @bkt, you don't have to reprogram the eeprom for that.
Greeting
Chimeno
Please Log in or Create an account to join the conversation.