XHC-WHB04B-6 Macro 10 zum Achse Nullen

More
6 years 11 months ago #149475 by DeepBlue
Hallo zusammen,

ich bin neu hier im Forum und möchte mich kurz vorstellen.

Mein Name ist Peter und ich habe derzeit 3 kleine Portalfräsen in Betrieb.
Die kleinste hat 300x400x100 und die größte hat 800x1800x200 (XYZ) Fahrweg.
Ich nutze als Steuerungssoftware (Mach3, Estlcam, und nun auch Linuxcnc 2.8 aktuell letztes Master).
Ich habe nun auch ein XHC-WHB04B-6 für die Linuxcnc Fräse eingebunden (nach Anleitung von talla83),
das Handrad Funktioniert wirklich gut.
Nun hätte ich aber eine Frage bezüglich den Macros als MDI_COMMAND.
Ich nulle derzeit die Achsen XYZ jeweils über ein eigenes Macro ab, das sind 3 Belegte Tasten.
Gibt es eine möglichkeit mit zb. der Macro-Taste 10 nur die aktuell ausgewählte Achse abzunullen ?
Das Handrad gibt ja die ausgewählte Achse am Auswahlschalter an Linuxcnc weiter, jetzt ist nur die Frage wie ich
das weiterverarbeiten kann. Leider kenne ich micht in Linuxcnc noch nicht so gut aus was es da für möglichkeiten gibt.
Wie könnte ich das umsetzen ?

Gruß

Peter

Please Log in to join the conversation.

  • Weiler810T
  • New Member
  • New Member
More
6 years 11 months ago #149476 by Weiler810T
Replied by Weiler810T on topic XHC-WHB04B-6 Macro 10 zum Achse Nullen
Bei meinen selbstgebastelten Handrad habe ich das so gelöst:
Code:
in derXXX.ini [HALUI] # halui.mdi-command-00 MDI_COMMAND = G10 L20 P1 X 0 ( X-Ursprung setzen ) # halui.mdi-command-01 MDI_COMMAND = G10 L20 P1 Y 0 ( Y-Ursprung setzen ) # halui.mdi-command-02 MDI_COMMAND = G10 L20 P1 Z 0 ( Z-Ursprung setzen ) # halui.mdi-command-03 MDI_COMMAND = M111 ( Gsimple starten ) # halui.mdi-command-04 MDI_COMMAND = M112 ( Programm uebertragen ) # halui.mdi-command-05 MDI_COMMAND = o<antasten> call ( Programm uebertragen )

Please Log in to join the conversation.

More
6 years 11 months ago #149478 by DeepBlue
so in der Art habe ich das auch gelöst. Allerdings werden da eben 3 Tasten belegt.
Ich möchte aber nur eine Taste verwenden und die aktuell ausgewählte Achse soll abgenullt werden.
Ich habe an meiner kleinen Fräse mit Mach3 ein WHB04 Handrad, das hat eine =0 Taste, da wird bei einem Tastendruck die aktuell
angewählte Achse genullt mit nur einer Taste.
Ich denke mal das wird mit einem Script gelöst bei dem Mach3 Handrad.

Please Log in to join the conversation.

More
6 years 11 months ago #149500 by pl7i92
bei mir sieht das dan so aus
Code:
[HALUI] # HalUI-MDI-Befehle hier einfügen (max. 64) erste =MDI 0 MDI_COMMAND=G10 L20 P1 X0 MDI_COMMAND=G10 L20 P1 Y0 MDI_COMMAND=G10 L20 P1 Z0 MDI_COMMAND=G0 G54 X0 Y0 Z25 MDI_COMMAND=G0 G53 X50 Y460 Z-25 MDI_COMMAND=G0 G53 Z-25 MDI_COMMAND=G10 L20 P1 X0 Y0 Z0 MDI_COMMAND=o<halfx> call MDI_COMMAND=o<halfy> call MDI_COMMAND= M5 MDI_COMMAND=S100 M3 MDI_COMMAND= M5 MDI_COMMAND= M5 MDI_COMMAND= M5 MDI_COMMAND = o<znullen> call MDI_COMMAND = G10 L20 P1 X 0.0 M100 MDI_COMMAND = G10 L20 P1 Y 0.0 M100 MDI_COMMAND = G10 L20 P1 X0.0 Y0.0 M100 MDI_COMMAND = G54 G1 X0.0 Y0.0 F2000 MDI_COMMAND = G53 G1 X50.0 Y460.0 Z-10 F800 MDI_COMMAND = M5

