James Louis wrote:
> Jon is right, you cannot.  Unless you are running pre-2.2.x EMC2. 
> Quote from http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?UPDATING:
>
> 3.4. double-linking of pins is now treated as an error
> halcmd and hal_link() now refuse to link an already-linked pin. This 
> immediately
> diagnoses configuration errors of the form
>      net limit-switch parport.0.pin-26-in =>  axis.0.neg-lim-sw-in 
> axis.0.pos-lim-sw-in
>      net home-switch  parport.0.pin-26-in =>  axis.0.home-sw-in
>
> which have the effect of leaving no pin driving the limit switch inputs. If 
> the
> "re-link" behavior is truly desired, add "unlinkp" commands before the new 
> link.
> It is still permitted for "unlinkp" to be used on an unconnected pin.
>
> Lesson learned: Never upgrade a working machine.

Actually, you did NOT have a working machine.  Prior to
the upgrade, you had broken limits, and didn't know it.
The machine may have appeared to work fine, but that is
because you probably never hit the limit switch.

After the upgrade, you still had broken limits, and EMC
refused to run, which called your attention to the
problem so you could fix it.  That is exactly why the
upgrade was done.

In an earlier email, James Louis wrote

> Thanks for the reply Kirk.  Having explained it, would you
> (or anyone) mind translating the following generic sample
> to "net" without deleting any signal names? :

I'm going to translate it to English, to point out the problem:

> newsig signalnameA bit
> newsig signalnameB bit
> newsig signalnameC bit

create three signals

> linksp signalnameA <= inputpin1

Connect input pin 1 to the first signal.

> linksp signalnameA => axis.0.negativelimit

Connect negative limit to the first signal.
This makes the negative limit work.

> linksp signalnameB <= inputpin2

Connect input pin 2 to the second signal.

> linksp signalnameB => axis.0.positivelimit

Connect positive limit to the second signal.
This makes the positive limit work.

> linksp signalnameC <= inputpin2

Disconnect input pin 2 from the second signal,
and connect it to the third signal.

This makes the positive limit STOP working.  The
second signal still goes to positive limit, but
the input pin doesn't drive the signal, so the
positive limit is broken.  Maybe you never noticed
because you never hit the limit switch, but if you
did hit the switch, EMC would not know - which could
lead to a crash or other dangerous situation.

> linksp signalnameC => axis.0.home

Connect home to the third signal.
This makes home work, but positive limit is still
broken.

The correct way to do this, using the old notation, is:

> newsig signalnameA bit
> newsig signalnameB bit

create two signals

> linksp signalnameA <= inputpin1

Connect input pin 1 to the first signal.

> linksp signalnameA => axis.0.negativelimit

Connect negative limit to the first signal.
This makes the negative limit work.

> linksp signalnameB <= inputpin2

Connect input pin 2 to the second signal.

> linksp signalnameB => axis.0.positivelimit

Connect positive limit to the second signal.
This makes the positive limit work.

> linksp signalnameB => axis.0.home

Connect home to the second signal.
This makes home work.

The same thing using net would be:

> net signalnameA inputpin1 axis.0.negativelimit
> net signalnameB inputpin2 axis.0.positivelimit axis.0.home

I strongly recommend that after you have your machine
configured they way you want it, you open a terminal,
and while EMC is running, do "halcmd show sig" and review
the resulting list of signals.  It will show you every
signal and what is connected to it, and you can see if
you have what you wanted.  In the case above, the show
sig command would output something like:

signalnameA
   <= inputpin1
   => axis.0.negativelimit
signalnameB
   => axis.0.positivelimit
signalnameC
   <= inputpin2
   => axis.0.home

It is clear from the listing that no physical input is
connected to the positive limit.  The corrected version
would look like:

signalnameA
   <= inputpin1
   => axis.0.negativelimit
signalnameB
   <= inputpin2
   => axis.0.positivelimit
   => axis.0.home


Regards,

John Kasunich

-- 
  John Kasunich
  [email protected]


------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to