Remotely control Machine on button

More
15 Nov 2020 15:23 #189457 by bevins

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


It's not hal.ui it is halui

You may have an issue because estop has to be reset before turning the machine on. You can try setting a delay after the estop reset then turning on the machine.

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

More
15 Nov 2020 15:37 #189458 by rogerfries
Bevins,

Thanks for pointing out my typo, but the root issue is there can only be one output. I get the error "halui.machine.on was already linked to signal estop.ext".

Thanks

Roger

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

More
15 Nov 2020 15:44 #189459 by bevins
You have a few ways this can be done.

estop latch

You can also use classicladder.

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

More
15 Nov 2020 15:54 - 16 Nov 2020 06:22 #189460 by bevins

Bevins,

Thanks for pointing out my typo, but the root issue is there can only be one output. I get the error "halui.machine.on was already linked to signal estop.ext".

Thanks

Roger


You only need the rising edge pulse when estop latches.

Something like this: This should theoretically work. Not tested.....
loadrt estop_latch
addf estop-latch.0 servo-thread
net estop-loopout iocontrol.0.emc-enable-in <= estop-latch.0.ok-out
net estop-loopin iocontrol.0.user-enable-out => estop-latch.0.ok-in
net estop-reset iocontrol.0.user-request-enable => estop-latch.0.reset
net remote-estop estop-latch.0.fault-in <=  hm2_5i25.0.7i77.0.0.input-07-not

loadrt oneshot count=2
addf oneshot.0 servo-thread
setp oneshot.0.width 1
setp oneshot.0.retriggerable 0
setp oneshot.0.rising 1
net estop-out-MO estop-latch.0.reset => oneshot.0.in
net estop-reset-MO <= oneshot.0.out
net estop-reset-MO => halui.machine-on
Last edit: 16 Nov 2020 06:22 by bevins.

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

More
16 Nov 2020 12:22 #189507 by rogerfries
Hi Bevins,

Thanks for the sample code! I tried the sample and I have an issue. I'm just not grasping HAL yet so I can't determine how to solve this. Any suggestions? Thanks!

I get the error:
./Boss5.hal:411: Pin 'estop-latch.0.reset' was already linked to signal 'estop-reset'

Config files online
github.com/rogerfries/Boss5.git

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

More
16 Nov 2020 12:34 - 16 Nov 2020 12:37 #189508 by bevins

Hi Bevins,

Thanks for the sample code! I tried the sample and I have an issue. I'm just not grasping HAL yet so I can't determine how to solve this. Any suggestions? Thanks!

I get the error:
./Boss5.hal:411: Pin 'estop-latch.0.reset' was already linked to signal 'estop-reset'

Config files online
github.com/rogerfries/Boss5.git


If I have time today I will setup the scenario and test it.
Last edit: 16 Nov 2020 12:37 by bevins.

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

More
16 Nov 2020 17:38 - 16 Nov 2020 19:40 #189525 by Aciera
In line 403 you have:
net estop-reset iocontrol.0.user-request-enable => estop-latch.0.reset

this creates the signal "estop-reset" by connecting the output pin "estop-reset iocontrol.0.user-request-enable" to the input pin "estop-latch.0.reset" which is fine. You have an output pin and an input pin:
iocontrol.0.user−request−enable

(Bit, Out) TRUE when the user has requested that estop be cleared
estop-latch.N.reset bit in

but then after that you also have:
net estop-out-MO estop-latch.0.reset => oneshot.0.in

here you are trying to create a new signal "estop-out.MO by connecting two inputs which is not possible. If you want to connect "oneshot.0.in" to "estop-latch.0.reset" then you need to do it like this (after having created the signal "estop-reset" line 403):

net estop-reset => oneshot.0.in

OR you could add the input "oneshot.0.in" to the line where you create the signal "estop-reset" in line 403:

net estop-reset <= iocontrol.0.user-request-enable => estop-latch.0.reset => oneshot.0.in

Note the "<=" and "=>" are ignored and are only there to visualize inputs and outputs for the user. LinuxCNC already knows which pins are input and which pins are outputs. When you define a signal you need to connect it to only one output pin and then you can connect it to as many input pins as you want.
Last edit: 16 Nov 2020 19:40 by Aciera.

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

More
06 Feb 2021 16:27 #197844 by biqut2
This thread came up in a google search I did trying to figure out why I couldn't toggle the power button in gmoccapy along with my e-stop. For what its worth I thought I'd add my solution:
net pendant-estop-in estop-latch.0.fault-in hm2_7i76e.0.7i76.0.0.input-16-not
net pendant-estop-out iocontrol.0.emc-enable-in oneshot.0.in hm2_7i76e.0.7i76.0.0.input-16
net machine-on-delay timedelay.0.in oneshot.0.out
net machine-on-signal halui.machine.on timedelay.0.out

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

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