Attempting to edit HAL, where to go from here?
02 Jan 2016 15:19 #67710
by Jake
Attempting to edit HAL, where to go from here? was created by Jake
I have been chugging away at the HAL for my Hurco. I started with the IO.hal trying to assign all the inputs and outputs.
Now loading I get the error and no start (i figured it was going to happen)
Where do I go from here? I am thinking there is another location where I have to define "spindleFWD"
I have read through the hal manual but am not connecting the dots.
Thanks guys!
Jake
Now loading I get the error and no start (i figured it was going to happen)
./ppmc_io.hal:69: Pin 'motion.spindleFWD' does not exist 4421
# SPINDLE CONTROLS
# connect spindle fwd to I/O controller
# Spindle FWD 1SSR8
net SpindleFwd <= ppmc.0.dout.08.out
net SpindleFwd => motion.spindleFWD
Where do I go from here? I am thinking there is another location where I have to define "spindleFWD"
I have read through the hal manual but am not connecting the dots.
Thanks guys!
Jake
# HAL config file for Pico Systems USC board
#
# Connect motion controller I/Os
# Hurco BMC20 Jake Freese 2016 Edited 01/02/2016 REV 0
# 2 Digital I/O cards identified by number in front of identifier
# LIMIT SWITCHES
# X + 1DI2, - 1DI3
net Xminlim <= ppmc.0.din.03.in
net Xminlim => axis.0.neg-lim-sw-in
net Xmaxlim <= ppmc.0.din.02.in
net Xmaxlim => axis.0.pos-lim-sw-in
# Y + 1DI5, - 1DI6
net Yminlim <= ppmc.0.din.06.in
net Yminlim => axis.1.neg-lim-sw-in
net Ymaxlim <= ppmc.0.din.05.in
net Ymaxlim => axis.1.pos-lim-sw-in
# z + 1DI9, - 1DI10
net Zminlim <= ppmc.0.din.10.in
net Zminlim => axis.2.neg-lim-sw-in
net Zmaxlim <= ppmc.0.din.09.in
net Zmaxlim => axis.2.pos-lim-sw-in
# connect index pulses to motion controller <dont know may have to modify
# uncomment if you have encoder index signals
#net Xindex <= ppmc.0.encoder.00.index-enable => axis.0.index-enable
#net Yindex <= ppmc.0.encoder.01.index-enable => axis.1.index-enable
#net Zindex <= ppmc.0.encoder.02.index-enable => axis.2.index-enable
#
# Connect I/O controller I/Os
#
# connect e-stop write/sense to I/O controller
# and ppmc's fault with estop's output, so estop FF is reset, but
# prevent continued estop signal from ppmc from holding FF cleared
# ESTOP input 1DI0
# ESTOP output to spindle 1SSR7
net ppmcEstop ppmc.0.din.estop.in
net ppmcEstop and2.0.in0
net EstopOkIn estop-latch.0.fault-in
net EstopOkIn and2.0.out
net EstopOkOut ppmc.0.dout.07.out
net EstopOkOut ppmc.0.dout.Estop.out
net EstopOkOut iocontrol.0.emc-enable-in
net EstopOkOut estop-latch.0.ok-out
net EstopOkOut and2.0.in1
net emc-estop-out iocontrol.0.user-enable-out
net emc-estop-out estop-latch.0.ok-in
net emc-estop-reset iocontrol.0.user-request-enable
net emc-estop-reset estop-latch.0.reset
# SPINDLE CONTROLS
# connect spindle fwd to I/O controller
# Spindle FWD 1SSR8
net SpindleFwd <= ppmc.0.dout.08.out
net SpindleFwd => motion.spindleFWD
# Spindle alarm 1DI12
net SpindleAlarm <= ppmc.0.din.12.in
net SpindleAlarm => motion.spindlealarm
# Alarm reset 1SSR4
net SpindleAlarmRST <= ppmc.0.dout.04.out
net SpindleAlarmRST => iocontrol.alarmRST
# Low speed winding select 1SSR5
net LOWspeedwinding <= ppmc.0.dout.05.out
net LOWspeedwinding => motion.windingselect
# Winding select complete 1DI11
net WindingselectCOMP <= ppmc.0.din.11.in
net WindingselectCOMP => iocontrol.windingselectcomp
# Spindle oil cooler pump 1SSR2
net LOWspeedwinding <= ppmc.0.dout.05.out
net LOWspeedwinding => iocontrol.windingselect
# Spindle Torque input 2DI3
net SpindleTorque <= ppmc.1.din.03.in
net SpindleTorque => iocontrol.spindle
# Spindle limit switches NO 1DI14, NC 1DI13
net SpindlelimitO <= ppmc.0.din.14.in
net SpindlelimitO => classicladder.spindlelimitO
net SpindlelimitC <= ppmc.0.din.13.in
net SpindlelimitC => classicladder.spindlelimitC
# Tool unclamp/clamp button 2DI10
net ToolCNGB <= ppmc.1.din.10.in
net ToolCNGB => classicladder.Button
# SERVO AMP CONTROLS
# Servo enable 1SSR1 all three servos combined
net ServoEnable <= ppmc.0.dout.01.out
net ServoEnable => motion.servoenable
# Servo X alarm 1DI1
net ServoAlarmX <= ppmc.0.din.01.in
net ServoAlarmX => motion.ServoX
# Servo Y alarm 1DI4
net ServoAlarmY <= ppmc.0.din.04.in
net ServoAlarmY => motion.ServoY
# Servo Z alarm 1DI7
net ServoAlarmZ <= ppmc.0.din.11.in
net ServoAlarmZ => motion.ServoZ
# Torque X input 2DI0
net ServoTorqueX <= ppmc.0.din.11.in
net ServoTorqueX => iocontrol.TorqueX
# Torque Y input 2DI1
net ServoTorqueY <= ppmc.0.din.11.in
net ServoTorqueY => iocontrol.TorqueY
# Torque Z input 2DI2
net ServoTorqueZ <= ppmc.0.din.11.in
net ServoTorqueZ => iocontrol.TorqueZ
# FLOOD AND MIST COOLANT
# Flood 2SSR8
# Mist
net MistOn <=
net MistOn =>
net FloodOn <= ppmc.1.dout.08.out
net FloodOn => iocontrol.0.coolant-flood
# CABINET COOLING
# Cabinet cooler relay 2SSR7
net CabinetCoolers <= ppmc.1.dout.07.out
net CabinetCoolers => iocontrol.enable
# WAYLUBE ALARM
# Waylube level switch 2DI11
net Waylubelevel <= ppmc.2.din.11.in
net Waylubelevel => iocontrol.low
#ATC
# Orient command 1SSR6
net OrientCMD <= ppmc.0.dout.05.out
net OrientCMD => classicladder.orientCMD
# Orient complete 1DI10
net OrientCOMP <= ppmc.0.din.10.in
net OrientCOMP => classicladder.orientCOMP
# Mag in pos 2DI4
net MaginPOS <= ppmc.1.din.04.in
net MaginPOS => classicladder.MP
# Mag right 2DI5
net MagRight <= ppmc.1.din.05.in
net MagRight => classicladder.MR
# Mag left 2DI6
net MagLeft <= ppmc.1.din.06.in
net MagLeft => classicladder.ML
# Mag down 2DI7
net MagDown <= ppmc.1.din.07.in
net MagDown => classicladder.MD
# Mag up 2DI8
net MagUp <= ppmc.1.din.08.in
net MagUp => classicladder.MU
# Mag Rotate 2SSR1
net MagRotate <= ppmc.1.dout.01.out
net MagRotate => classicladder.RT
# Tool unclamp 2SSR2
net ToolUnclamp <= ppmc.1.dout.02.out
net ToolUnclamp => classicladder.UNs
# Mag right 2SSR3
net MagRight <= ppmc.0.dout.03.out
net MagRight => classicladder.MRs
# Mag left 2SSR4
net MagLeft <= ppmc.1.dout.04.out
net MagLeft => classicladder.MLs
# Mag down 2SSR5
net MagDown <= ppmc.1.dout.05.out
net MagDown => classicladder.MDs
# Mag up 2SSR6
net MagUp <= ppmc.1.dout.06.out
net MagUp => classicladder.MUs
Please Log in or Create an account to join the conversation.
02 Jan 2016 15:34 #67711
by ArcEye
Replied by ArcEye on topic Attempting to edit HAL, where to go from here?
The motion component that is part of Linuxcnc, does not have a pin of that name, nor some of the others in that file
I would suspect it needs a custom version of motion
www.linuxcnc.org/docs/devel/html/man/man9/motion.9.html
Likewise iocontrol, does not have iocontrol.windingselect or iocontrol.alarmRST etc. etc.
www.linuxcnc.org/docs/devel/html/man/man1/iocontrol.1.html
So you need to find out where all the other files that go with this config are.
Someone has heavily modified components to suit that particular machine and / or the ppmc card.
regards
I would suspect it needs a custom version of motion
www.linuxcnc.org/docs/devel/html/man/man9/motion.9.html
Likewise iocontrol, does not have iocontrol.windingselect or iocontrol.alarmRST etc. etc.
www.linuxcnc.org/docs/devel/html/man/man1/iocontrol.1.html
So you need to find out where all the other files that go with this config are.
Someone has heavily modified components to suit that particular machine and / or the ppmc card.
regards
The following user(s) said Thank You: Jake
Please Log in or Create an account to join the conversation.
03 Jan 2016 02:26 #67738
by Jake
Replied by Jake on topic Attempting to edit HAL, where to go from here?
OK, it was those pages that I was looking for that I couldn't find earlier. From looking at what commands are are available, I can do most things for this machine. The tool changer and torque inputs look like config files will need to be tweaked for. The hal does appear to be fairly intuitive, this is the first time I've experienced it.
Please Log in or Create an account to join the conversation.
20 Jan 2016 03:11 - 20 Jan 2016 03:15 #68792
by Jake
Replied by Jake on topic Attempting to edit HAL, where to go from here?
One more hal question
I edit my hal file from the config folder
I am just trying to change the pins that the limit switches come in on.
I need to change the pins that they come in on.
One I have no home switches, I will have to home off limits.
After I edit it I have just hit save, closed the file and try to open LCNC again. It wont open. Am I missing somewhere where you need to "refresh" that edited hal file to LCNC? I have read myself to confusion tonight.
Thanks guys!
Also Jon had mentioned I need to set the
HOME_IGNORE_LIMITS in the .ini file to use the limits as home switches and set up the HOME_LATCH_VEL and HOME_SEARCH_VEL to have opposite signs as my servos disable when they hit a limit also, I am not totally understanding this. So for each axis I need to modify the sections below
I read through the .ini homing section to get to my conclusions there .
Thanks again everybody!
I edit my hal file from the config folder
I am just trying to change the pins that the limit switches come in on.
newsig Yminlim bit
newsig Ymaxlim bit
newsig Yhome bit
linksp Yminlim <= ppmc.0.din.05.in-not
linksp Yminlim => axis.1.neg-lim-sw-in
linksp Ymaxlim <= ppmc.0.din.06.in-not
linksp Ymaxlim => axis.1.pos-lim-sw-in
linksp Yhome <= ppmc.0.din.04.in-not #need to address
linksp Yhome => axis.1.home-sw-in
I need to change the pins that they come in on.
One I have no home switches, I will have to home off limits.
newsig Yminlim bit
newsig Ymaxlim bit
newsig Yhome bit
linksp Yminlim <= ppmc.0.din.04.in-not
linksp Yminlim => axis.1.neg-lim-sw-in
linksp Ymaxlim <= ppmc.0.din.05.in-not
linksp Ymaxlim => axis.1.pos-lim-sw-in
linksp Yhome <= ppmc.0.din.04.in-not #need to address I am not sure what to do with the home here
linksp Yhome => axis.1.home-sw-in
After I edit it I have just hit save, closed the file and try to open LCNC again. It wont open. Am I missing somewhere where you need to "refresh" that edited hal file to LCNC? I have read myself to confusion tonight.
Thanks guys!
Also Jon had mentioned I need to set the
HOME_IGNORE_LIMITS in the .ini file to use the limits as home switches and set up the HOME_LATCH_VEL and HOME_SEARCH_VEL to have opposite signs as my servos disable when they hit a limit also, I am not totally understanding this. So for each axis I need to modify the sections below
HOME_OFFSET = 0.0
# looks like I need to leave it 0
HOME_SEARCH_VEL = 0.0
# will have to set after seeing machine move, lower #= slower
#or does this get set to a positive integer for speed in the positive direction?
HOME_LATCH_VEL = 0.0
# will have to set after seeing machine move, lower #= slower and this get set negative?
#or does this get set to a negative integer for speed in the negative direction?
HOME_USE_INDEX = NO
# Pin is high when the limit is not tripped
HOME_IGNORE_LIMITS = NO
# keep no as it will use the limits to home
I read through the .ini homing section to get to my conclusions there .
Thanks again everybody!
Last edit: 20 Jan 2016 03:15 by Jake.
Please Log in or Create an account to join the conversation.
20 Jan 2016 14:37 #68826
by andypugh
Replied by andypugh on topic Attempting to edit HAL, where to go from here?
You can only connect the ppmc IO port HAL pin to one "signal". In this case, for example "Yhome"
The trick is to then use Yhome everywhere that you want to use the input pin. so
etc.
The newsig / linksp etc format is a bit old-school now. You could do it all on one (equivalent) line
Note that I have typed all pin names from fallible memory, so they might not be right.
The trick is to then use Yhome everywhere that you want to use the input pin. so
linksp Yhome axis.1.pos-lim-sw-in
linksp Yhome axis.1.neg-lim-sw-in
etc.
The newsig / linksp etc format is a bit old-school now. You could do it all on one (equivalent) line
net Yhome-and-limits-and-stuff ppmc.0.din.04.in-not => axis.1.home-sw-in axis.1.pos-lim-sw-in axis.1.neg-lim-sw-in
Note that I have typed all pin names from fallible memory, so they might not be right.
The following user(s) said Thank You: Jake
Please Log in or Create an account to join the conversation.
20 Jan 2016 15:10 #68831
by Jake
Replied by Jake on topic Attempting to edit HAL, where to go from here?
Thanks Andy!!
I will make the changes and give it a shot tonight.
I will make the changes and give it a shot tonight.
Please Log in or Create an account to join the conversation.
Time to create page: 0.124 seconds