Thanks Bill,

Looks like quite a meal. I'll need to digest for a bit after consuming
(brp).

-----Original Message-----
From: Bill Payter [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 06, 2003 2:05 PM
To: Michael Senack; [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [mfg-smartcam] NEXTPT template word

Right, here goes. LOOK PARTICULARLY AT THE @CALCS SECTION IN THE TEMPLATE
FILE, it' 205 lines long!!! Also programme test99a.pm4 which has every
possible move, as described below.

This code-gen was written for a four-axis jig-grinding machine a few years
ago, the machine grinds INTERNAL profiles. The customer has production
milling.

The fourth (A) axis is the grinding head, it is programmed incrementally and
has to be kept at a right-angle to the part profile, e.g. if the line is at
90 degrees (south to north) the A-axis will be at zero degrees. If there is
then a 90 degree tangential CCW arc the A-axis must roll through 90 degrees
around the arc. That is easy to code. The next line could then be a
tangential line at 180 degrees, again that's easy.

The difficult bit is when lines and arcs are not tangential to each other or
when a line goes into another line, arc into non-tangential arc etc. as the
A-axis has to pivot around the corner whilst the X and Y axis do not move.

So, there are these possible moves:-

Line to line at same angle.
Line to line with + or - angle.
Line to tangential arc CW.
Line to tangential arc CCW.
Line to non-tangential arc CW.
Line to non-tangential arc CCW.
Arc to tangential line.
Arc to non-tangential line with + or - angle.
Arc to tangential arc CW.
Arc to tangential arc CCW.
Arc to non-tangential arc CW.
Arc to non-tangential arc CCW.

Profiles must always have a line and arc lead-in and out for this code-gen
to work, so the 'logic' always has the same start. After the arc-on move
(let's call this element number 2), the next element could be a line or an
arc, tangential or not, (element number 3) . SO the actual arc-on move is
stored and not output until the NEXT element, a line or an arc. The line or
arc section KNOWS that the last element was an arc and will output the code
accordingly. What's happening is that the XY co-ordinates for element number
'n' are stored and output by element number 'n+1', co-ords for element 'n+1'
are stored and output by element 'n+2' etc. etc.

I built this code-gen up over about three weeks after I'd told the customer
I could do it. It is probably long-winded and could be shortened, BUT IT
WORKS. After installation I have not had one support call.


Good luck.



----- Original Message -----
From: "Michael Senack" <[EMAIL PROTECTED]>
To: "Bill Payter" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Monday, October 06, 2003 7:01 PM
Subject: RE: [mfg-smartcam] NEXTPT template word


Yes

-----Original Message-----
From: Bill Payter [mailto:[EMAIL PROTECTED]
Sent: Monday, October 06, 2003 1:31 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: [mfg-smartcam] NEXTPT template word

Are you guys interested in how I got SmartCAM to 'look-ahead' or not?

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, October 06, 2003 5:19 PM
Subject: RE: [mfg-smartcam] NEXTPT template word


> Calling @CYCLCHG from @LINE will not give you the look ahead
information
you
> are seeking. As to why they wouldn't have #MOV update, I don't know.
>
> ==================================================
>  Fred Lauzus, CAM Programming Coordinator
>  High Steel Structures, Incorporated
>  mailto:[EMAIL PROTECTED] http://www.highsteel.com
> ==================================================
>
>
>
>
> -----Original Message-----
> From: Pete Ruehle [mailto:[EMAIL PROTECTED]
> Sent: Monday, October 06, 2003 10:03 AM
> To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED]
> Subject: RE: [mfg-smartcam] NEXTPT template word
>
>
> Fred,
>
> I would have to call @CYCLCHG from within the current section (@LINE
in
this
> case) without exiting.  I need geometric information from the next
element
> (arc) in order to process the current one (line).  And if, by
definition,
> #NEXTPT causes SmartCAM to skip to the next element in the database,
why
> wouldn't #MOV update?
>
> Pete
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Monday, October 06, 2003 6:26 AM
> To: [EMAIL PROTECTED]
> Subject: RE: [mfg-smartcam] NEXTPT template word
>
> Pete,
>
> I believe you can read #ARAD and other template words in the @CYCLCHG
> section as well.
>
> As for #NEXTPT not updating #MOV, I believe that is by design, to go
to
the
> next "point" in the current mode.
>
> ==================================================
>  Fred Lauzus, CAM Programming Coordinator
>  High Steel Structures, Incorporated
>  mailto:[EMAIL PROTECTED] http://www.highsteel.com
> ==================================================
>
>
>
>
>
>
> -----Original Message-----
> From: Pete Ruehle [mailto:[EMAIL PROTECTED]
> Sent: Friday, October 03, 2003 4:45 PM
> To: '[EMAIL PROTECTED]'; [EMAIL PROTECTED]
> Subject: RE: [mfg-smartcam] NEXTPT template word
>
>
> Thanks Fred.  Yes, I'm seeing that it creates quite a bit of havoc.
The
> SECNAME or SECNUM would work for me except for one issue.  If the
following
> element (or secname) is an arc, I need to extract the radius value
(#ARAD).
> I can't see how to do that without resorting to #NEXTPT.  And one
(strange?)
> thing I'm finding is that it doesn't seem to update #MOV.  In other
words,
> if I'm in the @LINE section and #NEXTPT is an arc, the value of #MOV
stays
> at 1.  All other words are updated.  This is why the simple test that
I
> posted does not test true if #NEXTPT is an arc.
>
> Pete
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Sent: Friday, October 03, 2003 1:54 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [mfg-smartcam] NEXTPT template word
>
> Pete,
>
>
>
> #NEXTPT is typically used to force the database ahead to the next
point in
> X,Y & Z. This is not a "look" ahead but actually advances code
generation
in
> the database and may be hazardous the way you are using it from the
@LINE
> section.
>
> For an alternative, use the @CYCLCHG section. This section is
automatically
> called between each template section the system calls. This section
can
look
> ahead to the next section called using #SECNAME and #SECNUM.
>
> @CYCLCHG
>
> #IFSTR(#SECNAME=ARC)<#EVAL(#U18=1)>#ELSE<#EVAL(#U18=0)>
>
> #IF(#SECNUM=12)<#EVAL(#U18=1)>#ELSE<#EVAL(#U18=0)>
>
> From the Alphabetical List of Template Words
>
http://microsystemsgeorgia.com/Alphabetical%20List%20of%20Template%20Wor
ds.d
> oc
>
> #SECNAME
>
> Description: Name of section to be called. Made available for testing
in
the
> @CYCLCHG section
>
> #SECNUM
>
> Description: Internal numeric value of section to be called. Made
available
> for testing in the @CYCLCHG section.
>
> 1 = @START
>
> 2 = @TOOLCHG
>
> 3 = @END
>
> 4 = @TORCH
>
> 5 = @ATTCHMT
>
> 6 = @PNCHTL
>
> 7 = @STPROF
>
> 8 = @ENDPROF
>
> 9 = @RAP
>
> 10 = @LINE
>
> 11 = @SHPRF
>
> 12 = @ARC
>
> 13 = @XZARC
>
> 14 = @YZARC
>
> 15 = @ZCLRMV
>
> 16 = @ZCHKMV
>
> 17 = @ZDPTHMV
>
> 18 = @CORNER
>
> 19 = @FXDCAN
>
> 20 = @FXD1
>
> 21 = @FXD2
>
> 22 = @FXD3
>
> 23 = @FXD4
>
> 24 = @FXD5
>
> 25 = @FXD6
>
> 26 = @FXD7
>
> 27 = @SPEEDS
>
> 28 = @TPINDX
>
> 29 = @HELIX
>
> 30 = @XZHELIX
>
> 31 = @YZHELIX
>
> 32 = @GOSUB
>
> 33 = @SUBDEF
>
> 34 = @ENDDEF
>
> 35 = @WAIT
>
> 36 = @WKSYS
>
> 37 = @FXDDEF
>
> 38 = @STEPCHG
>
> 39 = @CYCLCHG
>
> 40 = @TRAVERSE
>
> 41 = @OP_DRL
>
> 42 = @OP_SPDRL
>
> 43 = @OP_CDRL
>
> 44 = @OP_PDRL
>
> 45 = @OP_REAM
>
> 46 = @OP_TAP
>
> 47 = @OP_CBORE
>
> 48 = @OP_BORE
>
> 49 = @OP_SPFACE
>
> 50 = @OP_CSINK
>
> 51 = @OP_SPEC
>
> 52 = @OP_THD
>
> 53 = @OP_GRV
>
> 54 = @OP_FGRV
>
> 55 = @OP_FACE
>
> 56 = @OP_TURN
>
> 57 = @COOLANT
>
> 58 = @CYCLE
>
> 59 = @NURBS
>
> ==================================================
> Fred Lauzus, CAM Programming Coordinator
> High Steel Structures, Incorporated
> mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
http://www.highsteel.com
> <http://www.highsteel.com>
> ==================================================
>
> -----Original Message-----
> From: Pete Ruehle [mailto:[EMAIL PROTECTED]
> Sent: Friday, October 03, 2003 1:50 PM
> To: SmartCam Forum (SmartCam Forum)
> Subject: [mfg-smartcam] NEXTPT template word
>
>
>
> I'm trying to use the #NEXTPT word to test if the element following a
line
> is an arc.  This is what I have:
>
>
>
> #CALL(CHKRAD)  //in the @LINE section
>
>
>
> @CHKRAD
>
> #NEXTPT
>
> #IF(#MOV=2,#OR#MOV=3)<#EVAL(#U18=1)>#ELSE<#EVAL(#U18=0)>
>
>
>
> The test is never true, even if the next element is an arc.  #MOV is
always
> 1.  I'm not sure if I'm using the #NEXTPT word correctly.  Help.
>
>
>
> Thanks,
>
> Pete
>
>
>
>
>
> ======================================================================
> To find out more about this mailing list including how to unsubscribe,
> send the message "info mfg-smartcam" to [EMAIL PROTECTED]
> ======================================================================
> ======================================================================
> To find out more about this mailing list including how to unsubscribe,
> send the message "info mfg-smartcam" to [EMAIL PROTECTED]
> ======================================================================
> ======================================================================
> To find out more about this mailing list including how to unsubscribe,
> send the message "info mfg-smartcam" to [EMAIL PROTECTED]
> ======================================================================
>
>
>
>

======================================================================
To find out more about this mailing list including how to unsubscribe,
send the message "info mfg-smartcam" to [EMAIL PROTECTED]
======================================================================





======================================================================
To find out more about this mailing list including how to unsubscribe,
send the message "info mfg-smartcam" to [EMAIL PROTECTED]
======================================================================

Reply via email to