Limit Spindle RPM and Feed for Touch probe
07 Dec 2018 21:30 #122022
by 3D-Master
Limit Spindle RPM and Feed for Touch probe was created by 3D-Master
Hi,
is it possible to limit the Spindle rpm and jog feed (possibly jog rapid aswell) to specified values if i call the touch probe? (for example 100 rpm and f1000 /f2000 rapid) i dont want to accidentally spool the touch probe up to 8000 rpm or crash it with 10.000mm/min
thanks
is it possible to limit the Spindle rpm and jog feed (possibly jog rapid aswell) to specified values if i call the touch probe? (for example 100 rpm and f1000 /f2000 rapid) i dont want to accidentally spool the touch probe up to 8000 rpm or crash it with 10.000mm/min
thanks
Please Log in or Create an account to join the conversation.
08 Dec 2018 04:00 #122032
by cmorley
Replied by cmorley on topic Limit Spindle RPM and Feed for Touch probe
I feel there is an answer to this but can't find the HAL pin required.
I thought there was a pin that told you what motion mode linuxcnc was currently using.
If there is you could possibly use that to limit rpm and feed rate using HAL infrastructure.
Maybe someone else will pick up on my idea and find the pin
Chris M
I thought there was a pin that told you what motion mode linuxcnc was currently using.
If there is you could possibly use that to limit rpm and feed rate using HAL infrastructure.
Maybe someone else will pick up on my idea and find the pin
Chris M
Please Log in or Create an account to join the conversation.
08 Dec 2018 04:11 #122033
by andypugh
Replied by andypugh on topic Limit Spindle RPM and Feed for Touch probe
motion.motion−type OUT S32
These values are from src/emc/nml_intf/motion_types.h
0: Idle (no motion)
1: Traverse
2: Linear feed
3: Arc feed
4: Tool change
5: Probing
6: Rotary unlock for traverse
You could use that to intervene (limit1?) between spindle commands and the driver, and also to apply a fixed feed-override, all in HAL.
These values are from src/emc/nml_intf/motion_types.h
0: Idle (no motion)
1: Traverse
2: Linear feed
3: Arc feed
4: Tool change
5: Probing
6: Rotary unlock for traverse
You could use that to intervene (limit1?) between spindle commands and the driver, and also to apply a fixed feed-override, all in HAL.
Please Log in or Create an account to join the conversation.
08 Dec 2018 04:19 #122035
by cmorley
Replied by cmorley on topic Limit Spindle RPM and Feed for Touch probe
thanks Andy.
I see motion.motion-type is not documented in the HTML online docs...
Or maybe I'm blind...
Chris M
I see motion.motion-type is not documented in the HTML online docs...
Or maybe I'm blind...
Chris M
Please Log in or Create an account to join the conversation.
08 Dec 2018 04:37 #122036
by rodw
Replied by rodw on topic Limit Spindle RPM and Feed for Touch probe
Nah, its there. search for type on this page
linuxcnc.org/docs/devel/html/man/man9/motion.9.html
linuxcnc.org/docs/devel/html/man/man9/motion.9.html
Please Log in or Create an account to join the conversation.
08 Dec 2018 05:54 #122044
by cmorley
Replied by cmorley on topic Limit Spindle RPM and Feed for Touch probe
Ahh..it should also be here:
linuxcnc.org/docs/2.7/html/config/core-c...html#sec:motion-pins
Chris M
linuxcnc.org/docs/2.7/html/config/core-c...html#sec:motion-pins
Chris M
Please Log in or Create an account to join the conversation.
09 Dec 2018 18:06 #122108
by fc60
Replied by fc60 on topic Limit Spindle RPM and Feed for Touch probe
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
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.
10 Dec 2018 11:20 #122132
by andypugh
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.
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.
Replied by andypugh on topic Limit Spindle RPM and Feed for Touch probe
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.
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
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.
09 Mar 2019 13:14 #128160
by 3D-Master
Replied by 3D-Master on topic Limit Spindle RPM and Feed for Touch probe
Where can i find out what various configs do?
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
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.
09 Mar 2019 13:26 #128161
by andypugh
Replied by andypugh on topic Limit Spindle RPM and Feed for Touch probe
linuxcnc.org/docs/2.7/html/man/man9/mux_generic.9.html
ss7 means "signed integer input, signed integer output, select one of 7"
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.111 seconds