- Posts: 125
- Thank you received: 11
LinuxCNC Features - a kind of NGCGUI
- Nick
- Offline
- Premium Member
-
Less
More
11 years 3 months ago #61009
by Nick
Replied by Nick on topic LinuxCNC Features - a kind of NGCGUI
I've found that if I make subroutine for сircle it wont turn on the spindle, how do you think, where should we put M3/M5 (and probably M4 for CCW spindle rotation depending on the mill bit)?
By the way, I've added difining spindle speed and feed into tool change. There was parameters but they were not used in the ini.
By the way, I've added difining spindle speed and feed into tool change. There was parameters but they were not used in the ini.
Please Log in or Create an account to join the conversation.
- FernV
- Offline
- Platinum Member
-
Less
More
- Posts: 457
- Thank you received: 124
11 years 3 months ago #61028
by FernV
Replied by FernV on topic LinuxCNC Features - a kind of NGCGUI
Hi Nick,
"Post action" is what happens after you change the tool and click OK : 'Pause' will pause linuxcnc until you click play again (this is usefull for spindle that is not controlled by linuxcnc, you do a manual start of the spindle then click play to continue) 'Pause then restart' is also used with manual spindle restart but you do not have to click play button, the pause will last 'Pause for' seconds. 'Auto restart' will start the spindle and continue automatically
'Use cooling' will do what it is supposed to do
M9 is used before tool change (do you really need M5 ?)
For M3 and M4, I would add this :
[PARAM_SPINDLE_DIR]
name = Spindle direction
type = combo
options = Clockwise=3:Counterclockwise=4
icon = cw-ccw.png
tool_tip = Select tool rotation
value = 3
and put in the order after speed
then change M3 in [CALL] to M#param_spindle_dir
Also delete these 2 lines that are not used anymore :
#<_tool_dia> = #5410
#<_tool_d> = #5410
at line 120 and 121, it sets F#<_ffeed> and S#<_spindle_rpm>
starting at line 134, if you need to plunge down directly in the material without X or Y move, it will use F#<_vertical_feed>, then when cut step is reached, it will revert to F#<_ffeed>. When the cut depth is reached, it will use F#<_final_feed> and S#<_final_spindle_rpm> for a final loop.
The same steps are used in the other ngc's
Does this answer your question ?
Regards,
Fern
You need to do a tool change first and set parameters.Nick wrote: I've found that if I make subroutine for сircle it wont turn on the spindle, how do you think, where should we put M3/M5 (and probably M4 for CCW spindle rotation depending on the mill bit)?
"Post action" is what happens after you change the tool and click OK : 'Pause' will pause linuxcnc until you click play again (this is usefull for spindle that is not controlled by linuxcnc, you do a manual start of the spindle then click play to continue) 'Pause then restart' is also used with manual spindle restart but you do not have to click play button, the pause will last 'Pause for' seconds. 'Auto restart' will start the spindle and continue automatically
'Use cooling' will do what it is supposed to do
M9 is used before tool change (do you really need M5 ?)
For M3 and M4, I would add this :
[PARAM_SPINDLE_DIR]
name = Spindle direction
type = combo
options = Clockwise=3:Counterclockwise=4
icon = cw-ccw.png
tool_tip = Select tool rotation
value = 3
and put in the order after speed
then change M3 in [CALL] to M#param_spindle_dir
Also delete these 2 lines that are not used anymore :
#<_tool_dia> = #5410
#<_tool_d> = #5410
You are right, they are not used in the ini but in the ngc files. Let's look at fv_circle.ngcNick wrote: By the way, I've added difining spindle speed and feed into tool change. There was parameters but they were not used in the ini.
at line 120 and 121, it sets F#<_ffeed> and S#<_spindle_rpm>
starting at line 134, if you need to plunge down directly in the material without X or Y move, it will use F#<_vertical_feed>, then when cut step is reached, it will revert to F#<_ffeed>. When the cut depth is reached, it will use F#<_final_feed> and S#<_final_spindle_rpm> for a final loop.
The same steps are used in the other ngc's
Does this answer your question ?
Regards,
Fern
Please Log in or Create an account to join the conversation.
- Nick
- Offline
- Premium Member
-
Less
More
- Posts: 125
- Thank you received: 11
11 years 3 months ago #61033
by Nick
Replied by Nick on topic LinuxCNC Features - a kind of NGCGUI
So 'Auto restart' will cause M3 after the tool change?
Is there any M05 in the end of the Gcode?
Probably we should put M03 M05 in the subroutines (i.e. at hte begining of the fv_circle M03/m04 and at the end m05 )... But I'm not sure about that...
Inside tool_change we do not define #<_spindle_rpm> just set S#param_speed and thats all, and in the circle we do S#<_spindle_rpm> which cause setting default speed.
I have not pulled my patch on that yet, it's on my machines computer.
Is there any M05 in the end of the Gcode?
Probably we should put M03 M05 in the subroutines (i.e. at hte begining of the fv_circle M03/m04 and at the end m05 )... But I'm not sure about that...
Inside tool_change we do not define #<_spindle_rpm> just set S#param_speed and thats all, and in the circle we do S#<_spindle_rpm> which cause setting default speed.
I have not pulled my patch on that yet, it's on my machines computer.
Code:
S#param_speed
F#param_feed
#<_final_feed> = #param_f_feed
#<_final_spindle_rpm> = #param_f_speed
#<_ffeed> = #param_feed
#<_vertical_feed> = #param_v_feed
#<_plunge_down> = #param_pen
#<_depth_step> = #param_stp
#<_plunge_ratio> = #param_pr
#<_pocket_ratio> = #param_pkr
Please Log in or Create an account to join the conversation.
- FernV
- Offline
- Platinum Member
-
Less
More
- Posts: 457
- Thank you received: 124
11 years 3 months ago #61058
by FernV
Replied by FernV on topic LinuxCNC Features - a kind of NGCGUI
Hi Nick,
I woke up this morning wondering why I let that code (I added it when I replaced the DC motor for AC with DFV and was trying to configure it, the manual was a very bad translation from Chinese to English)
So, the following are not needed and should be removed :
[PARAM_ACT] ('Post action')
[PARAM_TP] ('Pause for')
these lines
o<#self_id-act> if [#param_act EQ 0]
M0
o<#self_id-act> elseif [#param_act EQ 1]
G4 P#param_tp
M#param_spindle_dir
o<#self_id-act> else (will auto-restart)
M#param_spindle_dir
o<#self_id-act> endif
should be replaced by
M#param_spindle_dir
About M5 and M9 at the end, I am not sure where it would be best to place it. Maybe in Task-Post Processing where we set where we want the spindle to stop at the end ? This could be a True/False option. Or like others do, use a post amble file that is included at the end of to_gcode() ? This file could be editable just like defaults.ngc. Or at the end of to_gcode() before M2, like "\nM5 M9 M2" ? People would not have a choice then ? What do you think would be best ?
Regards
Fern
I woke up this morning wondering why I let that code (I added it when I replaced the DC motor for AC with DFV and was trying to configure it, the manual was a very bad translation from Chinese to English)
So, the following are not needed and should be removed :
[PARAM_ACT] ('Post action')
[PARAM_TP] ('Pause for')
these lines
o<#self_id-act> if [#param_act EQ 0]
M0
o<#self_id-act> elseif [#param_act EQ 1]
G4 P#param_tp
M#param_spindle_dir
o<#self_id-act> else (will auto-restart)
M#param_spindle_dir
o<#self_id-act> endif
should be replaced by
M#param_spindle_dir
About M5 and M9 at the end, I am not sure where it would be best to place it. Maybe in Task-Post Processing where we set where we want the spindle to stop at the end ? This could be a True/False option. Or like others do, use a post amble file that is included at the end of to_gcode() ? This file could be editable just like defaults.ngc. Or at the end of to_gcode() before M2, like "\nM5 M9 M2" ? People would not have a choice then ? What do you think would be best ?
Regards
Fern
Please Log in or Create an account to join the conversation.
- Nick
- Offline
- Premium Member
-
Less
More
- Posts: 125
- Thank you received: 11
11 years 3 months ago #61063
by Nick
Replied by Nick on topic LinuxCNC Features - a kind of NGCGUI
To my mind we should choose from two option.
1. turn on/of the spindle before and after each cutting feature (we can call O<spindle-start> and O<spindle-stop> there we can also turn on the flood and etc)
2. turn on/of by the task...
To my mind the first option is better.
But we will have to put it in each every feature once again.
By "we" I mean developpers, I thin it's no need for the user to make able to make this choise.
1. turn on/of the spindle before and after each cutting feature (we can call O<spindle-start> and O<spindle-stop> there we can also turn on the flood and etc)
2. turn on/of by the task...
To my mind the first option is better.
But we will have to put it in each every feature once again.
By "we" I mean developpers, I thin it's no need for the user to make able to make this choise.
Please Log in or Create an account to join the conversation.
- FernV
- Offline
- Platinum Member
-
Less
More
- Posts: 457
- Thank you received: 124
11 years 3 months ago #61090
by FernV
Replied by FernV on topic LinuxCNC Features - a kind of NGCGUI
Hi Nick,
I do not think option 1 would work with my VFD. I remember when setting it up it would raise an exception when trying to start while the motor was still spinning. Would it still fail now ? I can not test before a few weeks because we are re-locating and there are other higher level priorities.
I still think M3/M4 should be called right after a tool change but if you want to make simple tests, use custom gcode where you think it needs to be called. Is it a good idea to have this kind of code :
M3 M8
..do cut 1
M5 M9
M3 M8
.. do cut 2
M5 M9
M2
I re-checked M2 and it calls M5 and M9 so there is no need to change the end of to_gcode().
To move the spindle away from the workpiece when completed, I think I will add an optionnal post-amble.ngc file that can be edited as needed by the user just like defaults.ngc or I can create a new feature that can be added as the last one to do this or I can refine task.ini so users would be reminded to do it or I can do all of those
Regards,
Fern
I do not think option 1 would work with my VFD. I remember when setting it up it would raise an exception when trying to start while the motor was still spinning. Would it still fail now ? I can not test before a few weeks because we are re-locating and there are other higher level priorities.
I still think M3/M4 should be called right after a tool change but if you want to make simple tests, use custom gcode where you think it needs to be called. Is it a good idea to have this kind of code :
M3 M8
..do cut 1
M5 M9
M3 M8
.. do cut 2
M5 M9
M2
I re-checked M2 and it calls M5 and M9 so there is no need to change the end of to_gcode().
To move the spindle away from the workpiece when completed, I think I will add an optionnal post-amble.ngc file that can be edited as needed by the user just like defaults.ngc or I can create a new feature that can be added as the last one to do this or I can refine task.ini so users would be reminded to do it or I can do all of those
Regards,
Fern
Please Log in or Create an account to join the conversation.
Time to create page: 0.525 seconds