Sorry,  I may have been premature.  The STMBL has a HAL like interface for 
configuration.   It has the AND operation for example:
# Now enable drive if external signal there
load and
and0.rt_prio = 12
fault0.en=io0.C78
# No fault  when not enabled.
and0.in0 = io0.C78
and0.in1 = fault0.fault
enc_cmd0.fault = and0.out

I don't know if this feature exists in LinuxCNC.  I thought it did and I was 
using it but can't find it in my HAL file.

John


> -----Original Message-----
> From: John Dammeyer [mailto:[email protected]]
> Sent: April-20-20 8:12 PM
> To: 'Enhanced Machine Controller (EMC)'
> Subject: Re: [Emc-users] toolchange numbers are confusing on the documentation
> 
> HAL has both AND and OR operators.  I think you can use those to connect two 
> inputs to an output.
> 
> > -----Original Message-----
> > From: andrew beck [mailto:[email protected]]
> > Sent: April-20-20 6:37 PM
> > To: Enhanced Machine Controller (EMC)
> > Subject: Re: [Emc-users] toolchange numbers are confusing on the 
> > documentation
> >
> > hey guys just a quick question
> >
> > I have my toolchanger working now pretty good.  videos to come soon.  the
> > classic ladder toolchanger plc turns on output 6 on the 7i76 io pins which
> > unclamps the spindle drawbar.  that all works fine.  Now I want to also
> > have a manual spindle unclamp button like on most cnc machines to manually
> > release the tool.  incidentally that is also how you load tools into the
> > magazine in my machine through the spindle.
> >
> > HAL won't let me connect two inputs to one output at the moment  I am just
> > wondering what is the best way to go ahead.
> >
> > regards
> >
> > Andrew
> >
> >
> > On Thu, Apr 16, 2020 at 1:37 PM andrew beck <[email protected]>
> > wrote:
> >
> > > thanks Stuart
> > >
> > > I have mine working both ways but the logic is a little buggy at the
> > > moment.  It works fine if I only home the machine when I first turn it on
> > > but once I have homed it if I try re home the magazine later on eg if I 
> > > had
> > > a problem I cannot do it properly.  all sorts of things go wrong like the
> > > magazine arm doesn't turn off lol I am almost tempted to just have it go
> > > one way as that would be pretty easy to setup.  but I will press on for 
> > > now.
> > >
> > > I have a couple of questions though
> > >
> > > My classic ladder counter currently counts from 0 to 23 and then gets
> > > reset to 0 or the other way round.  obviously the actually tool numbers 
> > > are
> > > from 1-24  I think the spindle should be pocket 0.  Now how does that
> > > normally work with the tool table?  when it gets updated.  I think I have
> > > that part of it slightly off.  I could assign a value to another counter 
> > > or
> > > something I suppose that is the first counter value plus 1  and then use
> > > that in my compare equations.  But there must be a more elegant method 
> > > than
> > > that..  Any ideas would be much appreciated.
> > >
> > > This is the io control pins that I have connected to my classic ladder
> > > program.  the red letters are HAL signals I have used to connect the
> > > pins.  my comments are dark blue
> > >
> > > net prep-pocket iocontrol.0.tool-prep-pocket classicladder.0.s32in-00  
> > > This
> > > is connected to my classic ladder logic and is compared with the current
> > > value of the pocket sensor counter to decide which way to rotate and to
> > > know when to stop.
> > >
> > > net tool-prepare iocontrol.0.tool-prepare classicladder.0.in-04 this
> > > actually enables all the comparision formulas I have to calculate the
> > > correct direction to rotate.
> > >
> > > net tool-prepared iocontrol.0.tool-prepared classicladder.0.out-00  This
> > > is to tell linuxcnc that classic ladder is finished and the tool is in the
> > > correct pocket
> > >
> > > net tool-changed iocontrol.0.tool-changed classicladder.0.out-09  
> > > currently
> > > these are just looped in classic ladder as I haven't made my actual
> > > toolchange logic yet that is the easy bit
> > >
> > > net classicladder-homing joint.0.homed classicladder.0.in-05 this starts
> > > the homing cycle in the ladder logic when linuxcnc is first turned on.  I
> > > couldn't decide how else to do it when I went looking for pins so I just
> > > grabbed the joint 0 "homed" pin  currently it only works properly when
> > > linuxcnc is first turned on.  If i try re-home everything falls to pieces
> > > lol.  probably the toolchanger would just keep rotating for ever lol i
> > > think it will still work for now though and I will use it.
> > >
> > > I have attached the screen shots of my ladder program and also attached my
> > > Hal files INI files and classic ladder program if anyone wants to take a
> > > look.
> > > The custom-2.clp file is the current ladder logic file ready for my
> > > machine.
> > > The classic ladder after crash clp is a before I went through and changed
> > > the internal variables to actual input and output pins.  You want use the
> > > C2 counter to simulate the wanted pocket and make the ladder internally
> > > move the magazine and find the correct pocket.  You can use B5 to count
> > > pockets just activate it from the var window.
> > >
> > > and the Hal and INI files are from my testing setup so only use a
> > > parport.  I might have deactivated the parport driver for testing.  But
> > > this should work fine on any computer using linuxcnc 2.8
> > > I am running on linux mint with 2.8 installed.
> > >
> > > regards
> > >
> > > Ps I just hope now that the email is allowed to go through with all the
> > > attachments lol.  if you guys get it then it was a success.
> > >
> > > Andrew
> > >
> > >
> > >
> > >
> > >
> >
> > _______________________________________________
> > Emc-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/emc-users
> 
> 
> 
> _______________________________________________
> Emc-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/emc-users



_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to