Re: [Emc-users] Just in case anyone is interested in my tool changer...

2018-08-28 Thread John Dammeyer
Very very cool.

Your tool sensor is on the end of a pneumatic ram?  
It moves down slightly when touched.  Is that when it makes contact?   It
doesn't look like the ram moves down.  Just the sensor.
How do you calibrate the tool sensor?  

Thanks
John Dammeyer


> -Original Message-
> From: Les Newell [mailto:les.new...@fastmail.co.uk]
> Sent: August-27-18 1:44 PM
> To: emc-users@lists.sourceforge.net
> Subject: [Emc-users] Just in case anyone is interested in my tool
changer...
> 
> I uploaded a quick video of it in action 
> 
> Les
> 
> 
>

--
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Axis limit warning

2018-08-28 Thread Gene Heskett
On Tuesday 28 August 2018 11:24:03 Gene Heskett wrote:

> On Tuesday 28 August 2018 10:06:53 Les Newell wrote:
> > Hi Gene,
> >
> > > But homing does not apply a TLO, which can vary by 7 or 8 inches
> > > according to whats in this spindle for a tool at the time with
> > > this machine. So when I calculate the min limit, I'm effectively
> > > putting the spindle with no tool in it, about 25 thou from the
> > > table.
> >
> > Yes, Homing is just establishing the physical limits of the machine.
> > It doesn't take any offsets into account.
> >
> > > Z home switch trips about 50 thou below top of post and offsets
> > > are supposedly from there in the rest of my homing setup,mainly 
> > > because I don't care for -z's in my code.
> >
> > With my router I have Z0 as the top of the spoil board because the
> > bottom of the work is always in the same place. For milling, where
> > the bottom of the work can be anywhere depending on if it is held in
> > a vice, clamped to the bed etc I use Z0 as the top of the work.
> >
> > > So the question, since theres no z probition in a G10L1, does a z
> > > offset applied that way, actually get into the tool.tbl for use as
> > > TLO with a G43 H? Looking at the Doc pdf, it does not say
> >
> > Yes. From the docs: "A valid G10 L1 rewrites and reloads the tool
> > table." I have attached my toolset subs which may help. There is
> > some extra stuff to tweak the limits, make sure the spindle is
> > stopped, raise the setter etc but you can take that out.
> > You need to add some stuff to the ini file. All values are in
> > machine coords:
>
> Which for you are metric. I do a lot of metric, but the machine was
> originally setup in inches.
>
> > [RS274NGC]
> > REMAP=G36 modalgroup=1 ngc=toolset
> > REMAP=G36.1 modalgroup=1 ngc=optional_toolset
> > REMAP=G37 modalgroup=1 ngc=clear_toolset
>
> This is a new stanza for the ini file, kewl.
>
> > [TOOLSET]
> > #all coords are in machine coords
> > #Tool set Y (you probably don't want this one)
> > Y = 1393
> > #Rapid down to this height before probing
> > RAPID_Z = -60
> > #Tool set height (used to work out maximum distance for G38.2)
> > Z = -165
> > #Offset from tool setter to table
> > OFFSET = 5.75
>
> Neat, but my screws limit me to on table positions, so I usually just
> superglue a piece of dbl-sided pcb to some handy place near the middle
> of the table, ATM to the top of a block of wood also serving as a
> bearing for an r8 to turn in while drilling and tapping for the grub
> screws holding the tap by its square butt. And a lead from there to
> the probe input.  Next job setup is invented on the fly of course.
>
> > G36 will do a toolset. G36.1 will do a toolset if that tool has not
> > already been set in this session.
> >
> > G37 will clear all toolset flags and force a new toolset next time
> > G36.1 is called
>
> Also neat.
>
> > Note the toolset flags only work for the first 8 tools.
>
> Ouch, so those have to be treated as 100% volatile, meaning move the
> tools already defined to position 10 and above in the tool table. But
> thats alright as I tend to break a job down to not more than 4 or 5
> tools used per push of the R key. Us coffee-holics gotta have time to
> go recycle the last cup and refill the empty coffee cup :)
>
> All this is of course a different project from the screw comp for
> slight bed wear on the sheldon where x will be offset according to z
> position. Conversations will need to spec which project. :)
>
This I have been playing with a bit, and can report I'm going blind, the 
original joint.0.pos-fb was there and its stable whereas the 
joint.0.motor-pos-fb is not, drifting a thou or more for each repeated 
homing. But pos-fb stays in the E-09 range, so my switches must be 
working ok.

