G02 is making two turns instead of one


-----BEGIN PGP SIGNED MESSAGE-----

Hello list,

yesterday I ran into a kind of weird problem.
I made, with lots of help from other-thanks again, emc-1.17 run.
The stg card drives my machine just fine. However, when I tried to run a small
test .ngc file, I noticed, that G2 is making two full 360 degrees turns instead
of one. The offending line is:
N170 G2 X0 Y0 I-15 J0 Z-360
X and Y axis are linear, Z is an angular axis were the tool is mounted.
Z-360 should turn the tool a any moment of the movement tangential to the
direction of the movement.
To see the context, please see the attached file
plottest1.ngc. With the last older emc distro I tried and which is still on the
same machine, emc-15-Mar-2000 this does not happen.
I include my ini, var, nml etc. file for completeness.
The machine this is happening on is RH6.1, rtlinux-2.2a, kernel 2.2.14 and
emc-1.17.

Another question concerning homing. My machine is using heidenhain scales for
the x and y axis feedback to emc. The current behaviour of emc with my setup
when homing the axis is to set 0.0 when it gets the marker input of the scale.
Unfortunately this can be somewhere just in the middle of the machine. It does
not look for the home switch and then look for the the marker input as I think
it should.
What am I doing wrong ?

Thanks for your time.

Regards
Max

--
Max Heise <max.heise-at-gmx.net>
Student Mechatronik/Automatisierungstechnik
PGP public key from:
http://www.fht-esslingen.de/~mahemt01/pgp50i.pub or any keyserver





-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 5.0i for non-commercial use
MessageID: PubEI10RzaC2rjRvq4B1o1zC9P0c+gmh

iQA/AwUBOpYshE5ZirXV1A6ZEQIiTgCgg8CGm61JZDs/mV55ZgaMZSZAHOcAn1H4
bvJOYqbegAqXmJgfaeDqJjig
=WEPp
-----END PGP SIGNATURE-----
; Änderung 1 31.10.2000 1900 Max Heise Dieser Kommentar
; 2.Ä.:11.11.00  R.St. Fault Polarity Axis En. pol.=1
; Max Heise, 22.02.2001, neu erstellt un alte Aenderungen hinuebergenommen
;
;
;
;
;
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; EMC controller parameters for generic controller. Make these what you need
; for your system.

; General section -------------------------------------------------------------
[EMC]

; Version of this INI file
VERSION =               $Revision: 1.5 $

; Name of machine, for use with display, etc.
MACHINE =               ncp220

; Name of NML file to use, default is emc.nml
NML_FILE =              ncp220.nml

; Debug level, 0 means no messages. See emc/src/emcnml/emcglb.h for others
; DEBUG =                 0x00000003
DEBUG =               0x7FFFFFFF

; Sections for display options ------------------------------------------------
[DISPLAY]

; Platform for GUI
PLAT =                  nonrealtime

; Name of display program, e.g., xemc
; DISPLAY =               xemc
DISPLAY =             tkemc
; DISPLAY =             yemc
; DISPLAY =             keystick
; DISPLAY =             emcpanel

; Cycle time, in seconds, that display will sleep between polls
CYCLE_TIME =            0.200

; Path to help file
HELP_FILE =             doc/help.txt

; Initial display setting for position, RELATIVE or ABSOLUTE
POSITION_OFFSET =       RELATIVE

; Initial display setting for position, COMMANDED or ACTUAL
POSITION_FEEDBACK =     ACTUAL

; Highest value that will be allowed for feed override, 1.0 = 100%
MAX_FEED_OVERRIDE =     1.2

; Prefix to be used
PROGRAM_PREFIX =        programs/

; Introductory graphic
INTRO_GRAPHIC = emc.gif
INTRO_TIME = 5

; Task controller section -----------------------------------------------------
[TASK]

; Platform for task controller
PLAT =                  nonrealtime

; Name of task controller program, e.g., bridgeporttask
TASK =                  bridgeporttask
; TASK =                minimilltask

; Cycle time, in seconds, that task controller will sleep between polls
CYCLE_TIME =            0.010

; Part program interpreter section --------------------------------------------
[RS274NGC]

; File containing interpreter variables
PARAMETER_FILE =        ncp220.var

