The following APT/CL data types are supported by IMS software products. The license you purchase from IMS will allow your specific CAM system(s).
Code Value APT/CL Data Type
1 EUCLID
2 STRIM
3 BihlerCAT (GERBER) 4 General APT
6 Catia Machinist
9 PTC
11 Prelude Manufacturing 12 Adra Systems
13 IBM360/370 Binary 14 Mastercam
Controller Menu and Options: Grammar Code Value APT/CL Data Type
15 CATIA v4/v5
NOTE: The APT/CL data type selected is associated with the SYSTEM.CLDATA variable. For example, to change your input to CIMATRON format, enter SYSTEM.CLDATA = 19
Grammar
The Grammar option (also available with ) defines the grammar for macro syntax, registers, functions, variables, and CE errors. This is only active for the Controller Emulator and not applicable in the postprocessor environment.
The controller emulation involves two passes:
1. Split input blocks into tokens 2. Perform work
During the first pass, every input block is split into tokens according to the grammar definition.
For example, this block:
N100X1.2Y3.4Z-12.6F120 breaks into the followings tokens:
N100 X1.2 Y3.4 Z-12.6 F120
In the second pass, each token is executed according to the specific definition in the grammar. In general, all macros defined in the grammar are executed during this second pass. (An exception to this is based on the Parser option or Type (Define Variable) option, as described in the following sections.)
Controller Menu and Options: Grammar
Syntax
The Syntax grammar tab is directly associated with the controller language and preset
mathematical functions within the controller. Under normal conditions, there will be no need to modify this screen.
Option/Button Description
SYMBOL Lists an IMSpost definition for the operation.
SYNTAX Specifies required parameter(s) for the symbols operation.
Controller Symbol Indicates characters that correlate to the IMSpost symbol (described above).
Controller Syntax Defines the controller symbol action.
Motion Indicates (when checked) that a machine axis can be included.
Type Specifies a symbol type.
NOTE: When the type is Define Variable, the macro will be executed in the first controller pass. Normally (when the type is not Defined Variable), all macros defined in the grammar are executed in the second controller pass.
Controller Menu and Options: Grammar Option/Button Description
Instruction Specifies how to process the symbol operation:
Process Use the internal APT definition process only.
Macro Use the associated macro only.
Process + Macro Use the internal APT definition process followed by the macro.
Macro + Process Use the associated macro followed by the APT definition process.
Ignore Ignore symbols of this type.
Ignore All If a symbol occurs in a block, ignore entire block.
MACRO Indicates the macro name that the controller symbol is associated with.
Case Sensitive Indicates (when checked) that the syntax case sensitive.
Parser Indicates (when checked) that the macro will be executed in the first controller pass. Normally (when Parser is not checked), all macros defined in the grammar are executed in the second controller pass.
VNC Sends a signals to VNCK software (such as VNCK Siemens 840 controller software) when the token exists. The IMSpost controller emulator will wait for a return event from the VNCK software.
Expression Evaluate With Math Priority
Specifies how IMSpost interprets the expression. Math priority signifies embedded operations within parenthesis. If this option is checked, these operations are executed first.
Expression Evaluate From Left To Right
Specifies how IMSpost interprets the expression. If this option is checked, IMSpost will interpret the operations left-to-right.
Add Creates an open row which enables you to add an additional symbol.
Default Changes the controller syntax to be the same as the IMSpost syntax.
Most symbols have a definition of the symbol in the IMS language (SYNTAX column) and the equivalent in the controller language (Controller Syntax column). IMSpost generally ensures that the values are the same by using the equal sign (=). However, the FANUC controller does the same with the string EQ.
To ensure that the controller symbols are the same as the IMSpost symbols, highlight a specific row(s) and click Default. The controller symbol syntax will automatically change to be the same as the IMSpost syntax.
Macro Displays the macro if a symbol is associated with a macro (as described above). This button opens a dialog that enables you to edit the macro.
Save Saves all changes and exits the Grammar dialog.
To delete a syntax definition, highlight the definition row and press the keyboard Delete key.
Controller Menu and Options: Grammar
Register
The Register grammar tab displays all the controller letter addresses (registers) supported with the IMSpost project. The IMS library files contain and support most of the available controller letter addresses.
Option/Button Description
Symbol Lists all the controller addresses supported for the active IMSpost project. To add an address, see Controller > Register Format.
Sort Specifies the order in which the letter address will be processed. This usually apples to a condition when a single line of output generates more than one APT statement. For example, this one line of code:
G41 G1 X120. Y340. Z210. D22 F500. S1200 M3 could generate the following APT statements:
CUTCOM/LEFT,22,XYPLAN FEDRAT/MMPM,500
SPINDL/1200,CLW GOTO/120, 340,210
Controller Menu and Options: Grammar Option/Button Description
The Sort options available for this processing order are:
Order
Start of block End of block
The Start of Block option is selected for the above example because the D-code is processed first and included with the CUTCOM statement.
For everything else, Order is specified to instruct IMSpost to process the statements in the same order they are read in the ISO output file.
Since the F-code is being output before the S-code in the example above, the FEDRAT statement will be output first.
Motion Indicates (when checked) that the letter address can include motion.
Macro Specifies the name of the macro that is associated with the letter address. If this field is blank, no macro is associated with the register.
Instruction Indicates how the letter address is processed. The options are:
Process Use the internal APT definition process only.
Macro Use the associated macro only.
Process + Macro Use the internal APT definition process followed by the macro.
Macro + Process Use the associated macro followed by the APT definition process.
Ignore Ignore symbols of this type.
Ignore All If a symbol occurs in a block, ignore entire block.
Variable Enables you to pass arguments.
Update Automatically updates (when checked) the system variable if the register is associated with a system variable and there is any change in the register value.
String Indicates (when checked) that the register has the ability to contain a string.
Type Refers to the type of operation. Choose from these options:
Empty Program Start Program End Optional Skip Optional Stop
Empty Specifies what to do if the register appears by itself (without a value).
Options are:
Error Generate an error.
Last Assume the last value.
Value Use the value specified in the Empty Value field.
Empty Value Specifies the default value if the Value option is selected above (for Empty).
Case Sensitive Indicates (when checked) that the text is case sensitive.
Controller Menu and Options: Grammar Option/Button Description
Parser Indicates (when checked) that the macro will be executed in the first controller pass. Normally (when Parser is not checked), all macros defined in the grammar are executed in the second controller pass.
VNC Sends a signals to VNCK software (such as VNCK Siemens 840 controller software) when the token exists. The IMSpost controller emulator will wait for a return event from the VNCK software.
Macro Displays the macro if a register is associated with a macro (as described above). This button opens a dialog that enables you to edit the macro.
Save Saves all changes and exits the Grammar dialog.
To delete a register definition, highlight the definition row and press the keyboard Delete key.
Function
The Function grammar tab displays all the functions (G and M codes) used in the controller emulator.
Controller Menu and Options: Grammar Option/Button Description
Symbol Lists all the functions. To add or delete a function, see Controller >
Function Codes.
Sort Indicates when the Instruction should be processed. Options are:
Start of Block If the code should be processed first.
End of Block If the code should be processed last.
Order Process order in which it is read in the output block.
Motion Indicates (when checked) that the function can be output with motion.
Macro Specifies the name of the macro that is associated with the fucntion. If this field is blank, no macro is associated with the function.
Instruction Indicates how the letter address is processed. The options are:
Process Use the internal APT definition process only.
Macro Use the associated macro only.
Process + Macro Use the internal APT definition process followed by the macro.
Macro + Process Use the associated macro followed by the APT definition process.
Ignore Ignore symbols of this type.
Ignore All If a symbol occurs in a block, ignore entire block.
Activate Mode Specifies the mode if you want IMSpost to update other conditions. For example, if the M6 code puts the controller in the XY plane mode, enter G17.
Type Specifies the type of function. This is used by IMSpost to internally describe the operation.
NOTE: When the type is Define Variable, the macro will be executed in the first controller pass. Normally (when the type is not Defined Variable), all macros defined in the grammar are executed in the second controller pass.
Variable Indicates a variable associated with the function. This value is dependent upon the revpost file that is loaded.
Using a Fanuc as an example. Fanuc classifies code groups with system variables #4001 through #4130. Fanuc system variable #4001
represents the motion code group which includes G0, G1, G2, and G3.
Value Specifies the current code that is in effect for the system variable (indicated in the Variable field). For example, if the current system variable in effect is #4001, the Value field would contain the current motion code (G0, G1, G2, or G3).
Case Sensitive Indicates (when checked) that the text is case sensitive.
Parser Indicates (when checked) that the macro will be executed in the first controller pass. Normally (when Parser is not checked), all macros defined in the grammar are executed in the second controller pass.
VNC Sends a signals to VNCK software (such as VNCK Siemens 840 controller software) when the token exists. The IMSpost controller emulator will wait for a return event from the VNCK software.
Controller Menu and Options: Grammar Option/Button Description
Macro Displays the macro if a function is associated with a macro (described above). This button opens a dialog that enables you to edit the macro.
Save Saves all changes and exits the Grammar dialog.
To delete a function definition, highlight the definition row and press the keyboard Delete key.
Variable
The Variable grammar tab displays data regarding the controller’s variable structure and logic.
Option/Button Description
Name Indicates a character that represents a controller variable.
List Indicates (when checked) that the variable is a list-type variable. This is used to define the variable starting/ending number index. If checked, the starting (From) and ending (To) index address must be entered in the following two fields.
From Specifies the beginning index number value.
To Specifies the ending index number value.
Controller Menu and Options: Grammar Option/Button Description
Local Indicates (when checked) that the variable will not be recognized outside the program. If the variable is local, IMSpost will return the initial value to the register automatically by default.
Create Indicates (when checked) that code creates a variable.
Initial Specifies the initial default value.
Not Exist Indicates (when checked) that the variable is an undeclared variable used in an IMSpost assignment. For example, the FANUC controller uses # as a list variable (# must be followed by an integer to specify the variable):
(#1000=#1001+2)
In this example, the value of #1001+2 is set for the variable #1000.
However, in this example, the value for variable #1001 is not defined.
You can define the behavior of the controller in this case by indicating that this is a “Not Exist” variable and then specifying the value (in the next column).
Not Exist Value Returns a value only if the Not Exist option is checked.
Not Exist Condition Indicates (when checked) that the variable is an undeclared variable used in an IMSpost condition. For example, the FANUC controller uses
# as a list variable (# must be followed by an integer to specify the variable):
In this example, the value of 20 is set for the variable #1000. However, in this example, the value for variable #1001 is not defined until it is used in an IF statement.
You can define the behavior of the controller in this case by indicating that this is a “Not Exist Condition” and then specifying the value (in the next column).
Not Exist Condition Value
Returns a value only if the Not Exist Condition option is checked.
Vacancy Indicates (when checked) that the value of a variable is null (#0 in Fanuc). Null variables can be read, but cannot be written to. For example (Fanuc style):
IF[#24EQ#0] GOTO2
If you checked the Not Exist option for #0, you will jump to line N2.
MACRO Specifies a macro associated with the variable.
Macro Displays the macro if a variable is associated with a macro (described above). This button opens a dialog that enables you to edit the macro.
Var Def Enables you to use a variable without defining it first. Refer to Variable Definition below.
Add Creates an open row which enables you to add an additional variable.
Save Saves all changes and exits the Grammar dialog.
Controller Menu and Options: Grammar To delete a variable definition, highlight the definition row and press the keyboard Delete key.
Variable Definition
A specific command may define a variable. For example:
DEF AA
DEF is a reserved word telling the controller that the following string (AA) is a new variable name.
In some controller languages, the programmer can define and use a “free” variable that is not a specific name reserved in the controller language (such as # in FANUC). A free variable is available when the controller programming language allows for use of a variable without first defining it. For example:
N100 G1 X… Y… Z… Move to X, Y, and Z
N200 ABC=100. New variable “ABC” defined with the value of 100.
N300 X=ABC Move X to 100.
When you click Var Def, the Free Variable Definition dialog is displayed and enables you to define a free variable:
This dialog enables you to define a free variable that IMSpost will use to emulate the controller interpretation. If the controller emulator finds a token that it is not predefined in the grammar, it will check to determine if this token is a variable. For an unrecognized token to be defined as a variable, it must match the definition condition of the controls in the Free Variable Definition
Controller Menu and Options: Grammar
dialog. This enables you to specify a variety of ways that different controllers may restrict the use of free variables.
Different controllers have different restrictions for the name used to define a free variable. For example, there could be a maximum number of characters allowed in the name. Or, a specific character must be used as the first or last character in the name.
The IMSpost controller emulator enables you to define a number of different sets of restrictions (click the New button for each additional set). Once the controller emulator finds an undefined token, it checks against all free variable definitions until one is found. Then, it creates this variable.
NOTE: If a field is empty, IMSpost will ignore it and it will not be used as a restriction in the free variable name.
Option/Button Description Allowed Start
Characters
Indicates that the name must start with one of the defined characters.
Allowed End Characters
Indicates that the name must end with one of the defined characters.
Allowed Characters Indicates that the name must consist of only the defined characters.
Must Start With Indicates that the name must start with the specified string.
Must End With Indicates that the name must end with the specified string.
Minimum Length Defines the minimum number of characters in the name.
Maximum Length Defines the maximum number of characters in the name.
Allow Index Variable
Indicates (when checked) that the variable name can be an index (such as FANUC #1, #2,…#n).
Use the From option for the index start number.
Use the To option for the index end number.
Create With Initial Value
Specifies the initial value to use when one is not previously defined.
Vacancy Variable Indicates (when checked) that a vacancy variable (such as FANUC #0) can be used.
Not Exist Indicates the variable can be used in a simple assignment without first defining the variable. The entry in the box to the right of this option specifies the value to be used.
Not Exist Condition Indicates the variable can be used in a condition command without first defining the variable. The entry in the box to the right of this option specifies the value to be used.
Check Macro Checks for the specified macro. The token is considered to be a
legitimate variable name only if all restrictions fit the token AND if the macro returns a non-zero value.
Active Macro Activates the specified macro when the variable changes its value.
Back Displays the previous set of restrictions.
Next Displays the next set of restrictions.
Delete Deletes the current set of restrictions.
New Enables you to enter a new set of restrictions.
Controller Menu and Options: Grammar
CE Errors
The CE Errors grammar tab displays a dialog for error processing.
Option/Button Description
Id Specifies an identifier for the CE error.
Name Specifies a name for the CE error. This name is used only used as an identification reference.
Driven Specifies a control register or function code to look for. Setting a MODE condition is also allowed here. For example, if you are checking for linear motion, enter MODE.MOTION.LINEAR. If the Driven field is empty, every block will be checked.
You can also extend the check with a conditional statement in the Condition field (described below).
Condition Lists an optional conditional expression.
Message Specifies text for the error message. This is the message that will be output in the .log file and event list.
Macro Displays the macro if the error message is associated with a macro (as described above).
Controller Menu and Options: Grammar Option/Button Description
Status Determines how an error should be generated:
ON All the time.
OFF Terminate error (cancels ON).
ONCE First encounter.
Report Indicates how an error should be reported:
STOP Terminate processing.
WARNING Increment the warning counter and display the error in the log file and event list.
ERROR Increment the error counter and display the error in the log file and event list.
Macro Displays the macro if an error is associated with a macro (described above). This button opens a dialog that enables you to edit the macro.
Add Creates an open row which enables you to add an additional error message.
Save Saves all changes and exits the Grammar dialog.
To delete a CE error definition, highlight the definition row and press the keyboard Delete key.