STMBL Brake, Power on / Fault behaviour and HAL / INI

More
6 years 9 months ago #155029 by ross_dev
Hi

We are trying to setup the machine so that the brake comes off when the machine is powered on, and comes back on if estop arises. At the moment when we power on, the motors come on, but the brakes do nothing.

We are able to control the brake from AXIS using a little pyvcp plugin, with the brake lines on STMBL out 0, so we know that LCNC can see and access the brake.

At present we are just running one axis.

The STMBL profile has the line
Code:
io0.out0 = fault0.mot_brake

added, as I assumed this forces the stmbl to monitor for fault condition.

Here are the relevant parts of the HAL file (a lot has been snipped out for clarity but I can post the full thing)
Code:
loadrt [KINS]KINEMATICS loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS loadrt hostmot2 loadrt hm2_eth board_ip="192.168.1.121" config=" num_stepgens=4 sserial_port_0=000xxx" loadrt estop_latch loadrt not setp hm2_7i94.0.watchdog.timeout_ns 5000000 loadrt pid names=pid.x,pid.y,pid.z,pid.s addf hm2_7i94.0.read servo-thread addf motion-command-handler servo-thread addf motion-controller servo-thread addf pid.y.do-pid-calcs servo-thread addf pid.z.do-pid-calcs servo-thread addf pid.s.do-pid-calcs servo-thread addf hm2_7i94.0.write servo-thread #add estop components to servo thread - added RL addf estop-latch.0 servo-thread addf not.0 servo-thread #******************* # AXIS X JOINT 0 #******************* net xposcmd joint.0.motor-pos-cmd => hm2_7i94.0.stbl.0.1.pos_cmd net xvelcmd joint.0.vel-cmd => hm2_7i94.0.stbl.0.1.vel_cmd net xposfb joint.0.motor-pos-fb <= hm2_7i94.0.stbl.0.1.pos_fb net xenable joint.0.amp-enable-out => hm2_7i94.0.stbl.0.1.enable net xfault joint.0.amp-fault-in <= hm2_7i94.0.stbl.0.1.fault #added RL net x-index joint.0.index-enable <=> hm2_7i94.0.stbl.0.1.index_enable net x-brake => hm2_7i94.0.stbl.0.1.out-00 # ---setup home / limit switch signals--- net x-home-sw => joint.0.home-sw-in net x-neg-limit => joint.0.neg-lim-sw-in net x-pos-limit => joint.0.pos-lim-sw-in #allows you to reset smart serial - may not be needed - added RL net ssrun not.0.out => hm2_7i94.0.sserial.port-0.run net ssrunn => not.0.in net user-enable iocontrol.0.user-request-enable => estop-latch.0.reset net enable-latch estop-latch.0.ok-out => iocontrol.0.emc-enable-in net watchdog hm2_[HOSTMOT2](BOARD).0.watchdog.has_bit => estop-latch.0.fault-in

Is there anything obvious missing that means the brake is not affected by the power on / estop behaviour? Running under 2.8 pre on Debian Wheezy.

Cheers!

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

  • tommylight
  • Away
  • Moderator
  • Moderator
More
6 years 9 months ago #155032 by tommylight
If you just need it on and off without any other control, you can use "amplifier_enable" or "machine_is_on" pins.
The following user(s) said Thank You: ross_dev

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

More
6 years 9 months ago #155049 by ross_dev
Hi Tommy

Thanks for the reply. I'm not sure I follow however. Those pins have been created in the HAL file and are present, however I want to be able to hit the 'power on' button in AXIS and have the brakes come off when all the motors power on.

At the moment the motors come on, but the brakes don't come off. I also want any error such as joint following error to lead to estop and the brake to come back on.

What do I need to add to the HAL file make that happen please?

Cheers
Ross

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

