Re: [Emc-users] toolchange numbers are confusing on the documentation

2020-04-23 Thread andrew beck
Thanks Todd

I will suss out some sort of interlocking in classic ladder.

Regards

Andrew

On Fri, Apr 24, 2020, 1:56 AM Todd Zuercher  wrote:

> There should also be logic in place to prevent the tool from being
> released any time the spindle is running, and to detect and set an alarm if
> the tool is not properly clamped before and during running the spindle.
>
> Todd Zuercher
> P. Graham Dunn Inc.
> 630 Henry Street
> Dalton, Ohio 44618
> Phone:  (330)828-2105ext. 2031
>
> -Original Message-
> From: Stuart Stevenson 
> Sent: Tuesday, April 21, 2020 5:05 PM
> To: Enhanced Machine Controller (EMC) 
> Subject: Re: [Emc-users] toolchange numbers are confusing on the
> documentation
>
> [EXTERNAL EMAIL] Be sure links are safe.
>
> I think you should also have some logic to eliminate the possibility of
> the manual tool change button releasing the tool during any operation other
> than the manual mode. You don't want to tool change button to release the
> tool while the spindle is running or during an automatic tool change.
>
> On Tue, Apr 21, 2020, 10:34 AM Jon Elson  wrote:
>
> > On 04/20/2020 10:39 PM, John Dammeyer wrote:
> > > 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
> > >
> > >
> > The hal component is and2 (for 2 inputs).  So, the above would
> > actually be :
> >
> > loadrt and2
> > and2.0.rt_prio = 12
> > fault0.en=io0.C78
> > # No fault  when not enabled.
> > and2.0.in0 = io0.C78
> > and2.0.in1 = fault0.fault
> > enc_cmd0.fault = and2.0.out
> >
> > I'm assuming this needs to be loaded as a real-time component.
> >
> > Jon
> >
> >
> >
> >
> > ___
> > Emc-users mailing list
> > Emc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/emc-users
> >
>
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>
>
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] toolchange numbers are confusing on the documentation

2020-04-23 Thread Todd Zuercher
There should also be logic in place to prevent the tool from being released any 
time the spindle is running, and to detect and set an alarm if the tool is not 
properly clamped before and during running the spindle.

Todd Zuercher
P. Graham Dunn Inc.
630 Henry Street 
Dalton, Ohio 44618
Phone:  (330)828-2105ext. 2031

-Original Message-
From: Stuart Stevenson  
Sent: Tuesday, April 21, 2020 5:05 PM
To: Enhanced Machine Controller (EMC) 
Subject: Re: [Emc-users] toolchange numbers are confusing on the documentation

[EXTERNAL EMAIL] Be sure links are safe.

I think you should also have some logic to eliminate the possibility of the 
manual tool change button releasing the tool during any operation other than 
the manual mode. You don't want to tool change button to release the tool while 
the spindle is running or during an automatic tool change.

On Tue, Apr 21, 2020, 10:34 AM Jon Elson  wrote:

> On 04/20/2020 10:39 PM, John Dammeyer wrote:
> > 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
> >
> >
> The hal component is and2 (for 2 inputs).  So, the above would 
> actually be :
>
> loadrt and2
> and2.0.rt_prio = 12
> fault0.en=io0.C78
> # No fault  when not enabled.
> and2.0.in0 = io0.C78
> and2.0.in1 = fault0.fault
> enc_cmd0.fault = and2.0.out
>
> I'm assuming this needs to be loaded as a real-time component.
>
> Jon
>
>
>
>
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] toolchange numbers are confusing on the documentation

2020-04-21 Thread andrew beck
I think I might as well interlock the whole lot.

manual unclamp can only operate if machine is in manual mode.  if spindle
is stopped,  and if the toolchanger is not currently operating.  maybe if
the Hal toolchange pin goes high that can turn off the manual toolchange
unclamp.  I will just put everything in series in classic ladder with the E
stop also.

regards

Andrew

On Wed, Apr 22, 2020 at 12:43 PM Jon Elson  wrote:

> On 04/21/2020 04:04 PM, Stuart Stevenson wrote:
> > I think you should also have some logic to eliminate the possibility of
> the
> > manual tool change button releasing the tool during any operation other
> > than the manual mode. You don't want to tool change button to release the
> > tool while the spindle is running or during an automatic tool change.
> >
> >
> Only a guy who has run big machines with a toolchanger would
> think of that!
> VERY good point.
>
> So, should it only work in manual mode, only when spindle is
> off, or require BOTH manual and
> spindle off?  The last one sounds the best.
>
> Thanks,
>
> Jon
>
>
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] toolchange numbers are confusing on the documentation

2020-04-21 Thread Jon Elson

On 04/21/2020 04:04 PM, Stuart Stevenson wrote:

I think you should also have some logic to eliminate the possibility of the
manual tool change button releasing the tool during any operation other
than the manual mode. You don't want to tool change button to release the
tool while the spindle is running or during an automatic tool change.


Only a guy who has run big machines with a toolchanger would 
think of that!

VERY good point.

So, should it only work in manual mode, only when spindle is 
off, or require BOTH manual and

spindle off?  The last one sounds the best.

Thanks,

Jon


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] toolchange numbers are confusing on the documentation

