Remotely control Machine on button

More
11 Nov 2020 13:08 #188988 by rogerfries
To be clear this is not a problem, but rather I'm trying to tailor LinuxCNC to to my preferences.
In Gmocapy on the upper right there is an estop button and a machine power button. I also have physical buttons on my machine for both. When I power the machine up from the physical button I would like the LinuxCNC software to power up automatically. The software knows the status of the machine as it it's not physically powered up the software button won't activate. I'm looking to make the software power button a slave to the physical power button on the machine as I'm frequently aggravated why the interface is not responding, and it's because I need to hit the power button on the screen. I'm always forgetting to do this. This probably violates some Safety Sally rule, but this is a private single user machine. Any way to do this? Thanks!

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

More
11 Nov 2020 14:31 #189000 by Aciera
Not sure if I understood you correctly. The Machine on/off button in gmoccapy gets it's state from halui.machine.on and halui.machine.off. I have a signal that comes from classicladder.0.out-41 and toggles the machine on/off button:
# --- MACHINE ON-OFF ---
net machine-button-panel    <= classicladder.0.out-41       => toggle.machine.in    
net machine-toggle          <= toggle.machine.out           => not.machine.in           => halui.machine.on
net not-machine             <= not.machine.out                                          => halui.machine.off
net machine-is-on-led       <= halui.machine.is-on		    => classicladder.0.in-50 

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

More
12 Nov 2020 21:07 #189152 by rogerfries
Classic ladder appears to be a programing tool. Do I need it? If so Is it part of LinuxCNC or do I need to install it?

Basically I want the LinuxCNC power status to reflect the actual status of the machine, so I don't need to power up the CNC, then power up LinuxCNC.

Thanks

Roger

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

More
13 Nov 2020 06:14 #189179 by Aciera
You don't need classicladder. That's just where my signal happens to come from. So replace my classicladder signal with the signal you want.

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

More
13 Nov 2020 16:50 #189220 by rogerfries
Sorry, but I'm a total newbie on Linux CNC and sadly I don't yet understand most of this yet.

My machine has a 24 volt power indicator lamp. I can route this wire to an input on my Mesa Card.

Perhaps do something like this in my Hal file?

# --- Power-IN ---
net power-in <= hm2_7i76e.0.7i76.0.0.input-09

If I understand correctly this would create a new variable named power-in to reflect the state of the input pin 9 on my mesa card. Then how can I set this power-in to control the Linux CNC machine power status?

Thanks

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

More
13 Nov 2020 17:06 #189222 by newbynobi
Please find attached Estop hal file. I made this out of memory, but it should work if you change the hal pin to the one you use.

Norbert
###########################################################
#           Emergency switch / Not-Aus Schalter           #
###########################################################

net estop-ext <= hm2_7i76e.0.7i76.0.0.input-20
net estop-out <= iocontrol.0.user-enable-out
net estop-ext => iocontrol.0.emc-enable-in

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

More
13 Nov 2020 17:29 - 13 Nov 2020 17:44 #189226 by Aciera
Hm Norberts suggestion makes me wonder,
Do you want to connect the estop screen button or the machine on/off screen button?

My suggestion was actually for a momentary switch attached to one of your cards inputs to control machine on/off (machine enable) . Press and release enables the machine, press and release again disables the machine.
halui.machine.on / -.off is a bit special as it has two complementary inputs that take impulses.
# --- MACHINE ON-OFF ---
net machine-button-panel     <= momentary-switch on input xx      => toggle.machine.in    
net machine-toggle          <= toggle.machine.out           => not.machine.in           => halui.machine.on
net not-machine             <= not.machine.out                                          => halui.machine.off
Last edit: 13 Nov 2020 17:44 by Aciera.

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

More
13 Nov 2020 17:47 #189231 by newbynobi
I thought it is an estop problem
OK now here are both solutons named here ;-)

Norbert

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

More
13 Nov 2020 18:05 #189236 by tommylight
Hmm ... where ??? :)

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

More
15 Nov 2020 14:03 #189455 by rogerfries
Hi Again,

Perhaps I'm not stating my question correctly. Basically I don't want the LinuxCNC power button, so I'm trying to automate it. I want the power button to automatically change to reflect the e-stop status. By default Linux CNC turns the power button off when the machine e-stops. So when the machine comes out of e-stop I want to send a signal to automatically turn the LinuxCNC software power button on. Turning it Green and unlocking the controls. I don't want to rewire the machine to have a momentary button as Aciera suggests. and my stock HAL file already matches Norbert's post.

If I understand correctly (and I probably don't) the below line enables the machine when it comes out of estop
net estop-ext => iocontrol.0.emc-enable-in
So I want to enable the machine and turn on the power button so I want something like the below, but it does not work
net estop-ext => iocontrol.0.emc-enable-in => hal.ui.machine.on

I doubt there is anything relevant in my config, but it's available github.com/rogerfries/Boss5.git

This whole power button thing is really a minor annoyance, but I think Learning how to do this will be important to help me learn how HAL works for my future objectives. I want to add a bunch of buttons to make a control panel and a touch plate tool height setter.

Thanks

Roger

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

Moderators: newbynobiHansU
Time to create page: 0.089 seconds
Powered by Kunena Forum