So I'm in the process of working over my .hal file now, trying to get the 
addf's in a workable order. IMO. this joint.0.pos-fb into 
lincurve.0.input ought to be just about last in the servo loop, maybe 
even in the jog loop since the movement speeds aren't all that fast.  
Yeah, I'll put that whole signal change up to the offset.0.control-input 
in the slower 10 millisecond thread.

> > Change
> > clear_toolset to suit (probably best to use a loop rather than the
> > way I did it). You'll also need to change line 8 of toolset.ngc.
>
> Yup.

But lincurve setup is once per execution of LCNC so that can be done 
sequentially. I've given it a personality of 16 so I'll do setpoints at 
2.25" intervals, as it claims to interpolate between them. Now if I can 
get a decent reading from this slightly bent piece of A2 I have mounted. 
I wobbles the dial about 8 thou +- from center in the middle of it when 
turning slow, and thats still almost too fast for the dial so I'll put 
it in backgear for this.

> > Les

Back to it, thanks Les.
> I don't know how much of this I'd need, no tool changer yet. :( But
> its all printed F.F.R.
>
> Thanks Les, a bunch.



-- 
Cheers, Gene Heskett
--
"There are four boxes to be used in 

Re: [Emc-users] Just in case anyone is interested in my tool changer...

2018-08-28 Thread N. Christopher Perry
Very neat!

N. Christopher Perry

> On Aug 28, 2018, at 2:06 AM, Marcus Bowman 
>  wrote:
> 
> 
>> On 27 Aug 2018, at 21:44, Les Newell wrote:
>> 
>> I uploaded a quick video of it in action 
>> 
> Nice action, and I like the logic for the tool length setting/not setting.
> 
> Marcus
> 
> 
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Axis limit warning

2018-08-28 Thread Les Newell

Hi Gene,


Which for you are metric. I do a lot of metric, but the machine was
originally setup in inches.


No problem. Just change the G21 to G20 in toolset.ngc


Neat, but my screws limit me to on table positions, so I usually just
superglue a piece of dbl-sided pcb to some handy place near the middle
of the table,


Yeah, you'd need to take out the Y axis moves. I originally wrote this 
code for the fixed tool-setter on my Hurco mill. It has enough table 
area that I can get away with a permanently attached tool setter 
(Renishaw MP3 that I got cheap on eBay). On that machine the tool change 
code does the following:

Lift to the top of travel.
Ask for the tool.
If the 'Auto tool set' button on the control panel is on it then 
remembers the current X,Y position, does a tool set and returns to the 
stored X,Y position. I have lots of buttons on the front panel for 
various functions. For instance I have 8 buttons to select tools 1-8. If 
a tool within that range is selected that button lights up. Pressing a 
button executes 'M6Tn G43Hn'. I do a lot of one-off and manual work so 
being able to quickly select tools saves a lot of time.


It would be nice to have an ATC on this machine but it would be a big 
project and I don't have the round tuits. I still need to fit the second 
touch-screen display which will be dedicated to manual functions - 
probing, hole patterns etc. It will be run by a Pi that talks to the 
main computer over Ethernet using the CNCRemote library and GUI that I 
am (slowly) working on.





Note the toolset flags only work for the first 8 tools.

Ouch, so those have to be treated as 100% volatile, meaning move the
tools already defined to position 10 and above in the tool table.


You could run the G36.1 with block delete:
M6 T1
/G36.1

That way you can disable the G36.1 if you have restarted and know your 
tools are correct.


Les

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Where can I get absolute, reference z home=0 z position?

2018-08-28 Thread Gene Heskett
On Tuesday 28 August 2018 11:11:50 Les Newell wrote:

> Hi Gene,
>
> > I don't have a joint.N.pos-fb,but I do have a joint.N.motor-pos-fb.
>
>  That's 'cos I can't type... :-[
>
Common problem, it WILL get worse as the years pile up.

> > But, in order for it to be consistent, I have to "rm
> > hm2-stepper.var"
>
> AFAIK that file stores persistent parameters. I have no idea why you
> should need to delete it.
>
It loaded that signal with a -7 something figure after rehoming. No clue 
why. Otoh, it hadn't been deleted in at least a year, and there have 
been several un-announced power cuts which may have left it trashed. No 
UPS on that rpi card.

> > I'll have to find out if lincurve can work both sides of
> > zero.
>
> I don't see why it shouldn't.
>
> Les
>
> --
> Check out the vibrant tech community on one of the world's
> most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users



-- 
Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page 

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Parallel Port

2018-08-28 Thread Gene Heskett
On Tuesday 28 August 2018 09:25:17 Todd Zuercher wrote:

> I have done a fair bit of testing, and pins (1,14,16,17) work as
> inputs in X mode, they don't output any voltage in the other modes,
> but their resistance to ground does change in those modes, so
> something is happening.  All the other pins seem to work fine. My
> loadrt line in hal is :
> loadrt hal_parport cfg="0xe030 out 0xe010 out"
> Using loadrt hal_parport cfg="0 out 1 out" gives the same results.
> If I try to use loadrt hal_parport cfg="0xe030 epp 0xe010 epp" I get
> two warning popups "Linux parallel port @65535 not found" and hal
> shows pins for 4 parallel ports, but only port 0 seems to work.
>
> lspci -v
>
> 06:00.0 Parallel controller: MosChip Semiconductor Technology Ltd. PCI
> 9865 Multi-I/O Controller (prog-if 03 [IEEE1284]) Subsystem: Device
> a000:2000
>   Flags: bus master, medium devsel, latency 32, IRQ 19
>   I/O ports at e030 [size=8]
>   I/O ports at e020 [size=8]
>   Memory at fe503000 (32-bit, non-prefetchable) [size=4K]
>   Memory at fe502000 (32-bit, non-prefetchable) [size=4K]
>   Capabilities: 
>   Kernel driver in use: parport_pc
>   Kernel modules: parport_pc
>
> 06:00.2 Parallel controller: MosChip Semiconductor Technology Ltd. PCI
> 9865 Multi-I/O Controller (prog-if 03 [IEEE1284]) Subsystem: Device
> a000:2000

MosChip, by several name variations, has been found wanting back in the 
mists of time, failing to do an adequate job in the epp mode, both by me 
and others on this list. I had good luck with startech parport boards at 
the time. But now I'm down to just one x86 machine w/o a mesa 5i25 in 
it. The 5i25, with decent motor voltage, can move the machine 3-8x 
faster than software stepping. It and the Sainsmart bob make a good,  no 
or very minimal mods required, depending on how fast the encoder for 
spindle speed is.
 
>   Flags: bus master, medium devsel, latency 32, IRQ 17
>   I/O ports at e010 [size=8]
>   I/O ports at e000 [size=8]
>   Memory at fe501000 (32-bit, non-prefetchable) [size=4K]
>   Memory at fe50 (32-bit, non-prefetchable) [size=4K]
>   Capabilities: 
>   Kernel driver in use: parport_pc
>   Kernel modules: parport_pc
>
> The output from "cat /proc/ioports |grep parport" is a bit odd. In
> that it doesn't give any actually usable memory addresses ~$ cat
> /proc/ioports |grep parport
> - : parport1
> - : parport1
> - : parport0
> - : parport0
>
> Is it possible I damaged the card by testing it in X mode or that
> there is something wrong with the Cnc4pc C80 breakout boards I'm
> trying to use that wrecked them?  (I used a 470ohm resister to probe
> the port terminals to test with.) Or is it more likely that this card
> never really worked right.

No experience with that particular BOB.

> Todd Zuercher
> P. Graham Dunn Inc.
> 630 Henry Street 
> Dalton, Ohio 44618
> Phone:  (330)828-2105ext. 2031
>
> -Original Message-
> From: Jon Elson 
> Sent: Monday, August 27, 2018 9:07 PM
> To: Enhanced Machine Controller (EMC)
>  Subject: Re: [Emc-users] Parallel
> Port
>
> On 08/27/2018 12:38 PM, Todd Zuercher wrote:
> > I have a duel port PCIe parallel port card that I am trying to use
> > in an application, but I'm having a little trouble.
> >
> > My problem is that I can't seem to use the pins in the control
> > groupe (1,14,16,17) as outputs in the normal "out" or "in"
> > configurations.  When set up as out or in those pins seem to be
> > dead.  If I configure the port in X mode they do work as inputs.  I
> > am at a bit of a loss with what to do.  I am afraid that the
> > breakout board I was trying to use might have messed up the parallel
> > port card, so I'm a little afraid to plug it into a known good
> > working machine.
>
> Well, first thing is to put some LEDs on the outputs and use a par
> port test program to see what is going on.  Some boards have several
> modes (SPP, BiDir, EPP, ECP) that turn different driver strengths on.
> And, probably some of these PCIe clone cards may just not work
> completely.  I am most involved with EPP mode, and there certainly are
> some cards out there that just don't work.  Also, some cards are
> totally non-standard register arrangement, and will only work with the
> maker's Windows driver supplied on a disc.
>
> Jon
>
>
> --
> Check out the vibrant tech community on one of the world's
> most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___ Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users
>
> --
> Check out the vibrant tech community on one of the world's
> most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> 

Re: [Emc-users] Axis limit warning

2018-08-28 Thread Gene Heskett
On Tuesday 28 August 2018 10:06:53 Les Newell wrote:

> Hi Gene,
>
> > But homing does not apply a TLO, which can vary by 7 or 8 inches
> > according to whats in this spindle for a tool at the time with this
> > machine. So when I calculate the min limit, I'm effectively putting
> > the spindle with no tool in it, about 25 thou from the table.
>
> Yes, Homing is just establishing the physical limits of the machine.
> It doesn't take any offsets into account.
>
> > Z home switch trips about 50 thou below top of post and offsets are
> > supposedly from there in the rest of my homing setup,mainly  because
> > I don't care for -z's in my code.
>
> With my router I have Z0 as the top of the spoil board because the
> bottom of the work is always in the same place. For milling, where the
> bottom of the work can be anywhere depending on if it is held in a
> vice, clamped to the bed etc I use Z0 as the top of the work.
>
> > So the question, since theres no z probition in a G10L1, does a z
> > offset applied that way, actually get into the tool.tbl for use as
> > TLO with a G43 H? Looking at the Doc pdf, it does not say
>
> Yes. From the docs: "A valid G10 L1 rewrites and reloads the tool
> table." I have attached my toolset subs which may help. There is some
> extra stuff to tweak the limits, make sure the spindle is stopped,
> raise the setter etc but you can take that out.
> You need to add some stuff to the ini file. All values are in machine
> coords:
>
Which for you are metric. I do a lot of metric, but the machine was 
originally setup in inches.

> [RS274NGC]
> REMAP=G36 modalgroup=1 ngc=toolset
> REMAP=G36.1 modalgroup=1 ngc=optional_toolset
> REMAP=G37 modalgroup=1 ngc=clear_toolset
>
This is a new stanza for the ini file, kewl.
> [TOOLSET]
> #all coords are in machine coords
> #Tool set Y (you probably don't want this one)
> Y = 1393
> #Rapid down to this height before probing
> RAPID_Z = -60
> #Tool set height (used to work out maximum distance for G38.2)
> Z = -165
> #Offset from tool setter to table
> OFFSET = 5.75

Neat, but my screws limit me to on table positions, so I usually just 
superglue a piece of dbl-sided pcb to some handy place near the middle 
of the table, ATM to the top of a block of wood also serving as a 
bearing for an r8 to turn in while drilling and tapping for the grub 
screws holding the tap by its square butt. And a lead from there to the 
probe input.  Next job setup is invented on the fly of course.

> G36 will do a toolset. G36.1 will do a toolset if that tool has not
> already been set in this session.

> G37 will clear all toolset flags and force a new toolset next time
> G36.1 is called

Also neat.

> Note the toolset flags only work for the first 8 tools.

Ouch, so those have to be treated as 100% volatile, meaning move the 
tools already defined to position 10 and above in the tool table. But 
thats alright as I tend to break a job down to not more than 4 or 5 
tools used per push of the R key. Us coffee-holics gotta have time to go 
recycle the last cup and refill the empty coffee cup :)

