E-Stop

More
20 Jan 2020 09:24 #155237 by curtisa
Replied by curtisa on topic E-Stop
If all you want is the external E-stop switch to enable/disable the charge pump function (and also trigger the software E-stop button in Axis to halt things), you can simplify your 'E-stop Test' HAL config a bit.

Near the top of 'E-stop Test', delete the following two lines:
net estop-out charge-pump.enable iocontrol.0.user-enable-out
net charge-pump <= charge-pump.out

Change the parallel port pin 17 net definition from:
net charge-pump     => parport.0.pin-17-out

To:
net charge-pump.out     => parport.0.pin-17-out

Near the bottom of the HAL file change the following two lines:
net estop-out <= iocontrol.0.user-enable-out
net estop-ext => iocontrol.0.emc-enable-in

To:
net estop-ext => charge-pump.enable
net estop-ext => iocontrol.0.emc-enable-in

Modifying things so that both your physical E-stop and the software E-stop in Axis run in tandem is a bit more messy. I personally don't bother with a software E-stop and prefer the hardware one, as it takes longer for me to find the right key on the keyboard than it does for me to hit a big red button when things start going wrong.

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

More
20 Jan 2020 21:30 - 20 Jan 2020 21:33 #155276 by jhavanki
Replied by jhavanki on topic E-Stop
Thank you for the reply.

I changed to HAL as you specified above and get the following debug error when EMC2 loads:

Debug file information:
.
./E-Stop_Test.hal:41: Signal name 'charge-pump.out' must not be the same as a pin. Did you omit the signal name?
4011
PID TTY STAT TIME COMMAND
Stopping realtime threads
Unloading hal components

Here is the HAL file.....:

# Generated by stepconf 1.1 at Sat Jan 18 14:17:44 2020
# If you make changes to this file, they will be
# overwritten when you run stepconf again
loadrt trivkins
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES
loadrt hal_parport cfg="0Xc800 out"
setp parport.0.reset-time 5000
loadrt stepgen step_type=0,0,0
loadrt charge_pump

# net estop-out charge-pump.enable iocontrol.0.user-enable-out
# net charge-pump <= charge-pump.out

addf parport.0.read base-thread
addf stepgen.make-pulses base-thread
addf charge-pump base-thread
addf parport.0.write base-thread
addf parport.0.reset base-thread

addf stepgen.capture-position servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread
addf stepgen.update-freq servo-thread
net spindle-cmd-rpm <= motion.spindle-speed-out
net spindle-cmd-rpm-abs <= motion.spindle-speed-out-abs
net spindle-cmd-rps <= motion.spindle-speed-out-rps
net spindle-cmd-rps-abs <= motion.spindle-speed-out-rps-abs
net spindle-at-speed => motion.spindle-at-speed

net estop-out => parport.0.pin-01-out
net xstep => parport.0.pin-02-out
setp parport.0.pin-02-out-reset 1
net xdir => parport.0.pin-03-out
net ystep => parport.0.pin-04-out
setp parport.0.pin-04-out-reset 1
net ydir => parport.0.pin-05-out
net zstep => parport.0.pin-06-out
setp parport.0.pin-06-out-reset 1
net zdir => parport.0.pin-07-out
# net charge-pump => parport.0.pin-17-out
net charge-pump.out => parport.0.pin-17-out
net estop-ext <= parport.0.pin-10-in

setp stepgen.0.position-scale [AXIS_0]SCALE
setp stepgen.0.steplen 1
setp stepgen.0.stepspace 0
setp stepgen.0.dirhold 35000
setp stepgen.0.dirsetup 35000
setp stepgen.0.maxaccel [AXIS_0]STEPGEN_MAXACCEL
net xpos-cmd axis.0.motor-pos-cmd => stepgen.0.position-cmd
net xpos-fb stepgen.0.position-fb => axis.0.motor-pos-fb
net xstep <= stepgen.0.step
net xdir <= stepgen.0.dir
net xenable axis.0.amp-enable-out => stepgen.0.enable

setp stepgen.1.position-scale [AXIS_1]SCALE
setp stepgen.1.steplen 1
setp stepgen.1.stepspace 0
setp stepgen.1.dirhold 35000
setp stepgen.1.dirsetup 35000
setp stepgen.1.maxaccel [AXIS_1]STEPGEN_MAXACCEL
net ypos-cmd axis.1.motor-pos-cmd => stepgen.1.position-cmd
net ypos-fb stepgen.1.position-fb => axis.1.motor-pos-fb
net ystep <= stepgen.1.step
net ydir <= stepgen.1.dir
net yenable axis.1.amp-enable-out => stepgen.1.enable

setp stepgen.2.position-scale [AXIS_2]SCALE
setp stepgen.2.steplen 1
setp stepgen.2.stepspace 0
setp stepgen.2.dirhold 35000
setp stepgen.2.dirsetup 35000
setp stepgen.2.maxaccel [AXIS_2]STEPGEN_MAXACCEL
net zpos-cmd axis.2.motor-pos-cmd => stepgen.2.position-cmd
net zpos-fb stepgen.2.position-fb => axis.2.motor-pos-fb
net zstep <= stepgen.2.step
net zdir <= stepgen.2.dir
net zenable axis.2.amp-enable-out => stepgen.2.enable

# net estop-out <= iocontrol.0.user-enable-out
# net estop-ext => iocontrol.0.emc-enable-in
net estop-ext => charge-pump.enable
net estop-ext => iocontrol.0.emc-enable-in


loadusr -W hal_manualtoolchange
net tool-change iocontrol.0.tool-change => hal_manualtoolchange.change
net tool-changed iocontrol.0.tool-changed <= hal_manualtoolchange.changed
net tool-number iocontrol.0.tool-prep-number => hal_manualtoolchange.number
net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
Last edit: 20 Jan 2020 21:33 by jhavanki.

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

More
20 Jan 2020 23:13 #155283 by curtisa
Replied by curtisa on topic E-Stop
Odd, I would've thought that was a valid net expression. Try restoring the following line back in near the top:
net charge-pump <= charge-pump.out

And restoring parallel port pin 17:
net charge-pump     => parport.0.pin-17-out

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

More
20 Jan 2020 23:31 #155285 by PCW
Replied by PCW on topic E-Stop
The first token after the net command must be a signal, not a pin
( charge-pump.out is a pin )
The following user(s) said Thank You: curtisa

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

Time to create page: 0.067 seconds
Powered by Kunena Forum