Академический Документы
Профессиональный Документы
Культура Документы
Note: You must set the fastmode variable to no or 0 to enable these debug switches. Also note that
when fastmode is set to 1, the post processor displays no progress-indicator dots on the monitor to let
you know the program is still running. Make sure to give the post sufficient time to complete processing
before assuming there is a fault in the post.
fastmode : 0 # Posting speed optimization (set to 0 for debug)
You can leave bug1, bug2, bug3, bug4 set according to your preferences and toggle all debugging off or
on by setting the fastmode switch to 0 or 1, respectively.
The following shows an example of bug1 set to 1, displayed in a Mastercam File List window:
If bug2 is set to a negative value, it will display all the postblock labels that have been called in the post
even if output did not occur as a result of executing the instructions in that postblock. Setting this
variable to 0 will omit the postblock label.
The following shows output for bug2 set to 30, which displays, starting after column 30, the first and
last postblocks called:
The following shows the expanded output with bug2 set to –30, which displays all postblocks called,
also starting after column 30:
Bracketed postblocks are identified in debugging by the post line number of the occurrence of the open
bracket (starting at zero).
In the following example, notice the postline label appended to the output line is p__1:250.
N10 G01 X1.0 Y2.0 Z3.0 p__1:250
In this example, p__1 indicates the second occurrence of the open bracket ( [ ) and that the bracket was
located on post line number 250.
Error messages in MP
When an error is detected in the .PST file, a warning is posted on the screen in the form of:
The first message indicates what kind of error has been encountered. The second message tells you
where to look in order to fix it and describes this location by providing:
This error most commonly occurs when a function requiring two arguments is passed a single
argument.
Open the post file for editing and go to the postline number listed in the error message. See
Post Functions for more information on the correct syntax for the function in question.
This error can occur when you provide more than one argument to a single argument function
Open the post file for editing and go to the postline number listed in the error message. See
Post Functions for more information on the correct syntax for the function in question.
This error usually occurs when you initialize a "write counter" variable to zero.
To correct this problem, locate the write counter in the initialization list and change it from
an initial value of zero to one.
wc1 : 1
This error typically occurs when you attempt to read beyond the last record in a buffer file.
To correct this problem, consider checking the size of the buffer by reading record 0, and
testing the value of your "read counter" before attempting to read from the buffer. For
example:
size1 = rbuf(1, 0)
if rc1 <= size1, preadbuf1
This message indicates that the variable has not been declared in the post. This error can also occur if a
variable name is misspelled.
This message indicates that a division by zero was attempted and a math error generated, probably by a
postblock formula. It is not legal to divide by zero.
Check whether the formula contains a variable that is used in the divisor. If so, make sure
that the variable has been read in and is not 0.
The following example shows a while loop with a user-defined question inserted to ensure that the user
enters a non-zero number.
fq 1 tpi Enter Number of Threads Per Inch...
This error message indicates that the Gcode read from the NCI file is not recognized by the post
executable.
The NCI file may be corrupt or the wrong MP executable may have been specified in
question 91.
Typically this error occurs when you attempt to force out the previous value of a variable using the ‘*’
or ‘~’ symbols.
*prv_ccomp
Postblock calls can be controlled with Boolean tests, but are not considered to be modal or non-modal.
The symbols ‘*’ or ‘!’ are only to be used on variables and strings
Go to the line number indicated. Look for a postblock call prefixed with ‘*’ or ‘!’ and
remove that symbol.
This error message is given when the post attempts to access a string select table that contains less
elements than the value of the selector variable.
First try to find out what string select table(s) use the variable gcode as the selector variable.
Next, try to locate the target string in the postblock label listed. Finally, use one of the
three methods below to fix the problem:
1. Change the value of the selector variable prior to accessing the table.
gcode = 0
*sgcode
This error can occur when using the mergesub, mergeaux, and mergeext commands.
When using mergesub, the variable subout must be set to a value other than 1. When using
mergeaux, the variable subout must be set to a value other than 2, and subout must be set to a
value other than 3 when using mergeext.
♦ subout = 1 output is directed to the sub file, therefore mergesub is not legal
♦ subout = 2 output is directed to the aux file, therefore mergeaux is not legal
♦ subout = 3 output is directed to the ext file, therefore mergeext is not legal
♦ subout = 0 output is directed to the NC file
This error only occurs when newglobal is set to 1, and a global variable is the result of a postline
formula, on left side of the equation.
Either eliminate the global formula and initialize the variable, placing the formula in
postlines.
speed = abs(ss) #global formula
Bug4, when set to a negative value, alters the forced output of variables prefixed with the tilde character
(~). The variable is output with the variable name and is unformatted. This allows the post writer to
see the value as it is stored in memory. (The precision is not altered.)
In the code example above, the second parameter in the fbuf function is set to 1. This tells the post
executable to write the buffer to disk as an ASCII text file using the file name specified by the pre-
defined string sbufname1. The resulting file can be opened in a text editor to examine the records.
See Volume 2, How Buffer Files Work for detailed information on using buffers.
no_updprv set to 1 automatically updates the previous variables when the line is output.
no_updprv set to 2 does not perform any previous update on the variables and the post must update the
variables with the exclamation update (!).
To help determine if output occurred, the variable nc_lout is set to the current internal call level
immediately after the output postline. If no output was generated, nc_lout is set to -1.
Note: The post must test the postline immediately after the output postline.
nc_lout is reset to -1 after the postline is output and the output string is empty. no_updprv also prevents
MP from updating x, xr, xh with themselves.
Note: Bug statements (bug2, bug3 and bug4) disrupt this function.