All this is of course a different project from the screw comp for slight 
bed wear on the sheldon where x will be offset according to z position. 
Conversations will need to spec which project. :)

> Change 
> clear_toolset to suit (probably best to use a loop rather than the way
> I did it). You'll also need to change line 8 of toolset.ngc.

Yup.

> Les

I don't know how much of this I'd need, no tool changer yet. :( But its 
all printed F.F.R.

Thanks Les, a bunch.

-- 
Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page 

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Where can I get absolute, reference z home=0 z position?

2018-08-28 Thread Les Newell

Hi Gene,


I don't have a joint.N.pos-fb,but I do have a joint.N.motor-pos-fb.


 That's 'cos I can't type... :-[


But, in order for it to be consistent, I have to "rm hm2-stepper.var"


AFAIK that file stores persistent parameters. I have no idea why you 
should need to delete it.



I'll have to find out if lincurve can work both sides of
zero.



I don't see why it shouldn't.

Les

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Where can I get absolute, reference z home=0 z position?

2018-08-28 Thread Gene Heskett
On Tuesday 28 August 2018 09:58:16 Gene Heskett wrote:

> On Tuesday 28 August 2018 09:22:12 Les Newell wrote:
> > Hi Gene,
> >
> > > So, where do I get this absolute Z position to feed lincurve from?
> >
> > Assuming you have a cartesian machine joint.N.pos-fb is probably the
> > way to go. That's what I used when I did something similar on my
> > lathe.
> >
> > Les
>
> That would likely work and well Les, if indeed that data is referenced
> to the machines location vis-a-vis its actually 0.00 at a g53 g0
> z0. nothing else is such a permanent reference. I'll make some tests.
> If it moves with a touch off or tool loaded but not g43'd, its not too
> valuable.
>
> Now to feed the missus and refill her coffee cup with freshly brewed,
> and I'll hang a halmeter on it and find out.
>
> Thanks Les.

I don't have a joint.N.pos-fb,but I do have a joint.N.motor-pos-fb. I'm 
running master on the r-pi 3b.

But, in order for it to be consistent, I have to "rm hm2-stepper.var" 
before I start LCNC -l, then its about .0006" from zero at the parking 
point after homing, and seems to be immune to touch offs. For my 
purposes thats plenty accurate enough.  However, it will go thru zero to 
negative values by the time a tool gets close enough to work on 
something in the currently mounted ER-40 adapter as home is around 3" 
out from it. I'll have to find out if lincurve can work both sides of 
zero. I suspect it can or Andy would have fixed it long ago since its 
his code. ;-)

