Limit Spindle RPM and Feed for Touch probe

More
7 years 10 months ago #122108 by fc60
Greetings,

I find this most interesting and have a use for it.

Would someone paste some sample code that limits the spindle to 100RPM and feed to 10IPM?

Is this code something you paste into the normal *.cnc file?

Thanks, in advance,

Dave

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

More
7 years 10 months ago #122132 by andypugh

fc60 wrote: Would someone paste some sample code that limits the spindle to 100RPM and feed to 10IPM?

Is this code something you paste into the normal *.cnc file?


It can't always be simply pasted in, depending on whether the halui overrides are already in use. So you would need to understand your HAL file to know where it needed to be edited.
Using halui is only one way, and might not be the best way. For the spindle a limit block in the path from motion to pwm would probably be better.
Code:
loadrt mux_generic config="ss7,ss7" #motion-type is signed, mux-generic needs unsigned loadrt conv_232_u32 count=1 ... addf conv_s32_u32.0 servo-thread addf mux-gen.0 servo-thread addf mux-gen.1 servo-thread ... net select-motion-type-signed motion.motion-type =>conv_s32_u32.0.in net select-motion-type-unsigned conv_s32_u32.0.out => mux-gen.00.sel-int mux-gen.01.sel-int net mux-gen.00.out-s32 => halui.spindle-override.counts net mux-gen.01.out-s32 => halui.max-velocity.counts setp halui.spindle-override.direct-value 1 setp halui.spindle-override.scale 100 setp mux-gen.00.in-s32-00 100 setp mux-gen.00.in-s32-01 100 setp mux-gen.00.in-s32-02 100 setp mux-gen.00.in-s32-03 100 setp mux-gen.00.in-s32-04 100 setp mux-gen.00.in-s32-05 5 setp mux-gen.00.in-s32-06 100 setp halui.max-velocity.direct-value 1 setp halui.max-velocity.scale 100 setp mux-gen.01.in-s32-00 100 setp mux-gen.01.in-s32-01 100 setp mux-gen.01.in-s32-02 100 setp mux-gen.01.in-s32-03 100 setp mux-gen.01.in-s32-04 100 setp mux-gen.01.in-s32-05 10 setp mux-gen.01.in-s32-06 100
Provided untested and without warranty.

The numbers will need to be tweaked to suit your particular machine, I expect. Specifically the velocity scale needs to be max velocity and the limit for other motion types needs to be set to the same value. For the spindle the scaling is a ratio, so probably won't actually work as-is except to prevent the spindle turning altogether with an override of zero.

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

More
7 years 7 months ago #128160 by 3D-Master
Where can i find out what various configs do?

loadrt mux_generic config="ss7,ss7"


i found out that the number in "ss7" means how many pins are available for a mux, but what does the "ss" say and where can i find all possible configs?

thanks

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

More
7 years 7 months ago #128161 by andypugh
linuxcnc.org/docs/2.7/html/man/man9/mux_generic.9.html

ss7 means "signed integer input, signed integer output, select one of 7"

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

Time to create page: 0.058 seconds
Powered by Kunena Forum