Mori Seiki TV30 tool carousel setup problem.

More
11 Jul 2021 21:46 - 11 Jul 2021 21:47 #214327 by dm17ry
i would implement the component as a state machine. from the idle it would check the "home" pin and if true, move to, say, home1 state.
mimic the linuxcnc homing behavior. you'll have home_search_velocity and home_latch velocity. something like

target_velocity = home_search_velocity;
dv = (target_velocity - current_velocity);
if (dv / fperiod > max_accel) dv = max_accel * fperiod
else if (dv / fperiod < -max_accel) dv = -max_accel * fperiod;
current_velocity += dv;
output_pos += current_velocity * fperiod;

you can have a look how linuxcnc does it: github.com/LinuxCNC/linuxcnc/blob/master.../emc/motion/homing.c
Last edit: 11 Jul 2021 21:47 by dm17ry.

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

More
12 Jul 2021 23:57 #214456 by andypugh
Is the "carousel" HAL component any help here?

linuxcnc.org/docs/2.8/html/man/man9/carousel.9.html

That can be configured to home itself on the first tool request, for example.

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

More
13 Jul 2021 09:33 #214516 by Varang1an
Yes I would love carousel component, but I can only get servo position feedback and maybe encoder counts to it, and carousel component seems not to support either of those without modification? Also would be nice if carousel component would support position commanded servos :) hmm of course that could be good base for modification to achieve what I want... :))

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

More
13 Jul 2021 09:57 - 13 Jul 2021 10:01 #214519 by Varang1an

i would implement the component as a state machine. from the idle it would check the "home" pin and if true, move to, say, home1 state.
mimic the linuxcnc homing behavior. you'll have home_search_velocity and home_latch velocity. something like

target_velocity = home_search_velocity;
dv = (target_velocity - current_velocity);
if (dv / fperiod > max_accel) dv = max_accel * fperiod
else if (dv / fperiod < -max_accel) dv = -max_accel * fperiod;
current_velocity += dv;
output_pos += current_velocity * fperiod;

you can have a look how linuxcnc does it: github.com/LinuxCNC/linuxcnc/blob/master.../emc/motion/homing.c

 


I actually have some interesting question, could I use command nyx.0.servo-AX.spindle-fwd to drive that servo as spindle even though it is carousel? that could open the opportunity to use it with carousel component if I could convert pos-fb signal to binary signal for tool positions?
 
Last edit: 13 Jul 2021 10:01 by Varang1an.

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

More
13 Jul 2021 11:21 - 13 Jul 2021 11:22 #214543 by dm17ry
no, spindle-fwd/rev pins are mapped directly to bits in the "control input 3" word in the protocol and are only used by spindle drives, not servos.

but it's a trivial task to write a "speed-to-position" hal component, no?
position to a binary pocket number should be easy too...
can you do it? probably you can just use limit2/integ components which are already there:
cmd_speed -> limit2 -> integ -> cmd_position
Last edit: 13 Jul 2021 11:22 by dm17ry.

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

More
13 Jul 2021 12:32 #214564 by andypugh
I have an outstanding task in my inbox to add conventional encoder support to the carousel comp.

An alternative approach might be to do it all with a G-code subroutine, probably as part of a remap.

If the carousel is in position control, then you could send position commands out via a G-code analogue output pin in HAL, and use G-code logic to pick the shortest path.

An example that uses the carousel .comp is here:
github.com/LinuxCNC/linuxcnc/blob/master...hange/toolchange.ngc
Line 37 sends a position to "carousel" but it could very easily send a servo motor position to your toolchanger. It's a floating point output, so can be almost any number that works.

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

More
13 Jul 2021 17:17 - 13 Jul 2021 17:28 #214621 by Varang1an
thank you for help guys, I got lot good comments and even though I was looking "easier" solution or was hoping someone has already done it I think I just need to wrap my sleeves and do it myself. Oh and yes speed to position should be doable and I will then just go for it. Maybe I even take a look of carousel component now and modify my own version of it with speed to position outputs and encoder / position input. Will prolly come back later if I succeed :D wish me luck
Last edit: 13 Jul 2021 17:28 by Varang1an.

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

More
13 Jul 2021 18:00 - 13 Jul 2021 18:02 #214631 by Varang1an
Though cmd_speed -> limit2 -> integ -> cmd_position seems simplest way to do it :) or maybe the g code could work too... anyway have to think how I will try it
Last edit: 13 Jul 2021 18:02 by Varang1an.

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

Time to create page: 0.099 seconds
Powered by Kunena Forum