Linuxcnc Gmocappy -> Fragen zum Nullpunkt

More
29 Mar 2018 14:01 #108067 by Michael1992
Hallo Forum,

bin neu hier. Habe mir vor einigen Monaten eine CNC Fräse gebaut.
Nun habe ich in Fusion360 ein Bauteil erstellt, welches ich mittels
Linuxcnc Postprozessor in ein G-Code exportiert habe. Das Uploaden
auf Linuxcnc hat ebenfalls funktioniert. Nachdem ich jedoch dem System
den Werkstücknullpunkt "gezeigt" habe, fährt meine Z-Achse jedoch immer
auf den Maschinennullpunkt. Im G-Code steht Z-0 für die Oberkante des Werkstücks.
Für die Referenzfahrt der Z-Achse, fährt die Achse nach unten.

Kann mir irgendjemand bitte helfen?
Danke :)

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

More
30 Mar 2018 09:55 #108095 by Michael1992
Hier noch mein G-Code, der mir Fusion360 ausgibt.


%
(BOHRPLATTE)
N10 G90 G94 G17 G91.1
N15 G21
N20 G53 G0 Z0.
(PLANEN1)
N25 M9
N30 T1 M6
N35 T2
N40 S3820 M3
N45 G54
N50 M8
N60 G0 X156.5 Y3.438
N65 G43 Z15. H1
N70 G0 Z5.
N75 G1 Z0. F2336.8
N80 G18 G3 X155.5 Z-1. I-1. K0.
N85 G1 X150.
N90 X0.
N95 G17 G2 Y11.782 I0. J4.172
N100 G1 X150.
N105 G3 Y20.125 I0. J4.172
N110 G1 X0.
N115 G2 Y28.468 I0. J4.172
N120 G1 X150.
N125 G3 Y36.812 I0. J4.172
N130 G1 X0.
N135 G2 Y45.155 I0. J4.172
N140 G1 X150.
N145 G18 G2 X151. Z0. I0. K1.
N150 G0 Z15.
N155 G17
N160 M5
N165 G53 G0 Z0.
(BOHREN1)
N170 M9
N175 M1
N180 T2 M6
N185 T60
N190 S9700 M3
N195 G54
N200 M8
N210 G0 X75. Y25.
N215 G43 Z15. H2
N225 G0 Z5.
N230 Z3.
N235 Z0.
N240 G1 Z-4. F30.
N245 G0 Z-1.
N250 G1 Z-6. F30.
N255 G0 Z-3.
N260 G1 Z-8. F30.
N265 G0 Z-5.
N270 G1 Z-10. F30.
N275 G0 Z-7.
N280 G1 Z-12. F30.
N285 G0 Z-9.
N290 G1 Z-14. F30.
N295 G0 Z-11.
N300 G1 Z-16. F30.
N305 G0 Z-13.
N310 G1 Z-18. F30.
N315 G0 Z-15.
N320 G1 Z-20. F30.
N325 G0 Z-17.
N330 G1 Z-21. F30.
N335 G0 Z5.
N345 X125.046
N350 Z3.
N355 Z0.
N360 G1 Z-4. F30.
N365 G0 Z-1.
N370 G1 Z-6. F30.
N375 G0 Z-3.
N380 G1 Z-8. F30.
N385 G0 Z-5.
N390 G1 Z-10. F30.
N395 G0 Z-7.
N400 G1 Z-12. F30.
N405 G0 Z-9.
N410 G1 Z-14. F30.
N415 G0 Z-11.
N420 G1 Z-16. F30.
N425 G0 Z-13.
N430 G1 Z-18. F30.
N435 G0 Z-15.
N440 G1 Z-20. F30.
N445 G0 Z5.
N455 X24.98
N460 Z3.
N465 Z0.
N470 G1 Z-4. F30.
N475 G0 Z-1.
N480 G1 Z-6. F30.
N485 G0 Z-3.
N490 G1 Z-8. F30.
N495 G0 Z-5.
N500 G1 Z-10. F30.
N505 G0 Z-7.
N510 G1 Z-12. F30.
N515 G0 Z-9.
N520 G1 Z-14. F30.
N525 G0 Z-11.
N530 G1 Z-16. F30.
N535 G0 Z-13.
N540 G1 Z-18. F30.
N545 G0 Z-15.
N550 G1 Z-20. F30.
N555 G0 Z-17.
N560 G1 Z-21. F30.
N565 G0 Z5.
N570 Z15.
N580 M5
N585 G53 Z0.
(BOHREN2)
N590 M9
N595 M1
N600 T60 M6
N605 T1
N610 S5000 M3
N615 G54
N620 M8
N630 G0 X24.98 Y25.
N635 G43 Z15. H60
N645 G0 Z5.
N650 G98 G81 X24.98 Y25. Z-7. R4. F500.
N655 X75.
N660 X125.046
N665 G80
N670 G0 Z15.
N680 M9
N685 G53 Z0.
N690 M30
%

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

