absolute multiturn encoders (solved)

More
5 years 10 months ago #193367 by dm17ry
my forks on the github:
github.com/yur7aev/linuxcnc/tree/nyx2.8
github.com/yur7aev/linuxcnc/tree/nyx_master
those have some other stuff mostly for my sscnet/mds/mechatrolink interface cards support.

i did absolute encoder support in my own way because i wanted to keep the ability to home with limit switches/index/whatever. when you set USE_ABSOLUTE_ENCODER you lose it and have to adjust HOME_OFFSET manually. my patch basically does 2 things:
1. adds a set-homed pin to each joint which just sets the "homed" flag without doing anything else. really simple and straightforward thing apart from the need to add it thru a dozen of source files.
2. add an ABSOLUTE_ENCODER ini var in [JOINT_n] section. when set, upon exit it will save the "motor_offset" value instead of the current joint position to the .pos file.

with some mitsubishi drives i have no control upon the position reported by absolute encoders. it's just some random number which persists across power-ons. then the linuxcnc executes the homing, it sets the motor_offset = home_offset - motor_pos_fb when the joint is at the home switch position. so all i need to do is to save that "motor_offset". upon startup it is already getting read from the .pos file - nothing to change here.
The following user(s) said Thank You: bkt, Aciera

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

More
2 years 11 months ago #285583 by bkt
know someone if dm17ty stuff is include in actual master branch or not? not see on manual .... so think not ...but is for chek and not rebuilt the wheel.

regards

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

More
2 years 11 months ago #285589 by Aciera
No, it has not been merged. I have tried to motivate him to get it included but there wasn't much interest. It's rather unfortunate in my view as it forces everyone who buys his hardware to patch linuxcnc because his drivers are also not included anymore.

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

More
2 years 11 months ago #285648 by dm17ry
i try to keep up with stable releases, but yeah, a few guys who want master are in trouble...
it's not that i didn't have much interest. i just wasn't sure it's the optimal solution to push upstream. and now with an ability to make a custom homing module i can probably add my hal pins in there without touching the base code. i'll see what can i do with it in upcoming weeks. if i like it, i can prepare a pull request. though i have no idea how it works :)
The following user(s) said Thank You: bkt, Aciera, DPFlex

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

More
7 months 2 weeks ago #344353 by Pipik
I solve it right now by putting in hal file this line -
net machine-is-on halui.machine.is-on halui.joint.0.home

Write this for all joints you have, just connect machine-is-on to all joints.home.

When you enable your machine, it will trigger homing for each joint. Its not so dangerous I think, because you still need to Enable machine, but you dont need to extra click Home-all.
If you have properly setup homing via absolute encoders, machine will not move at all, just take possition from servo.

This solution is not solving if servo lost position, but it can be easily checked and routed to rehome script. I will solve this later.

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

Time to create page: 0.118 seconds
Powered by Kunena Forum