2020-04-21 Thread Stuart Stevenson
I think you should also have some logic to eliminate the possibility of the
manual tool change button releasing the tool during any operation other
than the manual mode. You don't want to tool change button to release the
tool while the spindle is running or during an automatic tool change.

On Tue, Apr 21, 2020, 10:34 AM Jon Elson  wrote:

> On 04/20/2020 10:39 PM, John Dammeyer wrote:
> > 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
> >
> >
> The hal component is and2 (for 2 inputs).  So, the above
> would actually be :
>
> loadrt and2
> and2.0.rt_prio = 12
> fault0.en=io0.C78
> # No fault  when not enabled.
> and2.0.in0 = io0.C78
> and2.0.in1 = fault0.fault
> enc_cmd0.fault = and2.0.out
>
> I'm assuming this needs to be loaded as a real-time component.
>
> Jon
>
>
>
>
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] toolchange numbers are confusing on the documentation

2020-04-21 Thread Jon Elson

On 04/20/2020 10:39 PM, John Dammeyer wrote:

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


The hal component is and2 (for 2 inputs).  So, the above 
would actually be :


loadrt and2
and2.0.rt_prio = 12
fault0.en=io0.C78
# No fault  when not enabled.
and2.0.in0 = io0.C78
and2.0.in1 = fault0.fault
enc_cmd0.fault = and2.0.out

I'm assuming this needs to be loaded as a real-time component.

Jon




___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] toolchange numbers are confusing on the documentation

2020-04-20 Thread andrew beck
actually I got ahead of myself lol

I am waiting for a encoder card for my schiender vfd to some from ebay and
then I will have to interface the encoder on my spindle into this card.
the vfd will output the encoder signals to linuxcnc and I will then have
full closed loop control at zero rpm so should be able to get the spindle
orientation working easily not that I have any clue how to do that.  But
when the time comes I am sure I can handle it with all the awesome help
available here.

I am sort of tossing up weather to just put a chinese encoder on the
spindle or buy a heidenhain exe box to convert my current encoder signals
to what the vfd can read.

anyway whatever I do will be a process i guess.

until then I will just manually change tools and disable all the the
classic ladder hal connections so nothing funny happens and get on with
jobs.

hopefully the jobs will pay for my next retrofit stuff

regards

Andrew

On Tue, Apr 21, 2020 at 4:21 PM andrew beck 
wrote:

> 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 <
> ralph.stirl...@wallawalla.edu> 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 [jo...@autoartisans.com]
>> 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:jo...@autoartisans.com]
>> > 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:andrewbeck0...@gmail.com]
>> > > 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
>> > >
>&g

Re: [Emc-users] toolchange numbers are confusing on the documentation

2020-04-20 Thread andrew beck
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 <
ralph.stirl...@wallawalla.edu> 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 [jo...@autoartisans.com]
> 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:jo...@autoartisans.com]
> > 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:andrewbeck0...@gmail.com]
> > > 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 
> > > 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 th

Re: [Emc-users] toolchange numbers are confusing on the documentation

2020-04-20 Thread andrew beck
hey john

you were right on the money I did a google search and found some examples
http://linuxcnc.org/docs/html/hal/hal-examples.html

this worked perfectly.

I know have a toolchanger classic ladder program that can unclamp the
spindle and also a working manual unclamp spindle release button

I just have to say if I didn't watch sams E stop video and learn all about
Halcmd -fk I would really struggle.  halcmd makes everything so easy.  I
tried it in the hal file first and getting the names right is such a pain
haha.  halcmd auto completes them for you making me make less mistakes

regards

Andrew


On Tue, Apr 21, 2020 at 3:42 PM John Dammeyer 
wrote:

> 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:jo...@autoartisans.com]
> > 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:andrewbeck0...@gmail.com]
> > > 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 
> > > 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.
> > > >
&g

Re: [Emc-users] toolchange numbers are confusing on the documentation

2020-04-20 Thread Ralph Stirling
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 [jo...@autoartisans.com]
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:jo...@autoartisans.com]
> 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:andrewbeck0...@gmail.com]
> > 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 
> > 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

Re: [Emc-users] toolchange numbers are confusing on the documentation

2020-04-20 Thread John Dammeyer
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:jo...@autoartisans.com]
> 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:andrewbeck0...@gmail.com]
> > 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 
> > 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 on

Re: [Emc-users] toolchange numbers are confusing on the documentation

2020-04-20 Thread John Dammeyer
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:andrewbeck0...@gmail.com]
> 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 
> 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 

Re: [Emc-users] toolchange numbers are confusing on the documentation

2020-04-20 Thread andrew beck
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 
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
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] toolchange numbers are confusing on the documentation

2020-04-15 Thread andrew beck
Stuart

could you please send me a PM with chris radeks email unless of course he
sees it here.  I have no way of contacting him..

just to confirm does your toolchanger calculate the shortest path and move
the chain magazine that way to get to the required pocket?

And also I am a little stuck now actually getting the handshaking with
linuxcnc working

I know how to get a S32 number into classic ladder.  to tell classic ladder
which pocket to choose
and I have me ladder logic to not more until I send a tool prepare signal
from linuxcnc.  But I don't actually know how the linuxcnc signals work
properly.  I am just guessing.
I know how to send a tool prepared signal from my ladder logic back to
linuxcnc to tell it that the tool is prepared and the toolchange can start.
So I would really appreciate some help on the actual signals.  From the
sound of it you have used linuxcnc for ages so know all about it.

