beautypg.com

Smithy CNC Mills User Manual

Page 11

background image

SmithyCNC Programmer’s Reference Manual: Language Overview

1-7

Values returned by unary operations which return angle measures (ACOS, ASIN,

and ATAN) are also in degrees.

The FIX operation rounds towards the left (less positive or more negative) on a

number line, so that FIX[2.8] =2 and FIX[-2.8] = -3, for example. The FUP

operation rounds towards the right (more positive or less negative) on a number

line; FUP[2.8] = 3 and FUP[-2.8] = -2, for example.

1.4 Parameter Setting

A parameter setting is the following four items one after the other: (1) a pound

character # , (2) a real value which evaluates to an integer between 1 and

5399, (3) an equal sign = , and (4) a real value. For example "#3 = 15" is a

parameter setting meaning "set parameter 3 to 15."

A parameter setting does not take effect until after all parameter values on the

same line have been found. For example, if parameter 3 has been previously set

to 15 and the line "#3=6 G1 x#3" is interpreted, a straight move to a point

where x equals 15 will occur and the value of parameter 3 will be 6.

1.5 Comments and Messages

Printable characters and white space inside parentheses is a comment. A left

parenthesis always starts a comment. The comment ends at the first right

parenthesis found thereafter. Once a left parenthesis is placed on a line, a

matching right parenthesis must appear before the end of the line. Comments

may not be nested; it is an error if a left parenthesis is found after the start of a

comment and before the end of the comment. Here is an example of a line con-

taining a comment: "G80 M5 (stop motion)". Comments do not cause a

machining center to do anything.

A comment contains a message if "MSG," appears after the left parenthesis and

before any other printing characters. Variants of "MSG," which include white

space and lower case characters are allowed. The rest of the characters before

the right parenthesis are considered to be a message. Messages should be dis-

played on the message display device. Comments not containing messages need

not be displayed there.

A comment can also be used to specify a file for the results of G38.2 probing.

See section [sub:G38.2:-Straight-Probe].