Thanks Les, I believe I can make it work.
> > 
> >--  Check out the vibrant tech community on one of the
> > world's most engaging tech sites, Slashdot.org!
> > http://sdm.link/slashdot
> > ___
> > Emc-users mailing list
> > Emc-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/emc-users



-- 
Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page 

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Axis limit warning

2018-08-28 Thread Les Newell

Hi Gene,


But homing does not apply a TLO, which can vary by 7 or 8 inches
according to whats in this spindle for a tool at the time with this
machine. So when I calculate the min limit, I'm effectively putting the
spindle with no tool in it, about 25 thou from the table.


Yes, Homing is just establishing the physical limits of the machine. It 
doesn't take any offsets into account.



Z home switch trips about 50 thou below top of post and offsets are
supposedly from there in the rest of my homing setup,mainly  because I
don't care for -z's in my code.


With my router I have Z0 as the top of the spoil board because the 
bottom of the work is always in the same place. For milling, where the 
bottom of the work can be anywhere depending on if it is held in a vice, 
clamped to the bed etc I use Z0 as the top of the work.



So the question, since theres no z probition in a G10L1, does a z offset
applied that way, actually get into the tool.tbl for use as TLO with a
G43 H? Looking at the Doc pdf, it does not say


Yes. From the docs: "A valid G10 L1 rewrites and reloads the tool table."
I have attached my toolset subs which may help. There is some extra 
stuff to tweak the limits, make sure the spindle is stopped, raise the 
setter etc but you can take that out.
You need to add some stuff to the ini file. All values are in machine 
coords:


