Motion feed hold cycle start physical buttons

More
7 years 2 months ago #143599 by Toolman321
Hello
I’ve added some physical buttons for cycle start and pause but my program resumes when I’m not pressing the pause button. I’d like it to stay paused until I hit the start button to resume.

I’d be grateful if someone could help me get it working properly please

Here is the code I’ve added to my Hal:
net prog-start-btn <= hm2_5i25.7i76.0.0.input-08 => halui.program.run
net prog-start-btn <= hm2_5i25.7i76.0.0.input-09 => motion-feed-inhibit

Many thanks

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

More
7 years 2 months ago #143609 by andypugh
The two lines _must_ use different signal names as they are driven by different physical input pins.

If your config runs with that HAL code then I suspect that it isn't even reading the HAL file with that code in, as it has at least 2 errors. (two HAL outputs to one signal, and no such pin as motion-feed-inhibit)

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

More
7 years 2 months ago #143638 by Toolman321
Sorry I think that should be:
net prog-start-btn <= hm2_5i25.7i76.0.0.input-08 => halui.program.run
net prog-pause-btn <= hm2_5i25.7i76.0.0.input-09 => motion.feed-inhibit

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

More
7 years 2 months ago - 7 years 2 months ago #143668 by Toolman321
I was looking through some of the forum and found a simalar thread, so I copied the code in input into my custom Hal

I changed it a little but I couldn’t get it to work and I’m not sure why, I don’t know what most of the code actually means as I’m just trying stuff to see if it will work

Addf and2.0 servo-thread
Addf and2.1 servo-thread
Addf and2.2 servo-thread

Loadrt and2 count=3

# remote-start-feedhold
Net mode.pause and2.2in0 <= hm2_5i25.0.7i76.0.0.input-09
Net mode.pause <= halui.program.pause
Net remotestart and2.0.in0 and2.1.in0 <= hm2_5i25.0.7i76.0.0.input-08
Net oktorun and2.0.in1 <= halui.program-is-idle
Net run.halui.program.run halui.mode.auto <= and2.0.out
Net oktoresume and2.1.in1 <= halui.program-is-paused
Net resume halui.program.resume <= and2.1.out

Could someone tell me what’s is the problem with this please?

Many thanks
Last edit: 7 years 2 months ago by Toolman321. Reason: Typo errors

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

More
7 years 2 months ago #143674 by bevins

Toolman321 wrote: I was looking through some of the forum and found a simalar thread, so I copied the code in input into my custom Hal

I changed it a little but I couldn’t get it to work and I’m not sure why, I don’t know what most of the code actually means as I’m just trying stuff to see if it will work

Andf and2.0 servo-thread
Andf and2.1 servo-thread
Andf and2.2 servo-thread

Loadrt and2 count=3

# remote-start-feedhold
Net mode.pause and2.2in0 <= hm2_5i25.0.7i76.0.0.input-09
Net mode.pause <= halui.program.pause
Net remotestart and2.0.in0 and2.1.in0 <= hm2_5i25.0.7i76.0.0.input-08
Net oktorun and2.0.in1 <= halui.program-is-idle
Net run.halui.program.run halui.mode.auto <= and2.0.out
Net oktoresume and2.1.in1 <= halui.program-is-paused
Net resume halui.program.resume <= and2.1.out

Could someone tell me what’s is the problem with this please?

Many thanks


This is what I use.
Code:
loadrt and2 count=2 loadrt or2 count=1 #loadrt toggle count=1 loadrt toggle2nist count=1 addf and2.0 servo-thread addf and2.1 servo-thread addf or2.0 servo-thread #addf toggle.0 servo-thread addf toggle2nist.0 servo-thread # External Program Pause/Resume Button net pause-resume-btn and2.0.in0 and2.1.in0 <= hm2_5i25.0.7i77.0.0.input-00 net pause-on toggle2nist.0.is-on and2.0.in1 <= halui.program.is-paused net run-on and2.1.in1 <= halui.program.is-running net pause-sig or2.0.in0 <= and2.0.out net resume-sig or2.0.in1 <= and2.1.out net toggle-ok toggle.2.in <= or2.0.out net togglesig toggle2nist.0.in <= toggle.2.out net toggleon halui.program.pause <= toggle2nist.0.on net toggleoff halui.program.resume <= toggle2nist.0.off
The following user(s) said Thank You: akb1212, Toolman321, Sadmeatball

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

More
7 years 2 months ago #143676 by Toolman321
Hi thanks for the info, I’m not sure it’s what I’m looking for but I’m sure it has all the relevant information so I can fix my code, many thanks

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

Moderators: newbynobi, HansU
Time to create page: 0.397 seconds
Powered by Kunena Forum