Even if you shared me your tool change hal file that may be enough.  I just
want to check what actual io control signals I need to connect for each
part and if there is anything i need to look out for
I think this infomation is not machine specific any random position
toolchanger would need to get this handshaking working.

regards

Andrew

On Thu, Apr 16, 2020 at 9:01 AM Stuart Stevenson  wrote:

> Andrew,
>
> Here is a machine of the same make and type as the one I had.
>
> https://www.dropbox.com/s/45pwhcvfqr38dfd/Used-Enshu-VMC.jpg?dl=0
>
> It is somewhat different than your machine. My machine didn't have a
> bidirectional tool change matrix.
>
> Your machine looks like a larger edition of the Mori Seiki Jr.. I think
> Chris Radek used classic ladder on his. I would ask him if he used classic
> ladder and see if his files would work on your machine or give you a head
> start.
>
> thanks
> Stuart
>
>
> On Wed, Apr 15, 2020 at 3:31 PM andrew beck 
> wrote:
>
> > Hey andy and stuart
> >
> > Andy thanks for that logic.  you are right I can include it in classic
> > ladder or use the hal component.  last night I actually found this maths
> on
> > the centroid websight just doing google searchs for shortest path
> > toolchanger stuff.
> > https://www.centroidcnc.com/downloads/centroid_cnc10_PLCMAN.pdf  It
> looks
> > pretty much identical to what you code in the hal component does I think.
> > Anyway I got classic ladder going the shortest path in every circumstance
> > so far as I can see perfectly now.  I am a happy man  I need to go try it
> > on my machine now !  yeha
> >
> > Stuart
> >
> > here is my machine I think this video shows the toolchanger pretty well.
> > It is basically what is on every side mount toolchanger on the HAAS
> mills.
> > it is a side mounted random pot tool changer and an has a
> > arm to exchange the tools between a pot and the spindle. just like your
> > type. they are pretty common I think.
> > my mill on youtube 
> >
> >
> > I would definitely be interested in seeing how you solved your problem as
> > your toolchanger sounds similar to mine.
> >
> > regards
> >
> > Andrew
> >
> > On Wed, Apr 15, 2020 at 11:35 PM andy pugh  wrote:
> >
> > > On Wed, 15 Apr 2020 at 09:04, andrew beck 
> > > wrote:
> > >
> > > >  it works pretty good if the numbers are 4 and 5 but not if
> > > > they are 23 and 0  the magazine goes the long way round and takes
> ages.
> > > >
> > > > How would I use your Hal component with this  as you say all I want
> it
> > to
> > > > do it chose the correct direction for the shortest path..  I could
> > > probably
> > > > do it within classic ladder if I could work out the equations.
> > >
> > > The logic is here:
> > >
> > >
> >
> https://github.com/LinuxCNC/linuxcnc/blob/master/src/hal/components/carousel.comp#L267
> > >
> > > You could copy that in CL or let the carousel comp do its thing.
> > >
> > > --
> > > atp
> > > "A motorcycle is a bicycle with a pandemonium attachment and is
> > > designed for the especial use of mechanical geniuses, daredevils and
> > > lunatics."
> > > — George Fitch, Atlanta Constitution Newspaper, 1912
> > >
> > >
> > > ___
> > > Emc-users mailing list
> > > Emc-users@lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/emc-users
> > >
> >
> > ___
> > Emc-users mailing list
> > Emc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/emc-users
> >
>
>
> --
> Addressee is the intended audience.
> If you are not the addressee then my consent is not given for you to read
> this email furthermore it is my wish you would close this without saving or
> reading, and cease and desist from saving or opening my private
> correspondence.
> Thank you for honoring my wish.
>
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>


Re: [Emc-users] toolchange numbers are confusing on the documentation

2020-04-15 Thread Stuart Stevenson
Andrew,

Here is a machine of the same make and type as the one I had.

https://www.dropbox.com/s/45pwhcvfqr38dfd/Used-Enshu-VMC.jpg?dl=0

It is somewhat different than your machine. My machine didn't have a
bidirectional tool change matrix.

Your machine looks like a larger edition of the Mori Seiki Jr.. I think
Chris Radek used classic ladder on his. I would ask him if he used classic
ladder and see if his files would work on your machine or give you a head
start.

thanks
Stuart


On Wed, Apr 15, 2020 at 3:31 PM andrew beck 
wrote:

