Using Pendant to enter F1 and F2

More
09 Jan 2019 19:41 #123857 by eriksalo
Using Pendant to enter F1 and F2 was created by eriksalo
Hi All;

I would like to be able to use my MPG pendant to take the machine out of eStop (F1) and turn the machine on (F2).

Any idea how I would do this?

I'm familiar with how to map a command to a pendant key, just don't know what hal pins or other command to use.

Thanks; Erik

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

More
09 Jan 2019 19:50 #123862 by rodw
Replied by rodw on topic Using Pendant to enter F1 and F2
What type of pendant? if it can output a signal for a discrete function, you can connect one button to halui.machine.on
and another to halui.estop.reset

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

More
09 Jan 2019 21:39 - 09 Jan 2019 21:40 #123875 by eriksalo
Replied by eriksalo on topic Using Pendant to enter F1 and F2
Thanks for your reply.

I have an XHC_HB04 Pendant. It works great. I use it to zero out the machine and jog it around.

It would be great if I could bypass using the keyboard completely and just use the pendant, hence the question about F1 and F2.

I've included the relevant section of my .ini file for reference on what I already have programmed for the pendant.

Thanks; Erik


###############################################################################
#Erik: This section added for MPG Pendant control 
###############################################################################

[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 
# jogmode normal(default) or vnormal
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 = 2
# require_pendant = yes|no: create xhc-hb04 hal pins when pendant not
#                           connected at startup
require_pendant = no
# inch_or_mm = in | mm
inch_or_mm = in
# mpg_accels: provision for reduced acceleration for manual mode jogging
mpg_accels = 1 2 20 600

[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.mdi-command-00
# synthesized per-axis buttons for goto-zero button:
goto-zero-x = ""
goto-zero-y = ""
goto-zero-z = ""
goto-zero-a = ""
# start-pause = 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        = ""
#Synthesized per axis buttons for 1/2 X and Y
half-x      = halui.mdi-command-04
half-y      = halui.mdi-command-05

#zero        = ""
# synthesized per-axis buttons for zero button:
zero-x      = halui.mdi-command-12
zero-y      = halui.mdi-command-13
zero-z      = halui.mdi-command-14

# safe-z      = halui.mdi-command-10
# in this sim, home-all only works first time, hold down till finished:
home        = halui.home-all
macro-1     = halui.mdi-command-01
macro-2     = halui.mdi-command-02
spindle     = halui.spindle.start
step        = xhc-hb04.stepsize-up
mode        = ""
# macro-6     = halui.mdi-command-06
# macro-7     = halui.mdi-command-07
stop        = halui.program.stop
reset       = halui.estop.activate

[APPLICATIONS]
APP = xhc-hb04-accels
APP = monitor-xhc-hb04


[HALUI]
#Added by Erik Dec 2018
#A halui pin is created for each MDI_COMMAND below
#halui.mdi-command-00, halui.mdi-command-01,... etc
#It's confusing (to Erik) but they are just in sequence:  First = 00, 2nd=01, etc

MDI_COMMAND  = G0 X0 Y0 Z0      
MDI_COMMAND  = halui.estop.activate               
MDI_COMMAND  = halui.machine.on           
MDI_COMMAND  = G10 L20 P0 Z0.004              
MDI_COMMAND  = G10 L20 P0 X[#<_x>/2.0]              
MDI_COMMAND  = G10 L20 P0 Y[#<_y>/2.0]               
MDI_COMMAND  = ""               
MDI_COMMAND  = ""               
MDI_COMMAND  = ""               
MDI_COMMAND  = ""               
MDI_COMMAND  = ""               
MDI_COMMAND  = ""              
MDI_COMMAND  = G10 L20 P0 X0   
MDI_COMMAND  = G10 L20 P0 Y0    
MDI_COMMAND  = G10 L20 P0 Z0    
MDI_COMMAND  = ""               
MDI_COMMAND  = ""               
MDI_COMMAND  = ""               

###############################################################################
# End of MPG Pendant section 
###############################################################################
Last edit: 09 Jan 2019 21:40 by eriksalo.

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

More
10 Jan 2019 01:13 #123882 by rodw
Replied by rodw on topic Using Pendant to enter F1 and F2
I'm not familiar with your hardware but maybe something like:
 # Turns Machine on
net turn-on  <=  my-pendant-output
net turn-on  => halui.machine.on

and likewise to reset your estop. See how you get on,

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

Time to create page: 0.094 seconds
Powered by Kunena Forum