More
6 years 9 months ago - 6 years 9 months ago #155051 by ross_dev
Here is the rest of the HAL file barring the two axes we are not working on yet:
Code:
loadrt [KINS]KINEMATICS loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[KINS]JOINTS loadrt hostmot2 loadrt hm2_eth board_ip="192.168.1.121" config=" num_stepgens=4 sserial_port_0=000xxx" loadrt estop_latch loadrt not setp hm2_7i94.0.watchdog.timeout_ns 5000000 loadrt pid names=pid.x,pid.y,pid.z,pid.s addf hm2_7i94.0.read servo-thread addf motion-command-handler servo-thread addf motion-controller servo-thread addf pid.y.do-pid-calcs servo-thread addf pid.z.do-pid-calcs servo-thread addf pid.s.do-pid-calcs servo-thread addf hm2_7i94.0.write servo-thread addf estop-latch.0 servo-thread addf not.0 servo-thread #******************* # AXIS X JOINT 0 #******************* net xposcmd joint.0.motor-pos-cmd => hm2_7i94.0.stbl.0.1.pos_cmd net xvelcmd joint.0.vel-cmd => hm2_7i94.0.stbl.0.1.vel_cmd net xposfb joint.0.motor-pos-fb <= hm2_7i94.0.stbl.0.1.pos_fb net xenable joint.0.amp-enable-out => hm2_7i94.0.stbl.0.1.enable # AMP ENABLE LINE net xfault joint.0.amp-fault-in <= hm2_7i94.0.stbl.0.1.fault net x-index joint.0.index-enable <=> hm2_7i94.0.stbl.0.1.index_enable net x-brake => hm2_7i94.0.stbl.0.1.out-00 # ---setup home / limit switch signals--- net x-home-sw => joint.0.home-sw-in net x-neg-limit => joint.0.neg-lim-sw-in net x-pos-limit => joint.0.pos-lim-sw-in #allows you to reset smart serial - may not be needed net ssrun not.0.out => hm2_7i94.0.sserial.port-0.run net ssrunn => not.0.in # ---HALUI signals--- net axis-select-x halui.axis.x.select net jog-x-pos halui.axis.x.plus net jog-x-neg halui.axis.x.minus net jog-x-analog halui.axis.x.analog net x-is-homed halui.joint.0.is-homed net axis-select-y halui.axis.y.select net jog-y-pos halui.axis.y.plus net jog-y-neg halui.axis.y.minus net jog-y-analog halui.axis.y.analog net y-is-homed halui.joint.1.is-homed net axis-select-z halui.axis.z.select net jog-z-pos halui.axis.z.plus net jog-z-neg halui.axis.z.minus net jog-z-analog halui.axis.z.analog net z-is-homed halui.joint.2.is-homed net jog-selected-pos halui.axis.selected.plus net jog-selected-neg halui.axis.selected.minus net spindle-manual-cw halui.spindle.0.forward net spindle-manual-ccw halui.spindle.0.reverse net spindle-manual-stop halui.spindle.0.stop net machine-is-on halui.machine.is-on # MACHINE IS ON LINE net jog-speed halui.axis.jog-speed net MDI-mode halui.mode.is-mdi # ---coolant signals--- net coolant-mist <= iocontrol.0.coolant-mist net coolant-flood <= iocontrol.0.coolant-flood # ---probe signal--- net probe-in => motion.probe-input # ---motion control signals--- net in-position <= motion.in-position net machine-is-enabled <= motion.motion-enabled # ---digital in / out signals--- # ---estop signals--- net estop-out <= iocontrol.0.user-enable-out #net estop-out => iocontrol.0.emc-enable-in #added RL net user-enable iocontrol.0.user-request-enable => estop-latch.0.reset net enable-latch estop-latch.0.ok-out => iocontrol.0.emc-enable-in net watchdog hm2_[HOSTMOT2](BOARD).0.watchdog.has_bit => estop-latch.0.fault-in # ---manual tool change signals--- loadusr -W hal_manualtoolchange net tool-change-request iocontrol.0.tool-change => hal_manualtoolchange.change net tool-change-confirmed 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

Cheers
Last edit: 6 years 9 months ago by ross_dev.

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

More
6 years 9 months ago #155060 by bevins
This will cause an output to follow turning on and off the machine.
Code:
net machine-is-on hm2_5i25.0.7i71.1.1.output-25
The following user(s) said Thank You: ross_dev

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

More
6 years 9 months ago #155176 by andypugh
I think this might be a question about STMBL HAL, which is modelled on LinuxCNC HAL, but runs in the motor drive itself.

Have you tried asking on the STMBL gitter chat?
gitter.im/rene-dev/stmbl

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

Time to create page: 0.552 seconds
Powered by Kunena Forum