EtherCAT servo as main spindle

More
10 months 3 weeks ago #339744 by Hexagon
I noticed that if I disable the machine the joint.0.motor-pos-cmd tracks the joint.0.motor-fb. So I set up a new hal file with only one cia402 and no cia402pv. Because you can't change the mode of the cia402 while LinuxCNC is running, I change between CSP and CSV by writing directly into the mode of the frequency drive via EtherCAT.

In CSP mode cia402.0.pos-fb -> joint.0.motor-pos-fb. 
In CSV mode joint.0.motor-pos-cmd -> joint.0.motor-pos-fb.

So I have no following error in CSV mode, but I need to change the position before changing from CSV back to CSP or I can turn the machine off and back on again. I built a network with mux2, oneshot and flipflop to toggle the machine for a very short amount and to reset all my mode switching logic. This works surprising well and isn't noticable.

I know that this soultion is not good and only works for my usecase because I only have one servo and nothing gets interrupted by the power cycle.

The bigger problem is that my gcode file gets stopped aswell and I can't resume. Maybe there is a way by tracking the executed lines and then starting from there... But I'm not happy with the power cycle solution in the first place.

Is there any other situation where joint.0.motor-pos-cmd tracks joint.0.motor-fb?

Please Log in to join the conversation.

More
10 months 3 weeks ago #339754 by Aciera
You can also disable motion by setting 'motion.enable' to FALSE but machine state will still be switched to Off.

the relevant code section is here:
github.com/LinuxCNC/linuxcnc/blob/master...tion/control.c#L1465

If it is possible to do this for a specific joint during program execution would have to be explored. I expect that the interpreter would need to restarted at the very least.

Please Log in to join the conversation.

More
10 months 3 weeks ago #339758 by Hakan
ADm1N didn't use CSV mode, it doesn't work well for a spindle as you see.
He used PV Profile Velocity mode which works well for spindle.
I made an adaptation to cia402 component for pv mode here incl an example
github.com/MetalMusings/cia402pv

Please Log in to join the conversation.

Time to create page: 1.069 seconds
Powered by Kunena Forum