button toggle output then also motion digital out on same output with or functio

More
30 Jul 2020 22:18 #176568 by bevins
Here is what I am trying to do.
Dust shoe needs to be controlled by button but the toolchange needs to to control it also.
the button must toggle it up, push button again then it goes down. That;s working by itself.

I need to have that output controlled by motion-digital-output also.

I tried running button through toggle function then feed to one leg of the or function. that doesn't work.
the toggle functions working and if I do the or function without toggle it is working but I can't get the output of
the toggle to feed the or and if I do would setting the motion digital out reset the toggle?

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

More
30 Jul 2020 22:37 #176571 by tommylight
There should be pins like
prepare-tool
and
tool-is-changed
i am pretty sure i have seen something like that in LinuxCNC, so those would be your best bet.
Found it:
iocontrol.0.tool−change

(Bit, Out) TRUE when a tool change is requested

iocontrol.0.tool−changed

(Bit, In) Should be driven TRUE when a tool change is completed.
linuxcnc.org/docs/html/man/man1/iocontrol.1.html

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

More
30 Jul 2020 22:57 #176575 by bevins

There should be pins like
prepare-tool
and
tool-is-changed
i am pretty sure i have seen something like that in LinuxCNC, so those would be your best bet.
Found it:
iocontrol.0.tool−change

(Bit, Out) TRUE when a tool change is requested

iocontrol.0.tool−changed

(Bit, In) Should be driven TRUE when a tool change is completed.
linuxcnc.org/docs/html/man/man1/iocontrol.1.html


That's not what I am looking for. I am trying hal logic so I can toggle the dust shoe with a button and also the remap needs to raise the dust shoe.

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

More
30 Jul 2020 23:02 - 30 Jul 2020 23:09 #176576 by bevins
The code below is working except I need a button to toggle the first input to the or function.
#BRUSH HOUSING
net brush_housing_up-A hm2_7i92.0.7i76.0.0.input-08 or2.0.in0 
net brush_housing_up-B motion.digital-out-01 or2.0.in1 
net brush_housing or2.0.out => hm2_7i92.0.7i76.0.0.output-10

instead of hm2_7i92.0.7i76.0.0.input-08 in the first leg of the or function I need that to be output of a toggle function.

like so, except it don't work.
#DUST COLLECTOR SHOE

net stops-in toggle.0.in <= hm2_7i92.0.7i76.0.0.input-16

net brush_housing_up-A toggle.0.out  or2.1.in0
net brush_housing_up-B motion.digital-out-02 or2.1.in1
net brush_housing_up or2.1.out hm2_7i92.0.7i76.0.0.output-09
Last edit: 30 Jul 2020 23:09 by bevins.

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

More
30 Jul 2020 23:20 #176579 by bevins
I got it to work except I don't know what motion-digital-out on the second leg will do to the toggle. If I set the digital out for that output will the toggle be set back?

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

More
31 Jul 2020 07:59 #176611 by rodw
Bevins, You'll be happy about this solution becasue you will get to do some coding in your beloved Python!

I don't know about tool changers but if you send digital pins (analog or digital) to a pin in your screen handler, you can add a python handler for the pin to change the value of the screen variable tat you change from the GUI. islander261 and I did this ages ago pre-plasmac and I think there might be some examples in the plasma section near the last page somewhere.

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

More
01 Aug 2020 12:33 #176773 by bevins

Bevins, You'll be happy about this solution becasue you will get to do some coding in your beloved Python!

I don't know about tool changers but if you send digital pins (analog or digital) to a pin in your screen handler, you can add a python handler for the pin to change the value of the screen variable tat you change from the GUI. islander261 and I did this ages ago pre-plasmac and I think there might be some examples in the plasma section near the last page somewhere.


I am going to do it with hardware. I am tired of this software kicking my ass.....
The following user(s) said Thank You: rodw

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

More
01 Aug 2020 13:21 #176778 by tommylight
Wrong topic ! :pinch:
Will try to move it where it belongs.

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

Time to create page: 0.109 seconds
Powered by Kunena Forum