> Hey andy and stuart
>
> Andy thanks for that logic.  you are right I can include it in classic
> ladder or use the hal component.  last night I actually found this maths on
> the centroid websight just doing google searchs for shortest path
> toolchanger stuff.
> https://www.centroidcnc.com/downloads/centroid_cnc10_PLCMAN.pdf  It looks
> pretty much identical to what you code in the hal component does I think.
> Anyway I got classic ladder going the shortest path in every circumstance
> so far as I can see perfectly now.  I am a happy man  I need to go try it
> on my machine now !  yeha
>
> Stuart
>
> here is my machine I think this video shows the toolchanger pretty well.
> It is basically what is on every side mount toolchanger on the HAAS mills.
> it is a side mounted random pot tool changer and an has a
> arm to exchange the tools between a pot and the spindle. just like your
> type. they are pretty common I think.
> my mill on youtube 
>
>
> I would definitely be interested in seeing how you solved your problem as
> your toolchanger sounds similar to mine.
>
> regards
>
> Andrew
>
> On Wed, Apr 15, 2020 at 11:35 PM andy pugh  wrote:
>
> > On Wed, 15 Apr 2020 at 09:04, andrew beck 
> > wrote:
> >
> > >  it works pretty good if the numbers are 4 and 5 but not if
> > > they are 23 and 0  the magazine goes the long way round and takes ages.
> > >
> > > How would I use your Hal component with this  as you say all I want it
> to
> > > do it chose the correct direction for the shortest path..  I could
> > probably
> > > do it within classic ladder if I could work out the equations.
> >
> > The logic is here:
> >
> >
> https://github.com/LinuxCNC/linuxcnc/blob/master/src/hal/components/carousel.comp#L267
> >
> > You could copy that in CL or let the carousel comp do its thing.
> >
> > --
> > atp
> > "A motorcycle is a bicycle with a pandemonium attachment and is
> > designed for the especial use of mechanical geniuses, daredevils and
> > lunatics."
> > — George Fitch, Atlanta Constitution Newspaper, 1912
> >
> >
> > ___
> > Emc-users mailing list
> > Emc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/emc-users
> >
>
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>


-- 
Addressee is the intended audience.
If you are not the addressee then my consent is not given for you to read
this email furthermore it is my wish you would close this without saving or
reading, and cease and desist from saving or opening my private
correspondence.
Thank you for honoring my wish.

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] toolchange numbers are confusing on the documentation

2020-04-15 Thread andrew beck
Hey andy and stuart

Andy thanks for that logic.  you are right I can include it in classic
ladder or use the hal component.  last night I actually found this maths on
the centroid websight just doing google searchs for shortest path
toolchanger stuff.
https://www.centroidcnc.com/downloads/centroid_cnc10_PLCMAN.pdf  It looks
pretty much identical to what you code in the hal component does I think.
Anyway I got classic ladder going the shortest path in every circumstance
so far as I can see perfectly now.  I am a happy man  I need to go try it
on my machine now !  yeha

Stuart

here is my machine I think this video shows the toolchanger pretty well.
It is basically what is on every side mount toolchanger on the HAAS mills.
it is a side mounted random pot tool changer and an has a
arm to exchange the tools between a pot and the spindle. just like your
type. they are pretty common I think.
my mill on youtube 


I would definitely be interested in seeing how you solved your problem as
your toolchanger sounds similar to mine.

regards

Andrew

On Wed, Apr 15, 2020 at 11:35 PM andy pugh  wrote:

> On Wed, 15 Apr 2020 at 09:04, andrew beck 
> wrote:
>
> >  it works pretty good if the numbers are 4 and 5 but not if
> > they are 23 and 0  the magazine goes the long way round and takes ages.
> >
> > How would I use your Hal component with this  as you say all I want it to
> > do it chose the correct direction for the shortest path..  I could
> probably
> > do it within classic ladder if I could work out the equations.
>
> The logic is here:
>
> https://github.com/LinuxCNC/linuxcnc/blob/master/src/hal/components/carousel.comp#L267
>
> You could copy that in CL or let the carousel comp do its thing.
>
> --
> atp
> "A motorcycle is a bicycle with a pandemonium attachment and is
> designed for the especial use of mechanical geniuses, daredevils and
> lunatics."
> — George Fitch, Atlanta Constitution Newspaper, 1912
>
>
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] toolchange numbers are confusing on the documentation

2020-04-15 Thread Stuart Stevenson
Andrew,

What does your tool changer look like?
I see talk about a carousel but when you say your tool change sequence
doesn't require Z axis motion I want to see how your carousel works.
I have a component I used for a side mounted random pot tool changer and an
arm to exchange the tools between a pot and the spindle.

regards
Stuart


On Wed, Apr 15, 2020 at 6:34 AM andy pugh  wrote:

> On Wed, 15 Apr 2020 at 09:04, andrew beck 
> wrote:
>
> >  it works pretty good if the numbers are 4 and 5 but not if
> > they are 23 and 0  the magazine goes the long way round and takes ages.
> >
> > How would I use your Hal component with this  as you say all I want it to
> > do it chose the correct direction for the shortest path..  I could
> probably
> > do it within classic ladder if I could work out the equations.
>
> The logic is here:
>
> https://github.com/LinuxCNC/linuxcnc/blob/master/src/hal/components/carousel.comp#L267
>
> You could copy that in CL or let the carousel comp do its thing.
>
> --
> atp
> "A motorcycle is a bicycle with a pandemonium attachment and is
> designed for the especial use of mechanical geniuses, daredevils and
> lunatics."
> — George Fitch, Atlanta Constitution Newspaper, 1912
>
>
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>


-- 
Addressee is the intended audience.
If you are not the addressee then my consent is not given for you to read
this email furthermore it is my wish you would close this without saving or
reading, and cease and desist from saving or opening my private
correspondence.
Thank you for honoring my wish.

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] toolchange numbers are confusing on the documentation

