- GCode and Part Programs
- O Codes (subroutines) and NGCGUI
- Mill Library
- Need clean subroutine like on industrial controls
Need clean subroutine like on industrial controls
10 Jan 2024 12:27 #290352
by dinamik
Need clean subroutine like on industrial controls was created by dinamik
I need a clean subroutine like on industrial controls like fanuc, heidenhain... with multiple loops that I can use multiple times in the main program without renaming, scripts and other nonsense...
I've tried almost all the posts and nothing works properly on LinuxCNC without some errors, even on stupid mach3 this works without any corrections and brainstorming!
Is there a fix for this serious software hole?
o1
G90 G94 G17 G91.1
G21
G54
T1 M6 G43
.....
....
...
M98 P100 L50
G90
.....
....
...
M98 P100 L50
G90
.....
....
...
M98 P100 L50
G90
.....
....
...
M98 P100 L50
G90
.....
....
...
M98 P100 L50
G90
.....
....
...
M98 P100 L50
G90
.....
....
...
M98 P100 L50
G90
.....
....
...
M98 P100 L50
G90
G0 Z50. M9
M5
T4 M6 G43
M00
M8
G0 X40.26 Y-28.04 Z50.
S150 M3
G0 X40.26 Y-28.04 G0 Z10.
G1 Z2. F500
G1 Z-22. F30
G1 Z-37. F500
G1 Z-65. F30
G0 Z50.
G0 X145.81 Y-59.
G0 Z10.
G1 Z2. F500
G1 Z-22. F30
G1 Z-37. F500
G1 Z-65. F30
G0 Z50. M9
G0 X0. M9 Y80.
M5
M30
o100
G91
G1 Z-1.
G4 P0.3
M99
I've tried almost all the posts and nothing works properly on LinuxCNC without some errors, even on stupid mach3 this works without any corrections and brainstorming!
Is there a fix for this serious software hole?
o1
G90 G94 G17 G91.1
G21
G54
T1 M6 G43
.....
....
...
M98 P100 L50
G90
.....
....
...
M98 P100 L50
G90
.....
....
...
M98 P100 L50
G90
.....
....
...
M98 P100 L50
G90
.....
....
...
M98 P100 L50
G90
.....
....
...
M98 P100 L50
G90
.....
....
...
M98 P100 L50
G90
.....
....
...
M98 P100 L50
G90
G0 Z50. M9
M5
T4 M6 G43
M00
M8
G0 X40.26 Y-28.04 Z50.
S150 M3
G0 X40.26 Y-28.04 G0 Z10.
G1 Z2. F500
G1 Z-22. F30
G1 Z-37. F500
G1 Z-65. F30
G0 Z50.
G0 X145.81 Y-59.
G0 Z10.
G1 Z2. F500
G1 Z-22. F30
G1 Z-37. F500
G1 Z-65. F30
G0 Z50. M9
G0 X0. M9 Y80.
M5
M30
o100
G91
G1 Z-1.
G4 P0.3
M99
Please Log in or Create an account to join the conversation.
10 Jan 2024 13:03 #290357
by Aciera
Replied by Aciera on topic Need clean subroutine like on industrial controls
Try O-codes:
linuxcnc.org/docs/html/gcode/o-code.html
linuxcnc.org/docs/html/gcode/o-code.html
Please Log in or Create an account to join the conversation.
10 Jan 2024 13:34 #290363
by dinamik
Replied by dinamik on topic Need clean subroutine like on industrial controls
Only from the O page that works is repeat/endrepeat approximately with some modification.. but after a few loops LINUXCNC STOPS because it cannot read more loops, i.e. blocks.
FRUSTRATING!!
o1
G90 G94 G17 G91.1
G21
G54
T1 M6 G43
........
.....
....
...
G91
o100 repeat [27]
G1 Z-1.
G4 P0.3
o100 endrepeat
G90
........
.....
....
...
G91
o101 repeat [27]
G1 Z-1.
G4 P0.3
o101 endrepeat
G90
........
.....
....
...
G91
o102 repeat [27]
G1 Z-1.
G4 P0.3
o102 endrepeat
G90
........
.....
....
...
G91
o103 repeat [27]
G1 Z-1.
G4 P0.3
o103 endrepeat
G90
........
.....
....
...
G91
o104 repeat [27]
G1 Z-1.
G4 P0.3
o104 endrepeat
G90
........
.....
....
...
G91
o105 repeat [27]
G1 Z-1.
G4 P0.3
o105 endrepeat
G90
....
....
...
...
M5
M30
FRUSTRATING!!
o1
G90 G94 G17 G91.1
G21
G54
T1 M6 G43
........
.....
....
...
G91
o100 repeat [27]
G1 Z-1.
G4 P0.3
o100 endrepeat
G90
........
.....
....
...
G91
o101 repeat [27]
G1 Z-1.
G4 P0.3
o101 endrepeat
G90
........
.....
....
...
G91
o102 repeat [27]
G1 Z-1.
G4 P0.3
o102 endrepeat
G90
........
.....
....
...
G91
o103 repeat [27]
G1 Z-1.
G4 P0.3
o103 endrepeat
G90
........
.....
....
...
G91
o104 repeat [27]
G1 Z-1.
G4 P0.3
o104 endrepeat
G90
........
.....
....
...
G91
o105 repeat [27]
G1 Z-1.
G4 P0.3
o105 endrepeat
G90
....
....
...
...
M5
M30
Please Log in or Create an account to join the conversation.
10 Jan 2024 14:26 #290367
by Aciera
Replied by Aciera on topic Need clean subroutine like on industrial controls
Not really sure what you are trying to do but are you saying that this code is not working for you? Because it seems to work fine on my simulation:
G90 G94 G17 G91.1
G21
G54
T1 M6 G43
F3000
G91
o100 repeat [27]
G1 Z-1.
G4 P0.3
o100 endrepeat
G90
G91
o101 repeat [27]
G1 Z-1.
G4 P0.3
o101 endrepeat
G90
G91
o102 repeat [27]
G1 Z-1.
G4 P0.3
o102 endrepeat
G90
G91
o103 repeat [27]
G1 Z-1.
G4 P0.3
o103 endrepeat
G90
G91
o104 repeat [27]
G1 Z-1.
G4 P0.3
o104 endrepeat
G90
G91
o105 repeat [27]
G1 Z-1.
G4 P0.3
o105 endrepeat
G90
M5
M30
Please Log in or Create an account to join the conversation.
10 Jan 2024 14:58 #290373
by dinamik
Replied by dinamik on topic Need clean subroutine like on industrial controls
Its not same in simulation mode and working mode!
Please Log in or Create an account to join the conversation.
10 Jan 2024 15:15 #290376
by Mecanix
Replied by Mecanix on topic Need clean subroutine like on industrial controls
?! Confused. Worried. Clueless. What do you mean by that? Lcnc can run indefinitely given the main breaker servicing current don't trip and/or power outage.Its not same in simulation mode and working mode!
Please Log in or Create an account to join the conversation.
10 Jan 2024 15:32 #290378
by Aciera
Replied by Aciera on topic Need clean subroutine like on industrial controls
Yea, I'm not sure where your problem is but I just went through the trouble of running my code above on my mill and it worked just fine. As expected.
Please Log in or Create an account to join the conversation.
10 Jan 2024 16:06 - 10 Jan 2024 16:13 #290379
by Mecanix
Replied by Mecanix on topic Need clean subroutine like on industrial controls
Unlike other silly mach3/industrialwhatever you can gcode this until the end-of-worlds using countless ways & logic with lcnc. It's good stuff.
e.g.
e.g.
while (universe != blackhole):
self.c.mdi("G91")
self.c.mdi("G1 Z-1.")
self.c.mdi("G4 P0.3")
self.c.mdi("G90")
Last edit: 10 Jan 2024 16:13 by Mecanix.
Please Log in or Create an account to join the conversation.
- GCode and Part Programs
- O Codes (subroutines) and NGCGUI
- Mill Library
- Need clean subroutine like on industrial controls
Time to create page: 0.066 seconds