- Posts: 1003
- Thank you received: 0
How to Turn One Output Signal Into Many
- my1987toyota
- Topic Author
- Offline
- Platinum Member
-
Less
More
2 years 3 months ago #306527
by my1987toyota
How to Turn One Output Signal Into Many was created 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.
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 to join the conversation.
2 years 3 months ago #306528
by Aciera
Replied by Aciera on topic How to Turn One Output Signal Into Many
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 ...
net signal <= hal.pin-out => hal.pin-in1 => hal.pin-in2 ...
Please Log in to join the conversation.
- tommylight
-
- Away
- Administrator
-
Less
More
- Posts: 22012
- Thank you received: 3
2 years 3 months ago #306529
by tommylight
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
Replied by tommylight on topic How to Turn One Output Signal Into Many
Code:
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 to join the conversation.
- my1987toyota
- Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 1003
- Thank you received: 0
2 years 3 months ago #306532
by my1987toyota
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.
Replied by my1987toyota on topic How to Turn One Output Signal Into Many
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 to join the conversation.
2 years 3 months ago #306535
by bkt
Replied by bkt on topic How to Turn One Output Signal Into Many
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 ....
Please Log in to join the conversation.
- my1987toyota
- Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 1003
- Thank you received: 0
2 years 3 months ago #306536
by my1987toyota
Replied by my1987toyota on topic How to Turn One Output Signal Into Many
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.
and thank you bkt. I will do some more looking around for that.
Please Log in to join the conversation.
2 years 3 months ago #306537
by Aciera
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
Replied by Aciera on topic How to Turn One Output Signal Into Many
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 to join the conversation.
2 years 3 months ago #306538
by bkt
Replied by bkt on topic How to Turn One Output Signal Into Many
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
Please Log in to join the conversation.
2 years 3 months ago #306539
by Aciera
Replied by Aciera on topic How to Turn One Output Signal Into Many
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
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 to join the conversation.
- tommylight
-
- Away
- Administrator
-
Less
More
- Posts: 22012
- Thank you received: 3
2 years 3 months ago #306540
by tommylight
Replied by tommylight on topic How to Turn One Output Signal Into Many
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!
-
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 to join the conversation.
Time to create page: 0.128 seconds
