Hey Ralph
thanks for the speedy reply

yes you are right.  I was just thinking about it now.  I connected it up in
the hal layer and then did some testing and realised that I would have a
problem if I wanted to interlock anything.  at the moment after connecting
just in the Hal layer to the or2 component I can drop the tool when the
machine is in estop, when the spindle is turned on, and any other thing you
can think of.  In short It is a accident waiting to happen.  I will tie it
into classic ladder.

I want to interlock the E stop, the spindle and the toolchanger.  there are
probably others but that will do for now.

regards

Andrew

On Tue, Apr 21, 2020 at 4:12 PM Ralph Stirling <
[email protected]> wrote:

> HAL certainly has all the basic logic functions,
> including OR, AND, and NOT.
>
> http://linuxcnc.org/docs/html/hal/components.html
>
> The ClassicLadder diagrams also have AND and
> OR as elemental functions.  All Andrew needs to
> do is bring in his button as an OR (parallel) rung
> in his ladder rung that turns on the "unclamp"
> output.
>
> -- Ralph
> ________________________________________
> From: John Dammeyer [[email protected]]
> Sent: Monday, April 20, 2020 8:39 PM
> To: 'Enhanced Machine Controller (EMC)'
> Subject: Re: [Emc-users] toolchange numbers are confusing on the
> documentation
>
> CAUTION: This email originated from outside the Walla Walla University
> email system.
>
>
> 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://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Femc-users&amp;data=02%7C01%7Cralph.stirling%40wallawalla.edu%7C85cad85799864c70a29208d7e5a5b9e3%7Cd958f048e43142779c8debfb75e7aa64%7C0%7C0%7C637230372266792900&amp;sdata=TRDFU8%2FHU45U0UUIMdR0Gcv1vapqbqoma7Q1lHQSTMw%3D&amp;reserved=0
> >
> >
> >
> > _______________________________________________
> > Emc-users mailing list
> > [email protected]
> >
> https://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Femc-users&amp;data=02%7C01%7Cralph.stirling%40wallawalla.edu%7C85cad85799864c70a29208d7e5a5b9e3%7Cd958f048e43142779c8debfb75e7aa64%7C0%7C0%7C637230372266792900&amp;sdata=TRDFU8%2FHU45U0UUIMdR0Gcv1vapqbqoma7Q1lHQSTMw%3D&amp;reserved=0
>
>
>
> _______________________________________________
> Emc-users mailing list
> [email protected]
>
> https://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.sourceforge.net%2Flists%2Flistinfo%2Femc-users&amp;data=02%7C01%7Cralph.stirling%40wallawalla.edu%7C85cad85799864c70a29208d7e5a5b9e3%7Cd958f048e43142779c8debfb75e7aa64%7C0%7C0%7C637230372266792900&amp;sdata=TRDFU8%2FHU45U0UUIMdR0Gcv1vapqbqoma7Q1lHQSTMw%3D&amp;reserved=0
>
>
> _______________________________________________
> 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