; Motion control section ------------------------------------------------------
[EMCMOT]

; Platform for motion
PLAT =                  realtime
; PLAT =                        nonrealtime

; Name of motion control program
; EMCMOT =                steppermod.o
; EMCMOT =              freqmod.o
EMCMOT =              stgmod.o
; EMCMOT =              stg8mod.o
; EMCMOT =              emcmotsim

; Key for real OS shared memory, e.g., for simulated motion
SHMEM_KEY =             100

; Base address for physical shared memory, e.g., for real-time motion.
; Note that if you change this, you may need to change OS parameters, e.g.,
; /etc/lilo.conf
; SHMEM_BASE_ADDRESS =    0x1F00000
SHMEM_BASE_ADDRESS =  0x3F00000

; Base address of Servo To Go board
STG_BASE_ADDRESS =      0x200
; STG_BASE_ADDRESS =    0x300

; Address for parallel port used for steppers
PARPORT_IO_ADDRESS =    0x378

; Timeout for comm to emcmot, in seconds
COMM_TIMEOUT =          1.0

; Interval between tries to emcmot, in seconds
COMM_WAIT =             0.010

; Base task period, in seconds
PERIOD =                0.000016

; Trajectory planner section --------------------------------------------------
[TRAJ]

AXES =                  3
; COORDINATES =         X Y Z R P W
COORDINATES =           X Y Z
HOME =                  0 0 0
;LINEAR_UNITS =          0.03937007874016
LINEAR_UNITS =          1
ANGULAR_UNITS =         1.0
CYCLE_TIME =            0.010
;DEFAULT_VELOCITY =      0.0167
DEFAULT_VELOCITY =      50
MAX_VELOCITY =          200
DEFAULT_ACCELERATION =  2500
MAX_ACCELERATION =	2500
;MAX_VELOCITY =          1.2
;DEFAULT_ACCELERATION =  20.0
;MAX_ACCELERATION =      20.0
PROBE_INDEX =           0
PROBE_POLARITY =        1

; Axes sections ---------------------------------------------------------------

; First axis
[AXIS_0]

TYPE =				LINEAR
;UNITS =				0.03937007874016
UNITS =				1 ; MAX: 3.4.00
HOME = 				0.000
;MAX_VELOCITY =			1.2
MAX_VELOCITY =	                200
P = 0.500
I = 0.000
D = 0.000
FF0 = 0.000
FF1 = 0.000
FF2 = 0.000
BACKLASH = 0.000
BIAS = 0.000
MAX_ERROR = 10000.000
DEADBAND = 0.000
CYCLE_TIME =			0.001000
INPUT_SCALE =			100	0
OUTPUT_SCALE = 1.000 0.000
MIN_LIMIT =			-100000.0
MAX_LIMIT =			 100000.0
MIN_OUTPUT =			-10
MAX_OUTPUT =			10
FERROR = 100000.000
;MIN_FERROR 13.5.00 - hochgesetzt, da sonst Achse FOLLOWING_ERROR
MIN_FERROR = 10.000
HOMING_VEL =			10
HOME_OFFSET =			-50.0
ENABLE_POLARITY =		1
;MIN_LIMIT_SWITCH_POLARITY =	0
;MAX_LIMIT_SWITCH_POLARITY =	0
HOME_SWITCH_POLARITY =		0
MIN_LIMIT_SWITCH_POLARITY =	1
MAX_LIMIT_SWITCH_POLARITY =	1
;HOME_SWITCH_POLARITY =		1
HOMING_POLARITY =		1
JOGGING_POLARITY =		1
FAULT_POLARITY =		1
; Parameters for Inland Motor BMHS-0701 X 20
TORQUE_UNITS =			OZ_IN
ARMATURE_RESISTANCE =		1.10
ARMATURE_INDUCTANCE =		0.0120
BACK_EMF_CONSTANT =		0.0254
ROTOR_INERTIA =			0.0104
DAMPING_FRICTION_COEFFICIENT =	0.083
SHAFT_OFFSET =			0
REVS_PER_UNIT =			10
; Parameters for generic amplifier
AMPLIFIER_GAIN =		1
MAX_OUTPUT_CURRENT =		10
LOAD_RESISTANCE =		1
; parameters for generic encoder
COUNTS_PER_REV =		4096

; Second axis
[AXIS_1]

TYPE =				LINEAR
;UNITS =				0.03937007874016
UNITS =				1
HOME = 				0.000
;MAX_VELOCITY =			1.2
MAX_VELOCITY =	                200
P = 0.5
I = 0.000
D = 0.000
FF0 = 0.000
FF1 = 0.000
FF2 = 0.000
BACKLASH = 0.000
BIAS = 0.000
MAX_ERROR = 10000.000
DEADBAND = 0.000
CYCLE_TIME =			0.001000
INPUT_SCALE =			100	0
OUTPUT_SCALE = 1 0
MIN_LIMIT =			-100000.0
MAX_LIMIT =			100000.0
MIN_OUTPUT =			-10
MAX_OUTPUT =			10
FERROR = 10000.000
;MIN_FERROR 13.5.00 - hochgesetzt, da sonst Achse FOLLOWING_ERROR
MIN_FERROR = 10.0
HOMING_VEL =			20
HOME_OFFSET =			0.0
ENABLE_POLARITY =		1
;MIN_LIMIT_SWITCH_POLARITY =	1
;MAX_LIMIT_SWITCH_POLARITY =	1
;HOME_SWITCH_POLARITY =		1
MIN_LIMIT_SWITCH_POLARITY =	0
MAX_LIMIT_SWITCH_POLARITY =	0
HOME_SWITCH_POLARITY =		0
HOMING_POLARITY =		1
JOGGING_POLARITY =		1
FAULT_POLARITY =		1
; Parameters for Inland Motor BMHS-0701 X 20
TORQUE_UNITS =			OZ_IN
ARMATURE_RESISTANCE =		1.10
ARMATURE_INDUCTANCE =		0.0120
BACK_EMF_CONSTANT =		0.0254
ROTOR_INERTIA =			0.0104
DAMPING_FRICTION_COEFFICIENT =	0.083
SHAFT_OFFSET =			0
REVS_PER_UNIT =			10
; Parameters for generic amplifier
AMPLIFIER_GAIN =		1
MAX_OUTPUT_CURRENT =		10
LOAD_RESISTANCE =		1
; parameters for generic encoder
COUNTS_PER_REV =		4096

; Third axis
[AXIS_2]

TYPE =				ANGULAR
UNITS =				2
HOME = 				0.000
MAX_VELOCITY =			360
P = 0.500
I = 0.000
D = 0.000
FF0 = 0.000
FF1 = 0.000
FF2 = 0.000
BACKLASH = 0.000
BIAS = 0.000
MAX_ERROR = 10000.000
DEADBAND = 0.000
CYCLE_TIME =			0.001000
INPUT_SCALE =			-61.5 0
OUTPUT_SCALE = 1.000 0.000
MIN_LIMIT =			-9999910.0
MAX_LIMIT =			9999910.0
MIN_OUTPUT =			-10
MAX_OUTPUT =			10
FERROR = 99900.000
MIN_FERROR = 999.10
HOMING_VEL =			36
HOME_OFFSET =			-7.5
ENABLE_POLARITY =		1
;MIN_LIMIT_SWITCH_POLARITY =	1
;MAX_LIMIT_SWITCH_POLARITY =	1
HOME_SWITCH_POLARITY =		1
MIN_LIMIT_SWITCH_POLARITY =	0
MAX_LIMIT_SWITCH_POLARITY =	0
;HOME_SWITCH_POLARITY =		0
HOMING_POLARITY =		1
JOGGING_POLARITY =		1
FAULT_POLARITY =		1
; Parameters for Inland Motor BMHS-0701 X 20
TORQUE_UNITS =			OZ_IN
ARMATURE_RESISTANCE =		1.10
ARMATURE_INDUCTANCE =		0.0120
BACK_EMF_CONSTANT =		0.0254
ROTOR_INERTIA =			0.0104
DAMPING_FRICTION_COEFFICIENT =	0.083
SHAFT_OFFSET =			0
REVS_PER_UNIT =			10
; Parameters for generic amplifier
AMPLIFIER_GAIN =		1
MAX_OUTPUT_CURRENT =		10
LOAD_RESISTANCE =		1
; parameters for generic encoder
COUNTS_PER_REV =		4096



; section for main IO controller parameters -----------------------------------
[EMCIO]

; Platform for IO controller
PLAT =                  nonrealtime

; Name of IO controller program, e.g., bridgeportio
EMCIO =                 bridgeportio
; EMCIO =               minimillio
; EMCIO =               simio

; cycle time, in seconds
CYCLE_TIME =    0.100

; tool table file
TOOL_TABLE =    ncp220.tbl

; address for parallel port used for auxiliary IO
PARPORT_IO_ADDRESS =    0x378

; wait times in seconds for spindle brake, release
SPINDLE_OFF_WAIT          =     1.0
SPINDLE_ON_WAIT           =     1.5

; external digital inputs, outputs are always 0 for 0V, 1 for 5/24V

; digital in bits

ESTOP_SENSE_INDEX         =     1
LUBE_SENSE_INDEX          =     2

; digital in polarity, 0 is inverted, 1 is normal
; controller compares with polarity, equal means on, not equal means off

ESTOP_SENSE_POLARITY      =     1
LUBE_SENSE_POLARITY       =     1

; digital out bits

SPINDLE_FORWARD_INDEX     =     1
SPINDLE_REVERSE_INDEX     =     0
MIST_COOLANT_INDEX        =     6
FLOOD_COOLANT_INDEX       =     7
SPINDLE_DECREASE_INDEX    =     8
SPINDLE_INCREASE_INDEX    =     9
ESTOP_WRITE_INDEX         =     10
SPINDLE_BRAKE_INDEX       =     11

; analog out bits

SPINDLE_ON_INDEX          =     3

; digital out polarity, 0 is inverted, 1 is normal
; controller writes the polarity to turn on, opposite of polarity to turn off

SPINDLE_FORWARD_POLARITY  =     0
SPINDLE_REVERSE_POLARITY  =     0
MIST_COOLANT_POLARITY     =     0
FLOOD_COOLANT_POLARITY    =     0
SPINDLE_DECREASE_POLARITY =     1
SPINDLE_INCREASE_POLARITY =     1
ESTOP_WRITE_POLARITY      =     1
SPINDLE_BRAKE_POLARITY    =     0
SPINDLE_ENABLE_POLARITY   =     1

; section for external NML server parameters ----------------------------------
[EMCSERVER]

; Name of NML server, e.g., emcsvr; if not found then none will run
; EMCSERVER =           emcsvr

; section for emc stripchart  parameters ----------------------------------
[EMCSTRIP]

; Name of strip chart display program e.g.  emcstripchart; if not found then none will run
; EMCSTRIP =            emcstripchart

; OPTIONS for emcstripchart ussually -f something.conf; This file says which
; variables to plot, colors etc. -u  changes the update rate.
OPTIONS = -f emcstrip.conf.ferror


# Note: controller is the master for all NML channels, and therefore is the
# first to start.

# Buffers
# Name                  Type    Host            size    neut?   (old)   buffer# MP ---

# Top-level buffers to EMC
B emcCommand            SHMEM   localhost       8192    0       0       1       12 1001 TCP=5005 disp
B emcStatus             SHMEM   localhost       8192    0       0       2       12 1002 TCP=5005 disp
B emcError              SHMEM   localhost       8192    0       0       3       12 1003 TCP=5005 disp queue

# These are for the IO controller, EMCIO
B toolCmd               SHMEM   localhost       1024    0       0       4       12 1004 TCP=5005 disp
B toolSts               SHMEM   localhost       4096    0       0       5       12 1005 TCP=5005 disp
B spindleCmd            SHMEM   localhost       1024    0       0       6       12 1006 TCP=5005 disp
B spindleSts            SHMEM   localhost       1024    0       0       7       12 1007 TCP=5005 disp
B coolantCmd            SHMEM   localhost       1024    0       0       8       12 1008 TCP=5005 disp
B coolantSts            SHMEM   localhost       1024    0       0       9       12 1009 TCP=5005 disp
B auxCmd                SHMEM   localhost       1024    0       0       10      12 1010 TCP=5005 disp
B auxSts                SHMEM   localhost       1024    0       0       11      12 1011 TCP=5005 disp
B lubeCmd               SHMEM   localhost       1024    0       0       12      12 1012 TCP=5005 disp
B lubeSts               SHMEM   localhost       1024    0       0       13      12 1013 TCP=5005 disp