Leute passt mit den leerzeilen und Commentaren in der INI audf der interpreter kann das sehr übel nehmen und die maschine fährt dann wie sie will

Please Log in to join the conversation.

More
6 years 11 months ago #149501 by pl7i92
das script kannst du individuell anpassen es gibt hier mehrere treads dazu
das GROH heist eine zusätzliche HAL wird geladen die alles managed ZB sowas
Code:
loadusr -W xhc-hb04 -I my_xyza_xhc.ini -H -s 4 #loadusr -W xhc-hb06 -H -I wbcnc_2.7.9.ini -s 4 loadrt flipflop names=flipflop_resume,flipflop_pause,flipflop_run,flipflop_icon addf flipflop_resume servo-thread addf flipflop_pause servo-thread addf flipflop_run servo-thread addf flipflop_icon servo-thread # RESET/ESTOP button loadrt multiclick names=click_estop,click_macro1,click_zero,click_spindel,click_stop,click_mode,click_macro2,click_macro3,click_probe_z addf click_estop servo-thread addf click_mode servo-thread addf click_macro2 servo-thread addf click_probe_z servo-thread #click_probe_z in postgui net xhc-macro2 xhc-hb04.button-macro-2 => click_macro2.in net xhc-mode xhc-hb04.button-mode => click_mode.in net estop-xhbutton xhc-hb04.button-reset => click_estop.in net estop-activated halui.estop.activate <= click_estop.single-click net estop-reset halui.estop.reset <= click_estop.double-click # Home button addf click_macro3 servo-thread net xhc-macro3 xhc-hb04.button-macro-3 => click_macro3.in net home halui.home-all <= click_macro3.double-click # maschine on/off addf click_macro1 servo-thread net maschine-on-off-xhbutton xhc-hb04.button-macro-1 => click_macro1.in net joy-mashine-off halui.machine.off <= click_macro1.single-click net joy-mashine-on halui.machine.on <= click_macro1.double-click # Program control addf click_stop servo-thread net button-stop xhc-hb04.button-stop => click_stop.in net stop-prog-run halui.program.stop <= click_stop.single-click net set-prog-to-start click_stop.double-click => halui.mdi-command-12 net button-start-pause xhc-hb04.button-start-pause => flipflop_pause.clk flipflop_resume.clk flipflop_run.clk net is-paused halui.program.is-paused => flipflop_resume.data flipflop_pause.reset net is-running halui.program.is-running => flipflop_pause.data flipflop_run.reset flipflop_resume.reset net is-idle halui.program.is-idle => flipflop_run.data net resume flipflop_resume.out => halui.program.resume net pause flipflop_pause.out => halui.program.pause net run flipflop_run.out => halui.mode.auto halui.program.run net step xhc-hb04.button-rewind => halui.program.step # Absolute position LCD net pos-x halui.axis.0.pos-feedback => xhc-hb04.x.pos-relative net pos-y halui.axis.1.pos-feedback => xhc-hb04.y.pos-relative net pos-z halui.axis.2.pos-feedback => xhc-hb04.z.pos-relative 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-absolute net pos-rel-y halui.axis.1.pos-relative => xhc-hb04.y.pos-absolute net pos-rel-z halui.axis.2.pos-relative => xhc-hb04.z.pos-absolute net pos-rel-a halui.axis.3.pos-relative => xhc-hb04.a.pos-relative # jog Speed loadrt mux8 count=2 addf mux8.0 servo-thread addf mux8.1 servo-thread #wheel speed per tick setp mux8.0.in0 0 setp mux8.0.in1 0.1 setp mux8.0.in2 0.5 setp mux8.0.in3 0 setp mux8.0.in4 1 #speed for moving axes setp mux8.1.in0 0 # this one must be 0 to prevent motion unless a button is pressed setp mux8.1.in1 250 setp mux8.1.in2 1000 setp mux8.1.in3 0 setp mux8.1.in4 2500 # step logic loadrt updown count=1 addf updown.0 servo-thread setp updown.0.wrap true setp updown.0.min 0 setp updown.0.max 6 net stepcount updown.0.countup <= xhc-hb04.button-step => xhc-hb04.stepsize-up #reset step to zero net updownreset updown.0.reset <= click_mode.single-click #convert count s32 to float loadrt conv_s32_float count=1 addf conv-s32-float.0 servo-thread net conv-step conv-s32-float.0.in updown.0.count #step signal compare loadrt comp count=7 addf comp.0 servo-thread addf comp.1 servo-thread addf comp.2 servo-thread addf comp.3 servo-thread addf comp.4 servo-thread addf comp.5 servo-thread addf comp.6 servo-thread setp comp.0.in0 0 setp comp.1.in0 1 setp comp.2.in0 2 setp comp.3.in0 3 setp comp.4.in0 4 setp comp.5.in0 5 setp comp.6.in0 6 loadrt or2 count=5 addf or2.0 servo-thread addf or2.1 servo-thread addf or2.2 servo-thread addf or2.3 servo-thread addf or2.4 servo-thread net stepcounter-out conv-s32-float.0.out => comp.0.in1 comp.1.in1 comp.2.in1 comp.3.in1 comp.4.in1 comp.5.in1 comp.6.in1 #jog scale selector from step to mux net scale-selectorA mux8.0.sel0 <= comp.1.equal => or2.0.in0 net scale-selectorB mux8.0.sel1 <= comp.2.equal => or2.0.in1 net scale-selectorC mux8.0.sel2 <= comp.3.equal => or2.1.in0 net led-wheel-sectorA or2.1.in1 <= or2.0.out # postgui net pyvc-led-wheel or2.1.out => pyvcp.wheel_select net jog-scale mux8.0.out => axis.0.jog-scale axis.1.jog-scale axis.2.jog-scale axis.3.jog-scale net joy-speed-1 mux8.1.sel0 <= comp.4.equal => or2.2.in0 net joy-speed-2 mux8.1.sel1 <= comp.5.equal => or2.2.in1 net joy-speed-3 mux8.1.sel2 <= comp.6.equal => or2.3.in0 net led-button-sectorA or2.3.in1 <= or2.2.out # postgui net pyvc-led-button or2.3.out => pyvcp.button_select net joy-speed-final halui.jog-speed <= mux8.1.out #logic for Button velomotion loadrt and2 count=12 addf and2.0 servo-thread #Jog positiv X addf and2.1 servo-thread addf and2.2 servo-thread addf and2.3 servo-thread #jog negativ X addf and2.4 servo-thread addf and2.5 servo-thread addf and2.6 servo-thread # Zeroing X addf and2.7 servo-thread addf and2.8 servo-thread addf and2.9 servo-thread #a plus addf and2.10 servo-thread #a minus addf and2.11 servo-thread #azero # Jog wheel and axis selection button net jog-x axis.0.jog-enable <= xhc-hb04.jog.enable-x => and2.0.in0 and2.3.in0 and2.6.in0 net jog-y axis.1.jog-enable <= xhc-hb04.jog.enable-y => and2.1.in0 and2.4.in0 and2.7.in0 net jog-z axis.2.jog-enable <= xhc-hb04.jog.enable-z => and2.2.in0 and2.5.in0 and2.8.in0 net jog-a axis.3.jog-enable <= xhc-hb04.jog.enable-a and2.9.in0 and2.10.in0 and2.11.in0 net joy-pos xhc-hb04.button-macro-7 and2.3.in1 and2.4.in1 and2.5.in1 and2.9.in1 net joy-neg xhc-hb04.button-macro-6 => and2.0.in1 and2.1.in1 and2.2.in1 and2.10.in1 net jog-counts xhc-hb04.jog.counts => axis.0.jog-counts axis.1.jog-counts net jog-counts-neg xhc-hb04.jog.counts-neg => axis.2.jog-counts #net jog-speed halui.jog-speed <= halui.max-velocity.value net joy-xpos-jog halui.jog.0.plus <= and2.3.out net joy-xneg-jog halui.jog.0.minus <= and2.0.out net joy-ypos-jog halui.jog.1.plus <= and2.4.out net joy-yneg-jog halui.jog.1.minus <= and2.1.out net joy-zpos-jog halui.jog.2.plus <= and2.5.out net joy-zneg-jog halui.jog.2.minus <= and2.2.out net joy-apos-jog halui.jog.3.plus <= and2.9.out net joy-aneg-jog halui.jog.3.minus <= and2.10.out # Wheel for feedrate and spindle setp halui.feed-override.scale 0.1 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 #buttons #net reset-jog updown.0.reset <= click_mode.single-click net goto-partzero xhc-hb04.button-goto-zero => halui.mdi-command-03 net park halui.mdi-command-04 <= xhc-hb04.button-home net safe-z halui.mdi-command-05 xhc-hb04.button-safe-z # X=0, Y=0, Z=0 XYZ=0 addf click_zero servo-thread net xh-button-zero xhc-hb04.button-zero => click_zero.in net zerobutton-single-click click_zero.single-click => and2.6.in1 and2.7.in1 and2.8.in1 and2.11.in1 net zerobutton-double-click click_zero.double-click => halui.mdi-command-06 net x0 halui.mdi-command-00 and2.6.out net y0 halui.mdi-command-01 and2.7.out net z0 halui.mdi-command-02 and2.8.out #net a0 halui.mdi-command-02 and2.11.out # halfzero net halfzero-x halui.mdi-command-07 <= xhc-hb04.button-half-x net halfzero-y halui.mdi-command-08 <= xhc-hb04.button-half-y #plasma torch addf click_spindel servo-thread net xh-button-spindel xhc-hb04.button-spindle => click_spindel.in net plasma-off halui.mdi-command-09 <= click_spindel.single-click net plasma-on halui.mdi-command-10 <= click_spindel.double-click net plasma-thc-on halui.mdi-command-11 <= click_spindel.triple-click #load gcode by double click the macro2 net xhloadfile click_macro2.double-click => halui.mdi-command-13 #test icons #net is-running => xhc-hb04.icon-cycle #net test-icon xhc-hb04.button-macro-7 => xhc-hb04.hb-mode #net home-icon halui.joint.0.is-homed xhc-hb04.icon-ref #net in-position => xhc-hb04.icon-pos # this needs to be set in postgui file #net reseterror click_mode.double-click => axisui.notifications-clear

