How to Turn One Output Signal Into Many

More
31 Jul 2024 14:42 - 31 Jul 2024 14:43 #306527 by my1987toyota
 I have been reading through the Manual looking for a way to turn one signal into multiple signals.
I know it's possible in Classic Ladder, but is it possible to do it in HAL? Like AND 2 but in reverse.
(1in 2out)? Basically I want to make a signal splitter.
Last edit: 31 Jul 2024 14:43 by my1987toyota. Reason: adding info

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

More
31 Jul 2024 14:48 #306528 by Aciera
Not sure I understand the question right but you can connect multiple hal inputs to the same signal:

net signal <= hal.pin-out => hal.pin-in1 => hal.pin-in2 ...
The following user(s) said Thank You: my1987toyota

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

More
31 Jul 2024 14:56 #306529 by tommylight
net x-pos-fb        =>  pid.x.feedback

net x-pos-fb               <=  [HMOT](CARD0).encoder.00.position

net x-pos-fb               =>  joint.0.motor-pos-fb
Just an example from a normal servo config, where x-pos-fb is just an arbitrary name and is wired to 3 other pins, or all 3 pins are wired together to the bus bar, and the bus bar is named x-pos-fb
The following user(s) said Thank You: my1987toyota

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

More
31 Jul 2024 15:42 #306532 by my1987toyota

Aciera post=306528 userid=25994Not sure I understand the question right but you can connect multiple hal inputs to the same signal:
 

to give some perspective of why this question has been asked is this, when I was trying to get my 7i96 to use a
general output pin to not only turn on the #5 SSR pin ON but also use PWM to control the hotwire for Foam cutting.
I was also using pyvcp to show what power the wire was running at and that it was ON. However when I did the HAL
and tried to connect that to pyvcp I kept getting an error saying the spindle-enable signal was already connected to
somewhere else, I can't remember where. If I could have split that signal I could
have achieved what I was doing.
   Instead I used the spindle-cw signal to achieve showing the hotwire was ON in pyvcp. It works, But I am still
trying to figure a way to split the original signal so it could have gone to were ever it originally went and send to where
I wanted it to go as well without involving Classic Ladder.

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

More
31 Jul 2024 15:53 - 31 Jul 2024 16:00 #306535 by bkt
in my mind AndyPugh done a component for these pourpouse ....think you means split an output to multiple of same type right? in hal normally these is not admit .... there are logical comp for these pourpouse ... but you write less code and more redable one if use logicladder ....
Last edit: 31 Jul 2024 16:00 by bkt.
The following user(s) said Thank You: my1987toyota

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

More
31 Jul 2024 15:54 - 31 Jul 2024 15:57 #306536 by my1987toyota
tommylight I will look into that. Is that part in the manual and if so what section should I check?

and thank you bkt. I will do some more looking around for that.
Last edit: 31 Jul 2024 15:57 by my1987toyota. Reason: adding info

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

More
31 Jul 2024 15:58 #306537 by Aciera

I kept getting an error saying the spindle-enable signal was already connected to
somewhere else


that usually happens if you try to assign a second output pin to the same signal:

net signalname <= hal.pin-out1 => hal.pin-in1
net signalname <= hal.pin-out2 => hal.pin-in2

the second line will create an error saying that 'signalname' already has an output pin assigned to it

Likewise you will also get an error if you try to assign another signal name to the same output pin:

net signalname <= hal.pin-out => hal.pin-in1
net another_signalname <= hal.pin-out => hal.pin-in2
The following user(s) said Thank You: my1987toyota

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

More
31 Jul 2024 16:01 #306538 by bkt
sorry wrong messages .... just try it can work in 2.7 not in 2.9 and not in 2.9.2 .... you receive error messages pin xxx is just connetc to out xxx.... so or use comp or logicladder
The following user(s) said Thank You: my1987toyota

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

More
31 Jul 2024 16:03 - 31 Jul 2024 16:05 #306539 by Aciera
As I understand it you want the input signal to go to all the outputs. If so you don't need a component.

If however you want to select which output the input signal goes to (ie a demultiplexer) then you would need to insert hal components.

[edit]
Posting your hal file(s) and the error message would likely cut down on the guess work quite a bit :)
Last edit: 31 Jul 2024 16:05 by Aciera.
The following user(s) said Thank You: my1987toyota

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

More
31 Jul 2024 16:04 - 31 Jul 2024 16:08 #306540 by tommylight
It is part of any servo config in LinuxCNC, even steppers with encoders have similar pins and all 3 tied to the same bus bar.
-
Is using the bus bar analogy helping or not?
I ask because using a joint(of wires) is a no go here due to joint being used for other stuff and causing confusion.
Edit:
Is this for the foam cutter?
If yes, you can download the configs for the "scratcher" and they use PWM and have logic for disabling PWM on stop or esc or e-stop, could save you headaches in use, a lot! :)
Last edit: 31 Jul 2024 16:08 by tommylight. Reason: more info
The following user(s) said Thank You: my1987toyota

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

Time to create page: 0.184 seconds
Powered by Kunena Forum