More
30 Mar 2018 10:16 #108096 by Clive S
After you homed the machine did you then touch off on the stock piece with x,y and z? and zeroed the dro

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

More
30 Mar 2018 10:24 - 30 Mar 2018 10:25 #108097 by Michael1992
Hello,

Thank you for your answer. Please excuse my bad English.

I loaded the program in Linuxcnc and touched the workpiece. Unfortunately, the Z-axis always moves to machine 0. I get an error message that the stop is triggered if you continue driving. Is the error in G-code?
Last edit: 30 Mar 2018 10:25 by Michael1992.

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

More
30 Mar 2018 10:56 #108100 by Clive S
It might help if you post your ini file

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

More
30 Mar 2018 11:12 #108101 by Michael1992
If I clip the tool change, for example T60 M6 in the G-code, it works. Is this an automatic tool change? In addition, I have to rewrite Z0 to Z150, so that the CNC milling machine does not move to the stop. My Z-axis reference switch is on top. This means that the Z-axis has to go all the way down. That explains why Z0 does not work. But how can I change this to fusion360? I would also like to do a manual tool change. Can you help me?

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

More
31 Mar 2018 09:11 #108166 by Michael1992
Hello,

I probably found the mistake for the tool change M6. Apparently HAL component called hal_manualtoolchange does not exist for me.
For the Z axis, I have now rebuilt the reference switch so that the Z axis goes up to the proximity switch.
How do I have to adjust the .ini?

# EMC controller parameters for a simulated machine.
# General note: Comments can either be preceded with a # or ; - either is
# acceptable, although # is in keeping with most linux config files.

# General section
[EMC]
VERSION = $Revision$
MACHINE = gmoccapy
DEBUG = 0


# Sections for display options
[DISPLAY]
DISPLAY = gmoccapy

# Cycle time, in milliseconds, that display will sleep between polls
CYCLE_TIME = 100

# Highest value that will be allowed for feed override, 1.0 = 100%
MAX_FEED_OVERRIDE = 15
MAX_SPINDLE_OVERRIDE = 1.2
MIN_SPINDLE_OVERRIDE = .5

# Max and default jog speeds in units per second
MAX_LINEAR_VELOCITY = 166
DEFAULT_LINEAR_VELOCITY = 5
MAX_ANGULAR_VELOCITY = 234

# Prefix to be used
PROGRAM_PREFIX = /home/cnc/linuxcnc/nc_files

# Introductory graphic
INTRO_GRAPHIC = linuxcnc.gif
INTRO_TIME = 5

# list of selectable jog increments
INCREMENTS = 1.000 mm, 0.100 mm, 0.010 mm, 0.001 mm ,1.2345 in

# for details see nc_files/subroutines/maco_instructions.txt
[MACROS]
MACRO = i_am_lost
MACRO = halo_world
MACRO = jog_around
MACRO = increment xinc yinc
MACRO = go_to_position X-pos Y-pos Z-pos

