0% found this document useful (0 votes)
701 views22 pages

An Introduction To ESPRIT Post Processor

This document provides an introduction to ESPRIT post processors. It discusses new features in ESPRIT like park positioning and tool change locations. It also covers important post processor elements like system variables, machine modes, formatable codes, and examples. System variables allow default values and special functions to be called. Machine modes set default machine values and requirements. Formatable codes return values from ESPRIT operations and how they will be formatted in output code. Examples demonstrate how these elements work together in a post processor.

Uploaded by

Taner Akkas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
701 views22 pages

An Introduction To ESPRIT Post Processor

This document provides an introduction to ESPRIT post processors. It discusses new features in ESPRIT like park positioning and tool change locations. It also covers important post processor elements like system variables, machine modes, formatable codes, and examples. System variables allow default values and special functions to be called. Machine modes set default machine values and requirements. Formatable codes return values from ESPRIT operations and how they will be formatted in output code. Examples demonstrate how these elements work together in a post processor.

Uploaded by

Taner Akkas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

Post Perfect: An Introduction to ESPRIT Post Processor

1. Introduction
This class is an introduction to ESPRIT post processor. You will be given tips that will
help you write your own post processor or to modify an existing one.
This class is also a prereuisite for the more advanced post processor classes: Post
Perfect: 4- and 5-Axis Output and Post Perfect: Mill-Turn Output.
Iportant note:
Please always refer to ESPRIT Post !elp "in ESPRIT go to !elp # Post !elp$. %ost of
the points below are covered& explained and detailed there.
'. !"at#s ne$ in ESPRIT post processor: ne$ par% c&cle
and tool c"an'e location
( new Par) cycle is introduced in ESPRIT '*+'. It is now possible to par) a head
without selecting a tool. Par) positioning has also been improved and optimi,ed.
You can even position your head in the machine wor) coordinate system "-./$.
0inally& new return modes have been implemented to precisely control how to par)
your tool.
1n every tool pages& there is also a new tool change movement option2 it is possible
to select machine wor) coordinate system "-./$.
Please see the class (et )our Mo*e On: Strate'ies for Multitas%in' and Pinc"
Mac"inin' for more details.
Par) and tool change do now share the same positioning options. These
improvements will reuire some changes in your post processor. These will be
explained and documented in the class Post Perfect: Mill-Turn Output.
/. S&ste *aria+les
a. Introduction
System variables serve two purposes2
They allow certain default values to be set
1ther variables can be used to call special features.
The structure used in the system variables section is2
****** SYSTEM VARIABLES ******
Keyword : Value
+. ,oonl& used *aria+les
Two system variables that are commonly used are 34ode5efault and
34odeIncrement. 34ode5efault is the seuence number to start the program and
34odeIncrement is how much the seuence number increases on each line.
1ther system variables allow the user to call up special functions or conditions. 0or
example& some machines cannot have spaces in the 34 code. The system variable
called RemoveSpaces provides this function.
Perhaps the most important system variable is %achineTolerance. It should be set
to the resolution of the 34 machine. If the 34 machine can ma)e moves out to the
fifth decimal place& then set %achineTolerance to *.****+ in the post. (ny move
that is less than the %achineTolerance value will be eliminated from the 34 code
output.
Some system variables have a more advanced use in the Examples section of the
post. In that case& system variables and functions can be used to determine certain
values from ESPRIT.
c. -ess is More
6ith system variables& the rule is2 do not add variables unless you need to set a
value other than default.
d. Exaple: ,"an'e .-code increent
If the system variable 34odeIncrement is set + in your post processor& whenever
Seuence3umber 3 will be called& the current seuence number will incremented
by +. 3ote that with the settings below& 3 will start at 3+ "0irst 3 value output in the
code will be2 34ode5efault * plus 34odeIncrement +$ and will reach at the most
37777.
****** SYSTEM VARIABLES ******
NCodeIncrement : 1
NCodee!ault : "
Ma#NCode : $$$$
****** %&RMATABLE C&ES ******
Se'uenceNum(er : N N ) N N " N ) N N " " * * * *
Sample 34 code2
N1 +S,INLE*1 -R&&VIN- %ACE * CANNE CYCLE.
N2 +T1/1/ -R&&VIN- INSERT %ACE 0V.
N3 -12 3"
N4 -12 V" 4"
N5 -/)
N6 -"" T1/1/
3ow& if you change 34odeIncrement to .& you 34 code will be2
N5 +S,INLE*1 -R&&VIN- %ACE * CANNE CYCLE.
N10 +T1/1/ -R&&VIN- INSERT %ACE 0V.
N15 -12 3"
N20 -12 V" 4"
N25 -/)
N30 -"" T1/1/
8. Mac"ine odes
a. Introduction
%achine modes serve two purposes2
To set certain default machine values in case they are not set in the ESPRIT
program
To give important machine reuirements that are not found within any of
the technology in ESPRIT
The structure used in the machine modes section is2
Keyword : Value
+. Re*ie$ of coon ites
9elow is an example of typical machine modes2
****** MAC5INE M&ES ******
Coord6nateMode : A(7olute
Mea7urementMode : Metr6c
C6rcleMode : By08"
CenterMode : Increment%romStart
4or9,laneMode : :Y,lane
0or example& the default for %easurement%ode can be Inch or %etric.
4oordinate%ode can be Incremental but is almost always set to (bsolute. If these
values have already been programmed in ESPRIT& these two machine modes are
ignored.
To specify the capabilities of the machine& 4ircle%ode specifies how much of a circle
the 34 machine can cut in one bloc) of 34 code. If the machine can cut a /:*;
degree arc in one bloc) of code& then 9y/:* can be set for 4ircle%ode. If the
machine can cut up to 7* degrees in one bloc) and must brea) down circles larger
than 7*& then use 9y<uadrant.
c. Exaple: ,"an'e ,ircleMode
If the machine mode 4ircle%ode is set 9y/:* in your post processor& any arc up to a
full circle can be output as one line of 34 code.
****** MAC5INE M&ES ******
C6rcleMode : 1
Sample 34 code2
-"0 :/2;0<1 Y1/;$$2 =*</;$11 R18;"
3ow& if you change C6rcleMode to 9y+=* "arcs which are greater than +=* degrees
will be bro)en up into multiple lines of 34 code$& you 34 code will be2
-"0 :/8;2< Y*1/;$$2 =*<8;)<$ R18;"
:/2;0<1 Y1/;$$2 =*</;$11 R18;"
.. /orata+le codes
a. Introduction
0ormatable codes are used to return values from the operation technology in
ESPRIT& such as the tool number and >& Y& and ? coordinates.
The structure of the formatable codes section is uniue in that it has several
columns of information.
Keyword : Sym(ol I1 I1 I0 I) I/ M1 M1 M0 M) M/ S =1 =1 =0 =)
The columns to the right of the Symbol define the numeric field for the value that is
output. 3umeric values can be output with or without leading digits& trailing digits& a
decimal point& or a positive or negative sign. The last set of columns "?+;?8$ give
the format for when the value is ,ero.
( post may have the following in its formatable codes section2
************************** %&RMATABLE C&ES **************************
* Inc> &ut?ut Metr6c &ut?ut @A* =ero Value*
* L B ; T B L B ; T B L ; B @A**
************************************************************************
:A(7olute : : N ) Y N ) N / Y N 0 1 1 N " "
ToolNum(er : T Y 1 N N " Y 1 N N " " * * * *
6ameterCom?en7at6on : Y 1 N N " Y 1 N N " " 1 N " "
The )eyword returns a value from ESPRIT. 0or example& >(bsolute returns the value
of the > coordinate in ESPRIT. The symbol for >(bsolute is usually >.
0ormatable codes must be defined in the formatable codes section before they can
be used in other sections of the post file.
9elow is an example of formatable codes being used in the @Examples@ section. The
>& Y& and ? coordinates& the I and A circle center coordinates& the T for the tool
number& S for spindle speed& and 0 for feedrate are all formatable codes.
e#CC6rcle : N -1< C6rcle6rect6on* : Y I* D* %
e#C&t>erToolC>anEe : ToolC>anEeComment
: N T M"8
e#CRa?6d : N -"" : Y =
e#CL6near : N -"1 : Y = %
+. Exaples of coon forats
6hen outputting program numbers "O0001+SAM,LE 1.$& the first four digits need to
be filled with ,eros. To achieve this& Program3umber can be set this way2
,roEramNum(er : & Y ) N N " Y ) N N " " * * * *
O:
Symbol that will be output in 34 code.
) 4 . . 0:
The first Y will fill the digits with ,erosB 8 sets which digits will be filed "8 first digits$B
3 to ma)e sure to not output a decimal pointB 3 to not fill trailing digits with ,erosB *
trailing digits would be filled. The same settings are applied for inch and metric
output.
0:
Sign output is set to * so that program number always output with no sign.
c. MiscM,ode1 Misc(,ode
1nly twenty custom symbolic codes can be defined using "%iscSymbolic4odeCB see
next part$. ( good alternative to avoid using them all is to use %isc%4ode and
%isc-4ode.
%isc%4ode and %isc-4ode formatable codes can be used for miscellaneous % and
- codes. %isc%4ode and %isc-4ode do not correspond to any value in ESPRIT. Its
only use is as a user defined formatable that is always overwritten& similar to
%isc0ormat+& etc.
d. Paddin': 2se of underscores
In the 34 code& a symbol can be used for multiple different cycle. 0or example& <
can be used to define the end seuence number for a turning canned cycle& to
specify the depth of cut or the step over for a grooving canned cycle& to specify the
pec) increment for drilling canned cyclesD
(ll these values use different format and so needs to be defined with different
formatable properties in your post. To be able to that& you can use the padding
techniue "use of EFG symbol$2
EndSe'uenceNum(er : F N ) N N " N ) N N " " * * * *
M67c%ormat/ : FC N 0 N Y ) N / N Y 0 " * * * *
,ec9 : FCC N 0 N Y ) N 0 N Y 0 " 1 N " "
6hen using the above formatable codes in your post& only < and its value will be
output. The EFG will be ignored. This is how you can define multiple formatable
codes that needs to be output using the same symbol but with different formatting.
3otes2
The amount of padding is not limited. You can add as many underscores as
you need since all of the underscores will be stripped.
You can also use the padding on symbolic codes "even if it is not necessary$.
e. 3ou+le dot forat for insertin' s&+ols and nu+ers in
iddle of forata+le codes
Hsing the double dot format& you can insert symbols and numbers in the middle of
formatable codes. This can be very useful when wor)ing with variables on your
machine.
!ere is an example2
M67c%ormat1 : =GB/""@;;H 1 0 Y 1 ) 1 / Y 1 0 1 1 Y 1 "
You can then use in the post examples 4565007..89:;alue t"at needs to +e
output<.
4565007..89:=< for example will be output li)e this "with above format$2
4565007=.08.
f. Si'n output set to :-1< to oit code1 reo*e . nu+ers
If Sign 1utput "fourth column$ of a formatable code is set to ";+$& the output of
symbol and value will be suppressed. This is for example a very useful way to turn
off the output of 3;codes in the 34 code.
****** %&RMATABLE C&ES ******
Se'uenceNum(er : N N ) N N " N ) N N " 0 * * * *
Sample 34 code "with above format properties$2
N1 +S,INLE*1 -R&&VIN- %ACE * CANNE CYCLE.
N2 +T1/1/ -R&&VIN- INSERT %ACE 0V.
N3 -12 3"
N4 -12 V" 4"
N5 -/)
N6 -"" T1/1/
3ow& if you change the format properties as follow& the 3;codes will not be output
anymore2
****** %&RMATABLE C&ES ******
Se'uenceNum(er : N N ) N N " N ) N N " -1 * * * *
Sample 34 code "with above format properties$2
+S,INLE*1 -R&&VIN- %ACE * CANNE CYCLE.
+T1/1/ -R&&VIN- INSERT %ACE 0V.
-12 3"
-12 V" 4"
-/)
-"" T1/1/
g. 4ero forat
Some values "li)e the dwell time$ should not be output in the 34 code if their value
is set to * in ESPRIT. This can be achieved using the ?ero 0ormat properties of the
formatable codes section. To omit the output of ,ero values& set the ?ero 0ormat to
; ; ; ;. !ere is an example for the dwell time2
wellT6me : -")C3 1 0 Y 1 ) 1 0 Y 1 ) " - - - -
:. S&+olic codes
a. Introduction
( symbolic code is generated in the 34 file exactly as it is shown in the post .(S4
file. The structure used in the symbolic codes section is2
Keyword : Sym(ol
( post may have the following in its symbolic codes section2
****** SYMB&LIC C&ES ******
Mot6onRa?6d : -""
Mot6onL6near : -"1
:Y,lane : -1<
End,roEram : M"1
S?6ndle&!! : M"/
ToolC>anEe : M"8
Coolant&!! : M"$
Symbolic codes must be defined in the symbolic codes section before they can be
used in other sections of the .(S4 file.
9elow is an example of symbolic codes being used in the @Examples@ section.
e#CRa?6d : N -"" : Y =
e#CL6near : N -"1 : Y = %
e#CToolCancel : N M"/ M"$
e#CMa6nEnd : N M"1
The symbolic codes for -**& -*+& %*.& %*7& and %*' have already been defined in
the symbolic codes section.
b. S&+olic s$itc"es
( symbolic switch is a )eyword that switches output to one symbolic code out of
several possible symbolic codes based on certain conditions.
(s with other symbolic codes& the symbolic codes output as part of a symbolic
switch must be defined in the symbolic codes section.
!ere is an example2
e#CC6rcle : N -1< C6rcle6rect6on* : Y I* D* %
The symbolic switch that can be seen above is 4ircle5irection.
0rom 4ircle5irection in exF4ircle& the 34 code output will be a -*' or -*/
depending on the direction of the arc move.
(s with other symbolic codes& the symbolic codes output as part of a symbolic
switch must be defined in the symbolic codes Section. 4ircle5irection typically
would have the following2
Mot6onC4 : -"1
Mot6onCC4 : -"0
3ote that if -*' or -*/ would directly be used in exF4ircle instead of the switch& it
would not matter what )eyword would be used.
In the case of the symbolic switch& however& the )eyword is very critical.
4ircle5irection specifically switches between the symbols assigned to the )eywords
%otion46 and %otion446.
This symbolic switch switches between Iust two symbolic codes& but there are many
other symbolic switches that switch between three or more symbolic codes.
4ompensationSide& often found in exF4ompensation& will switch between
4ompensation1ff& 4ompensationJeft& and 4ompensationRight& which are typically
-8*& -8+& and -8'. Spindle5irection& often found in the tool change examples& will
switch between Spindle1ff& Spindle46& and Spindle446& which are typically %*/&
%*8& and %*..
c. MiscS&+olic,ode6
%iscSymbolic4odeC "with C& index number from + to '*$ corresponds to a user
defined miscellaneous code.
!ere is an example2
****** %&RMATABLE C&ES ******
,roEramNum(er : & Y ) N N " Y ) N N " " 1 N " "
****** SYMB&LIC C&ES ******
MiscSymbolicCode1 : G10
e#CMac>6neSetu? : &*
: G10
: Mac>6neSetu?Comment
Tip:
Instead of assigning codes to %iscSymbolic4odeC )eywords& strings can be
hardcoded into exF examples by enclosing them in double uotes. See
String4haracter in ESPRIT Post !elp for more details.
K. ;aria+les: store *alues1 s$itc"es :fla's< and arra&s
In the post .(S4 file it is possible to declare variables for your own use. The format
for doing this is2
Var6a(le : l67t o! Iar6a(le7
The variable can be assigned a value in any exF example by using the following
format2
: Iar6a(leCnameJ+e#?re776on.
1nce the variable is declared& it can be used li)e any other variable& such as the
built in system variables and 0unctions. It can be used as part of a mathematical
expression to 1verwriting 0ormatable Lalues& or it can be used as part of a Jogical
4ondition Testing.
Suppose that if a Set 1rigin operation is created in E5%& the output is to be -7'
with the >& Y& and ? Start Positions from the Set 1rigin page. 9ut if a Set 1rigin is
not created& then a -7' with >& Y& and ? of the approach "entry$ point of the first
operation needs to be output. !ere a variable can be used to determine whether a
Set 1rigin has been created. The variable acts li)e a flag. Initially the flag variable is
cleared& but as soon as the -7' is output& the variable will be set so as to prevent
any additional -7' output2
M67c%ormat1 : :C N ) Y N ) N / Y N 0 1 1 N " "
M67c%ormat1 : YC N ) Y N ) N / Y N 0 1 1 N " "
M67c%ormat0 : =C N ) Y N ) N / Y N 0 1 1 N " "
Set&r6E6n : -$1
Var6a(le : 7eto
e#CStartCode : 7etoJ+".
e#CSet&r6E6n : -$1 :C*+#7tart. YC*+y7tart. =C*+K7tart.
: 7etoJ+1.
e#CCycleStart : I! +7etoJ".
: -$1 :C*+#ne#t. YC*+yne#t. =C*+Kne#t.
: 7etoJ+1.
: EndI!
(n array variable can be declared with the format
arrayFname"lowerFindex..upperFindex$. Suppose there was a 8 axis lathe post
where for sync purposes all of the spindle speeds and feedrates had to be )nown
prior to changing to the tool used for those operations. The example
exF4ycle5efinition is called for each operation at the beginning of the 34 code. In
this example all of the feed and speed values could be recorded into an array for
later use. The following would do Iust that2
Var6a(le : c77+1;;$$$. !?r+1;;$$$. o?count
e#CStartCode : o?countJ+".
e#CCyclee!6n6t6on : o?countJ+o?count@1.
: c77+o?count.J+ne#tcl!6le+)12..
: !?r+o?count.J+ne#tcl!6le+)18..
The examples above demonstrate numeric variables. Hser defined variables may
also contain strings& and there is a set of string functions for dealing with strings
and string variables.
>. Su+routines
a. Introduction
There are a lot of examples where certain parts of code may be repeated over and
over again. If a change has to be made to this code& one of the locations could
easily be missed. Repeated code li)e this can instead be defined as a subroutine.
Then if a change needs to be made& it only has to be done in one location.
+. Sin'le line1 ulti-line
Sin'le line su+routines:
Some subroutines may be Iust part of a single line. The format for these subroutines
is2
e!6ne 7u(rout6neCname GcodeH Ende!6ne
The )eywords 5efine and End5efine are used to create the subroutine. To call the
subroutine then& a MsubroutineFname is inserted into the appropriate examples. The
M is only used before the name when calling it in the examples& not when defining it.
(s one example& maybe all of the drilling canned cycles in a post are canceled with
3 -** -=* %*7. Instead of putting this into all of the cancel examples and ris)ing
having to change it several places later& a single line subroutine could be made li)e
so2
e!6ne cannedcancel N -"" -2" M"$ Ende!6ne
The cancel examples would then call this subroutine li)e this
e#Cr6llCancel : Lcannedcancel
e#C,ec9Cancel : Lcannedcancel
e#CTa?Cancel : Lcannedcancel
e#CBoreCancel : Lcannedcancel
Multi-line su+routines:
1ther subroutines may encompass several lines of 34 code. The format for them is2
e!6ne 7u(rout6neCname
: GcodeH
: ;;;
: GcodeH
Ende!6ne
6here between the 5efine and End5efine there can be as many lines of code as
necessary.
( typical mill post may contain the following2
e#C%6r7tToolC>anEe : T M"8
: ToolC>anEeComment
: T+7econdtool.
e#C&t>erToolC>anEe : T M"8
: ToolC>anEeComment
: T+ne#ttool.
e#CLa7tToolC>anEe : T M"8
: ToolC>anEeComment
: T*+!6r7ttool.
This could be rewritten with a subroutine as2
e!6ne tc
: T M"8
: ToolC>anEeComment
Ende!6ne
e#C%6r7tToolC>anEe Ltc
: T+7econdtool.
e#C&t>erToolC>anEe Ltc
: T+ne#ttool.
e#CLa7tToolC>anEe Ltc
: T*+!6r7ttool.
3otice how there is no 2 "colon$ between the exF )eyword and the M for the
subroutine call. This is because with a multiple line subroutine the colons are
embedded between the subroutine 5efine and End5efine. If you include them in
both places& you will get a compilation error.
.otes:
%a)e sure to always end a subroutine with End5efine.
Subroutines must always be defined above all call locations.
In the samples above& the subroutine calls were all made within the
Examples section. It is possible to ma)e subroutine calls in other sections of
the post .(S4 file.
7. Exaples section
a. Introduction
The Examples section is the heart of the post because it gives examples of what the
output 34 code is supposed to loo) li)e. The example )eywords all start with exF.
Everything that is programmed in ESPRIT has a corresponding exF )eyword in the
post.
The structure used in the Examples section is2
e#CKeyword : NC Code %&RMAT
The format of the 34 code is given to the right of the colon"s$. There are several
different types of codes used to give the 34 format. Three of the most important
types seen in the Examples section are& as seen above2 symbolic codes& symbolic
switches& and formatable codes.
Some examples produce a single line of 34 code. ( typical arc move may loo) li)e
this2
e#CC6rcle : N -1< C6rcle6rect6on* : Y I* D* %
1ther examples may generate several lines of 34 code li)e this tool change
example2
e#C&t>erToolC>anEe : ToolC>anEeComment
: N T M"8
Each line after exF )eyword that starts with colon ma)es a line in the 34 file.
(ny line in an exF example can be bro)en up into multiple lines in the .asc but still
only produce one line of code in 34 file. This is done by using NN line continuation
in .asc2
e#CCycleStart : Comment
: S?6ndle3n6t I! +7?6ndle7?eedM/"". S+1. El7e \\
I! ++7?6ndle7?eedNJ/"". OO +7?6ndle7?eedM11/".. \\
S+1. El7e S+0. EndI! EndI! S?6ndle6rect6on
Iportant notes:
Each exF example in your post processor file must have a colon "2$ on its
first line.
Each example can only be defined once2 each example can only have one
instance in the post processor.
+. Re*ie$ of exaple flo$ order
To wor) on a post processor& it is necessary to )now the exF examples wor)flow.
This way& the proper logic can be implemented in each example of your post
processor.
The best way to review this flow order is to post the long 34 code2 in ESPRIT& go to
0ile # (dvanced 34 code D or push on 4trl O 07 on your )eyboard2
The (dvanced 34 4ode 1utput window will be displayed. 4hec) JongB this way&
when you post& the long 34 code will be displayed.
Jong 34 code shows the @exF...@ )eywords from the .(S4 0ile before the line"s$ of
34 code that )eyword produced. You can this way see the posting flow order.
Sample2
/</ 5ard E:C&T5ERT&&LC5AN-E
N)/ +S,INLE*1 4RA, RILLIN- & Y"
* B&RE.
+T1)1) EM "/;" L.
-0" 3"
-0" V" 4"
-/)
-"" T1)1)
/<8 5ard E:CC&NSTANTS3R%ACE
/<< 5ard E:CSET4&RKC&&R
/<2 5ard E:CCYCLESTART+r6ll4ra?. M8$
-$2 -1$ M)/
-$< S0""" M10
/<$ 5ard E:CC5AN-E4&RKSYSTEM+r6ll4ra?.
/2" So!t E:CRA,I+r6ll4ra?.
/21 So!t E:CRA,I+r6ll4ra?.
/21 5ard E:CSTART,&INT+r6ll4ra?. -"" C*12";"
-"" =*1$;8))
:)1;1 Y";" M"2
/20 So!t E:CB&RESTART+r6ll4ra?. -2$ :0);) R";" %1/";"
/2) So!t E:CB&REB&Y+r6ll4ra?. C*$";"
/2/ So!t E:CB&REB&Y+r6ll4ra?. C";"
/28 So!t E:CB&REB&Y+r6ll4ra?. C$";"
/2< So!t E:CB&RECANCEL+r6ll4ra?. -2"
/22 5ard E:CCYCLEEN+r6ll4ra?.
/2$ 5ard E:CT&&LCANCEL M"$
-0" 3"
-0" V" 4"
M"/
M8$
M)8
c. ?ard *s. soft
(s you can see in the sample above& there are Soft and !ard examples.
( !ard example is always called& regardless of any technology or other settings.
Soft examples are only called based on certain conditions. exFStart4ode is a hard
example because it always comes at the start of the 34 4ode output. exF%ainStart
is a hard example because it always comes at the start of the main program.
Ji)ewise exF%ainEnd and exFEnd4ode are hard examples.
exFTap'Start and exFTap'9ody are soft examples& because they are only used if
4anned 4ycle is Yes and the 4ycle Type is set to Tap ' on the drilling technology
dialog. If 4anned 4ycle was Yes and 4ycle Type was Iust Tap& then the soft
examples exFTapStart and exFTap9ody would be called instead. If 4anned 4ycle
was 3o& then instead of those examples& the motion would be bro)en down into all
of the exFRapid and exFJinear moves necessary to perform the tapping on each
hole. exFRapid and exFJinear are themselves Soft examples.
In both cases& however& the example that is called can depend on what other
examples are defined "or not defined$ in the post .(S4 file. exF4ycleStart is a !ard
example& and it always appears at the start of an operation& unless it is a drilling
type operation and exFPT1P4ycleStart is defined in the post .(S4 file. If
exFPT1P4ycleStart is defined in the post .(S4 file& then it will be used for the start
of drilling type operations instead of exF4ycleStart.
If 4anned 4ycle was Yes and 4ycle Type was Tap ' on a drilling technology dialog&
but the post .(S4 file did not contain the exFTap'Start and exFTap'9ody examples&
then exFTapStart and exFTap9ody would be used instead. If those examples were
not defined in the post .(S4 file either& then it would resort to brea)ing the motion
up into exFRapid and exFJinear moves.
Pnowing this difference and what the terms !ard and Soft mean can be somewhat
useful when 5ebugging. If you see a !ard example in the Jong "or Extended$ 34
4ode listings that is coming out at a certain location where you need 34 code
output& then you can add that Example to your post .(S4 file and be confident that
it will always be called in that same relative location. If you see some Soft examples
in the Jong "or Extended$ 34 4ode listings that you did not expect to see& then you
)now that certain technology settings are causing those examples to be output. You
can then try changing those settings or even removing those example )eywords
from your post .(S4 file altogether to see what examples are called and what 34
code output they produce instead.
10. (eneral topics
a. O*er$ritin' diensions
In overwriting formatable values the distinction between formatable dimensions and
formatable miscellaneous is very important. It can be summed up li)e so2
0ormatable %iscellaneous values can always be overwritten.
1verwriting 0ormatable 5imension values can give unpredictable output in
the 34 code and is strongly recommended against.
Lalues that come from the graphics are called 5imensions& while the name
%iscellaneous is used for values that typically come from the technology pages. 0or
example& >(bsolute is considered a formatable dimension while Tool3umber is
considered a formatable miscellaneous.
Probably the best example of this is in posts for multi;axis mills. 6hen rotating table
axes& it is usually desired to send the tool to a safe home position. This is often
accomplished with -7+ -'= >* Y* ?* in the 34 code. 1ne way you could try to get
this output may be with -7+Q -'=Q >"*$ Y"*$ ?"*$. The "*$ says to overwrite the
formatable value with ,ero& but the -7+Q forces the code into incremental mode. So
instead of getting a move of ,ero& you get the incremental move necessary to ta)e
you bac) to the ,ero position. If the tool was at >. to begin with& instead of >*
output in the 34 code& the output would be >;..
(nother example of this is trying to apply a scale factor. %aybe you have a user;
defined variable called scale that is set via one of the custom page settings.
Suppose your I and A values on arcs or H and L values on 8 (xis are measured
incrementally from > and Y. 6ell& if you overwrite the > and Y values directly& then
you also change the reference for these incremental calculations. So if you Iust try
to apply the same scale to the I and A or H and L values& then the numbers will come
out wrong.
The solution in all cases is to define a %isc0ormatC )eyword& such as %isc0ormat+&
and overwrite the symbol for that %isc0ormatC. 6hile you do not overwrite the
formatable dimension& you still need to update it as if it had been output. This is
done with 341utput1ff and 341utput1n. So in general& ta)e the approach shown in
the example below2
:A(7olute : : N ) Y N ) N / Y N 0 1 1 N " "
YA(7olute : Y N ) Y N ) N / Y N 0 1 1 N " "
M67c%ormat1 : :C N ) Y N ) N / Y N 0 1 1 N " "
M67c%ormat1 : YC N ) Y N ) N / Y N 0 1 1 N " "
Mot6onRa?6d : -""
e!6ne :&ut :C+oIerwr6te e#?re776on. NC&ut?ut&!! : NC&ut?ut&n Ende!6ne
e!6ne Y&ut YC+oIerwr6te e#?re776on. NC&ut?ut&!! Y NC&ut?ut&n Ende!6ne
e#CRa?6d : -"" L:&ut LY&ut
If you always ma)e it a rule to only overwrite formatable miscellaneous codes and
never overwrite formatable dimensions& you will save yourself a lot of headaches.
+. 3e+u''in'
6hen writing your post processor& you will often have to debug the value of your
defined variables to ma)e sure that your logic or your mathematical expression is
correct.
9efore ESPRIT '*+*& you probably used a formatable code to do that2
M67c%ormat1 : e(uE N ) Y N ) N / Y N 0 < 1 N " 8
Var6a(le : Te7t
e#CRa?6d : e(uE*+Te7t.
This way is not the best way to do it because the output of the value of your
variable is subIect to the formatting of the 5E9H- formatable. 0or instance& if you
are wor)ing in metric& only three digits will be output and so your variable will be
rounded.
To debug in ESPRIT& you should use OutputStrin':<. It was added as part of the
string variable support in E'*+*. 6ith this function& you can easily output a variable
to the standard listing "without overwriting a formatable and thus limiting the
number of places after the decimal shown$. The example above would become2
Var6a(le : Te7t
e#CRa?6d : &ut?utStr6nE+PTe7tJQ @ Te7t.
c. -o'ical operators
The following logical operators can be used in the post processor2
# -reater than
R Jess than
S Eual to
R
#
3ot eual
#
S
-reater than or
eual to
R
S
Jess than or eual
to
TT 1r
U
U
(nd
d. Mat"eatical operators and functions
The following mathematical operators can be used in the post processor "These are
given in order of precedence$2
" $
Parenthesis "by default$& or whatever is defined as
the StartExp and EndExp& are used to group parts of
an expression. 6hatever is inside has the highest
precedence& and is evaluated first.
;
3egation. 3umbers which are to be negated should
be enclosed in parenthesis& as in ";'$. Lariables and
expressions which are to be negated should be
multiplied by ";+$& as in ";+$Q"expression$.
Q %ultiplication
V 5ivision "same precedence as multiplication$
W %odulus& which returns the remainder after division
O (ddition
; Subtraction "same precedence as addition$
9esides mathematical operators there are also mathematical 0unctions2
(9S
(9S is a function that returns the absolute value of
an argument. If the value is positive& the absolute
value is the same. If the value is negative& it is
negated so as to be a positive value of the same
magnitude.
(4S
(4S is a function that returns the arccosine value.
(4S is the angle "in degrees$ that has a cosine value
eual to the given argument.
(S3
(S3 is a function that returns the arcsine value. (S3
is the angle "in degrees$ that has a sine value eual
to the given argument.
(T3
(T3 is a function that returns the arctangent value.
(T3 is the angle "in degrees$ that has a tangent
value eual to the given argument.
41S
41S is a function that returns the cosine of a given
angle. The angle value is given in degrees.
E>P
E>P is a function that raises the natural logarithm "e$
to the power of the argument. In other words& E>P"x$
euals eXx. e is a transcendental constant "li)e pi$
and has a value off approximately '.K+='=.
I3T
I3T is a function that returns the next lowest integer
value for a given argument.
0or positive numbers& this is the number with the
decimal portion removed. 0or 3egative numbers
with a decimal portion& it is one less than the
number with that decimal portion removed. 0or
example& I3T"/.+8$ S / while I3T";/.+8$ S ";8$.
J3
J3 is a function that returns the natural logarithm
value. The natural logarithm is the power to which
the constant e must be raised to eual the given
value. eXJ3"x$ S x. e is a transcendental constant
"li)e pi$ and has a value off approximately '.K+='=.
SI3
SI3 is a function that returns the sine of a given
angle. The angle value is given in degrees.
S<R
S<R is a function that returns the suare of a value
"that value to the power of '$. S<R"x$ euals xX'.
S<R
T
S<RT is a function that returns the suare root of a
given value.
T(3
T(3 is a function that returns the tangent of a given
angle. The angle value is given in degrees.
3otes2
The O operator is also used to concatenate strings. If either of the operands
in an expression is a string& then the O is treated as concatenation. The O
operator only wor)s as addition of both operands are numbers or numeric
variables.
The exponent operator X is not supported& but it is easily wor)ed around
using the E>P and J3 functions since2 x@&Aexp:&9ln:x<<.
e. Soe of t"e special %e&$ords
If Else Endif V If ElseIf Endif2
If is a special )eyword that branches the 34 code output depending upon a
test condition.
Else is a special )eyword that separates the true and false branches of an If
condition.
ElseIf is a special )eyword that separates and branches the 34 code output
depending on a test condition.
EndIf is a special )eyword that closes an If conditional branch.
6hile End6hile2
!"ile is a special )eyword that starts a loop. The loop will continue to
execute as long as a given test condition is true.
End!"ile is a special )eyword that closes a 6hile loop.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy