Re: [Emc-users] emc2 and kernel 2.6.20

2007-08-03 Thread Jeff Epler
The problem you report is fixed in CVS TRUNK:
http://cvs.linuxcnc.org/cvs/emc2/src/rtapi/rtai_rtapi.c.diff?r1=1.34;r2=1.35
this patch should apply cleanly to the 2.1 branch.

Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] emc2 and kernel 2.6.20

2007-08-04 Thread Jeff Epler
paul_c wrote:
 Attached, configure  make logs for emc2-2.1.7 released on July 30th.

On Sat, Aug 04, 2007 at 07:46:38AM -0400, Jack Ensor wrote:
 Thanks, Paul.  I already downloaded 2.1.7 via the update manager a day 
 or so ago.  What I don't understand is your file is only about 8K and 
 when I updated it was over 5M. Why the difference or do I need to do 
 something with what you sent me?
 
 Jack Ensor

If you are using Ubuntu and installed 2.1.7 using the update manager, you
don't need to do anything else.

Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] OT Encoder Question

2007-08-07 Thread Jeff Epler
On Mon, Aug 06, 2007 at 08:03:23PM -0700, richard harris wrote:
 Perhaps this is why Hardinge/Bandit cost so much half the wires go
 nowhere  and and there to confuse you.  Mission Accomplished.

This is quite funny. Thanks for sharing your story.

Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Macro Language

2007-08-15 Thread Jeff Epler
In emc2, these are known as parameters.  The # character is used to
set them or use their values.

A parameter can be set with gcode like
#43=4000
and used like this:
X10 Y10 F#43

Math is supported:
#43=[sin[45] * 300]
and can be used anywhere a number would be used:
X10 Y10 F[sin[45]*300]

Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Macro Language

2007-08-15 Thread Jeff Epler
On Wed, Aug 15, 2007 at 03:16:35PM +0200, Sven Mueller wrote:
 Ask user to define minimum and maximum X, Y and Z positions by moving
 the tooltip to the relevant positions manually or by entering the values
 numerically. Then use a procedural (possibly recursive) approach to scan
 the work pieces surface with a touch probe.

O-words are powerful enough to represent looping and recursion.  Even
before O-words, variables and expressions were available in emc's
gcode.

However, there is no gcode for allow the user to jog to a position then
signal the program to continue.  In fact, allowing something like this
is a big change because running a program and ready to jog were
designed as mutually exclusive, and this is deeply ingrained in many
places including the GUIs and the task controller.  (there is a
similar division between running a program and homing an axis which
makes the occasionally requested execute homing procedure gcode
difficult to implement too)

Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Pluto (is not a planet)

2007-08-15 Thread Jeff Epler
The change in emc2.2 will be to allow any number of counts per index, so
long as the maximum number of counts per servo cycle is within the
permitted range.  I made this change for sam and his 10160-count
encoder, but I am not sure he's actually tested it with the updated
version.

Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Proglem with EMC script - understanding error message

2007-08-16 Thread Jeff Epler
When emc shows an error message with a line number, it refers to the
physical line number in the file, not an O- or N-number.

In emc 2.1, parameters are numbers, not letters.  So, for instance, you
can't write
#D=1.4
you must write
#7=1.4
and remember that later on, #7 refers to the o.d. of the part you're
making.