Please Log in to join the conversation.

More
6 years 11 months ago #149507 by DeepBlue
Danke für die Infos !

Egal was ich bisher versucht habe, scheitert es mit der Fehlermeldung das die Signale bereits schon verlinkt sind.
Scheint wohl doch nicht ganz so einfach zu sein.
Muss ich mir in einer ruhigen minute nochmal anschauen, so ganz steig ich noch nicht durch....

Please Log in to join the conversation.

More
6 years 11 months ago #149618 by pl7i92
kanst du mal den kompletten ordner CONFIGS/Maschinenname hier in eine zip packen

dann schauen wir mal drüber
das macro 10 soll ja die gewählte achse null setzen

grundsatz
der button druck und der positionsschalter lösen eine MDI befehl aus
der befehl steht in der ini
Code:
[HALUI] # HalUI-MDI-Befehle hier einfügen (max. 64) erste =MDI 0 MDI_COMMAND=G10 L20 P1 X0 MDI_COMMAND=G10 L20 P1 Y0 MDI_COMMAND=G10 L20 P1 Z0

die verknüpfung kommt in der xhc hal ich nutze multiklicks auf den tasten
1mal auslösen 2mal rücksetzen
für dich reichjt click_macro10 aus
du hast bestimmt drinnstehen das macro_10 home-all heisen soll
da muss ein # davor
und dann die verknüpfung zu den achsen
WENN Achse A angewählt und macro10 dann
mit einem and2 logik baustein
and2.x.in0 mit Achscode laden
and2.x.in1 mit macro10 laden
Code:
# Jog wheel and axis selection button net jog-x axis.0.jog-enable <= xhc-hb04.jog.enable-x => and2.0.in0 and2.3.in0 and2.6.in0 net jog-y axis.1.jog-enable <= xhc-hb04.jog.enable-y => and2.1.in0 and2.4.in0 and2.7.in0 net jog-z axis.2.jog-enable <= xhc-hb04.jog.enable-z => and2.2.in0 and2.5.in0 and2.8.in0 net jog-a axis.3.jog-enable <= xhc-hb04.jog.enable-a and2.9.in0 and2.10.in0 and2.11.in0
Code:
loadrt multiclick names=click_estop,click_macro1,click_zero,click_spindel,click_stop,click_mode,click_macro2,click_macro3,click_probe_z addf click_estop servo-thread addf click_mode servo-thread addf click_macro10 servo-thread addf click_probe_z servo-thread # X=0, Y=0, Z=0 XYZ=0 addf click_zero servo-thread net xh-button-zero xhc-hb04.macro10 => click_zero.in net zerobutton-single-click click_zero.single-click => and2.6.in1 and2.7.in1 and2.8.in1 and2.11.in1 net zerobutton-double-click click_zero.double-click => halui.mdi-command-06 net x0 halui.mdi-command-00 and2.6.out net y0 halui.mdi-command-01 and2.7.out net z0 halui.mdi-command-02 and2.8.out #net a0 halui.mdi-command-02 and2.11.out

