Problem with HAL with 2 OUT pins

More
14 Oct 2020 11:55 #186089 by Clive S
This is from forum.linuxcnc.org/38-general-linuxcnc-q...etup?start=30#185996


net apos-cmd joint.2.motor-pos-cmd => stepgen.2.position-cmd
net apos-cmd toolchanger.position-cmd => stepgen.2.position-cmd

The error is signal apos-cmd cannot add OUT pin "toolchanger.position-cmd" it already has OUT pin "stepgen.2.position-cmd "

So how do I solve this

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

More
14 Oct 2020 14:20 #186093 by PCW
Usually a mux component that selects which output signal should drive the input
is used. Note that switching modes may be fairly complex to avoid motion discontinuities

loadrt mux2
addf mux2.0 servo-thread

net apos-cmd-motion <= joint.2.motor-pos-cmd => mux2.0.in0
net apos-cmd-toolchanger <= toolchanger.position-cmd => mux2.0.in1
net apos-cmd <= mux2.0.out => stepgen.2.position-cmd
net apos-mode <= toolchanger-active mux2.0.sel

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

More
14 Oct 2020 15:17 - 14 Oct 2020 15:26 #186100 by Clive S
Thanks Peter
I get an error toolchanger-active does not exist. I don't see any pins by that name
With this;-
loadrt toolchanger
addf toolchanger servo-thread

loadrt mux2
addf mux2.0 servo-thread

net apos-cmd-motion <= joint.2.motor-pos-cmd => mux2.0.in0
net apos-cmd-toolchanger <= toolchanger.position-cmd => mux2.0.in1
net apos-cmd <= mux2.0.out => stepgen.2.position-cmd
net apos-mode <= toolchanger-active mux2.0.sel


net tool-change iocontrol.0.tool-change => toolchanger.toolchange
net tool-changed iocontrol.0.tool-changed <= toolchanger.toolchanged
net tool-number iocontrol.0.tool-prep-number => toolchanger.toolnumber
net tool-oldnumber iocontrol.0.tool-number => toolchanger.currenttoolnumber

##net apos-cmd toolchanger.position-cmd => stepgen.2.position-cmd
net ahomed joint.2.homed => toolchanger.ishomed
net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared

net estop-out <= iocontrol.0.user-enable-out
net estop-ext => iocontrol.0.emc-enable-in

loadusr -W hal_manualtoolchange
net tool-change iocontrol.0.tool-change => hal_manualtoolchange.change
#net tool-changed iocontrol.0.tool-changed <= hal_manualtoolchange.changed

net tool-number iocontrol.0.tool-prep-number => hal_manualtoolchange.number
net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
Last edit: 14 Oct 2020 15:26 by Clive S.

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

More
14 Oct 2020 15:31 #186101 by PCW
I just made up that name.

You would need a signal that indicates the the toolchanger is active and
expects to control joint2

Note that I am not suggesting this as a solution to anything but the issue
of driving a hal input (the stepgen position in this case) from two different
sources (the toolchanger position in one case and the joint 2 position in the other)

Expect wild motions and following errors even after you determine what should select
the stepgen source

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

Time to create page: 0.086 seconds
Powered by Kunena Forum