two pause / resume inputs

More
3 years 3 months ago - 3 years 3 months ago #276246 by Kasper-001
two pause / resume inputs was created by Kasper-001
hello 

is there a simple way to add one more input to this setup


Code:
# --- Toggle button stuff --- loadrt toggle count=3 loadrt toggle2nist count=3 addf toggle.0 servo-thread addf toggle.1 servo-thread addf toggle.2 servo-thread addf toggle2nist.0 servo-thread addf toggle2nist.1 servo-thread addf toggle2nist.2 servo-thread loadrt and2 count=2 loadrt or2 count=2 addf and2.0 servo-thread addf and2.1 servo-thread  addf or2.0 servo-thread # --- Toggle machine on button --- net btn-pwr toggle.1.in <= hm2_7i92.0.7i76.0.0.input-24  # Machine on Button net pwr-btn toggle2nist.1.in <= toggle.1.out net tog-on toggle2nist.1.is-on <=  halui.machine.is-on net pwr-on halui.machine.on <= toggle2nist.1.on net pwr-off halui.machine.off <= toggle2nist.1.off # External Program Pause/Resume Button net pause-resume-btn and2.0.in0 and2.1.in0 <= hm2_7i92.0.7i76.0.0.input-23  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.0.in <= or2.0.out net togglesig toggle2nist.0.in <= toggle.0.out net toggleon halui.program.pause <= toggle2nist.0.on net toggleoff halui.program.resume <= toggle2nist.0.off i like to use   input.0.btn-mode  on my ps3 controller  
Last edit: 3 years 3 months ago by Kasper-001.

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

More
3 years 3 months ago #276249 by PCW
Replied by PCW on topic two pause / resume inputs
You can make wider "AND" and "OR" gates with the logic component

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

More
3 years 3 months ago #276253 by Kasper-001
Replied by Kasper-001 on topic two pause / resume inputs
sorry but i can´t see how its done,  

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

More
3 years 3 months ago #276254 by PCW
Replied by PCW on topic two pause / resume inputs
I don't totally understand the logic but it seems like you might need
say a 3 input "OR" gate, and that is something the logic component can do...

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

More
3 years 3 months ago #276257 by Kasper-001
Replied by Kasper-001 on topic two pause / resume inputs
and i dont know how to build it, or where to put in   input.0.btn-mode
 

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

More
3 years 3 months ago - 3 years 3 months ago #276258 by PCW
Replied by PCW on topic two pause / resume inputs
Nothing to build, the logic component is part of LinuxCNC

Here's an example of creating a 3 input "or" gate:

halcmd: loadrt logic personality=0x203
halcmd: addf logic.0 servo-thread

And the pins it creates:

halcmd: show pin logic
Component Pins:
Owner Type Dir Value Name
51 bit IN FALSE logic.0.in-00
51 bit IN FALSE logic.0.in-01
51 bit IN FALSE logic.0.in-02
51 bit OUT FALSE logic.0.or
51 s32 OUT 164 logic.0.time

( The "logic.0.or" pin is the output )

"man logic" for details
Last edit: 3 years 3 months ago by PCW.

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

Time to create page: 0.418 seconds
Powered by Kunena Forum