Please Log in to join the conversation.

More
6 years 11 months ago #149653 by DeepBlue
Hallo,
vielen Dank für die Hilfe und Infos !!

Ich habe es jetzt so gelöst:
Maschine.ini
Code:
[HALUI] # HalUI-MDI-Befehle hier einfügen (max. 64) MDI_COMMAND=(debug,00) MDI_COMMAND=(debug,macro1) MDI_COMMAND=(debug,macro2) MDI_COMMAND=(debug,macro3) MDI_COMMAND=(debug,macro4) MDI_COMMAND=G1 G53 X0 Y0 Z0 F4000 MDI_COMMAND=(debug,macro6) MDI_COMMAND=G1 X0 Y0 Z0 F4000 MDI_COMMAND=(debug,macro8) MDI_COMMAND=(debug,macro9) MDI_COMMAND=(debug,macro10) MDI_COMMAND=(debug,macro11) MDI_COMMAND=(debug,macro12) MDI_COMMAND=(debug,macro13) MDI_COMMAND=(debug,macro14) MDI_COMMAND=(debug,macro15) MDI_COMMAND=(debug,macro16) MDI_COMMAND=G1 G53 Z0 F4000 MDI_COMMAND=(debug,macro17) MDI_COMMAND=(debug,macro18) MDI_COMMAND=(debug,macro19) ## 21 Abnullen X MDI_COMMAND=G10 L20 P0 X0 ## 22 Abnullen Y MDI_COMMAND=G10 L20 P0 Y0 ## 23 Abnullen Z MDI_COMMAND=G10 L20 P0 Z0

