How to Turn One Output Signal Into Many
- my1987toyota
- Topic Author
- Away
- Platinum Member
- Posts: 803
- Thank you received: 322
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.
Please Log in or Create an account to join the conversation.
net signal <= hal.pin-out => hal.pin-in1 => hal.pin-in2 ...
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
- Posts: 18657
- Thank you received: 6266
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
Please Log in or Create an account to join the conversation.
- my1987toyota
- Topic Author
- Away
- Platinum Member
- Posts: 803
- Thank you received: 322
to give some perspective of why this question has been asked is this, when I was trying to get my 7i96 to use aAciera post=306528 userid=25994Not sure I understand the question right but you can connect multiple hal inputs to the same signal:
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.
Please Log in or Create an account to join the conversation.
- my1987toyota
- Topic Author
- Away
- Platinum Member
- Posts: 803
- Thank you received: 322
and thank you bkt. I will do some more looking around for that.
Please Log in or Create an account to join the conversation.
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
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
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
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
- Posts: 18657
- Thank you received: 6266
-
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!
Please Log in or Create an account to join the conversation.