# Processes
# Name          Buffer          Type    Host            Ops     server? timeout master? cnum

P emc           emcCommand      LOCAL   localhost       RW      0       1.0     1       0
P emc           emcStatus       LOCAL   localhost       W       0       1.0     1       0
P emc           emcError        LOCAL   localhost       W       0       1.0     0       0
P emc           toolCmd         LOCAL   localhost       W       0       1.0     0       0
P emc           toolSts         LOCAL   localhost       R       0       1.0     0       0

P emcpanel      emcCommand      LOCAL   localhost       W       0       10.0    0       1
P emcpanel      emcStatus       LOCAL   localhost       R       0       10.0    0       1
P emcpanel      emcError        LOCAL   localhost       R       0       10.0    0       1
P emcpanel      toolCmd         LOCAL   localhost       W       0       10.0    0       1
P emcpanel      toolSts         LOCAL   localhost       R       0       10.0    0       1

P emcsvr        emcCommand      LOCAL   localhost       W       1       1.0     0       2
P emcsvr        emcStatus       LOCAL   localhost       R       1       1.0     0       2
P emcsvr        emcError        LOCAL   localhost       R       1       1.0     0       2
P emcsvr        toolCmd         LOCAL   localhost       W       1       1.0     0       2
P emcsvr        toolSts         LOCAL   localhost       R       1       1.0     0       2

P tool          emcError        LOCAL   localhost       W       0       1.0     1       3
P tool          toolCmd         LOCAL   localhost       RW      0       1.0     1       3
P tool          toolSts         LOCAL   localhost       W       0       1.0     1       3
P tool          spindleCmd      LOCAL   localhost       W       0       1.0     1       3
P tool          spindleSts      LOCAL   localhost       R       0       1.0     1       3
P tool          coolantCmd      LOCAL   localhost       W       0       1.0     1       3
P tool          coolantSts      LOCAL   localhost       R       0       1.0     1       3
P tool          auxCmd          LOCAL   localhost       W       0       1.0     1       3
P tool          auxSts          LOCAL   localhost       R       0       1.0     1       3
P tool          lubeCmd         LOCAL   localhost       W       0       1.0     1       3
P tool          lubeSts         LOCAL   localhost       R       0       1.0     1       3

P spindle       emcError        LOCAL   localhost       W       0       1.0     0       4
P spindle       spindleCmd      LOCAL   localhost       R       0       1.0     0       4
P spindle       spindleSts      LOCAL   localhost       W       0       1.0     0       4

P coolant       emcError        LOCAL   localhost       W       0       1.0     0       5
P coolant       coolantCmd      LOCAL   localhost       R       0       1.0     0       5
P coolant       coolantSts      LOCAL   localhost       W       0       1.0     0       5

P aux           emcError        LOCAL   localhost       W       0       1.0     0       6
P aux           auxCmd          LOCAL   localhost       R       0       1.0     0       6
P aux           auxSts          LOCAL   localhost       W       0       1.0     0       6

P lube          emcError        LOCAL   localhost       W       0       1.0     0       7
P lube          lubeCmd         LOCAL   localhost       R       0       1.0     0       7
P lube          lubeSts         LOCAL   localhost       W       0       1.0     0       7

P emcJavaGui    emcCommand      REMOTE  localhost       W       0       1.0     0       8
P emcJavaGui    emcStatus       REMOTE  localhost       R       0       1.0     0       8
P emcJavaGui    emcError        REMOTE  localhost       R       0       1.0     0       8

P keystick      emcCommand      LOCAL   localhost       W       0       10.0    0       9
P keystick      emcStatus       LOCAL   localhost       R       0       10.0    0       9
P keystick      emcError        LOCAL   localhost       R       0       10.0    0       9
P keystick      toolCmd         LOCAL   localhost       W       0       10.0    0       9
P keystick      toolSts         LOCAL   localhost       R       0       10.0    0       9

