CNC-Fräse/Linux CNC: Unterschied zwischen den Versionen

Aus C3MAWiki
(Pendant)
Zeile 2: Zeile 2:


= Linux CNC für Next3D =
= Linux CNC für Next3D =
== Fräse ==
== Pendant ==
Es wurde ein '''xhc-hb04''' verwendet.
Um diesen in Betrieb zu nehmen muss der entsprechende Treiber [http://wiki.linuxcnc.org/cgi-bin/wiki.pl?Using_A_XHC-HB04_Wireless_MPG_Pendant hier] heruntergeladen werden.
Trotz einer neueren ''Linux CNC'' Version wurde der darin beinhaltende Treiber kompiliert.
=== Konfiguration ===
Zur Inbetriebnahme wurde in der Konfigurations-Datei (''GoCNC_Step_2600.ini'' in unserem Fall) folgende Stelle im Abschnitt '''HAL''' angepasst werden:
<pre>
[HAL]
HALUI = halui
HALFILE = GoCNC_Step_2600.hal
HALFILE = custom.hal
HALFILE = xhc-hb04-world-mode.hal
POSTGUI_HALFILE = custom_postgui.hal
[XHC_HB04_CONFIG]
layout = 2
coords = x y z a
coefs  = 1 1 1 1
scales = 1 1 1 1
threadname = servo-thread
sequence = 1
jogmode = normal
require_pendant = yes
inch_or_mm = mm
</pre>
Die Knöpfe des Pendant wurden mit der Konfigurations-Datei '''xhc-hb04-world-mode.hal''' festgelegt.
<pre>
loadusr -W xhc-hb04 -I xhc-hb04-layout2.ini -H
# Home button
net home halui.home-all <= xhc-hb04.button-home
# Absolute position LCD
net pos-x halui.axis.0.pos-feedback => xhc-hb04.x.pos-absolute
net pos-y halui.axis.1.pos-feedback => xhc-hb04.y.pos-absolute
net pos-z halui.axis.2.pos-feedback => xhc-hb04.z.pos-absolute
net pos-a halui.axis.3.pos-feedback => xhc-hb04.a.pos-absolute
# Relative position LCD
net pos-rel-x halui.axis.0.pos-relative => xhc-hb04.x.pos-relative
net pos-rel-y halui.axis.1.pos-relative => xhc-hb04.y.pos-relative
net pos-rel-z halui.axis.2.pos-relative => xhc-hb04.z.pos-relative
net pos-rel-a halui.axis.3.pos-relative => xhc-hb04.a.pos-relative
# Jog axis selection button
net jog-x axis.0.jog-enable <= xhc-hb04.jog.enable-x
net jog-y axis.1.jog-enable <= xhc-hb04.jog.enable-y
net jog-z axis.2.jog-enable <= xhc-hb04.jog.enable-z
#net jog-a axis.3.jog-enable <= xhc-hb04.jog.enable-a
# Jog wheel for world mode
net jog-max-velocity halui.max-velocity.value => xhc-hb04.jog.max-velocity
net jog-speed xhc-hb04.jog.velocity => halui.jog-speed
net jog-plus-x xhc-hb04.jog.plus-x => halui.jog.0.plus
net jog-minus-x xhc-hb04.jog.minus-x => halui.jog.0.minus
net jog-plus-y xhc-hb04.jog.plus-y => halui.jog.1.plus
net jog-minus-y xhc-hb04.jog.minus-y => halui.jog.1.minus
net jog-plus-z xhc-hb04.jog.plus-z => halui.jog.2.plus
net jog-minus-z xhc-hb04.jog.minus-z => halui.jog.2.minus
#net jog-plus-a xhc-hb04.jog.plus-a => halui.jog.3.plus
#net jog-minus-a xhc-hb04.jog.minus-a => halui.jog.3.minus
# Wheel for feedrate and spindle
setp halui.feed-override.scale 0.01
net jog-counts => halui.feed-override.counts
net jog-feed halui.feed-override.count-enable <= xhc-hb04.jog.enable-feed-override
net jog-feed2 halui.feed-override.value => xhc-hb04.feed-override
setp halui.spindle-override.scale 0.01
net jog-counts => halui.spindle-override.counts
net jog-spindle halui.spindle-override.count-enable <= xhc-hb04.jog.enable-spindle-override
net jog-spindle2 halui.spindle-override.value => xhc-hb04.spindle-override
net spindle-rps motion.spindle-speed-cmd-rps => xhc-hb04.spindle-rps
# RESET/ESTOP button
net estop xhc-hb04.button-reset => halui.estop.activate
net speed-up xhc-hb04.button-step => xhc-hb04.stepsize-up
net step xhc-hb04.button-rewind => halui.program.step
# X=0, Y=0, Z=0
net x0 halui.mdi-command-06 <= xhc-hb04.button-zero-x
net y0 halui.mdi-command-07 <= xhc-hb04.button-zero-y
net z0 halui.mdi-command-08 <= xhc-hb04.button-zero-z
net origin halui.mdi-command-09 xhc-hb04.button-goto-zero
</pre>
Die genannte Dateien befinden sich im '''configs/GoCNC_Step_2600''' Ordner von ''Linux CNC''.
=== XHC Layout ===
Es wurde das folgende mitgelieferte Layout '''xhc-hb04-layout2.ini''' verwendet.
<pre>
[XHC-HB04]
BUTTON=17:button-reset
BUTTON=16:button-stop
BUTTON=01:button-goto-zero
BUTTON=02:button-start-pause
BUTTON=03:button-rewind
BUTTON=04:button-probe-z
BUTTON=0C:button-spindle
BUTTON=06:button-half
BUTTON=07:button-zero
BUTTON=08:button-safe-z
BUTTON=09:button-home
BUTTON=0A:button-macro-1
BUTTON=0B:button-macro-2
BUTTON=05:button-macro-3
BUTTON=0F:button-macro-6
BUTTON=10:button-macro-7
BUTTON=0D:button-step
BUTTON=0E:button-mode
</pre>
Die genannte Dateien befinden sich im '''configs/GoCNC_Step_2600''' Ordner von ''Linux CNC''.

Version vom 4. Juli 2016, 20:06 Uhr

Beschreibung der Fräse

Linux CNC für Next3D

Fräse

Pendant

Es wurde ein xhc-hb04 verwendet. Um diesen in Betrieb zu nehmen muss der entsprechende Treiber hier heruntergeladen werden.

Trotz einer neueren Linux CNC Version wurde der darin beinhaltende Treiber kompiliert.

Konfiguration

Zur Inbetriebnahme wurde in der Konfigurations-Datei (GoCNC_Step_2600.ini in unserem Fall) folgende Stelle im Abschnitt HAL angepasst werden:

[HAL]
HALUI = halui
HALFILE = GoCNC_Step_2600.hal
HALFILE = custom.hal
HALFILE = xhc-hb04-world-mode.hal
POSTGUI_HALFILE = custom_postgui.hal

[XHC_HB04_CONFIG]
layout = 2
coords = x y z a
coefs  = 1 1 1 1
scales = 1 1 1 1
threadname = servo-thread
sequence = 1
jogmode = normal
require_pendant = yes
inch_or_mm = mm

Die Knöpfe des Pendant wurden mit der Konfigurations-Datei xhc-hb04-world-mode.hal festgelegt.


loadusr -W xhc-hb04 -I xhc-hb04-layout2.ini -H

# Home button
net home halui.home-all <= xhc-hb04.button-home

# Absolute position LCD
net pos-x halui.axis.0.pos-feedback => xhc-hb04.x.pos-absolute
net pos-y halui.axis.1.pos-feedback => xhc-hb04.y.pos-absolute
net pos-z halui.axis.2.pos-feedback => xhc-hb04.z.pos-absolute
net pos-a halui.axis.3.pos-feedback => xhc-hb04.a.pos-absolute

# Relative position LCD
net pos-rel-x halui.axis.0.pos-relative => xhc-hb04.x.pos-relative
net pos-rel-y halui.axis.1.pos-relative => xhc-hb04.y.pos-relative
net pos-rel-z halui.axis.2.pos-relative => xhc-hb04.z.pos-relative
net pos-rel-a halui.axis.3.pos-relative => xhc-hb04.a.pos-relative

# Jog axis selection button
net jog-x axis.0.jog-enable <= xhc-hb04.jog.enable-x
net jog-y axis.1.jog-enable <= xhc-hb04.jog.enable-y
net jog-z axis.2.jog-enable <= xhc-hb04.jog.enable-z
#net jog-a axis.3.jog-enable <= xhc-hb04.jog.enable-a

# Jog wheel for world mode
net jog-max-velocity halui.max-velocity.value => xhc-hb04.jog.max-velocity
net jog-speed xhc-hb04.jog.velocity => halui.jog-speed 
net jog-plus-x xhc-hb04.jog.plus-x => halui.jog.0.plus 
net jog-minus-x xhc-hb04.jog.minus-x => halui.jog.0.minus
net jog-plus-y xhc-hb04.jog.plus-y => halui.jog.1.plus 
net jog-minus-y xhc-hb04.jog.minus-y => halui.jog.1.minus
net jog-plus-z xhc-hb04.jog.plus-z => halui.jog.2.plus 
net jog-minus-z xhc-hb04.jog.minus-z => halui.jog.2.minus
#net jog-plus-a xhc-hb04.jog.plus-a => halui.jog.3.plus 
#net jog-minus-a xhc-hb04.jog.minus-a => halui.jog.3.minus

# Wheel for feedrate and spindle
setp halui.feed-override.scale 0.01
net jog-counts => halui.feed-override.counts
net jog-feed halui.feed-override.count-enable <= xhc-hb04.jog.enable-feed-override
net jog-feed2 halui.feed-override.value => xhc-hb04.feed-override

setp halui.spindle-override.scale 0.01
net jog-counts => halui.spindle-override.counts
net jog-spindle halui.spindle-override.count-enable <= xhc-hb04.jog.enable-spindle-override
net jog-spindle2 halui.spindle-override.value => xhc-hb04.spindle-override
net spindle-rps motion.spindle-speed-cmd-rps => xhc-hb04.spindle-rps

# RESET/ESTOP button
net estop xhc-hb04.button-reset => halui.estop.activate
net speed-up xhc-hb04.button-step => xhc-hb04.stepsize-up
net step xhc-hb04.button-rewind => halui.program.step

# X=0, Y=0, Z=0 
net x0 halui.mdi-command-06 <= xhc-hb04.button-zero-x
net y0 halui.mdi-command-07 <= xhc-hb04.button-zero-y
net z0 halui.mdi-command-08 <= xhc-hb04.button-zero-z
net origin halui.mdi-command-09 xhc-hb04.button-goto-zero

Die genannte Dateien befinden sich im configs/GoCNC_Step_2600 Ordner von Linux CNC.

XHC Layout

Es wurde das folgende mitgelieferte Layout xhc-hb04-layout2.ini verwendet.

[XHC-HB04]
BUTTON=17:button-reset
BUTTON=16:button-stop
BUTTON=01:button-goto-zero
BUTTON=02:button-start-pause
BUTTON=03:button-rewind
BUTTON=04:button-probe-z
BUTTON=0C:button-spindle
BUTTON=06:button-half
BUTTON=07:button-zero
BUTTON=08:button-safe-z
BUTTON=09:button-home
BUTTON=0A:button-macro-1
BUTTON=0B:button-macro-2
BUTTON=05:button-macro-3
BUTTON=0F:button-macro-6
BUTTON=10:button-macro-7
BUTTON=0D:button-step
BUTTON=0E:button-mode

Die genannte Dateien befinden sich im configs/GoCNC_Step_2600 Ordner von Linux CNC.