physical start button + pause switch

More
9 years 10 months ago #83784 by SenorAguas
When I have some free time, I may try this. Thanks for your help!

Please Log in to join the conversation.

More
9 years 10 months ago #83791 by Todd Zuercher
I think I have a handle on what the problem might be (why you get the odd error messages), but you need to share your complete hal file(s)

Please Log in to join the conversation.

More
9 years 10 months ago #83811 by SenorAguas
OK, here's my complete HAL file, also attached:
Code:
# Generated by stepconf 1.1 at Tue Nov 8 05:07:19 2016 # 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="0 out" setp parport.0.reset-time 1000 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 loadrt minmax count=2 addf minmax.0 servo-thread addf minmax.1 servo-thread net xmaxferror axis.0.f-error minmax.0.in net ymaxferror axis.1.f-error minmax.1.in loadrt and2 count=2 loadrt or2 count=1 addf and2.0 servo-thread addf and2.1 servo-thread addf or2.0 servo-thread # External Program Pause and Run Buttons # Run Section net run-step-btn or2.0.in0 and2.1.in0 <= parport.0.pin-13-in net pause-on and2.1.in1 <= halui.program.is-paused net my-or1 or2.0.in1 <= and2.1.out net run-sig halui.mode.auto halui.program.run <= or2.0.out # Pause Section net pause-resume-btn and2.0.in0 <= parport.0.pin-15-in-not net run-on and2.0.in1 <= halui.program.is-running net pause-sig halui.program.stop <= and2.0.out setp halui.mode.teleop 1 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 coolant-mist <= iocontrol.0.coolant-mist net coolant-flood <= iocontrol.0.coolant-flood net xstep => parport.0.pin-02-out setp parport.0.pin-02-out-reset 1 setp parport.0.pin-03-out-invert 1 net xdir => parport.0.pin-03-out net ystep => parport.0.pin-04-out setp parport.0.pin-04-out-reset 1 setp parport.0.pin-05-out-invert 1 net ydir => parport.0.pin-05-out net coolant-mist => parport.0.pin-06-out net coolant-flood => parport.0.pin-07-out setp parport.0.pin-08-out-invert 1 net xenable => parport.0.pin-08-out net xenable => parport.0.pin-16-out net charge-pump => parport.0.pin-17-out net home-y <= parport.0.pin-11-in net home-x <= parport.0.pin-12-in setp stepgen.0.position-scale [AXIS_0]SCALE setp stepgen.0.steplen 1 setp stepgen.0.stepspace 0 setp stepgen.0.dirhold 11200 setp stepgen.0.dirsetup 11200 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 net home-x => axis.0.home-sw-in setp stepgen.1.position-scale [AXIS_1]SCALE setp stepgen.1.steplen 1 setp stepgen.1.stepspace 0 setp stepgen.1.dirhold 11200 setp stepgen.1.dirsetup 11200 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 net home-y => axis.1.home-sw-in net estop-out <= iocontrol.0.user-enable-out net estop-out => iocontrol.0.emc-enable-in

Please Log in to join the conversation.

More
9 years 10 months ago #83813 by Todd Zuercher
I'm still not sure where the error is coming from, I had an idea but it doesn't seem to be the problem. Tests I've been running in a simulation have not been reproducing it.
It sometimes matters the order that you add things to threads, so it is a good idea to have all of them in one place in the hal file.

I did a little tidying up, and removed a bunch of needless hal logic.

Give it a try and see if it works any better.

Please Log in to join the conversation.

More
9 years 10 months ago #83817 by SenorAguas
Thanks, it worked the same as far as I can tell. Still had the same error message during certain moves, which seemed to be the interpolated moves.

Please Log in to join the conversation.

More
9 years 10 months ago #83824 by Todd Zuercher
Sorry, I really don't know, right now I can't seem to reproduce the error message. What version Linuxcnc and what OS are you using?

Please Log in to join the conversation.

More
9 years 10 months ago #83836 by an92626
SenorAguas

I happened upon your thread because I was having the same problem getting the "can't do that" error message. Operationally it did not cause a problem, it was just annoying getting the error message.

I seem to have resolved my problem by pausing and then stopping.

You may wish to try editing your hal file in the pause section.

Just before you have the statement: net pause-sig halui.program.stop <= and2.0.out,
you may wish to trying adding the statement:net pause-sig halui.program.pause <= and2.0.out

This is what I did and from the limiting testing I did it seemed to stop the "can't do that" error message. I can not give you an explanation why it worked, but there are many things in linuxcnc that I can not explain. It would be a quick test and if it gets rid of the annoying error message then you can move on. Pause the program and then stopping it should not make any difference operationally that I can tell.

Please Log in to join the conversation.

More
9 years 10 months ago #83873 by cncnoob1979
Warning: Spoiler!


Here is my hal file that is using two physical buttons for what you are asking for. I hope it helps, my hal is a work in progress. So dont mind the mess please! :) Has worked fine for me in master and previous versions.

Please Log in to join the conversation.

Time to create page: 0.185 seconds
Powered by Kunena Forum