I spotted another error further down:
 Y-[#L]
Unfortunately emc2 gcode omits the negation operator.  You could write
this as
Y[-1*#8]
or
Y[0-#8]
but what you wrote will not be accepted.

Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Proglem with EMC script - understanding error message

2007-08-16 Thread Jeff Epler
I spotted several more errors in your program.

 #10 = 1.4( o.d )
...
 #22 = 90(final arc angle)
Parameters up to 30 are used for subroutine arguments.  Use parameters
above 30 for global variables:

#40 = 1.4( o.d )
...
#52 = 90(final arc angle)

 o200 sub(rounds half top of pinion leaf in several steps)
 do
 G0 Z[[sin[#10]/[#20]] X[[cos[#10]/[#20]]
 G1 Y[#14] F4
 G0 Y[0-[#14]]
 G0 A[#21]
 #10 = [[#10]+[#21]]
 while [#10] LT [#22]
 endsub

Numbers are required for the beginning and end of a subroutine, loop, or
conditional.  So your code should look more like:
O200 sub ...
O201 do
...
O201 while ...
O200 endsub
It's the missing O100 for the first endsub that makes emc run off
the end of the program without doing anything -- it's looking for O100
endsub and nothing else will do.

 while [#10] LT [#22]
the correct syntax is
O201 while [#10 LT #22]

 G1 Y[#14] F4
Brackets are not necessary here, but not harmful either

 N0500 [#17] = [#17] + 1(increment counter)
The correct bracketing is:
#17=[#17+1]
In addition to the original, these are both incorrect:   
[#17]=[#17+1]
#17=[#17]+1

 G0 Z[[sin[#10]/[#20]] X[[cos[#10]/[#20]]
The correct bracketing is:
G0 Z[sin[#10]/#20]
if you want to compute what would be written sin(x)/y in many other
languages, or
G0 Z[sin[#10/#20]]
if you want to compute what would be written sin(x/y) in many other
languages.

 N2000 o200 call [#10][#14][#20][#21][#22]
Inside O200 sub, you refer to #10, #14, #21, #21, and #22 which are the
numbers of the variables you intended to be global.  You could either
omit these parameters from O200 call and use the global variable numbers
once you renumber them to be above 30.  Or, inside O200 sub you could
refer to them as #1 through #5.

On Thu, Aug 16, 2007 at 11:24:07PM +0100, [EMAIL PROTECTED] wrote:
 Hi again,
 
 Thanks to everyone who responded to my earlier mailing. As a result and 
 after a considerable rewrite and correction I have now managed to get 
 the script to load - however, it does nothing!! When I hit 'R' or press 
 the play button, the screen flashes briefly and returns to the stop 
 state - the machine doesn't even twitch...
 Do I have a problem in trying to run nested 'do - while' loops, its the 
 only thing I can think of that might do nothing. there are no error 
 messages displayed.
 Here is the rewritten script - any advice would be very welcome. 
 Thanks.. Ian
 
 %
 #10 = 1.4( o.d )
 #11 = 0.38(root dia)
 #12 = [[#10 - #11] / 2](cut depth)
 #13 = 5(number of teeth)
 #14 = 4(length of cut)
 #15 = [360/[#13]](angular increment)
 #16 = 0.09(cutter thickness)
 #17 = 1(counter)
 #18 = 1(tooth counter)
 #19 = 10(step angle for rounding)
 #20 = [[#10]/2](radius of work)
 #21 = 10(increment for rounding steps)
 #22 = 90(final arc angle)
 
 o100 sub(cuts one slot in blank)
 G1 X[[#12]/2] F4
 G1 Y[#14] F4
 G0 Y[0-[#14]]
 G1 X[#12] F4
 G1 Y[#14] F4
 G0 Y[0-[14]]
 endsub
 
 o200 sub(rounds half top of pinion leaf in several steps)
 do
 G0 Z[[sin[#10]/[#20]] X[[cos[#10]/[#20]]
 G1 Y[#14] F4
 G0 Y[0-[#14]]
 G0 A[#21]
 #10 = [[#10]+[#21]]
 while [#10] LT [#22]
 endsub
 
 o300 sub(rounds other half top of pinion leaf in several steps)
 do
 G0 Z[0-[[sin[#10]/[#20]] X[[cos[#10]/[#20]]]
 G1 Y[#14] F4
 G0 Y[0-[#14]]
 G0 A[0-[#21]]
 #10 = [[#10]+[#21]]
 while [#10] LT [#22]
 endsub
 
 N0100 G92 X0 Y0 Z0(set axes to zero)
 N0200 G21 G91(metric units, incremental moves)
 
 N0300 do(first cut of pinion leaves)
 N0400 o100 call [#12][#14]
 N0500 [#17] = [#17] + 1(increment counter)
 N0600 G0 A[360/[#13]](rotate work one tooth distance)
 N0700 while [#17] LT 5
 
 N0800 [#17] = 1(set counter back to 1)
 N0900 G0 A[0-[[#15]/3]](rotate by thickness of pinion leaf and)
 N1000 G0 Z[#16](move cutter - saw - to other side of leaf)
 N1100 do(cut other side of pinion leaves)
 N1200 o100 call [#12][#14]
 N1300 [#17] = [#17] + 1
 N1400 G0 A[0-[360/[#13]]]
 N1500 while [#17] LT 5
 N1600 [#17] = 1(set counter back to 1)
 N1700 G0 A[[#15]/6](move cutter to centre of leaf)
 N1800 G0 Z[0-[[#16]/2]( )
 N1900 do(round over half the leaf and repeat for all leaves)
 N2000 o200 call [#10][#14][#20][#21][#22]
 N2100 #17 = [#17] + 1
 N2200 G0 A[360/[#13]]
 N2300 while #17 LT 5
 
 N2400 #17 = 1(set counter back to 1)
 N2500 G0 Z0 A-90(set cutter and pinion leaf back to centre)
 N2600 G0 Z[[#16]/2]
 N2700 do(round over other half the leaf and repeat for all
 
 leaves)
 N2800 o300 call [#10][#14][#20][#21][#22]
 N2900 #17 = [#17] + 1
 N3000 G0 A[0-[360/[#13]]]
 N3100 while #17 LT 5
 
 N3200 #17 = 1(clean up)
 N3300 G0 X-20 Z40 Y50(retract tool)
 N3200 G30
 %
 
 -- 
 Best wishes,
 
 Ian
 
 Ian W. 

Re: [Emc-users] Floating Z (solenoid on PCB Mill) Hal configuration

2007-08-16 Thread Jeff Epler
Thanks -- I imagine this will be helpful to anyone with a similar
system.

the only thing that comes to mind is that the time emc spends on the Z
motion had better be long enough for the solenoid to completely lower --
does this take long on your machine, or does it snap right down to the
right depth before you can blink?

Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Proglem with EMC script - understanding error message

2007-08-17 Thread Jeff Epler
On Fri, Aug 17, 2007 at 11:15:29AM +0100, [EMAIL PROTECTED] wrote:
 Just a couple of points I'm not completely clear on - in the 
 above example, are line numbers needed on every line of the 
 subroutine or just at the ends?

O-numbers are required on lines where the flow control words such as
sub, endsub, do, while are used.  The interpreter uses these
numbers to match up the beginning and end of a subroutine or a loop.

O-numbers on other lines are not permitted, so this is incorrect gcode:
O200 G0 X0 Y0 Z0

 Also, would it be normal to use different variable numbers 
 in the different subroutines, - i.e. 1-3 in subroutine o100 
 and 4-8 in subroutine o200 or would it confuse the 
 subroutine call? I just wondered if the variables 1-3 are 
 forgotten after the first subroutine ends or not and how 
 starting at 4 might confuse the passing of variables from 
 the second subroutine call?

Each subroutine gets its first argument in #1, its second argument in
#2, and so on up to a maximum of #30.  At the end of the subroutine, the
former values in #1 up to #30 are restored[1].  If there are values that
you want to use from one call of o100 to the next, then they need to be
stored in #31 and above.

 Oh, and is there an upper limit to the number of variables - 
 could the global variables be numbered from 100 up..

Subroutine locals are #1 through #30 inclusive.  #31 through #5000 are
for global use, because they're neither modified by O- call nor
restored by O- endsub.  Above #5000 is reserved for internal interpreter 
stuff,
like the result of a G38.2 probe, the origin of the coordinate systems,
and so on.

Jeff
[1] at least, they're supposed to be, but this bug has been reported:
http://sourceforge.net/tracker/index.php?func=detailaid=1772411group_id=6744atid=106744

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Proglem with EMC script - understanding error message

2007-08-17 Thread Jeff Epler
On Fri, Aug 17, 2007 at 05:31:38PM +0100, [EMAIL PROTECTED] wrote:
 N0300 do  (first cut of pinion leaves)

With do you need an O-number, and the matching O-number at the while

Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Macro Language

2007-08-17 Thread Jeff Epler
That's right, the named parameters and named O-words are in the
version that will be known as 2.2, not the current stable version.

Anyone can download, compile, and use the development version, but it
may not be a task for linux beginners:

http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Installing_EMC2#On_Ubuntu_5_10_and_6_06_from_source

Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Interactive machining

2007-08-17 Thread Jeff Epler
AXIS can automatically execute a filter program when loading a
machinable file.  You can also use the NML messages for issuing MDI
commands to feed your program in line-by-line.  (I just verified that,
at least in the development version of emc 2, this doesn't kill blending
altogether, though it's likely that blending degrades more quickly when
fed by MDI than by file)

Personally, I lean towards using filters because then I benefit from the
preview plot.

Using tcl as a gcode preprocessor: http://axis.unpy.net/01167315565

To make .gcl files openable in axis, put this in your inifile:
PROGRAM_EXTENSION .gcl TCL-preprocessed gcode
gcl = /path/to/gcode.tcl
and make gcode.tcl executable

Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Stepper Power Supplies

2007-08-19 Thread Jeff Epler
I glanced through that PDF and the numbers, formulas, and circuits look
pretty typical for unregulated linear power supplies.

Unregulated linear power supplies are considered the best kind for
running steppers with chopper or current limiting stepper drivers.
The power supply is simple, though the capacitors and transformers can
be expensive.

If you are not using gecko drives, the only calculation that is likely
to vary is the desirable voltage: different driver circuits will have
different minimum and maximum voltages.

Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Interactive machining

2007-08-19 Thread Jeff Epler
In emc, there are lots of ways to interact with the running system
besides using gcode.

These two ways are called NML and HAL.  Using NML, for instance, any
userspace program can retrieve the current position of the machine and
lots of other details about it.  Any information displayed in the AXIS
GUI or in the EMC Status window comes from NML, and any action that
AXIS takes when you press a key or click a button is achieved through
NML.  If you want to script a series of actions like those taken in the
GUI (such as: home all axes, open gcode file, begin execution) then you
want to write a program to send NML messages.  Small examples of this in
Python are in the included mdi script, or another script I called
jdi: http://axis.unpy.net/01167419757

Using HAL, you can read and write values such as hardware inputs and
outputs.  There are a large number of predefined realtime components
(such as 'and', 'or', 'compare', 'limit', 'timedelay', 'oneshot') as
well as ClassicLadder which allows you to draw ladder diagrams.  The
inputs can depend on such things as 'is a program running', 'is a
tool-change requested', and so on.

By writing a new userspace or realtime HAL component, then connecting it
with a .hal file, you can do a wide range of things.  For instance,
hal_input is a userspace HAL component written in python which makes
any Linux-recognized input device into a series of HAL pins.  With the
proper .hal file, this allows you to jog your machine using a joypad,
assign its buttons to cycle start, and so on.  If I had not already
written hal_input and had it bundled with emc2, anybody else who had the
idea and the exepertise could have too.

The problem is not that emc is not customizable and extensible in a wide
variety of ways -- the problem is a lack of documentation and examples
that are accessible to the typical user.

Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Axis File Open

2007-08-19 Thread Jeff Epler
On Sun, Aug 19, 2007 at 02:41:55PM -0500, John Thornton wrote:
 Is there a way to change the file open dialog in Axis to see .ngc 
 files without regard to case? 

In the inifile section [FILTER], add a line that reads
PROGRAM_EXTENSION = .[nN][gG][cC] rs274ngc gcode file
you can add any other extensions you like in this area.

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Stepper Power Supplies

2007-08-19 Thread Jeff Epler
You will need to make sure the power dissipated within the '317 is in
the safe operating area -- Power dissipated is (Vin - Vout) * Ilim and
becomes unmanagably large pretty quickly.  You will certainly not be
able to follow the guideline of 20x faceplate voltage from geckodrive
documentation.  Iout = Iin, so you must also size your DC power supply
larger than documents written for geckodrive or other switching stepper
drivers.

Most stepper drivers use methods similar to a buck-mode switching
regulator to give the desired amount of current in the motor
windings--the motor winding itself is the inductor.  This kind of driver
has much lower power dissipation than a simple linear power supply.

Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Axis File Open

2007-08-20 Thread Jeff Epler
In one of the other sample configurations (sim/axis), the [FILTER]
section looks like this:
[FILTER]
PROGRAM_EXTENSION = .png,.gif,.jpg Grayscale Depth Image
PROGRAM_EXTENSION = .py Python Script

png = image-to-gcode
gif = image-to-gcode
jpg = image-to-gcode 
py = python

When you select a .png, .gif, or .jpg file it's sent to image-to-gcode
http://linuxcnc.org/docs/2.1/html/gui/image-to-gcode/index.html
and the gcode produced by image-to-gcode is then loaded into emc.

When you load a .py file it is executed, and the lines it prints are
treated as gcode.

Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Foam cutting configuration

2007-08-20 Thread Jeff Epler
[TRAJ]AXES should probably be set to 8.  Here's the explanation from the
documentation:
One more than the number of the highest joint number in the system.
For an XYZ machine, the joints are numbered 0, 1 and 2; in this case
AXES should be 3. For an XYUV machine using ``trivial kinematics'',
the V joint is numbered 8 and therefore AXES should be 9. For a
machine with nontrivial kinematics (e.g., scarakins) this will
generally be the number of controlled joints. 
http://linuxcnc.org/docs/devel/html/config/ini_config/index.html#hue432

In the .hal files, the number of stepgen should be 4:
loadrt stepgen step_type=0,0,0,0
and the correspondance between axis numbers, axis names, and stepgen
numbers will be:
Axis Name   Axis #  Stepgen #
X   0   0
Y   1   1
U   6   2
V   7   3

Thanks for jumping in and trying out this new  only sparsely documented
feature.  I hope we can help you get it working.

Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Foam cutting configuration

2007-08-20 Thread Jeff Epler
On Mon, Aug 20, 2007 at 02:59:39PM -0500, Jeff Epler wrote:
 [TRAJ]AXES should probably be set to 8.  Here's the explanation from the
 documentation:
 One more than the number of the highest joint number in the system.
 For an XYZ machine, the joints are numbered 0, 1 and 2; in this case
 AXES should be 3. For an XYUV machine using ``trivial kinematics'',
 the V joint is numbered 8 and therefore AXES should be 9. For a
 machine with nontrivial kinematics (e.g., scarakins) this will
 generally be the number of controlled joints. 
 
 http://linuxcnc.org/docs/devel/html/config/ini_config/index.html#hue432

Just as I was posting this, another developer noticed that the
documentation was incorrect.  The corrected text reads:
the V joint is numbered 7 and therefore AXES should be 8.

I think the rest of what I said in my message is correct.

Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Foam cutting configuration

2007-08-20 Thread Jeff Epler
On Mon, Aug 20, 2007 at 03:03:27PM -0600, Ryan Hulsker wrote:
 Ok, thanks for your help (Chris too), I seem to have it working now.

Yay!  I am excited to hear it.  If you want to, create a page on our
wiki (wiki.linuxcnc.org, follow instructions on page BasicSteps to be
able to add  edit pages) with some information  photos when you have
them.  Other people have done this with their new or unusual types of
machines:
http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Alex_Joni's_Toy
http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Koppi's_Toy

 A question about feed rates. From the quick testing I have just done it
 looks like it always tries to apply the feed rate to the XY axes, and
 scales the feed rate for the UV to match so that they all reach their
 end point at the same time.  Unless your feed rate at XY causes the UV
 to overrun the max, or any individual axis to overrun its max speed,
 then the XY is scaled down until UV are running at their max.  Does this
 sound correct?  Seems like the right thing to do to me.
 
 Just wanted to make sure that it is treating the XY and UV as two
 separate pairs from which to calculate 2 separate combined feed rates to
 apply the max.

The rules are a bit complex.  Chris described them like this (I think
some variation of this is in the documentation as well):

If any of XYZ are moving, F is units per minute in the XYZ
cartesian system, and all other axes (UVWABC) move so as to start
and stop in a coordinated fashion.

Otherwise:

If any of UVW are moving, F is units per minute in the UVW
cartesian system, and all other axes (ABC) move so as to start and
stop in a coordinated fashion.

Otherwise:

The move is pure rotary motion and the F word is in rotary units
instead of linear, in the ABC (pseudo)cartesian system, as
originally described in NGC 2.1.2.5(B,C) :
http://www.linuxcnc.org/handbook/RS274NGC_3/RS274NGC_32a.html#1010695

if emc violates a machine constraint (e.g., moves V at 2 units/second
instead of the inifile max of 1 unit/second) it's a bug, please report
it.  Before emc 2.0.x, we did extensive testing in 4-axis XYZA setups to
eliminate these bugs, but it would not be surprising to learn that there
are some added by the 9 axis code.

As far as writing gcode for XYUV goes, you may wish to consider G93 inverse
time feed mode, where the F-number is the number of minutes the move
should take to complete, and it is specified on each line with a G0
move.  CAM software may have a more complete view of just how the cutter
is moving through the foam, and expressing the desired feed rate in
minutes per move may be better than in XY inches per minute if XY
moves, or UV inches per minute otherwise.

 I am assuming that cutter compensation to handle a variable width kerf
 depending on feed rate, and applying it to 2 different sets of axes is
 not handled by standard g-code?  So I am planning on incorporating it
 into my g-code generator.

That's right, cutter compensation remains XY-only.  Again, your CAM
hopefully has a more complete idea just what is going on, and can apply
appropriate offsets to X, Y, U and V.

Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] m101 Turret Program

2007-08-21 Thread Jeff Epler
G4 delays in gcode and sleep delays in shell scripts are both
non-realtime.  The delay you get will always be at least .2 seconds, but
may be longer.

Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Interactive machining

2007-08-22 Thread Jeff Epler
On Wed, Aug 22, 2007 at 02:35:03AM +0200, Michel Gouget wrote:
 Is it difficult, very difficult or extremely difficult to add an NML+HAL
 library to python?

It's already there -- it's the basis for such neat things as AXIS, the
hal_input userspace driver, and so on.


Help on module hal:

NAME
hal - Interface to emc2's hal

FILE
/usr/lib/python2.4/site-packages/hal.so

DESCRIPTION
This module allows the creation of userspace HAL components in Python.
This includes pins and parameters of the various HAL types.

Typical usage:

import hal, time
h = hal.component(component-name)
# create pins and parameters with calls to h.newpin and h.newparam
h.newpin(in, hal.HAL_FLOAT, hal.HAL_IN)
h.newpin(out, hal.HAL_FLOAT, hal.HAL_OUT)
h.ready() # mark the component as 'ready'

try:
while 1:
# act on changed input pins; update values on output pins
time.sleep(1)
h['out'] = h['in']
except KeyboardInterrupt: pass

When the component is requested to exit with 'halcmd unload', a
KeyboardInterrupt exception will be raised.

CLASSES
__builtin__.object
component
exceptions.Exception
error

class component(__builtin__.object)
 |  HAL Component
 |  
 |  Methods defined here:
 |  
 |  __delattr__(...)
 |  x.__delattr__('name') == del x.name
 |  
 |  __delitem__(...)
 |  x.__delitem__(y) == del x[y]
 |  
 |  __getattribute__(...)
 |  x.__getattribute__('name') == x.name
 |  
 |  __getitem__(...)
 |  x.__getitem__(y) == x[y]
 |  
 |  __init__(...)
 |  x.__init__(...) initializes x; see x.__class__.__doc__ for signature
 |  
 |  __len__(...)
 |  x.__len__() == len(x)
 |  
 |  __repr__(...)
 |  x.__repr__() == repr(x)
 |  
 |  __setattr__(...)
 |  x.__setattr__('name', value) == x.name = value
 |  
 |  __setitem__(...)
 |  x.__setitem__(i, y) == x[i]=y
 |  
 |  exit(...)
 |  Call hal_exit
 |  
 |  newparam(...)
 |  Create a new parameter
 |  
 |  newpin(...)
 |  Create a new pin
 |  
 |  ready(...)
 |  Call hal_ready
 |  
 |  setprefix(...)
 |  Set the prefix for newly created pins and parameters
 |  
 |  --
 |  Data and other attributes defined here:
 |  
 |  __new__ = built-in method __new__ of type object
 |  T.__new__(S, ...) - a new object with type S, a subtype of T

class error(exceptions.Exception)
 |  Methods inherited from exceptions.Exception:
 |  
 |  __getitem__(...)
 |  
 |  __init__(...)
 |  
 |  __str__(...)

FUNCTIONS
pin_has_writer(...)
Return a FALSE value if a pin has no writers and TRUE if it does

DATA
HAL_BIT = 1
HAL_FLOAT = 2
HAL_IN = 16
HAL_IO = 48
HAL_OUT = 32
HAL_RO = 16
HAL_RW = 48
HAL_S32 = 3
HAL_U32 = 4


Help on module emc:

NAME
emc - Interface to EMC

FILE
/usr/lib/python2.4/site-packages/emc.so

CLASSES
__builtin__.object
command
error_channel
ini
positionlogger
stat
exceptions.RuntimeError(exceptions.StandardError)
error

class command(__builtin__.object)
 |  Methods defined here:
 |  
 |  __init__(...)
 |  x.__init__(...) initializes x; see x.__class__.__doc__ for signature
 |  
 |  abort(...)
 |  
 |  auto(...)
 |  
 |  brake(...)
 |  
 |  debug(...)
 |  
 |  feedrate(...)
 |  
 |  flood(...)
 |  
 |  home(...)
 |  
 |  jog(...)
 |  
 |  load_tool_table(...)
 |  
 |  mdi(...)
 |  
 |  mist(...)
 |  
 |  mode(...)
 |  
 |  override_limits(...)
 |  
 |  program_open(...)
 |  
 |  reset_interpreter(...)
 |  
 |  set_block_delete(...)
 |  
 |  set_optional_stop(...)
 |  
 |  spindle(...)
 |  
 |  spindleoverride(...)
 |  
 |  state(...)
 |  
 |  teleop_enable(...)
 |  
 |  teleop_vector(...)
 |  
 |  tool_offset(...)
 |  
 |  traj_mode(...)
 |  
 |  wait_complete(...)
 |  
 |  --
 |  Data and other attributes defined here:
 |  
 |  __new__ = built-in method __new__ of type object
 |  T.__new__(S, ...) - a new object with type S, a subtype of T
 |  
 |  serial = member 'serial' of 'emc.command' objects

class error(exceptions.RuntimeError)
 |  Method resolution order:
 |  error
 |  exceptions.RuntimeError
 |  exceptions.StandardError
 |  exceptions.Exception
 |  
 |  Methods inherited from 

Re: [Emc-users] intro and question about Jeff Epler's Etch CNC servo driver board

2007-08-23 Thread Jeff Epler
On Thu, Aug 23, 2007 at 10:40:02AM -0600, Sebastian Kuzminsky wrote:
 About the circuit, what is the purpose of resistors R1-R4?  They look like
 pull-up resistors for the encoder outputs.

The encoder I had used OC drivers, so the resistors were the recommended
circuit.  If your encoder has push-pull drivers, then the resistor may
be inappropriate or unneeded.

If in doubt, refer to the documentation for your encoder and follow its
recommended circuit design.

 I have only a vague understanding of back EMF off electric motors.
 I believe that the diodes D2-D9 are there to protect the L298 and
 the power supply from back EMF.  Is that right?  How does that work?
 (I know, vague question, sorry.)

The reasons are exactly the same as for a reverse diode in a simple
relay: when the H-bridge switch turns off, the voltage across the
inductor rises.  The diode allows this voltage to be dumped into the
supply rails, limiting the reverse voltage across the switch to a diode
drop.  The other reason is simply that this is the recommended setup in
the L298 datasheet.

 If I hook up a power supply to the servo drive circuit, then also connect
 the computer's parallel port to the drive circuit, isn't that creating
 a giant ground loop?  The house wiring ground goes through the computer
 power supply, out the parallel port, to the drive circuit ground, which
 is also connected to the motor power supply ground, and back to the
 house wiring ground.  Isn't that bad?  Is it something to worry about?
 Should there be optical isolation somewhere to interrupt the ground loop?

This setup, without isolation or attention to grould looks has worked OK
in the etch-servo (though honestly there's no way I will tell if some
quadrature transitions were lost, as sloppy as that machine is).  It also
worked OK for a sherline lathe retrofit, though noise reared its head
when using an SSR to switch the spindle motor on and off.  That may or
may not scale to larger systems with bigger voltages, currents, and
noise sources.  For a real machine, you want to pay careful attention to
grounding and isolation for safety reasons as well as reliability
reasons, and I do not have the depth of knowledge to answer those
questions well.

Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Pumakins module missing

2007-08-25 Thread Jeff Epler
To use the puma kinematics, you need to compile the complete development
version of emc2, not just pull a few files from the development version
and add them to your installed version.

You can compile the development version without disturbing any of the
files from your installed version.  Instructions are located on our
wiki:

http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Installing_EMC2#On_Ubuntu_5_10_and_6_06_from_source

Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Has Anyone Seen Comp?

2007-08-25 Thread Jeff Epler
It is part of the emc2-dev package

Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Has Anyone Seen Comp?

2007-08-25 Thread Jeff Epler
On Sat, Aug 25, 2007 at 05:23:52PM -0400, Stephen Wille Padnos wrote:
 Kirk Wallace wrote:
 
 I did a find on my Ubuntu 6.06/EMC 2.1.7 install and can't find comp. I
 would like to use it to compile a new component. Thanks.
   
 
 I think you need a full checkout to use comp.  Comp is really a 
 preprocessor that outputs C code, which is then compiled like any other 
 component.  It's necessary to use the same compiler and settings when 
 compiling a component, so distributing comp separately would be a chore, 
 I think.
 
 If you follow the instructions on the wiki here 
 http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Installing_EMC2#On_Ubuntu_5_10_and_6_06_from_source,
  
 you should be able to get things going.  It's easy, as long as you have 
 a net connection :)

Incorrect -- you should be able to develop new hal realtime components
just by installing emc2-dev, not by recompiling all of emc2 from source.

Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] etch-servo

2007-08-29 Thread Jeff Epler
On Wed, Aug 29, 2007 at 10:50:02AM -0600, Sebastian Kuzminsky wrote:
 I'm looking at the etch-servo config in emc2-trunk, and I'm not seeing
 pwmgen.*.pwm-freq getting set.  Does that mean it's left at 0, and pwmgen
 does PDM?

Yes, I think that's true.

Because the on- and off- times are long (1 base-period, typically 20us
to 50us -- I don't remember the actual setting used in etch-servo) this
is not a problem for typical transistor drivers like the l298 I used.

Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Turret.comp Install Errors

2007-08-30 Thread Jeff Epler
Yet again you had me scratching my head.

state is a name used internally by comp, so you get weird compile
errors when you also use it for a parameter name.  I changed the
name to state_ through the whole file, and also fixed a few other
typos.  You can find my corrected version below.

Jeff


component turret This component controls the turret hardware for Kirk 
Wallace's Hardinge HNC turret. It moves the turret to the last T word value 
entered. (Invoked by M6);
pin in bit tool_change A .hal file should connect this to 
iocontrol.X.tool-change.;
pin in bit match A .hal file should connect this to s32equal.X.out which 
should be the result of a check for a match between the requested and current 
tool.;
pin out bit tool_changed A .hal file should connect this to 
iocontrol.X.tool-changed to indicate to EMC when the position change is 
complete.;
pin out bit seek Connect this pin via .hal file to the turret rotate solenoid 
signal.;
pin out bit stop Connect this pin via .hal file to the turret stop solenoid 
signal.;
param rw s32 state_ This parameter holds the value of the current state of the 
turret change process; idle, seeking, stopping, parking.;
param rw s32 settle This parameter holds the initial value and then the count 
down of servo periods to allow settling of the turret mechanism before invoking 
next state proceedure.;
param r s32 stop_settle This is the initial settle time in servo periods 
between activating the stop solenoid and when the turret comes to rest.;
param r s32 park_settle This is the initial settle time in servo periods 
between deactivating the turret rotate solenoid and when the turret descends to 
the park position.;
function _ nofp;
;;
MODULE_LICENSE(GPL);
FUNCTION(_) {
if (tool_change) {
if (!match) {
switch (state_) {
case 1:
seek=1;
state_=2;
break;
case 2:
if (match) {
stop=1;
settle=stop_settle;
state_=3;
}
break;
case 3:
--settle;
if (settle=0) {
seek=0;
settle=park_settle;
state_=4;
}
break;
case 4:
--settle;
if (settle=0) {
stop=0;
state_=1;
tool_changed=1;
}
break;
default:
state_=1;
break;
}
}
}
}

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Axix Touchoff data

2007-09-03 Thread Jeff Epler
On Mon, Sep 03, 2007 at 10:54:19AM -0400, Jack Ensor wrote:
 Where is Touchoff data stored?

In the rs274 parameters set aside for this purpose.
http://linuxcnc.org/docs/2.1/html/gcode/main/#sub:Parameters

axis touch off simply issues a 'G10 L2' command as if in MDI mode.

Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Need advice on building a mill controller with EMC2

2007-09-05 Thread Jeff Epler
On Wed, Sep 05, 2007 at 09:45:49PM +0200, Gerhard Pircher wrote:
 The Mesa card looks interesting. Do you use it with the SoftDMC Digital
 Motion Control Firmware?

With emc2, the hostmot firmware is used.

With hostmot, emc sends velocity commands and reads encoder counts,
performing closed-loop operation and pid control in the emc software.

Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Xylotex Stepper Board

2007-09-09 Thread Jeff Epler
I'm using a xylotex 3-axis board.  I'm pretty happy with it so far.  For
whatever reason, my machine moves reliably at higher speeds (70ipm
instead of 40ipm) in half-step mode than 1/8 step mode, though most
people seem to prefer using the board in 1/8 step configuration.

The connections are very simple: PC to xylotex with DB25 M-F cable;
24VDC connection from power supply to xylotex; 4-wire connections from
xylotex to each motor.

In stepper_inch.ini or stepper_mm.ini, change standard_pinout.hal to
xylotex_pinout.hal

There are probably other all-in-one boards, and emc should work with any
board that takes step+direction inputs that match the PC parport for
voltage and current requirements.

Geckos also work fine, though I understand that the other models
*besides* 203V have input current requirements that may not be met by
all parports, leading to the use of an extra board in between with its
own 5V supply and line driver IC.  Someone who's actually used geckos
should add them to the wiki.

Jeff

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Compiling a new kinematic

2007-09-11 Thread Jeff Epler
'comp' is the tool for compiling HAL components that are implemented in
a single .c file.  Kinematics modules are one kind of HAL component.

If you are using the package version, install emc2-dev and
build-essential packages using Package Manager or the commandline.

Then, use 'comp' to compile and install a new kinematics module:
comp --compile yourkins.c  # compile yourkins.c
or
sudo comp --install yourkins.c # compile and install yourkins.c

These instructions should work for emc 2.1.7 and for the development
version of emc.

Jeff

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Homing - zeroing - touch off

2007-09-11 Thread Jeff Epler
There are a bunch of different things that affect the relationship
between machine coordinates and gcode coordinates.

G5x coordinate systems:
At any time, one G5x coordinate system is in effect.  Normally the
G54 coordinate is in effect at emc startup and after readahead
reaches M2.

You can set the offsets of the nine program coordinate systems
using G10 L2 Pn (n is the number of the coordinate system) with
values for the axes in terms of the absolute coordinate system.

G54 corresponds to P1, G55 to P2, and so on.

Generally, G5x offsets are saved even when exiting emc.

G92 coordinate offset
The G92 coordinate offset is programmed by G92, and also affected by
M2, G92.1, G92.2 and G92.3 as documented in the gcode manual.
http://linuxcnc.org/docs/html/gcode/main/#sub:G92_-G92.1_-G92.2_
Particularly due to the way the G92 coordinate offset is disabled if
the interpreter readahead reaches M2, many users find that the
behavior of G92 is confusing.

G43 Tool offset
When G43 is in effect, the Z coordinate is modified by the tool
length.  On lathes, G43 can offset both X and Z

All three of these (G5x coordinate system (one is always in effect), G92
coordinate offset (unless disabled by G92.1 or G92.2), and G43 tool
offset (when enabled)) are combined to get the coordinate value
shown on the AXIS DRO when Relative coordinates are selected.  When
the Relative coordinates are different than the Machine coordinates,
AXIS draws a cyan icon at the machine origin and the tricolor coordinate
system marker at the origin of the relative coordinate system.


Home (GUI button):
In a machine with home switches, use these home switches to move the
axis to its home location.

In a machine without home switches, notify emc that the current axis
position has been manually jogged to the home position.

Even in a machine without home switches, you should establish and
use a home position.  After homing, the inifile soft limits are
applied, so you can be confident that the machine will not walk the
table right off the end of the leadscrew.

After invoking Home, the value shown could be nonzero for several
reasons:
 * A coordinate system or offset is being added to the axis value
 * The inifile HOME is not 0

Touch Off (GUI button):
Touch Off is a way of setting the G54 coordinate system based on the
current location of the axis and the entered value.  Touch Off
ignores G93 coordinate offsets even if they are currently in effect.


So if you're lost, what should you do?  
* Move to the machine origin. MDI: G53 G0 X0Y0Z0 (A0B0C0)
* Clear the G92 coordinate offset.MDI: G92.1
* Use the G54 coordinate system.  MDI: G54
* Set the G54 coordinate system to be identical to the machine
  coordinate system.  MDI: G10 L2 P1 X0Y0Z0 (A0B0C0)
* Turn off tool offsets.  MDI: G49
* Turn on Relative coordinate display from the menu
now, you should be at machine origin (0,0,0), and the relative
coordinate system should be the same as the machine coordinate system.

What should you do to set your origin on material?  For each axis,
* Jog to a known or measurable location with respect to the material
* Invoke Touch Off, and enter the current position with respect to
  the material

For example, when I mill circuit boards, (0,0) is almost always the
lower right-hand corner of the board.  I jog X and Y to this corner of
the circuit board blank, and Touch Off each one of these and enter a
value of 0.  This measurement is almost never critical, as I'm cutting
small boards (typically under 3x4) from a 4x6 blank.

With tool inserted, I move to the approximate middle of the area being
milled.  Then using a feeler gauge I jog Z down towards the material,
switching to small incremental moves as I get close.  When the feeler
gauge just passes between the board and the tool, I Touch Off and enter
the thickness of the feeler gauge (e.g., 0.0020).  I don't have
repeatable tool length, so I don't use G43 while cutting; if I did, I'd
also enable G43 while doing the Z Touch Off.

This got long winded, so if you got this far give yourself a pat on the
back.

Jeff

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Touch Off

2007-09-17 Thread Jeff Epler
Another user has reported a similar problem, but I've never been able to
reproduce it on my machine.  And that means I've been unable to try
fixing it. :(

Jeff

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] User Interface

2007-09-18 Thread Jeff Epler
On Wed, Sep 19, 2007 at 07:17:31AM +1000, AKSYS Tech Pty Ltd wrote:
 Hi,
 I have been playing around with the different user interfaces for EMC
 and have a couple of questions.  I was initially interested in using the
 MINI interface but I would like to be able to backplot my code before
 actually running the machine - is this possible?

Mini does not have a preview plot feature.  AXIS is the only GUI with
this capability.

 My other question about
 the MINI interface is , can it be used for lathe work i.e threading???

Yes, the dialect of g-code is exactly the same no matter which GUI you
use.

 is there a way to edit the tool table
 via the user interface, or do you have to manually open the tool file
 and edit it there?

AXIS doesn't have a tool-table editor built in.  In the upcoming EMC 2.2
it will be possible to re-load the tool table and open an external tool
editor (such as the gedit text editor) from the menu in AXIS.

 Also with AXIS is there a way to set  store Work
 Offsets other than G54?

In the upcoming EMC 2.2 it will be possible to set any G5x coordinate
system offset using Touch Off.  In 2.1.7 and earlier, only the G54
coordinate system can be set this way.

Jeff

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] User Interface

2007-09-19 Thread Jeff Epler
On Wed, Sep 19, 2007 at 08:39:00AM -0500, Andre' Blanchard wrote:
 AXIS doesn't have a tool-table editor built in.  In the upcoming EMC 2.2
 it will be possible to re-load the tool table and open an external tool
 editor (such as the gedit text editor) from the menu in AXIS.
 
 Is that going to be limited to the tool offsets?

AXIS will support opening an editor on the tool offsets and on the
loaded gcode file.

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] User Interface

2007-09-19 Thread Jeff Epler
On Wed, Sep 19, 2007 at 11:06:40AM -0400, Ed wrote:
 Is there a timeframe?

No.  This spring I was saying this summer, but now I'm saying
hopefully this fall.

Jeff

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] ax5214h troubles

2007-09-26 Thread Jeff Epler
Indeed -- I don't have such a card to test.  (I didn't read your earlier
message closely enough and missed the fact that this is merely a card
similar to the axiom card)

I think I understand why the original configuration outb()s are written
in that order: In the new order, the outputs are enabled for a short
time before they are driven with the 0xff value.  Perhaps a better
sequence would be
outb(0xff, board-base_addr+0);
outb(0xff, board-base_addr+1);
outb(0xff, board-base_addr+2);
outb(board-port1config, board-base_addr+3);
+   outb(0xff, board-base_addr+0);
+   outb(0xff, board-base_addr+1);
+   outb(0xff, board-base_addr+2);
so that 8255-clones which accept output values while configured as
inputs do not drive unknown values after the switch, but boards which
don't accept output values while in input mode are driven with the
proper initial output value as early as possible.  Does this order work
on your card?

As for setting the 0x80 bit of the configuration register, if it turns
out the Access and Axiom boards can't be satisfied with a single setting
then I suppose a module parameter could be used for that purpose.

Jeff

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Keyboard shortcuts - Axis

2007-09-29 Thread Jeff Epler
Put this line in the file ~/.axisrc, with no whitespace at the beginning
of the line:

bind_axis(Right, Left, 0)

Create the file ~/.axisrc if it doesn't exist yet.

Jeff

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Desktop CNC Website Information

2007-10-02 Thread Jeff Epler
On Tue, Oct 02, 2007 at 02:20:26PM -0500, Sam Sokolik wrote:
 the only other thing I can think of is that the max step/sec is a bit on the 
 low side.  But I don't know a good safe step rate to put on paper.  (~20k/s 
 w/Parport) - expecially because 2.2 will have doublefreq which will increase 
 the step rate a bit more.

A ~108kHz square wave on a standard PC parallel port, produced by emc
TRUNK and captured on a scope:
http://emergent.unpy.net/index.cgi-files/sandbox/img_7714-medium.jpg

the scope measured the period as 9.182uS (but this figure varied as the
scope ran); the pc says the period should be 9.219uS.

This was not a full emc; it was the simplest hal configuration that
will toggle an output pin at high rate:
loadrt threads name1=fast period1=1 fp1=0
loadrt hal_parport cfg=0x378
addf parport.0.write fast
addf parport.0.reset fast
setp parport.0.pin-02-out 1
setp parport.0.pin-02-out-reset 1
start

Jeff

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] StepTimingCalculator on Wiki

2007-10-06 Thread Jeff Epler
By their nature, anyone should add something to the wiki that he feels
is of value.

For text edits, a history is preserved; for uploaded files this is not
the case.  So if you're not entirely sure your new spreadsheet is an
improvement, upload it with a different filename and add a descriptive
paragraph and link to the new version of the spreadsheet.

But to answer your question, John Kasunich is the guy who actually
created the spreadsheet.

Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Installing EMC2

2007-10-07 Thread Jeff Epler
The emc official packages, and the EMC2 CD are Ubuntu 6.06.  These
packages cannot be installed on Ubuntu 7.04.

If you want easy you will want to reinstall from the CD, either
replacing 7.04 or as a dual-boot setup.

Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] EMC2.2

2007-10-09 Thread Jeff Epler
I hope that 2.2 will be out this calendar year.

When it is available, you'll have a choice of upgrading to it on your
existing installation (though not if it's Ubuntu 5.10), or installing
fresh from a new Live CD image that will be released at about the same
time.

Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Thanks, and by the way here's yet another question!!!!

2007-10-09 Thread Jeff Epler
Make sure you issue a nonzero spindle speed, even if your spindle has no
speed control:
M3 S1000

Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] howto compile emc on mips

2007-10-09 Thread Jeff Epler
emc 1.2.0 is an old and no longer developed version of emc.  The current
version of emc2 doesn't have any file named smallmath.o.

the contents of smallmath.o are uninteresting:
 
00cc W acos
00cc T __acos
00c0 W atan
00c0 T __atan
0050 W cos
0050 T __cos
 T __ieee754_acos
0020 W sin
0020 T __sin
0080 W sincos
0080 T __sincos

these functions should be offered by the standard -lm math library on
any standard system.

The comment when smallmath.o was added was this:

Made some mods to get EMC working under RedHat 7, against doctors
orders.
 (They are ugly and embarassing so don't look at them.)

.. so it's probably not relevant to a mips system.

Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Restoring a saved HAL file

2007-10-15 Thread Jeff Epler
On Mon, Oct 15, 2007 at 08:31:03AM -0500, John Thornton wrote:
 I'm trying to restore a saved HAL file in the terminal window. 
 following the HAL TUTORIAL Chap 2.3.6
 I get the following error after issuing this command:
 
 linux:~$ halcmd -f saved.hal
 RAPTI: ERROR: could not open shared memory (error=2)
 HAL: ERROR:   rtapi init failed
 calcmd: hal_init() failed: -9
 NOTE: 'rtapi' kernel module must be loaded
 
 I've searched the hal doc and can not find any information on this.

Looks like this part of the documentation needs to be updated.

Try this instead:
halrun -I -f saved.hal
to start the realtime environment (halrun), load saved.hal (-f
saved.hal), then show the 'halcmd:' prompt (-I).

You'll need to issue 'start' once at the halcmd prompt to start the
realtime threads; the 'start' command isn't written by 'halcmd save'.

Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Threading without feedback?

2007-10-15 Thread Jeff Epler
emc's motion controller uses the following HAL pins during the G33
spindle synchronized move and G76 threading canned cycle:
motion.spindle-revs
motion.spindle-index-enable
These must behave like the canonical encoder interface pins 'position'
and 'index-enable', described here: 
http://linuxcnc.org/docs/devel/html/hal_general_ref.html#sec:CanonEncoder

It is possible to imagine a component which reads an index input in
the fast thread and produces a guessed spindle-revs value every servo
period based on the expectation that the spindle velocity is constant
during the threading moves.  However, no such component has been
contributed to emc.  If you develop this component, please consider
contributing it:
http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?ContributedComponents

Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] HNC Lathe Spindle Sync Motion

2007-10-15 Thread Jeff Epler
It may be useful to refer to the docs, which I believe are up to date
http://linuxcnc.org/docs/devel/html/gcode_main.html#sec:G33,-G33.1:-Spindle-Synchronized
.. but perhaps this conversation can help improve the documentation.

On Mon, Oct 15, 2007 at 11:33:27AM -0700, Kirk Wallace wrote:
 - Can a K be applied to each axis? Such as G33 z1.0 k0.050 x0.100
 k0.010. I suppose, I could just try it and see what happens.

No, there can be only one K-word.  The K-word gives the distance moved
for each revolution of the spindle.  For instance, if you are at X=0 Z=0
and command
G33 X3 Z4 K.1
then the move will be on a sloped line with a total length of 5
(sqrt(3*3 + 4.4)).  During that time, the spindle will turn 5/.1 = 50
times.  The first turn will be 1/50th of the total distance, which means
that the machine will reach X.06 Z.08 at that time.

Look at it another way: Say you want to command the move from X=0 Z=0 to
X=3 Z=4, but with 10 revolutions per Z moved.  That's 40 total
revolutions, but the length of the move is 5.  Use K[40/5] = K.125.

 - How could subsequent G33's latch onto the last index of the previous
 G33 before the current G33 is invoked? What persists between G33 calls?

When the program has a G33 after a non-synchronized motion, it waits for
an index pulse before beginning the synchronized motion:
G0 ...
 ( waits for index here )
G33 ... 

When the program has two G33s in a row, the second one starts at
whatever angle the first one ended:
G33 ...
( no wait for index here )
G33 ...

So, for instance, these two are equivalent:
G0 X0 Y0 Z0
G33 X.25 K.1
G33 X1 K.1
and
G0 X0 Y0 Z0
G33 X1 K.1
even though in the first case, the spindle is part way through a
revolution when the X.25 move finished.

Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] EMC2 version on Live CD?

2007-10-17 Thread Jeff Epler
The latest version of the Live CD includes either 2.1.6 or 2.1.7, I'm
not sure which.

There are several ways to find the version of emc:
* If you use AXIS as your user interface, Help  About shows the version
  number
* If you start emc from the terminal window, the version is printed
* If you issue the following command, you can see what version of the
  package is installed:
dpkg -l emc2

Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Using Match8

2007-10-18 Thread Jeff Epler
You must addf match8.0 partest_thread or its outputs will never be
updated.

Jeff


-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Axis Jog Speed

2007-10-21 Thread Jeff Epler
AXIS uses an logarithmic relationship between the position of the jog
slider and the jog speed in inches per minute.  At the left hand side,
the jog speeds are fairly close together (e.g., .001 and .002 in/min)
and at the right hand side the speeds are further apart (e.g., 296 and
300 in/min).  The exact numbers available depend on the axis SCALE (to
set the low end to about one count per second) and MAX_LINEAR_VELOCITY
(to set the high end).

Whatever value you give in the inifile is converted to one of the two
nearest values actually available on the slider.

The intent is not to have exact speeds selectable for jogging, but to
have a wide range of speeds available to be suitable for quick
positioning (high end) and fine-tuning (low and middle end).

Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] upgradeing from emc testing to emc2.17

2007-10-24 Thread Jeff Epler
Here's a document which shows what configuration changes are needed to
go from emc2.0.x to emc 2.1.7:
http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?UPDATING

I don't think there's any document that lists changes in configuration
files from the very old TESTING releases that came before 2.0.0.

Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] minor Mesa 5I20 related errors in EMC2 user manual

2007-10-25 Thread Jeff Epler
emc uses this equation to get pwmRate from dacRate:
pCard16-pwmRate = dacRate * 65536 / 1000 * 1024 / 33000;
so the 33MHz SYSCLK is hardcoded at the moment.

That makes the max usable Hz value 32226, giving a pwmRate of 65534
and an actual rate of 32225.79Hz.  I've updated the documentation to
reflect this.  

I started to add support for using SYSCLK instead of the hardcoded 33MHz
but I am not able to test on a 5i20 card at the present time so it's
probably best if I leave things alone.

Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Starting a new project

2007-10-25 Thread Jeff Epler
the classic ladder in emc can't communicate directly to modbus -- it
only communicates to HAL pins.  That option should not appear.

Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] minor Mesa 5I20 related errors in EMC2 user manual

2007-10-25 Thread Jeff Epler
Thanks for the offer.  I have one, but it's not in a working PC at the
moment.

Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Problems Compiling/Running - Update

2007-10-29 Thread Jeff Epler
EMC 2.1.x is unlikely to work on Ubuntu 7.10.  However, the development
version has been improved in various ways for compatability with newer
versions of Ubuntu.

On Ubuntu 7.10 the default amount of locked memory for regular users
is too low.  You can fix that problem by adding the line
hard memlock 20480
to /etc/security/limits.conf as root.  (it's necessary to log out
completely after making this change)

However, the result of this problem is not an insmod error, but
another error about creating shared memory areas which I don't recall.
In the case of insmod errors, the last few lines shown by dmesg are
usually most useful in determining what is going on.

Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] var file source listing

2007-10-29 Thread Jeff Epler
On Mon, Oct 29, 2007 at 09:58:30AM -0500, Cecil Thomas wrote:
 I guess I'm looking for the reverse directory for the .var file.

Please see:
http://www.linuxcnc.org/docview/2.2/html/gcode_main.html#sub:Parameters

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Problems Compiling/Running - Update

2007-10-29 Thread Jeff Epler
A system call trace (produced by using strace) or a backtrace at the
time of the segmentation fault (produced using gdb) would be helpful
in pinpointing the location of the problem.

You can find information how to use these utilities on many pages on the
internet.

Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Problems Compiling/Running - Update

2007-11-01 Thread Jeff Epler
The following emc2.rules file, which is installed when you install a
.deb of emc2 (but not by 'make install), makes the rtai_shm device
accessible to all users:
~/emc2-src/debian/extras-Ubuntu-6.06/etc/udev/rules.d$ cat emc2.rules 
KERNEL==RTAI_SHM SYMLINK==rtai_shm MODE=0666

Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] steplen, stepspace, dirsetup, dirhold

2007-11-01 Thread Jeff Epler
These items would be in .hal files.

Usually the default values (1 BASE_PERIOD) are OK for most stepper
drivers, so they are omitted from the default configuration files.

If you add these lines, they would be of the form
setp stepgen.0.steplen VALUE
where VALUE is the number of BASE_PERIODs (and so on for each stepgen)

In emc 2.2.0, VALUE will be in nanoseconds instead of BASE_PERIODs.

Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] new kinematics

2007-11-04 Thread Jeff Epler
For source code exploration there are a few more things that it's nice
to be aware of:
 * lxr web page, which allows you to see definition and use of any
   identifier,  http://cvs.linuxcnc.org/lxr
 * tags, search for the definition of any identifier from vi or emacs
   (make tags target in src to set up, :tag or M-x tag or other
   editor-specific functionality to use)
 * swish, full-text search of all the source. (make swish to set up,
   run scripts/swish to use.  The output can be interpreted by many
   editors to automatically go to each file and line where the text is
   matched.

If you are using vim and :source .vimrc in the emc2/src directory,
:tag refers to the tags file built by make tags and :grep runs the
swish full-index search.

Personally, I find tags and swish most useful, because they can run
directly in my editor and pull up information about where identifiers
are defined or used in a second or so.

Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Hardware suggestions for EMC

2007-11-04 Thread Jeff Epler
On Sun, Nov 04, 2007 at 01:20:34PM +0100, [EMAIL PROTECTED] wrote:
 Hi
 
 I have a milling machine here which i want to control with emc. Fo the
 first tests im using the normal parallel port adapter. I'm, however,
 afraid of loosing steps on my stepping motors so im planing to use some
 quadratur encoder to also measure the position of the axes. My questions
 now are:
 
 1. Is it better to use a dedicated board which is able to control the
 stepper motor and readout the quadratur encoders. The board is connected
 via usb (usbserial modul) and the board can send a command for either
 speed or steps of the motor.

No USB hardware is supported by emc at this time.

 2. How would i readout quadratur encoder on the parallel port

Use the 'encoder' module.  After installing emc, man 9 encoder.

 3. How many stepper motor can i control maximum with one parallelport
 and emc?

Each stepper motor requires 2 hardware output pin.  The parallel port
has 13.  So if no pins are required for other purposes, 6 stepper motors
can be controlled, with one output pin left over.

 I know that question one implies writing a adaper for the hal. I have
 basic experience in xenomai programming. Would it be hard to implement
 the usb board into emc?

You'd need a very thorough, low-level knowledge of USB in order to make
a USB driver fit the HAL model (hardware read and write takes place
according to function position in HAL threads, not based on interrupts
or DMA).  I don't even know whether this is possible.

Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] Released: EMC 2.2.0

2007-11-05 Thread Jeff Epler
I'm pleased to announce the first release of the EMC 2.2 series, EMC
2.2.0.  After about a year of development, many new features are
available in this release.  The documentation (particularly the HTML
documentation) is greatly improved, and a partial translation of the
documentation into the french language is available.

Please join us on IRC in the usual place (irc.freenode.net / #emc)
if you have any questions, or just to help us celebrate!


I am the release manager for the emc 2.2.x release cycle.  As a result,
you'll need to add my gpg key to the list of keys that will
authenticate packages on your system.  Do so by issuing these commands
in the terminal:
gpg --keyserver pgpkeys.mit.edu --recv-key 96935D7D
gpg -a --export 96935D7D | sudo apt-key add -
after the second step you will be prompted for your password in order to
run the administrative command apt-key add.  If you don't perform this
step, you will get a warning about unauthenticated software when
installing bugfix releases.


Because (minor) changes to configuration files are needed, your
existing install will not automatically be updated to 2.2.  If you want
to run 2.2, you will have to change to the EMC 2.2 repository by
following these instructions:

Run System/Administration/Synaptic Package Manager
Go to Settings/Repositories

In the list of Channels are two lines for linuxcnc.org.

For each of them:
  Select the line and click Edit
  on the Components line, change emc2 or emc2.1 to emc2.2
  Click OK

Close the Software Preferences window
Click Reload as instructed
Click Mark All Upgrades
Click Apply


A new EMC 2.2 Live CD will be released in the next week or so.


CVS users can get this release by checking out the RELEASE_2_2_0 tag.


Once you have done the upgrade, you will need to update any custom
configurations by following these instructions:
http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl/emcinfo.pl?UPDATING


As noted previously, support for Ubuntu 5.10 Breezy Badger has been
dropped from this release.  The currently supported version is Ubuntu
6.06 LTS Dapper Drake.  If you are running a Breezy Badger system, you
must reinstall with Dapper Drake, or follow these instructions to update
online:
http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Breezy_Upgrading


More detailed changelog:
  * G41.1, G42.1, G43.1 to take tool parameters from gcode instead of tool
table
  * split libposemath and libemcini from libnml
  * new inifile item: [HAL]SHUTDOWN, a .hal file run at a clean shutdown of emc
  * new component: deadzone
  * new component: tristate_float
  * new component: random
  * new components: clarke2 clark3 clarkeinv
  * hexapod visualization
  * scara robot sample configuration with visualization
  * opengl machine visualization for several robots
  * new m5i20 firmwares
  * M66 - digital input control (wait  read external HAL inputs)
  * userspace comp
  * hal-8255 driver for a PCI multiple-8255 card
  * tapered in/out on multipass threading canned cycle
  * debug and print output from the interpreter
  * named parameters in the interpreter
  * puma robot kinematics
  * sample configuration for a puma robot
  * reduce quantization of the encoder module's velocity output
  * MDI history manipulation and save in AXIS
  * home to index on STG1
  * number of samples in halscope can be specified at runtime
  * add 'source' command to halcmd
  * add tcl interface to halcmd commands (tcl/hal.so)
  * add -U (force unload) to halrun script
  * new component: lut5
  * image-to-gcode: roughing passes
  * rs274.author: automatic arc recognition (used by image-to-gcode)
  * Filters can now show progress bars in the AXIS window as they run
  * U,V,W linear axes with fully coordinated motion
  * probing in A,B,C,U,V,W axes is now allowed
  * AXIS: touch-off in any coordinate system
  * AXIS: allow starting an editor on the loaded gcode or tool table from the
File menu
  * AXIS: A much better Velocity display
  * AXIS: Preferences set on the View menu are saved for the next EMC run
  * Rigid tapping G33.1
  * Feed Per Revolution and Constant Surface Speed for lathes
  * Index-only homing for configurations where homing on a switch is
inconvenient
  * G28/G30 now move only the specified axes to the home/reference point
  * Improved error messages for incorrect arcs
  * All combinations of inch/metric machines running inch/metric programs work
correctly when using the tool table.  The tool table is always in machine
units.
  * Now any combination of XYZABCUVW axes can be defined, and trying to move
an undefined axis causes a proper error message
  * Tool change position can have an ABC component.  Previously rotary axes
always moved to 0 for a tool change.
  * Spindle speed override
  * Optional stop
  * Analog jogging in halui (for joysticks etc.)
  * Fix several-second unresponsiveness when switching between two guis
(even if one of them was halui)
  * 

Re: [Emc-users] Released: EMC 2.2.0

2007-11-05 Thread Jeff Epler
On Mon, Nov 05, 2007 at 10:02:28AM -0700, Andrew Ayre wrote:
 Jeff,
 
 Which version of Ubuntu will the live CD use?

For now, the Live CD will remain based on Ubuntu 6.06 LTS Dapper
Drake.

Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] EMC 2.2.0: execv(pumagui) failed

2007-11-07 Thread Jeff Epler
On Wed, Nov 07, 2007 at 07:37:35PM +0100, Karl-Heinz Glahe wrote:
 Hello,
 
 after upgrading from 2.1.7 to 2.2.0 (via synaptic packet manager, as
 recommended in the wiki) i tried the puma example which leads to this:

This problem will be fixed in 2.2.1.

Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


[Emc-users] Released: EMC 2.2.1

2007-11-07 Thread Jeff Epler
I'm pleased to announce the first bugfix release of the EMC 2.2 series,
EMC 2.2.1.  This release fixes several important packaging problems, as
well as a problem frequently encountered by users upgrading from 2.1.7.

The new packages are now available in the Ubuntu package repository.
If you already installed 2.2.0, this is available as an update.  If you
are still using 2.1.7 but want to upgrade, instructions are here:
http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?UpdatingTo2.2

CVS users can get this release by checking out the RELEASE_2_2_1 tag.
Tarballs will be available on sourceforge.net within the next 24 hours.


Changes in this release:
  * fix packaging of stepconf.glade
  * german translation improvements
  * package additional new-in-2.2.x programs (pumagui, scaragui, hexagui
tracking-test, teach-in)
  * fix problems using v2.1 var file -- it's silently upgraded with the
new entries used by v2.2 instead of issing weird errors at startup
  * fix problem with probe_parport on certain machines
  * fix problem with non-integer INTRO_TIME 


Jeff Epler

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Preliminary Installation Instructions for Ubuntu 7.10

2007-11-07 Thread Jeff Epler
Hi.  Thanks for documenting this process, it looks pretty similar to
what I've done.

I am curious why you chose this option:
Loadable module support  Module unloading (N)
With this option, I would have expected that emc can only be run once
per reboot, a pretty nasty limitation.

Did your kernel not have the same ethernet driver problem you mentioned
on cnczone in the gutsy experimental kernel?  or did some other reason
encourage you to build yours from scratch?

I still haven't come up with any bright ideas about why you can't run
halcmd as non-root -- this wasn't a problem on my own gutsy machine and
the experimental emc2 package.

Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Improved probing

2007-11-09 Thread Jeff Epler
You configure a probe just like almost everything else in emc: add the
right lines to a .hal file.  In this case, you will be writing a line to
connect a signal to the pin motion.probe-input.  For example, if the
probe input is on parport pin 26*, you could write
net probe parport.0.pin-26-in motion.probe-input

motion.probe-input must be TRUE for probe contact closed (touching),
FALSE for probe contact open.  So if your probe has a LOW voltage when
touching and a HIGH voltage when not touching, you'll have to use the
inverted signal instead:
net probe parport.0.pin-26-in-invert motion.probe-input

Each location found by a G38.2 probing move can be written to a file
named in the special (PROBEOPEN) comment.

Relevant online documentation:
http://linuxcnc.org/docs/2.2/html/gcode_main.html#sub:G38.2:-Straight-Probe
http://linuxcnc.org/docs/2.2/html/man/man9/motion.9.html#PINS

Jeff
* Yes, I know there's no pin 26

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Image to G-code...Saving files?

2007-11-11 Thread Jeff Epler
If you upgrade to emc 2.2.1, there's a new menu option File  Save
gcode as... which does what you want.

In 2.1.6, if you want to save gcode, run image-to-gcode at the
commandline and redirect to a file:
image-to-gcode mumble.png  mumble.ngc

Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] EMC 2.2.1 and G3

2007-11-12 Thread Jeff Epler
If you have an arc that doesn't preview right, please post the code so
that it can be fixed in a future release.

If you can trim it down to just a few lines of g-code, just include it
in a message.  Otherwise, e-mail me privately and attach the whole file
indicating where the problem is.

Thanks,
Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Latency issue

2007-11-14 Thread Jeff Epler
On Linux, modifying system files requires the use of administrator
(root) privileges.  I would do an activity like this in the terminal
window with sudo:
sudo cp rtai_smp.ko /usr/realtime-2.6.15-magma/modules/rtai_smi.ko
(assuming you have already changed to the directory where you compiled
or downloaded rtai_smp.ko)

I have updated the page
http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?FixingDapperSMIIssues
to give this instruction, so that hopefully the next person won't have
the same problem.

Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Is updating EMC@ impossible without internet?

2007-11-14 Thread Jeff Epler
apt supports offline operation with the --print-uris option.  You can
find various instructions on how to do this, though I have never tried
it myself.

e.g.,
http://olympus.het.brown.edu/cgi-bin/dwww?type=text/plainlocation=/usr/share/doc/apt-doc/offline.text.gz

Jeff

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now  http://get.splunk.com/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Confusing the EMC2 Stepconf Wizard...

2007-11-18 Thread Jeff Epler
Thanks for your report.  I'll look into this and hopefully get it fixed
for the next release, emc 2.2.2.

Thanks to reports from other users, the following stepconf bugs will
also be fixed in the next release:
  * fix stepconf 'charge pump' pin
  * fix stepconf 'external estop' pin
  * fix homing in stepconf-created configurations

Jeff

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] G Code Generator

2007-11-18 Thread Jeff Epler
I think Python is a fine language for this.  In the emc sample files,
there is a program holecircle.py uses python and tkinter to prompt the
user for the required values and show a schematic preview of the result.
Two thirds of holecircle.py are generic code for prompting the user that
should be separated out into a separate module to be used by other
similar programs, and one third is concerned with generating the preview
or the gcode.

Others -- Kenneth Lerman comes to mind -- have mentioned work on
generic wizard programs for gcode.  I think his design is to use gcode
programs with special comments at the top which direct the wizard
program to prompt for certain values.  In this case, repetitions
(looping and subroutines) are done in emc's o-words.  I don't know if
Kenneth has a preview version for download, all I recall seeing are some
nice looking screen shots.

Jeff

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] EMC 2.2.1 and G3

2007-11-18 Thread Jeff Epler
Can you also show me the tool table entries you used?

Jeff

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] G Code Generator

2007-11-18 Thread Jeff Epler
particularly long ago, tcl made some *very bad* decisions about floating
point numbers -- after every operation, they were converted back to
strings with a small number of decimal places.  modern tcl has improved
this situation considerably by having a sane default for the string
representation of numbers, and by not always converting a number to a
string whenever it's e.g., stored in a variable.

In python you do not have this kind of difficulty (all floating-point
data is calculated and stored as C doubles and you have to explicitly
request conversions that lose precision, such as conversion to string)
and in fact many people use python for serious numerics.

Jeff

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Axis display colors

2007-11-20 Thread Jeff Epler
In the next version, that text will be white on brown instead of black
on brown.  I think it is an improvement to legibility.

If you are using an installed package, you can make the same change in
your installed version by modifying the file /usr/bin/axis (e.g., with
sudo gedit /usr/bin/axis) around line 3370:

Change this line:
t.tag_configure(executing, background=#804040)

To this:
t.tag_configure(executing, background=#804040, foreground=#ff)

you can also experiment with different foreground and background colors
by modifying this line in other ways, but be aware that when you install
a bugfix or upgrade for emc this file will be overwritten.

Jeff

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] A simple question on I J

2007-11-27 Thread Jeff Epler
I can see now that the documentation was unclear about this.
I am revising it to add the sentence marked +:

  I and J are the offsets from the current location (in the X and Y directions,
  respectively) of the center of the circle.
  I and J are optional except that at least one of the two must be used.
+ If only one is specified, the value of the other is taken as 0.
  It is an error if: 
...
and similarly for the other planes.

Does this clarify emc's behavior for you, or is it still not clear?

Jeff

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] rs232 output

2007-11-30 Thread Jeff Epler
On Fri, Nov 30, 2007 at 01:27:11AM -0800, Klemen Dovrtel wrote:
 BTW, is there an option to control individual I/O pins
 via parallel port using G code.

Use the gcodes M64 and M65 for this purpose.  In stock version of emc,
this is limited to 4 pins numbered 0 to 3.  You can link them to
whatever you like using emc2's hal.

http://linuxcnc.org/docs/2.2/html/gcode_main.html#sec:M62-to-M65:

Jeff

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Keling Stepper drives

2007-11-30 Thread Jeff Epler
I have no experience with this company or its products, but I was able
to find a very short (one-page) datasheet on their website.

It appears that the KL-4030 takes step and direction inputs through
optoisolators.  emc has no problem producing step and direction
waveforms--probably this is the way the vast majority of emc users
control their machines.

However, I was unable to find information about the following, which may
make it a matter of trial and error to properly configure your system to
interface to these drives:
* Waveform timings: Step length, step space, direction setup,
  direction hold.  The emc step generator can be configured to meet
  any timing requirements of the stepper driver, but you have to
  know what they are!

* Optoisolator current requirements.  Without knowing the
  requirement, it is impossible to know whether a particular
  breakout board will correctly operate the optos.

Jeff

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] rs232 output

2007-11-30 Thread Jeff Epler
On Fri, Nov 30, 2007 at 01:27:11AM -0800, Klemen Dovrtel wrote:
 Is it possible to send a simple command to rs232
 within the G code using emc. I would like to control
 the pneumatic valves and some other simple stuff and i
 don't want to sped parallel port pins for simple
 things like this. 

Every serial device is different, so to do this you will have to write
your own HAL component.  If the control does not need to be real-time,
then it is fairly simple to do this.  One choice is to use Python and
pyserial.

You will have to install the pyserial package.  If your Ubuntu system is
on the internet, this can be done through the package manager by
selecting the package called 'python-serial'.  It is in the universe
repository, which is not enabled by default but you can find
instructions online for how to enable it.  If you're not online, then
download this file onto a usb drive then install it by double-clicking:

http://us.archive.ubuntu.com/ubuntu/pool/universe/p/pyserial/python-serial_2.2-1_all.deb

Here is an (untested!) example which should give you a general idea of
the complexity of such a driver.  This driver controls a hypothetical
serial-attached device which turns something on when the character 1
is received, and turns it off when the character 0 is received:

#!/usr/bin/python
# ---
# Import the necessary modules
import hal
import time
import pyserial

# Get the serial connection -- first port, 9600,8,N,1
import serial
ser = serial.Serial(0)

# Create the HAL component and its pin.  You will use a .hal file to
# connect whatever bit signal you want to the pin 'example.enable'.
h = hal.component(example)
h.newpin(enable, hal.HAL_BIT, hal.HAL_IN)
h.ready()

# The previous value of the 'enable' pin so that a byte is only sent on
# the serial port when it is necessary.  This setting, which is not a
# number, means that the first time the value will always be considered
# changed.
last = None

# (without try/except, the component will print what looks like an error
# when emc is shut down, and the cleanup below won't happen)
try:
while 1:
# As long as the component is running, periodically check
# whether the value has changed; if it has, send a command to
# set the new value
new = h[enable]
if new != old:
if new: ser.write(1)
else: ser.write(0)
old = new
time.sleep(.01)
except KeyboardInterrupt: pass

# Shut down the connected device at exit
ser.write(0)
# ---

Put the above in a file named example, make it executable (chmod +x
example), and put it in a directory on your $PATH.

In your HAL file, hook it up something like this:
loadusr -W example
net coolant iocontrol.0.coolant-mist = example.enable

Jeff

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] open loop galvanometer control

2007-12-01 Thread Jeff Epler
On Sat, Dec 01, 2007 at 06:13:17AM -0800, Klemen Dovrtel wrote:
 The galvanometer is current driven, so i was thinking
 of using a op-amp and R-2R resistor ladder for current
 source. So i need a 10 bit digital output for R-2R
 resistor ladder (instead of pwm used in etch-servo
 sample configuration). How can i archive this? Is this
 a good solution, or should i also use PWM (i didn't
 make the hardware driver yet).

This can easily be accomplished with a custom component which takes one
input and produces a bunch of bit outputs.

Here's a lightly-tested component to do just that.  After installing
emc2-dev and build-essential using the package manager, you can install
the new component with 'comp --install tobits.comp' or view the
formatted documentation with 'comp --view-doc tobits.comp':

// --
component tobits Convert a floating-point value into a binary value;

pin in float in;
pin out bit out-##[10];

param rw float scale=1;
param rw float offset;

function _;

license GPL;

description Convert a floating-point value into a 10-bit binary value.
The binary value is given by the equation
.RS
floor((in-offset)/scale * 1023 + 0.5)
.RE
limited to the range 0..1023.
;
;;
int i, v;

if(scale == 0) scale = 1;

v = (int)((in - offset) / scale * 1023 + 0.5);

if(v0) v = 0;
if(v1023) v = 1023;
for(i=0; i10; i++) out(i) = (v  (1i)) != 0;
// --

 My second problem is, that I think the position signal
 from emc should be modified a bit (
 hight_on_the_wall=constant*tangens(emc_output signal
 ), because otherwise the drawing on the wall will be
 stretched at the sides. How can i achieve this? 

In emc, 'kinematics' can define arbitrary relationships between the
cartesian axes (e.g., xyz) and the joints of the machine.  The basics
of writing a new kinematics type are described here:
http://linuxcnc.org/docs/2.2/html/motion_kinematics.html

An alternative is to use screw compensation, which you can do by just
writing a table of entries that approximate the tangent or arctangent
function you need.

http://linuxcnc.org/docs/2.2/html/config_ini_config.html#sub:%5BAXIS%5D-Section
(see COMP_FILE and COMP_FILE_TYPE)

Jeff

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] rs232 output

2007-12-03 Thread Jeff Epler
In ECP mode only, parallel ports have FIFOs.  In traditional modes (SPP,
bidirectional, EPP) the fifo is disabled and has no effect on operation.

Jeff

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Pivot mill

2007-12-04 Thread Jeff Epler
What an interesting looking machine.

We have a demo of a similar type of machine, called SCARA.  In emc
2.2.2, you can run the sample configuration scara/scara.ini and see a
visualization of this machine on your desktop.  Screenshot here:
http://axis.unpy.net/01170693566

In emc, the process of converting from the XYZ coordinate system to the
motor positions of a particular machine (and back again) is called
kinematics.

You can view the source code for the scara kinematics online, to get an
idea of the complexity:
http://cvs.linuxcnc.org/cvs/emc2/src/emc/kinematics/scarakins.c?rev=1.5

There is also documentation on writing a new kinematics type:
http://linuxcnc.org/docs/2.2/html/motion_kinematics.html

It is possible to build new kinematics types as a part of emc, or add
them to an existing emc installation -- install emc2-dev and
build-essential, then use comp --install yourkins.c to compile and
install a new kinematics module.  The kinematics module is typically
specified at the very top of the first .hal file used for machine
configuration.

emc has some shortcomings for nontrivial machines.
 * How to specify and enforce joint limits for acceleration and velocity
   (at present, only cartesian limits are enforced)
 * How to specify the working volume of the machine
however, there are a number of people interested in improving these
items, so it's possible that we'll find solutions during the current
development cycle.

Jeff

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Results in G38.2 bug report

2007-12-06 Thread Jeff Epler
On Thu, Dec 06, 2007 at 10:20:21AM -0200, Daniel Scheeren wrote:
 In 2.2 releases each scan position create 9 lines like this:
 
 0.00 0.00 0.004700 0.00
 -1078038889533352951247954537139929273706981666439934620835065307540162947668163682328294324733651291932469341814794485760.00
 -20013983783346165793258740692823450059607579332118972776994627514482229992151737444806544334141214424940798702636137325794191212550734922632046556714922672128.00
 -7368554751641724535047026877998039650146848554115089884485955880828678465674529121150265203412873842084843230046730569603589198605536482732887601044914536710144.00
 0.00 0.00
...

In the next emc 2.2 release, the numbers printed for axes that do not
exist will be 0.00 instead of these values, which represent memory
which was not initialized.

http://cvs.linuxcnc.org/cvs/emc2/src/emc/motion/control.c.diff?r1=1.130.2.1;r2=1.130.2.2;f=h
http://cvs.linuxcnc.org/cvs/emc2/src/emc/motion/motion.c.diff?r1=1.107.2.1;r2=1.107.2.2;f=h

Jeff

-
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell.  From the desktop to the data center, Linux is going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] How to configure pins in Parallel Port?

2007-12-06 Thread Jeff Epler
You can make an output pin HIGH all the time by using setp in your hal
file:
setp parport.0.pin-MM-out 1
   ^^  replace MM with the pin number

However, parport pin 13 is an input to the PC, not an output (see
http://linuxcnc.org/docs/2.2/html/hal_drivers.html#fig:Parport-block-diag)  EMC
cannot set this pin to HIGH or LOW.

Jeff

-
SF.Net email is sponsored by: 
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Stepconf problems

2007-12-10 Thread Jeff Epler
John,

When using stepconf, the BASE_PERIOD is chosen for you.  If the required
step rate is low, stepconf chooses a high BASE_PERIOD, capped at
10ns.  In the case of Alan Condit's machine, the maximum required
step rate is 3500Hz which is one step per 285us or so.

Do you see any reason why this large BASE_PERIOD would be a problem?

Jeff

-
SF.Net email is sponsored by: 
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Stepconf problems

2007-12-10 Thread Jeff Epler
The step length requirement of 25000ns is much longer than for other
stepper drivers I am familiar with.  Doublestep is predicated on the
idea that the step pulse is fairly short (e.g. less than say 4000ns).

Doublestep uses a busy wait to create short output pulses; if
BASE_PERIOD is very large compared to the step length then this is
beneficial; if the required output pulse length is large then this just
hurts machine performance.

In hal_parport I built in a maximum length for pulses, which I
arbitrarily made 1/4 of the thread time.  In your case, this turns out
to be a maximum of 24933ns when emc rounds the requested period
10ns to 99733ns.  Just a bit under your datasheet timing
requirement.

So here's what I would try: Edit my-mill.ini to set BASE_PERIOD to
15 so that the delay can actually be 25000ns.  If that still doesn't
work, also edit my-mill.hal to increase the delay above 25000ns.
Perhaps your break-out board creates an additional timing requirement
that you haven't accounted for yet.

There is no way to direct stepconf to produce a non-doublestep
configuration.

Jeff

-
SF.Net email is sponsored by: 
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Stepconf problems

2007-12-10 Thread Jeff Epler
On Sat, Dec 08, 2007 at 11:12:28PM -0500, xtra209 wrote:
 My experience with stepconfig are mixed... The homing is screwed. I 
 fixed that by commenting out the sequence = lines in the .ini and now it 
 will home individual axes just fine.

What home sequence is required for your machine?  Or is there no safe
home sequence?  At present, stepconf hard-codes the homing sequence Z, X,
Y, A.  I intended that the configuration set the Z home position near
the top of travel so that it X and Y can move freely in their homing
sequence, above anything on the table.

 Also the thing would not load without a bunch of error messages and
 quitting. I fixed that by doing a hard reboot of the computer. This is
 on my spare computer which is not attached to a machine but no hard
 shutdown and reboot, no EMC-2... With the new configs that is...

Please find a way to copy the error messages over to a networked
computer, because without them I am in the dark.  I haven't run into
this problem myself.  I run stepconf-generated configuration files many
times on the same machine without the need to reboot after each run.

Jeff

-
SF.Net email is sponsored by: 
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Remote GUI

2007-12-10 Thread Jeff Epler
I don't know of anyone running AXIS remotely; I've never done it.

AXIS assumes that it can create HAL pins and access (read) the var file
from the filesystem.  This may be causing problems.

Look on the terminal for any errors AXIS prints.

Jeff

-
SF.Net email is sponsored by: 
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] EMC configuration issues

2007-12-26 Thread Jeff Epler
On Tue, Dec 25, 2007 at 08:30:09PM +0100, Jesús Bas wrote:
 - No matter what numbers you put in stepconf for steplen, step space,
 dirhold and dirsetup, the generated .hal file reflect wrong data.
 
I believe that the values written by stepconf are exactly what I
intended.  Let me explain how stepconf arrives at each figure in
question.

 In my case, the following requested numbers were (I use Gecko drives):
 
 - steplen  4000
 - stepspace 500
 - dirhold 2
 - dirsetup 1000
(not shown: you must have entered a latency test result of 3)

 and the corresponding lines in the generated .hal file is allways (no
 matter what numbers you input):
 
 - setp stepgen.0.steplen 1
 - setp stepgen.0.stepspace 0
 - setp stepgen.0.dirhold 5
 - setp stepgen.0.dirsetup 31000
(not shown: setp parport.0.reset-time 4000)
(not shown: inifile BASE_PERIOD of at least 39500)

BASE_PERIOD 39500
This is at least as big as machine latency + reset_time + 5000
but may be a larger value if your step rate is low.

reset-time 4000
this is the step length you entered in stepconf.  After the step
1 bit is written to the parport, it is reset back to 0 after
at least 4000ns has passed (but maybe longer)

steplen 1
this means the shortest step length possible.  the actual
minimum length of the pulse on the parport is 4000ns, defined by
parport.0.reset-time

stepspace 0
this means that steps are allowed in subsequent base_periods
(doublestep).  The actual minimum length of the space on the
parport is defined by
BASE_PERIOD - machine latency - reset-time - overhead
where overhead is any time above and beyond the minimum
reset-time that the step pulse is high, plus any other
variations (such as cache misses) that make the time between one
reset and the subsequent write (in the next base-thread
invocation) vary.  It is assumed that this is less than 5000ns
in all cases, but has only been measured on a few machines.

dirhold 5
dirsetup 31000
these are the dirhold and dirsetup values you entered, plus the
latency test result you entered.

Perhaps someone will point out an error in these calculations, but for
now I simply cannot see it.

Other possibilities are:
* The signal path from your PC to the gecko has other
  characteristics (e.g., weak drive stringth in the parport,
  additional external signal conditioning) that lead to increased
  rise/fall time for signals and require higher step length and
  space in emc
* another error in your configuration, such as an incorrect invert
  on a step output pin
* there is a (yet unknown) bug in the hal_parport driver that causes
  the step output bit to be reset too early (this is based on CPU
  speed, so if linux misdetects your CPU that could also be the
  cause)
* the arbitrary max overhead value of 5000ns is not appropriate
  for all machines

If the *only* change you made was to modify the inifile stepspace to 
a nonzero value, then the only effect is to increase the step space by
approximately one base-period--e.g., from 500ns minimum to 4ns
minimum.  The step pulse will still be short (as short as 4000ns) unless
you made other changes (e.g., remove the setp parport.0.pin-##-reset 1
lines, or the addf parport.0.reset base-thread line)

Jeff

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Arduino

2007-12-28 Thread Jeff Epler
On Fri, Dec 28, 2007 at 11:39:38AM -0800, Kirk Wallace wrote:
 This looks interesting:
 
 http://axis.unpythonic.net/01198594294
 
 This looks like an inexpensive way to get fast PWM and encoder rates
 except it doesn't work in realtime yet?

I have been debating whether to announce this to a bigger audience.

I think this is more a proof-of-concept than anything truly useful.
First, beacuse the particular board I used is on a USB interface, it
simply can't be used for realtime purposes.

Switching to a traditional PC serial port (there are, or at least
were, similar board designs with RS232 or TTL serial instead of USB),
you run into bandwidth limits -- you can't quite transmit 12 bytes every
1ms at 115200bps, and with the protocol I used, it takes 12 bytes to
read or write all the pins.  You also have to budget the time that the
micro takes to actually perform its actions -- e.g., it takes at least
100uS to do one ADC conversion, and because the AVR's UART has only one
byte of output buffering it can't efficiently be interleaved with
transmitting the previous sample over the serial connection.

The driver from my website has ADC in and PWM out (the avr microcontroller
has both built into the hardware) but no quadrature decoder.  Quadrature
might be possible, but it would be fairly low speed because avrs do not
have dedicated quadrature decoders.  At best you'd get something good
enough for use with an MPG, not for a spindle or axis motor (5kHz sample
rate, maybe?).

Jeff

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Additional I/O Modbus card.

2007-12-29 Thread Jeff Epler
the classicladder in emc2 does not have any modbus support.

emc2 doesn't ship with any modbus drivers.

jeff

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Home and Limit Switch Setup in Stepconf

2008-01-17 Thread Jeff Epler
stepconf only gives a tiny, tiny subset of all the configurations that
can be created through emc2's HAL.  It sounds like your home switch
configuration may be one that is not possible.  You may be able to use
custom.hal and/or inifile tweaks after stepconf has run to get the
configuration you want, or you may be better off starting with a
traditional stepper_inch/stepper_mm configuration and editing it to
suit.

Jeff

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Home and Limit Switch Setup in Stepconf

2008-01-18 Thread Jeff Epler
Dean,
If I got a report about these problems in 2.2.2, I lost it.
Can you let me know what problems you encountered?

I do know of some homing problems in 2.2.1, but the ones I know about
were fixed in 2.2.2.

Jeff

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] announcing a HAL driver for Mesa 7i43 EPP Anything I/O card

2008-01-18 Thread Jeff Epler
This looks like good stuff.  Thanks for your efforts to improve EMC2!

Jeff

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Python Component Loading

2008-01-23 Thread Jeff Epler
In my interface between the Arduino board and HAL, the first line of the
sample hal file is
loadusr -W arduino /dev/ttyUSB0 3
this runs the python script (which is actually at
/home/jepler/bin/arduino on my particular system) as a userspace
component.

Python programs aren't ever realtime components.

http://axis.unpy.net/01198594294

Jeff

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] Changing parameters within repeat loop

2008-01-28 Thread Jeff Epler
Here is my solution.  Change the definition of #1 and #3 to suit the hexagonal
hole pattern you need.

Screenshot:
http://emergent.unpy.net/index.cgi-files/sandbox/hexagonal-pattern.png

Program:
( Drill a system of holes in a hexagonal layout )
#1=8   (nuber of holes on the side of the large hexagon)
#3=.25 (row-spacing of repeats)

(subroutine O100: drill a row of holes along X)
(drill a row of holes starting at x0 and shifting over by dx until repeats)
(holes have been done.  drill down to z, retract to r)
O100 sub ([z] [x0] [dx] [repeats] [r])
#10=0
O110 while [#10 LT #4]
G82 X#2 Z#1 R#5 P.5
#2=[#2+#3]
#10=[#10+1]
O110 endwhile
O100 endsub

(subroutine O200: drill a row of holes along X, alternating direction)
#100=0  (used in O200 to track even/odd row)
O200 sub ([z] [x] [dx] [repeats] [r])
O201 if [#100 EQ 0]
#2=[#2+#3*[#4-1]]
#3=[-1*#3]
O201 endif
O100 call [#1] [#2] [#3] [#4]
#100=[1-#100]
O200 endsub

(Main program starts here)
#2=[#1*2-1]   (ending number of repeats)
F8
G0 X0 Y0 Z.1

(step 1: increasing from #1 to #2)
#11=0
#10=#1
O1 while [#10 LE #2]
G0 Y[#11]
O200 call [-1] [-.5*#3*#10] [#3] [#10]
#10=[#10+1]
#11=[#11+#3]
O1 endwhile

(step 2: decreasing back to #1)
#10=[#2-1]
O3 while [#10 GE #1]
G0 Y[#11]
O200 call [-1] [-.5*#3*#10] [#3] [#10]
#11=[#11+#3]
#10=[#10-1]
O3 endwhile

M2

Jeff

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


Re: [Emc-users] home+limits configuration

2008-01-29 Thread Jeff Epler
You can accomplish what you need in HAL or ClassicLadder.  For each
axis, there is a pin axis.N.homing which is TRUE when the joint is
homing.  You can use these together with the single input signal to get
the limit signal.  In C-like notation, this would be
on_limit = switch_input  !(axis_0_homing || axis_1_homing || 
axis_2_homing)

This configuration is undesirable, because if some bug causes motion on
one axis while another is homing, it won't be detectable within emc.

Jeff

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users


<    1   2   3   4   5   6   7   8   >