Two signals connected to one Output Pin

  • GradeMind
  • GradeMind's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
10 Jan 2019 00:37 #123881 by GradeMind
Two signals connected to one Output Pin was created 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 or Create an account to join the conversation.

More
10 Jan 2019 13:47 #123899 by PCW
Replied by PCW on topic Two signals connected to one Output Pin
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
The following user(s) said Thank You: ikkuh, GradeMind

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

  • GradeMind
  • GradeMind's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
10 Jan 2019 21:21 #123923 by GradeMind
Replied by GradeMind on topic Two signals connected to one Output Pin
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 or Create an account to join the conversation.

More
11 Jan 2019 18:18 #123982 by pl7i92
Replied by pl7i92 on topic Two signals connected to one Output Pin
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
The following user(s) said Thank You: GradeMind

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

More
25 Mar 2022 18:23 #238354 by chili023
Replied by chili023 on topic Two signals connected to one Output Pin
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 or Create an account to join the conversation.

More
25 Mar 2022 18:33 #238356 by PCW
Replied by PCW on topic Two signals connected to one Output Pin
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 or Create an account to join the conversation.

More
25 Mar 2022 19:11 #238359 by chili023
Replied by chili023 on topic Two signals connected to one Output Pin
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 or Create an account to join the conversation.

More
25 Mar 2022 19:14 #238360 by PCW
Replied by PCW on topic Two signals connected to one Output Pin
In that case you should be able to accomplish
what you want with the "or" component
The following user(s) said Thank You: chili023

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

More
25 Mar 2022 19:35 #238363 by chili023
Replied by chili023 on topic Two signals connected to one Output Pin
Ahhh great.
I was not aware I could do logic in the Hal.
I feel stupid.

Thank you

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

More
25 Mar 2022 19:56 #238365 by PCW
Replied by PCW on topic Two signals connected to one Output Pin
You should feel empowered :-)
The following user(s) said Thank You: tommylight

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

Time to create page: 0.068 seconds
Powered by Kunena Forum