XHC.hal
Code:
######################################################################## # Achsen Abnullen mit Ausgewaehlter Achse und einem Button ######################################################################## loadrt and2 count=3 addf and2.0 servo-thread addf and2.1 servo-thread addf and2.2 servo-thread #### X-Achse #### net pdnt.joint.X.select and2.0.in0 net pdnt.macro.10 and2.0.in1 net x-null halui.mdi-command-21 and2.0.out #### Y-Achse #### net pdnt.joint.Y.select and2.1.in0 net pdnt.macro.10 and2.1.in1 net y-null halui.mdi-command-22 and2.1.out #### Z-Achse #### net pdnt.joint.Z.select and2.2.in0 net pdnt.macro.10 and2.2.in1 net z-null halui.mdi-command-23 and2.2.out # ######################################################################

So Funktioniert es wie gewünscht - Perfekt

Please Log in to join the conversation.

More
6 years 11 months ago #149720 by pl7i92
genau so
nur der debug muss jetzt den echten nulpunkt setzen

Please Log in to join the conversation.

More
6 years 11 months ago #149729 by DeepBlue
MDI_COMMAND=(debug,macro10) wird jetzt von einer anderen Taste Bedient :-)
Habe ich in der xhc.hal auskommentiert.
Ich verlinke jetzt noch die "C" Schalterstellung zum alle Achsen zu nullen, und
dann sollte es passen.

Vorerst zumindest...bis mir wieder was anderes einfällt...

Please Log in to join the conversation.

Time to create page: 0.101 seconds
Powered by Kunena Forum