2020-04-15 Thread andy pugh
On Wed, 15 Apr 2020 at 09:04, andrew beck  wrote:

>  it works pretty good if the numbers are 4 and 5 but not if
> they are 23 and 0  the magazine goes the long way round and takes ages.
>
> How would I use your Hal component with this  as you say all I want it to
> do it chose the correct direction for the shortest path..  I could probably
> do it within classic ladder if I could work out the equations.

The logic is here:
https://github.com/LinuxCNC/linuxcnc/blob/master/src/hal/components/carousel.comp#L267

You could copy that in CL or let the carousel comp do its thing.

-- 
atp
"A motorcycle is a bicycle with a pandemonium attachment and is
designed for the especial use of mechanical geniuses, daredevils and
lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1912


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] toolchange numbers are confusing on the documentation

2020-04-15 Thread andrew beck
Here are two links that I have found that I am trying to use to help me.
one is already made in classic ladder but the output controls a stepper
motor and I am not sure if it would work correctly-i can't get it to work
for me at least.

http://www.vdwalle.com/Norte/Classic%20Ladder%20Examples.html

the second link is the maths behind how this all works.  this looks pretty
cool and I understand the maths of how it works but not how to add it to
classic ladder so the math works out.


http://www.iaeme.com/MasterAdmin/Journal_uploads/IJMET/VOLUME_8_ISSUE_3/IJMET_08_03_009.pdf

regards

Andrew



On Wed, Apr 15, 2020 at 8:01 PM andrew beck 
wrote:

> Hey andy
>
> I have the classic ladder program I have made working fine to chose select
> the correct pocket and I am getting pretty used to classic ladder now.
>
> currently my formulas for choosing direction are simply comparing the
> current pocket number to the required pocket number  (C1 is the current
> toolnumber.  C2 is the required toolnumber.
> %C1.V>%C2.V   --set MAG fwd
> %C1.V<%C2.V   --set MAG REV
>
> %C1.V=%C2.V   reset coils (turn off
> magazine motor) and tell linux cnc
>
> this is slightly better than just going in forward direction but not that
> much better.  it works pretty good if the numbers are 4 and 5 but not if
> they are 23 and 0  the magazine goes the long way round and takes ages.
>
> How would I use your Hal component with this  as you say all I want it to
> do it chose the correct direction for the shortest path..  I could probably
> do it within classic ladder if I could work out the equations.  But I am
> definitely open to using the hal component if needed.  I am just a little
> confused how it all works
>
> regards
>
> Andrew
>
> On Wed, Apr 15, 2020 at 4:49 AM andy pugh  wrote:
>
>> On Tue, 14 Apr 2020 at 12:02, andrew beck 
>> wrote:
>>
>> > I don't quite understand if the carousel component can interlock the
>> motors
>> > so I don't turn both fwd and rev contactors on at the same time for
>> > example.  I have been told that the contactors make a quite nice BOOM
>> when
>> > that happens lol.  I suppose that I can probably use a combination of
>> hal
>> > components and classic ladder for a toolchanger as they all can be
>> linked
>> > together its really up to the imagination/
>>
>> Yes, carousel is only really meant to be one part of a toolchange
>> system. It is only really intended to calculate the current carousel
>> position and choose a direction to turn it.
>> I would suggest that you can use the direction outputs and the ready
>> outputs as input to CL, and then let CL do the direction interlocking.
>> (Especially as there may need to be a dead-time between direction
>> selections?)
>>
>> It looks like the component might potentially set both outputs at the
>> same time, for a nanosecond or two:
>>
>> https://github.com/LinuxCNC/linuxcnc/blob/master/src/hal/components/carousel.comp#L269
>> But if you consider that those pins then need to pass through, at the
>> very least, a hardware driver running in a separate HAL function, it
>> can only really cause a problem if the system crashes between the two
>> lines of code...
>>
>> --
>> atp
>> "A motorcycle is a bicycle with a pandemonium attachment and is
>> designed for the especial use of mechanical geniuses, daredevils and
>> lunatics."
>> — George Fitch, Atlanta Constitution Newspaper, 1912
>>
>>
>> ___
>> Emc-users mailing list
>> Emc-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/emc-users
>>
>

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] toolchange numbers are confusing on the documentation

2020-04-15 Thread andrew beck
Hey andy

I have the classic ladder program I have made working fine to chose select
the correct pocket and I am getting pretty used to classic ladder now.