P xemc          emcCommand      LOCAL   localhost       W       0       10.0    0       10
P xemc          emcStatus       LOCAL   localhost       R       0       10.0    0       10
P xemc          emcError        LOCAL   localhost       R       0       10.0    0       10
P xemc          toolCmd         LOCAL   localhost       W       0       10.0    0       10
P xemc          toolSts         LOCAL   localhost       R       0       10.0    0       10
POC     FMS     LEN     DIAM    COMMENT
1       1       0.0     0.0     first tool
2       2       0.0     0.0
3       3       0.0     0.0
4       4       0.0     0.0
32      32      0.0     0.0     last tool
5161	0.000000
5162	0.000000
5163	0.000000
5164	0.000000
5165	0.000000
5166	0.000000
5181	0.000000
5182	0.000000
5183	0.000000
5184	0.000000
5185	0.000000
5186	0.000000
5211	80.200000
5212	136.000000
5213	0.000000
5214	0.000000
5215	0.000000
5216	0.000000
5220	1.000000
5221	0.000000
5222	0.000000
5223	0.000000
5224	0.000000
5225	0.000000
5226	0.000000
5241	0.000000
5242	0.000000
5243	0.000000
5244	0.000000
5245	0.000000
5246	0.000000
5261	0.000000
5262	0.000000
5263	0.000000
5264	0.000000
5265	0.000000
5266	0.000000
5281	0.000000
5282	0.000000
5283	0.000000
5284	0.000000
5285	0.000000
5286	0.000000
5301	0.000000
5302	0.000000
5303	0.000000
5304	0.000000
5305	0.000000
5306	0.000000
5321	0.000000
5322	0.000000
5323	0.000000
5324	0.000000
5325	0.000000
5326	0.000000
5341	0.000000
5342	0.000000
5343	0.000000
5344	0.000000
5345	0.000000
5346	0.000000
5361	0.000000
5362	0.000000
5363	0.000000
5364	0.000000
5365	0.000000
5366	0.000000
5381	0.000000
5382	0.000000
5383	0.000000
5384	0.000000
5385	0.000000
5386	0.000000
N1 ( using M8 to turn on creasing tool )
N2 ( using M7 to turn on knife tool )
N3 ( using M9 to turn of any tool )
N4 G91 F20000
N5 G21
N10 G92X0Y0
N14 G0 X30 Y78
N18 G90 Z0
N20 G91
N22 G90
N24 G0 Z0
N26 G91
N28 G54 X0 Y0 F6000
N30 M8
N32 G1 X50
N34 M9
N36 G0 Z90
N38 M8
N40 G1 Y50
N42 M9
N44 G0 Z90
N46 M8
n47 g1 x-50
N48 M9
N50 G0 Z90
N52 M8
N54 G1 Y-50
N56 M9
N58 G90
N60 G0 Z0
N62 G91
N64 G0 y-48
N66 G0 Z-90
N68 M7
N70 G1 Y-30
N72 M9
N74 G0 Z90
N76 M7
N78 G1 X50
N80 M9
N82 G0 Z90
N84 M7
N86 G1 Y30
N88 M9
N90 G0 Z-90
N92 M7
N94 G1 X30
N96 M9
N98 G0 Z90
N100 M7
N102 G1 Y50
N104 M9
N106 G0 Z90
N108 M7
N110 G1 X-30
N112 M9
N114 G0 Z-90
N116 M7
N118 G1 Y30
N120 M9
N122 G0 Z90
N124 M7
N126 G1 X-50
N128 M9
N130 G0 Z90
N132 M7
N134 G1 Y-30
N136 M9
N138 G0 Z-90
N140 M7
N142 G1 X-30
N144 M9
N146 G0 Z90
N148 M7
N150 G1 Y-50
N152 M9
N154 G0 Z90
N156 M7
N158 G1 X30
N160 M9
N162 G0 X40 Y25
N164 Z-90
N166 M7
N168 F3000
N170 G2 X0 Y0 I-15 J0 Z-360
N172 M9
N174 G0 Z90
N176 G91
N178 M30





Date Index | Thread Index | Back to archive index | Back to Mailing List Page

Problems or questions? Contact