Two signals connected to one Output Pin

More
7 years 9 months ago #123881 by GradeMind
net emcmot.01.enable <= axis.1.amp-enable-out
net emcmot.04.enable <= axis.1.amp-enable-out

net emcmot.01.enable => hm2_[HOSTMOT2](BOARD).0.stepgen.01.enable pid.1.enable
net emcmot.04.enable => hm2_[HOSTMOT2](BOARD).0.stepgen.04.enable

Is there a way to make this work?

Need to link the 2 together for a Tandem Gantry, so both motors are on one enable signal.

I tried Alias for the output pin, but it didn't work.

forum.linuxcnc.org/24-hal-components/33071-duplicating-signals
I see another person asked this and they said they made it work with:
not.0.in
not.0.out

Not sure how to do that?

Please Log in to join the conversation.

More
7 years 9 months ago #123899 by PCW
net emcmot.01.enable <= axis.1.amp-enable-out
net emcmot.01.enable => hm2_[HOSTMOT2](BOARD).0.stepgen.01.enable
net emcmot.01.enable => pid.1.enable
net emcmot.01.enable => hm2_[HOSTMOT2](BOARD).0.stepgen.04.enable

Please Log in to join the conversation.

More
7 years 9 months ago #123923 by GradeMind
That did it -- thanks!

Didn't know you could reuse the same line like that, very interesting..

Also had to adjust this section near the top:

Top
..............etc
..............etc
# .write should be last after new outputs are computed
# in servo-thread
addf hm2_[HOSTMOT2](BOARD).0.write servo-thread

# external output signals
##############
# --- X-ENABLE ---
net emcmot.00.enable hm2_5i25.0.7i76.0.0.output-00

# --- Y1-ENABLE ---
net emcmot.01.enable hm2_5i25.0.7i76.0.0.output-01

# --- Y2-ENABLE ---
net emcmot.01.enable hm2_5i25.0.7i76.0.0.output-04

Please Log in to join the conversation.

More
7 years 9 months ago #123982 by pl7i92
To Get The Brain behind things
NET is the Signal Loaded only ones then You can output Multiple Times to Multiple PINS

OR use Logic if more then one in
LIKE
and2 This gives you a 2 Inputs must be on for the out
or logic eatch will trigger thew out

....
SEE www.linuxcnc.org/docs/html/man/man9/
THERE are all the good stuff listed

Please Log in to join the conversation.

More
4 years 7 months ago #238354 by chili023
Hi I have the sam problem. And I do not understand why this isn't possible.
I am trying to net two signals to one PIN.
Later this will not be nessecary but I need it for debugging.
net set-twitch-cw mh400e-gearbox.twitch-cw hm2_7i97.0.7i66.0.0.output-03 #Rechtslauf
net set-twitch-ccw mh400e-gearbox.twitch-ccw hm2_7i97.0.7i66.0.0.output-03 #Linkslauf

What am I not getting?

Thanks
A.

Please Log in to join the conversation.

More
4 years 7 months ago #238356 by PCW
What value should hm2_7i97.0.7i66.0.0.output-03 take when
mh400e-gearbox.twitch-cw is true and mh400e-gearbox.twitch-ccw
is false?

Please Log in to join the conversation.

More
4 years 7 months ago #238359 by chili023
Hi
Thanks for the reply.
It should be on. Like a circuit with two relays.
If ether relay is on there is power on the line.

But I get your point. If it is not programmed in it doesn’t work.

I will integrate it in my .comp file. I was just surprised that it doesn’t work.

Greetings from Berlin. Stay healthy

Please Log in to join the conversation.

More
4 years 7 months ago #238360 by PCW
In that case you should be able to accomplish
what you want with the "or" component

Please Log in to join the conversation.

More
4 years 7 months ago #238363 by chili023
Ahhh great.
I was not aware I could do logic in the Hal.
I feel stupid.

Thank you

Please Log in to join the conversation.

More
4 years 7 months ago #238365 by PCW
You should feel empowered :-)

Please Log in to join the conversation.

Time to create page: 1.307 seconds
Powered by Kunena Forum