currently my formulas for choosing direction are simply comparing the
current pocket number to the required pocket number  (C1 is the current
toolnumber.  C2 is the required toolnumber.
%C1.V>%C2.V   --set MAG fwd
%C1.V<%C2.V   --set MAG REV

%C1.V=%C2.V   reset coils (turn off
magazine motor) and tell linux cnc

this is slightly better than just going in forward direction but not that
much better.  it works pretty good if the numbers are 4 and 5 but not if
they are 23 and 0  the magazine goes the long way round and takes ages.

How would I use your Hal component with this  as you say all I want it to
do it chose the correct direction for the shortest path..  I could probably
do it within classic ladder if I could work out the equations.  But I am
definitely open to using the hal component if needed.  I am just a little
confused how it all works

regards

Andrew

On Wed, Apr 15, 2020 at 4:49 AM andy pugh  wrote:

> On Tue, 14 Apr 2020 at 12:02, andrew beck 
> wrote:
>
> > I don't quite understand if the carousel component can interlock the
> motors
> > so I don't turn both fwd and rev contactors on at the same time for
> > example.  I have been told that the contactors make a quite nice BOOM
> when
> > that happens lol.  I suppose that I can probably use a combination of hal
> > components and classic ladder for a toolchanger as they all can be linked
> > together its really up to the imagination/
>
> Yes, carousel is only really meant to be one part of a toolchange
> system. It is only really intended to calculate the current carousel
> position and choose a direction to turn it.
> I would suggest that you can use the direction outputs and the ready
> outputs as input to CL, and then let CL do the direction interlocking.
> (Especially as there may need to be a dead-time between direction
> selections?)
>
> It looks like the component might potentially set both outputs at the
> same time, for a nanosecond or two:
>
> https://github.com/LinuxCNC/linuxcnc/blob/master/src/hal/components/carousel.comp#L269
> But if you consider that those pins then need to pass through, at the
> very least, a hardware driver running in a separate HAL function, it
> can only really cause a problem if the system crashes between the two
> lines of code...
>
> --
> atp
> "A motorcycle is a bicycle with a pandemonium attachment and is
> designed for the especial use of mechanical geniuses, daredevils and
> lunatics."
> — George Fitch, Atlanta Constitution Newspaper, 1912
>
>
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] toolchange numbers are confusing on the documentation

2020-04-14 Thread andy pugh
On Tue, 14 Apr 2020 at 12:02, andrew beck  wrote:

> I don't quite understand if the carousel component can interlock the motors
> so I don't turn both fwd and rev contactors on at the same time for
> example.  I have been told that the contactors make a quite nice BOOM when
> that happens lol.  I suppose that I can probably use a combination of hal
> components and classic ladder for a toolchanger as they all can be linked
> together its really up to the imagination/

Yes, carousel is only really meant to be one part of a toolchange
system. It is only really intended to calculate the current carousel
position and choose a direction to turn it.
I would suggest that you can use the direction outputs and the ready
outputs as input to CL, and then let CL do the direction interlocking.
(Especially as there may need to be a dead-time between direction selections?)

It looks like the component might potentially set both outputs at the
same time, for a nanosecond or two:
https://github.com/LinuxCNC/linuxcnc/blob/master/src/hal/components/carousel.comp#L269
But if you consider that those pins then need to pass through, at the
very least, a hardware driver running in a separate HAL function, it
can only really cause a problem if the system crashes between the two
lines of code...

-- 
atp
"A motorcycle is a bicycle with a pandemonium attachment and is
designed for the especial use of mechanical geniuses, daredevils and
lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1912


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] toolchange numbers are confusing on the documentation

2020-04-14 Thread andrew beck
just checked out that carousel component that you wrote andy.  It looks
very usefull and I will probably use it for my slant bed cnc lathe that I
am going to retrofit next.  At this stage I would still like to use classic
ladder for my toolchanger as I have most of it sussed now and I think it is
the simplest for me to work out how all the interlocking is going to work.
I don't quite understand if the carousel component can interlock the motors
so I don't turn both fwd and rev contactors on at the same time for
example.  I have been told that the contactors make a quite nice BOOM when
that happens lol.  I suppose that I can probably use a combination of hal
components and classic ladder for a toolchanger as they all can be linked
together its really up to the imagination/

anyway if you could get back and just confirm how the toolchange iocontrol
stuff works that would be great.  As always thanks so much for all the time
you spend helping people out with linuxcnc/

regards

Andrew



On Tue, Apr 14, 2020 at 10:49 PM andrew beck 
wrote:

> oops sorry Andy!
>
> I made that big email replying to you guys and referencing the wiki page
> but didn't link it lol.
>
> here it is..
>
> http://wiki.linuxcnc.org/cgi-bin/wiki.pl?ToolChange
>
> regards
>
> Andrew
>
> On Tue, Apr 14, 2020 at 10:47 PM andrew beck 
> wrote:
>
>> I saw the Hal component that you wrote Andy.  My toolchanger doesn't
>> require  Z axis movements to work the toolchanger which is why I thought I
>> would use classic ladder..  But I'm fine with whatever works..   I'm
>> starting to like classic ladder now and it's easy to interlock all my
>> motors and sensors so that for example the magazine can't move unless the
>> pocket tool pot is in the up position.  That's easy in ladder logic.  But
>> anything that works is fine.  I just need to understand it.
>>
>> Regards
>>
>> Andrew
>>
>> On Tue, Apr 14, 2020, 10:26 PM andy pugh  wrote:
>>
>>> On Tue, 14 Apr 2020 at 05:10, andrew beck 
>>> wrote:
>>>
>>> > To actually get this to work, my classic ladder would have a counter
>>> set up
>>> > triggering as each pocket goes past the sensor.
>>>
>>> I will get back to your main points later, but there is a HAL
>>> component that can do much of the work here:
>>> http://linuxcnc.org/docs/2.8/html/man/man9/carousel.9.html
>>>
>>> --
>>> atp
>>> "A motorcycle is a bicycle with a pandemonium attachment and is
>>> designed for the especial use of mechanical geniuses, daredevils and
>>> lunatics."
>>> — George Fitch, Atlanta Constitution Newspaper, 1912
>>>
>>>
>>> ___
>>> Emc-users mailing list
>>> Emc-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/emc-users
>>>
>>

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] toolchange numbers are confusing on the documentation