[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image
PROGRAM_EXTENSION = .py Python Script
png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode
py = python

# Task controller section
[TASK]
TASK = milltask
CYCLE_TIME = 0.001

# Part program interpreter section
[RS274NGC]
RS274NGC_STARTUP_CODE = G17 G21 G40 G43H0 G54 G64P0.005 G80 G90 G94 G97 M5 M9
PARAMETER_FILE = sim.var
SUBROUTINE_PATH = macros

# Motion control section
[EMCMOT]
EMCMOT = motmod
COMM_TIMEOUT = 1.0
COMM_WAIT = 0.010
BASE_PERIOD = 100000
SERVO_PERIOD = 1000000

# Hardware Abstraction Layer section
[HAL]
HALFILE = Robin.hal
#HALFILE = axis_manualtoolchange.hal
HALFILE = LIB:xhc-hb04.tcl
HALUI = halui

[HALUI]
MDI_COMMAND=G0 X0 Y0 Z0
MDI_COMMAND=G0 X0 Y0 Z0
#3
MDI_COMMAND= G10 L20 P0 X0
#4
MDI_COMMAND= G10 L20 P0 Y0
#5
MDI_COMMAND= G10 L20 P0 Z0

[XHC_HB04_BUTTONS]
# use button names according to layout file xhc-hb04-layout{n}.cfg
# note: "start-pause" is connected for standard behavior
# controlling halui.pause/halui.resume/halui.run
# these are examples, edit as required:
goto-zero = halui.home-all
start-pause = halui.machine.on
#std_start_pause
rewind = halui.program.step
# probe-input for simulating a probe:
probe-z = motion.probe-input
# macro-3 = halui.mdi-command-03
half = halui.spindle.stop
zero = halui.joint.selected.is-homed
safe-z = halui.mdi-command-10
# in this sim, home-all only works first time, hold down till finished:
home = halui.mdi-command-00
#macro-1 = halui.mdi-command-01
macro-2 = halui.mdi-command-01
spindle = halui.spindle.start
step = xhc-hb04.stepsize-up
mode = ""
# macro-6 = halui.mdi-command-06
# macro-7 = halui.mdi-command-07
stop = halui.estop.reset
reset = halui.estop.activate
zero-x = halui.mdi-command-02
zero-y = halui.mdi-command-03
zero-z = halui.mdi-command-04

[XHC_HB04_CONFIG]
# specify layout = n for LIB:xhc-hb04-layout{n}.cfg files
layout = 2
# coords: specify upto 4 letters from set {x y z a b c u v w}
# coords: switch labels are xyza but any unique 4 letters
# from the set {xyxabcuvw) can be used (if the coord exists)
coords = x y z
# lowpass settings:
# coef: slows rate of change of output, range: 0 < coef < 1
coefs = 1 1 1
# scale plus or minus, rotaries may require larger scale factor:
scales = 1 -1 1 10 50 100
# jogmode normal(default) or vnormal or plus-minus
jogmode = normal
# sequence 1: 0.001,0.010,0.100,1.000 (mm-based machine)
# sequence 2: 0.001,0.005,0.010,0.020 (inch-based machine)
# sequence 3: 0.001,0.010,0.100
# sequence 4: 0.001,0.005,0.010,0.020,0.050,0.100
# sequence 5: 0.001,0.010,0.050,0.100,1.000
sequence = 5
# require_pendant = no: create xhc-hb04 hal pins when pendant not connecte
# at startup
require_pendant = yes
inch_or_mm = mm
# mpg_accels: provision for reduced acceleration for mpg jogging
mpg_accels = 1 2 20 600

# Trajectory planner section
[TRAJ]
AXES = 3
COORDINATES = X Y Z
LINEAR_UNITS = mm
ANGULAR_UNITS = degree
CYCLE_TIME = 0.010
DEFAULT_VELOCITY = 50.00
MAX_VELOCITY = 500.00

[AXIS_0]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 13
MAX_ACCELERATION = 1000.0
STEPGEN_MAXACCEL = 1250.0
SCALE = 160.0
FERROR = 99
MIN_FERROR = 99.25
MIN_LIMIT = -100.0
MAX_LIMIT = 570
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = 16
HOME_LATCH_VEL = 1
HOME_SEQUENCE = 1

[AXIS_1]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 11
MAX_ACCELERATION = 1000.0
STEPGEN_MAXACCEL = 1250.0
SCALE = 160.0
FERROR = 99
MIN_FERROR = 99
MIN_LIMIT = -100.0
MAX_LIMIT = 500
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = 11
HOME_LATCH_VEL = 1
HOME_SEQUENCE = 2

[AXIS_2]
TYPE = LINEAR
HOME = 0.0
MAX_VELOCITY = 11
MAX_ACCELERATION = 1000.0
STEPGEN_MAXACCEL = 1250.0
SCALE = 160.0
FERROR = 99
MIN_FERROR = 99
MIN_LIMIT = 0
MAX_LIMIT = 150
HOME_OFFSET = 0.000000
HOME_SEARCH_VEL = 11
HOME_LATCH_VEL = 1
HOME_SEQUENCE = 0

# section for main IO controller parameters
[EMCIO]
EMCIO = io
CYCLE_TIME = 0.100

# tool table file
TOOL_TABLE = tool.tbl
TOOL_CHANGE_POSITION = 100 100 -10
TOOL_CHANGE_QUILL_UP = 1

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

More
31 Mar 2018 10:10 #108169 by Mike_Eitel
As you understand german.
There is very good explaining video from talla83

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

More
01 Apr 2018 09:36 #108203 by Michael1992
Hallo Mike,

Danke für Deine Nachricht.
Dank dem Video funktioniert nun alles :)

Schöne Ostern.

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

More
01 Apr 2018 11:24 #108205 by Mike_Eitel
Danke nicht mir, besser danke Talla.
Er hat eine ganze Menge recht brauchbare Videos zu lcnc gemacht.

Er ist wohl mehr in der CNC Ecke aktiv.
Mike

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

Time to create page: 0.257 seconds
Powered by Kunena Forum