Start / resume button challenges

  • daveyr
  • Away
  • Junior Member
  • Junior Member
More
22 Oct 2024 22:21 - 22 Oct 2024 22:24 #312907 by daveyr
Start / resume button challenges was created by daveyr
First up i am apologizing for the silly thing that i have missed or dont yet understand but i hope i have tried. :) 

I have my Probe basic (now will be previous stable on 2.9.3) setup mostly working for what i wanted with Pendant etc.. but wanted to customize the physical buttons that i have for start / resume, Step / feed hold and well stop works fine.

(Currently 7i76 with physical buttons mapped through to the following
# --- Start ---
net cycle-start <= hm2_7i76e.0.7i76.0.0.input-07
# --- ABORT ---
net abort     <=  hm2_7i76e.0.7i76.0.0.input-05
# --- SINGLE-STEP ---
net single-step     <=  hm2_7i76e.0.7i76.0.0.input-06

I started with forum.linuxcnc.org/47-hal-examples/13201...ume-buttons?start=40 and thought that i would like to have it when i press the start button and the system is in a feed hold state to resume.  So first part was to change from the single mapping to using an And to only allow start to happen when idle. (I know that is how the above cycle-start works but i was trying to do it to just prove i could get it working)
loadrt and2 names=and2.pause-resume-0 # Really just added to end of existing loadrt line not fresh.
addf and2.pause-resume-0 servo-thread
#Mapped physical button with no issues to one leg of And
net my-start-resume-button-in1 and2.pause-resume-0.in0 <= hm2_7i76e.0.7i76.0.0.input-07
#Then when trying to map one of the existing pins / signals is where  i get all screwed up.  
net my-start-resume-button-in2 and2.pause-resume-0.in1 <=  halui.program.is-idle

I thought that read as the following Netname = my-start-resume-button-in2, name of signal wire to set and2.pause-resume-0.in1 (the 2nd leg of the And), The trigger signal = halui.program.is-idle 
Instead of that working (Knowing i have no output yet) i get the following error.
custom_postgui.hal:67: Pin 'halui.program.is-idle' was already linked to signal 'prog-running'

So i was well lets change the trigger to be prog.running and see what happens then.
#net my-start-resume-button-in2 and2.pause-resume-0.in1 <=  prog.running
#.../custom_postgui.hal:68: Pin 'prog.running' does not exist (I can see that prog.running is a signal not pin but i am then back to confused about how to do the 2nd part of the and)

Then i was trying to even take the output of the and to trigger 'cycle-start'
net my-start cycle-start <= and2.pause-resume-0.out
#.../custom_postgui.hal:75: Pin 'cycle-start' does not exist

i hope that i am so close but yet so far.  (The reason that i posted this in the Probe basic is my aim is to use qtpvcp.feed-override.reset to remove from feed hold (I hope that is the correct way))
Thank you for reading this far and hoping someone can fix my broken understanding.  Full code block of what i was trying to do below with no extra typing.
loadrt and2 names=and2.pause-resume-0,and2.pause-resume-1
addf and2.pause-resume-0 servo-thread
addf and2.pause-resume-1 servo-thread
net my-start-resume-button1-in1 and2.pause-resume-0.in0 <= hm2_7i76e.0.7i76.0.0.input-07
net my-start-resume-button1-in2 and2.pause-resume-0.in1 <=  halui.program.is-idle
net my-start cycle-start <= and2.pause-resume-0.out

net my-start-resume-button2-in1 and2.pause-resume-1.in0 <= hm2_7i76e.0.7i76.0.0.input-07
net my-start-resume-button2-in2 and2.pause-resume-1.in1 <=  halui.program.is-paused
net my-start2 qtpvcp.feed-override.reset <= and2.pause-resume-1.out
Last edit: 22 Oct 2024 22:24 by daveyr. Reason: fixing code blocks

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

More
23 Oct 2024 07:26 #312927 by zmrdko
Replied by zmrdko on topic Start / resume button challenges
RE: custom_postgui.hal:67: Pin 'halui.program.is-idle' was already linked to signal 'prog-running'

try replacing:
net my-start-resume-button-in2 and2.pause-resume-0.in1 <= halui.program.is-idle
with:
net prog-running my-start-resume-button-in2 and2.pause-resume-0.in1
The following user(s) said Thank You: Lcvette, daveyr

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

  • daveyr
  • Away
  • Junior Member
  • Junior Member
More
25 Oct 2024 20:04 #313228 by daveyr
Replied by daveyr on topic Start / resume button challenges
Ok so got it finally working.  A fair chunk of the error was me not reading well and not realizing that custom_postgui.hal had a conflicting pin name so when i kept on saying why is this giving errors i just didnt read them correctly.

This is the working version that i got going.  It also needed 
net prog-running or2.paused-idle-0.in0 and2.green-button-start.in1 
added to the custom_postgui

 
Attachments:
The following user(s) said Thank You: Lcvette

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

Moderators: KCJLcvette
Time to create page: 0.227 seconds
Powered by Kunena Forum