[RS274NGC]
REMAP=G36 modalgroup=1 ngc=toolset
REMAP=G36.1 modalgroup=1 ngc=optional_toolset
REMAP=G37 modalgroup=1 ngc=clear_toolset


[TOOLSET]
#all coords are in machine coords
#Tool set Y (you probably don't want this one)
Y = 1393
#Rapid down to this height before probing
RAPID_Z = -60
#Tool set height (used to work out maximum distance for G38.2)
Z = -165
#Offset from tool setter to table
OFFSET = 5.75

G36 will do a toolset. G36.1 will do a toolset if that tool has not 
already been set in this session.
G37 will clear all toolset flags and force a new toolset next time G36.1 
is called
Note the toolset flags only work for the first 8 tools. Change 
clear_toolset to suit (probably best to use a loop rather than the way I 
did it). You'll also need to change line 8 of toolset.ngc.


Les


O SUB
O1030 IF[#[5000 + #5400] NE 1]
G36
O1030 ENDIF
O ENDSUB
M2
O SUB


O999 IF [#<_task> LT 1]
O999 return [-2]
O999 ENDIF

O1100 IF[[#5400 eq 0] or [#5400 gt 8]]
(abort, Tool number not known)
O1100 ENDIF

O CALL

g43 h#5400
M65 P2 ;normal soft limit
#[5000 + #5400] = 1 ;flag that this tool has been measured

O ENDSUB


O SUB
M5

M73; store current state

G21 (ATC position is in mm as per ini)
G90 (absolute)
M64 P2 ;Enable ATC soft limit

G53 G0 Z0
#2 = #5422
M64 P3; Raise tool setter
G53 G0 Y[#<_ini[TOOLSET]Y>]

M66 P1 L4 Q15; Wait for spindle to stop
O1101 IF[#5399 ne 0]
(abort, Spindle failed to stop)
O1101 ENDIF

G53 G0 Z[#<_ini[TOOLSET]RAPID_Z>]

M50 P0 ;Disable feed rate override
#1 = [#5422 + #<_ini[TOOLSET]Z> - #<_ini[TOOLSET]RAPID_Z>]

g38.2 z#1 f3000
M65 P3; Drop tool setter

g10 l1 p#5400 z[#5063 - #2 + #<_ini[TOOLSET]OFFSET>]

g53 g0 z0

O ENDSUB

M2
O SUB
#[5000] = 0
#[5001] = 0
#[5002] = 0
#[5003] = 0
#[5004] = 0
#[5005] = 0
#[5006] = 0
#[5007] = 0
#[5008] = 0

O ENDSUB
M2
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Parallel Port

2018-08-28 Thread Todd Zuercher
I have done a fair bit of testing, and pins (1,14,16,17) work as inputs in X 
mode, they don't output any voltage in the other modes, but their resistance to 
ground does change in those modes, so something is happening.  All the other 
pins seem to work fine.
My loadrt line in hal is :
loadrt hal_parport cfg="0xe030 out 0xe010 out"
Using loadrt hal_parport cfg="0 out 1 out" gives the same results.
If I try to use loadrt hal_parport cfg="0xe030 epp 0xe010 epp" I get two 
warning popups "Linux parallel port @65535 not found" and hal shows pins for 4 
parallel ports, but only port 0 seems to work.

lspci -v

06:00.0 Parallel controller: MosChip Semiconductor Technology Ltd. PCI 9865 
Multi-I/O Controller (prog-if 03 [IEEE1284])
Subsystem: Device a000:2000
Flags: bus master, medium devsel, latency 32, IRQ 19
I/O ports at e030 [size=8]
I/O ports at e020 [size=8]
Memory at fe503000 (32-bit, non-prefetchable) [size=4K]
Memory at fe502000 (32-bit, non-prefetchable) [size=4K]
Capabilities: 
Kernel driver in use: parport_pc
Kernel modules: parport_pc

06:00.2 Parallel controller: MosChip Semiconductor Technology Ltd. PCI 9865 
Multi-I/O Controller (prog-if 03 [IEEE1284])
Subsystem: Device a000:2000
Flags: bus master, medium devsel, latency 32, IRQ 17
I/O ports at e010 [size=8]
I/O ports at e000 [size=8]
Memory at fe501000 (32-bit, non-prefetchable) [size=4K]
Memory at fe50 (32-bit, non-prefetchable) [size=4K]
Capabilities: 
Kernel driver in use: parport_pc
Kernel modules: parport_pc

The output from "cat /proc/ioports |grep parport" is a bit odd. In that it 
doesn't give any actually usable memory addresses
~$ cat /proc/ioports |grep parport
- : parport1
- : parport1
- : parport0
- : parport0

Is it possible I damaged the card by testing it in X mode or that there is 
something wrong with the Cnc4pc C80 breakout boards I'm trying to use that 
wrecked them?  (I used a 470ohm resister to probe the port terminals to test 
with.)
Or is it more likely that this card never really worked right.


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

-Original Message-
From: Jon Elson  
Sent: Monday, August 27, 2018 9:07 PM
To: Enhanced Machine Controller (EMC) 
Subject: Re: [Emc-users] Parallel Port

On 08/27/2018 12:38 PM, Todd Zuercher wrote:
> I have a duel port PCIe parallel port card that I am trying to use in an 
> application, but I'm having a little trouble.
>
> My problem is that I can't seem to use the pins in the control groupe 
> (1,14,16,17) as outputs in the normal "out" or "in" configurations.  When set 
> up as out or in those pins seem to be dead.  If I configure the port in X 
> mode they do work as inputs.  I am at a bit of a loss with what to do.  I am 
> afraid that the breakout board I was trying to use might have messed up the 
> parallel port card, so I'm a little afraid to plug it into a known good 
> working machine.
>
>
Well, first thing is to put some LEDs on the outputs and use a par port test 
program to see what is going on.  Some boards have several modes (SPP, BiDir, 
EPP, ECP) that turn different driver strengths on.
And, probably some of these PCIe clone cards may just not work completely.  I 
am most involved with EPP mode, and there certainly are some cards out there 
that just don't work.  Also, some cards are totally non-standard register 
arrangement, and will only work with the maker's Windows driver supplied on a 
disc.

Jon


--
Check out the vibrant tech community on one of the world's most engaging tech 
sites, Slashdot.org! http://sdm.link/slashdot 
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Where can I get absolute, reference z home=0 z position?

2018-08-28 Thread Gene Heskett
On Tuesday 28 August 2018 09:22:12 Les Newell wrote:

> Hi Gene,
>
> > So, where do I get this absolute Z position to feed lincurve from?
>
> Assuming you have a cartesian machine joint.N.pos-fb is probably the
> way to go. That's what I used when I did something similar on my
> lathe.
>
> Les
>
That would likely work and well Les, if indeed that data is referenced to 
the machines location vis-a-vis its actually 0.00 at a g53 g0 z0. 
nothing else is such a permanent reference. I'll make some tests. If it 
moves with a touch off or tool loaded but not g43'd, its not too 
valuable.

Now to feed the missus and refill her coffee cup with freshly brewed, and 
I'll hang a halmeter on it and find out.

Thanks Les.
> --
> Check out the vibrant tech community on one of the world's
> most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users



-- 
Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page 

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Where can I get absolute, reference z home=0 z position?

2018-08-28 Thread Les Newell

Hi Gene,


So, where do I get this absolute Z position to feed lincurve from?


Assuming you have a cartesian machine joint.N.pos-fb is probably the way 
to go. That's what I used when I did something similar on my lathe.


Les

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Axis limit warning

2018-08-28 Thread Gene Heskett
On Friday 24 August 2018 17:39:50 Les Newell wrote:

> I have another issue that I think others have seen as well. Quite
> often when I run a program on my router I get a warning that the Z
> axis maximum limit will be exceeded. The code runs fine if I ignore
> the warning. The warning appears to be triggered by G53 G0Z0 at the
> end of the code. My maximum limit is Z1, minimum something like -200.
>
> Does anyone have any ideas of what is going on? As a workaround is
> there any way to tell Axis to never show this warning?
>
> Les
>
I think I may not have 100% grokked the z axis homing or tool setup.

Scenario:

Z home switch trips about 50 thou below top of post and offsets are 
supposedly from there in the rest of my homing setup,mainly  because I 
don't care for -z's in my code.

But homing does not apply a TLO, which can vary by 7 or 8 inches 
according to whats in this spindle for a tool at the time with this 
machine. So when I calculate the min limit, I'm effectively putting the 
spindle with no tool in it, about 25 thou from the table. With an r8 
spindle and er20 TTS holders, or a 5/8" drill chuck and drill, there 
simply is no way to achieve a consisten TLO measurement without finding 
the length with a g38.2 and writing that offset into the tool table, 
valid until the collet is loosened or if the drill is changed.

What I have been doing is feeding that offset into the co-ord map, which 
is not a fixed offset from the g53 g0 x0y0z0 mapping.  Since we do have 
an gcode editable tool.tbl, my present method is wrong, grossly so at 
times.

So the question, since theres no z probition in a G10L1, does a z offset 
applied that way, actually get into the tool.tbl for use as TLO with a 
G43 H? Looking at the Doc pdf, it does not say...

If so, then how can I save myself from the inevitable fubar by having an 
invalid flag applied to that H when a tool change is requested, making 
LCNC spit out an error indicating that the new tool is to be measured 
before first use. For me that might be a time killer, but I don't see a 
way around it. Perhaps zero that H, and use it for an error flag? That 
of course won't work if the g53 and the coord in use are not synched.

So I'm open to suggestions on how to proceed. My table has enough scars 
now.

> --
> Check out the vibrant tech community on one of the world's
> most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users



-- 
Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page 

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Where can I get absolute, reference z home=0 z position?

2018-08-28 Thread Gene Heskett
On Saturday 18 August 2018 15:53:15 Gene Heskett wrote:

Ping?

> Greetings guys;
>
> I have a little over 2 feet of 1/2" A2 chucked in the ER40 kit on the
> Sheldon, and I have pushed and pulled on the middle of it so its
> within about 6 thou to dead straight watching it turn slowly with a
> dial.  I had, when only about 1/4" was projecting from the ER40, put a
> center drill into the end of it, cutting very slowly so it would be
> fairly close to center, and watching the dial, it has about a 3.8 thou
> wobble about 1/4" from a snugged up dead center, and I've used that to
> center the tailstock. Elevation of course is still iffy. We'll ignore
> that for the moment.
>
> I'm about to install a lincurve/offset kit and adjust it to center the
> wobble up on the zero of the dial at as many places as I can, but to
> do that accurately, the lincurve reference input must not be effected
> by Z touch offs etc, only by the absolute Z position established when
> it was homed.
>
> It appears the bed is worn such that it would be turning about 3 thou
> small in the max wear in front of the spindle area, then fades in a
> relatively straight pattern from about a foot away to the end of my A2
> rod. So It's not quite Moglic time yet if lincurve and offset can be
> made to compensate.
>
> So, where do I get this absolute Z position to feed lincurve from?
>
> Poking around with a halmeter, I can't find  it. And the man page
> makes no mention of enabling motion.debug pins, which are 100%
> missing.
>
> Cheers all, Gene Heskett
>
> --
> "There are four boxes to be used in defense of liberty:
>  soap, ballot, jury, and ammo. Please use in that order."
> -Ed Howdershelt (Author)
> Genes Web page 
>
> --
> Check out the vibrant tech community on one of the world's
> most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> ___
> Emc-users mailing list
> Emc-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/emc-users



-- 
Cheers, Gene Heskett
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Genes Web page 

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] Fwd: [Machinekit] Re: RPI gipo help

2018-08-28 Thread TJoseph Powderly

Seb hello,

1) sorry to hear Jeff's change of plans,

best of luck to him,

he's been enormous in the linuxcnc development.

2) i been working on the hal_gpio for linuxcnc and

i got this email this morning (thailand 28 aug 2018)

i can loadrt already it and will test asap.
(
i dont have the changes made to the src yet,
i do know i cant compile as is.
I know it calls macros that specifically say they are not for userspace.

(hahaha i hand wrote out the whole code to try to find why it would not 
build,

 and had the notebook out when the email arrived :-)

tomp


 Forwarded Message 
Subject:[Machinekit] Re: RPI gipo help
Date:   Mon, 27 Aug 2018 19:36:53 -0700 (PDT)
From:   KL Chin 
To: Machinekit 



Hi Tim,

I still testing both.

1) LinuxCNC had already 2.8 but MachineKit still based on 2.6.
2) The StepConf was so slow with MachineKit.
3) The Gui sample works on LinuxCNC

BTW. I had attached the hal_gpio.so for LinuxCNC, may be you can try it.
Just copy to LinuxCNC rtlib folder. I just change few lines of the 
hal_gpio.c.


Regards,
KL Chin

On Tuesday, 28 August 2018 03:42:31 UTC+8, Timothy March wrote:

   KL Chin why are you using LinuxCnc instead of Machinekit? The
   hal_gipo only works with Machinekit there is no gipo driver for
   LinuxCnc.

   Tim

--
website: http://www.machinekit.io blog: http://blog.machinekit.io 
github: https://github.com/machinekit

---
You received this message because you are subscribed to a topic in the 
Google Groups "Machinekit" group.
To unsubscribe from this topic, visit 
https://groups.google.com/d/topic/machinekit/t2eCs09EvrU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to 
machinekit+unsubscr...@googlegroups.com 
.

Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.


hal_gpio.so
Description: Binary data
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Just in case anyone is interested in my tool changer...

2018-08-28 Thread Marcus Bowman


On 27 Aug 2018, at 21:44, Les Newell wrote:

> I uploaded a quick video of it in action 
> 
Nice action, and I like the logic for the tool length setting/not setting.

Marcus



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users