2020-04-14 Thread andrew beck
oops sorry Andy!

I made that big email replying to you guys and referencing the wiki page
but didn't link it lol.

here it is..

http://wiki.linuxcnc.org/cgi-bin/wiki.pl?ToolChange

regards

Andrew

On Tue, Apr 14, 2020 at 10:47 PM andrew beck 
wrote:

> I saw the Hal component that you wrote Andy.  My toolchanger doesn't
> require  Z axis movements to work the toolchanger which is why I thought I
> would use classic ladder..  But I'm fine with whatever works..   I'm
> starting to like classic ladder now and it's easy to interlock all my
> motors and sensors so that for example the magazine can't move unless the
> pocket tool pot is in the up position.  That's easy in ladder logic.  But
> anything that works is fine.  I just need to understand it.
>
> Regards
>
> Andrew
>
> On Tue, Apr 14, 2020, 10:26 PM andy pugh  wrote:
>
>> On Tue, 14 Apr 2020 at 05:10, andrew beck 
>> wrote:
>>
>> > To actually get this to work, my classic ladder would have a counter
>> set up
>> > triggering as each pocket goes past the sensor.
>>
>> I will get back to your main points later, but there is a HAL
>> component that can do much of the work here:
>> http://linuxcnc.org/docs/2.8/html/man/man9/carousel.9.html
>>
>> --
>> atp
>> "A motorcycle is a bicycle with a pandemonium attachment and is
>> designed for the especial use of mechanical geniuses, daredevils and
>> lunatics."
>> — George Fitch, Atlanta Constitution Newspaper, 1912
>>
>>
>> ___
>> Emc-users mailing list
>> Emc-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/emc-users
>>
>

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] toolchange numbers are confusing on the documentation

2020-04-14 Thread andrew beck
I saw the Hal component that you wrote Andy.  My toolchanger doesn't
require  Z axis movements to work the toolchanger which is why I thought I
would use classic ladder..  But I'm fine with whatever works..   I'm
starting to like classic ladder now and it's easy to interlock all my
motors and sensors so that for example the magazine can't move unless the
pocket tool pot is in the up position.  That's easy in ladder logic.  But
anything that works is fine.  I just need to understand it.

Regards

Andrew

On Tue, Apr 14, 2020, 10:26 PM andy pugh  wrote:

> On Tue, 14 Apr 2020 at 05:10, andrew beck 
> wrote:
>
> > To actually get this to work, my classic ladder would have a counter set
> up
> > triggering as each pocket goes past the sensor.
>
> I will get back to your main points later, but there is a HAL
> component that can do much of the work here:
> http://linuxcnc.org/docs/2.8/html/man/man9/carousel.9.html
>
> --
> atp
> "A motorcycle is a bicycle with a pandemonium attachment and is
> designed for the especial use of mechanical geniuses, daredevils and
> lunatics."
> — George Fitch, Atlanta Constitution Newspaper, 1912
>
>
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] toolchange numbers are confusing on the documentation

2020-04-14 Thread andy pugh
On Tue, 14 Apr 2020 at 05:10, andrew beck  wrote:

> To actually get this to work, my classic ladder would have a counter set up
> triggering as each pocket goes past the sensor.

I will get back to your main points later, but there is a HAL
component that can do much of the work here:
http://linuxcnc.org/docs/2.8/html/man/man9/carousel.9.html

-- 
atp
"A motorcycle is a bicycle with a pandemonium attachment and is
designed for the especial use of mechanical geniuses, daredevils and
lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1912


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] toolchange numbers are confusing on the documentation

2020-04-14 Thread andy pugh
On Tue, 14 Apr 2020 at 05:10, andrew beck  wrote:

> here is what is in the wiki

Which Wiki page?

-- 
atp
"A motorcycle is a bicycle with a pandemonium attachment and is
designed for the especial use of mechanical geniuses, daredevils and
lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1912


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] toolchange numbers are confusing on the documentation

2020-04-13 Thread andrew beck
hey Andy and Rene

I thought the wiki was the Docs.  But looking in the installed html docs
that come with the iso as rene said there is nothing about random position
toolchanging.  Or if there is I would love to know.  I think I understand
how it works but would appreciate come confirmation.

here is what is in the wiki  my comments are below in red
Prepare operation
The prepare operation is initiated by a T command. This
toolnumber is used in a later change step as the M6 command carries no tool
number attribute by itself. The following signals support the prepare step


   - tool-prep-number: out,s32: the tool number to prepare
   - tool-prep-pocket: out,s32: the commanded pocket number to position the
   toolchanger to. Valid only when RANDOM_TOOLCHANGER is set. The tool table
   is searched for the given tool number, the corresponding pocket number is
   retrieved and signaled with this pin.
   - tool-prepare: out, bit: iocontrol signals to start a prepare.
   - tool-prepared: in, bit: acknowledge line that the tool-prepare line
   has been noticed by the toolchanger, the tool-prep-number or
   tool-prep-pocket has been read if needed and the prepare operation has been
   started (FIXME: or completed? this would defeat the purpose of running in
   parallel)



So this is how I understand it..  if someone could write up a better
explanation I would appreciate it..

I think the Iocontrol pin "tool-prep-number: out,s32" comes from linuxcnc
and is triggered by the toolnumber in the Gcode.
so if the tool number requested was T2 then linuxcnc would search the tool
table and find out which pocket number matched T2.
Just say T2 was in Pocket 1.  Iocontrol  pin "tool-prep-pocket s32 would
have a value of 1.  (think its 1 but it might be zero depending on how the
counting works)

I could get this info into classic ladder by connecting it to
classicladder.0.s32in-00.  (If you then checked in the Hal configuration
window in the axis gui the Iocontrol pin "tool-prep-pocket s32" would show
a value of 1)  This would just connect up the stream of data.  I would
still have to actually signal the toolchanger to prepare the correct
pocket.  I would do this with "iocontrol tool-prepare: out, bit"  This is
the signal that should actually make the toolchanger start to prepare the
tool.

This is where the info gets hazy in the wiki.  I think after classic ladder
(the toolchanger) has moved to the correct pocket and is all finishing
moving pockets, it should signal to linuxcnc that the magazine is ready to
go.

To actually get this to work, my classic ladder would have a counter set up
triggering as each pocket goes past the sensor.  I would have a compare
variable box comparing the requested tool number with the number in the
counter.  once they were the same then the magazine would stop at that
pocket and signal to linuxcnc that the correct pocket (and tool) was ready
for a tool change.
I would do this by connecting the classic ladder output to iocontrol
tool-prepared for example (net classicladder.0.out-05  => iocontrol
tool-prepared)


Now that the magazine is controlled and set its time to use the
toolchange iocontrol pins.

Change operationThe change operation is initiated by an M6 command, which
relies on the number of the tool to be loaded having been set by a previous
T command. When using a random toolchanger with prepare
capability, it might make sense to execute the T
immediately after an M6 to give the prepare mechanism ample time to
position. In nonrandom or manual toolchange scenarios this has no effect so
T and M6 could well be on the same line.

The following signals support the change step:


   - tool-number: out,s32: the tool number currently loaded (in spindle).
   - tool-change: out, bit: iocontrol signals to start a tool change
   operation.
   - tool-changed: in, bit: acknowledge line that the tool-change line has
   been noticed by the toolchanger, the tool-number has been read if needed,
   and the change operation has completed


   1. An M6 command initiates the tool loading cycle. iocontrol asserts
   tool-change.
   2. The toolchanger completes the tool load and signals that with
   asserting tool-changed.
   3. iocontrol the tool-changed pin at 1, and deasserts tool-change to
   acknowledge.
   4. The toolchanger sees tool-change going low and in response deasserts
   tool-changed. The change cycle is now complete.

This is how I understand the actual tool change operation.

I think the iocontrol toolchange: out, bit tells classic ladder to swap the
tool in the magazine pocket with the one in the spindle.

I would make this work by by connecting iocontrol toolchange to my classic
ladder input pin I am using to start the plc into toolchange.

for example  net iocontrol toolchange => classicladder.0.in-04.


Once classicladder has completed the toolchange it would signal linuxcnc by
connecting a classicladder output to iocontrol tool-changed: in, bit:

for example  net classicladder.0out.07 

Re: [Emc-users] toolchange numbers are confusing on the documentation

2020-04-13 Thread Rene Hopf via Emc-users


> On 14. Apr 2020, at 01:20, andy pugh  wrote:
> 
> On Mon, 13 Apr 2020 at 23:57, andrew beck  wrote:
> 
>> I was just looking at the toolchanger wiki online and it looks like some of
>> the info is outdated or wrong.
> 
> Where?
> 
> The Wiki is not "the documentation"
> 
> Maybe it just needs wholesale deletion?

Some stuff needs moving to the docs.
There isn’t actually any documentation on the tooltable or toolchanging.


> 
> 
> --
> atp
> "A motorcycle is a bicycle with a pandemonium attachment and is
> designed for the especial use of mechanical geniuses, daredevils and
> lunatics."
> — George Fitch, Atlanta Constitution Newspaper, 1912
> 
> 
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users



___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] toolchange numbers are confusing on the documentation

2020-04-13 Thread andy pugh
On Mon, 13 Apr 2020 at 23:57, andrew beck  wrote:

> I was just looking at the toolchanger wiki online and it looks like some of
> the info is outdated or wrong.

Where?

The Wiki is not "the documentation"

Maybe it just needs wholesale deletion?


--
atp
"A motorcycle is a bicycle with a pandemonium attachment and is
designed for the especial use of mechanical geniuses, daredevils and
lunatics."
— George Fitch, Atlanta Constitution Newspaper, 1912


___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] toolchange numbers are confusing on the documentation

2020-04-13 Thread andrew beck
Hi guys

I was just looking at the toolchanger wiki online and it looks like some of
the info is outdated or wrong.  someone has put fix-me comments all over
it.  Can someone please confirm how this works or if the instructions are
correct or not?

regards

Andrew

http://wiki.linuxcnc.org/cgi-bin/wiki.pl?ToolChange

___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users