Session 106-Introduction to the Control
Session 106-Introduction to the Control
The Control file contains rules that emulate how a real NC control processes NC data.
When combined with a Machine file, VERICUT can simulate how a NC machine will
respond to G-Code NC program files. A "starter" set of Control files are included in the
library files installed with VERICUT ("library" folder in your VERICUT installation)
and can be used as is, or quickly modified to match the exact requirements of your NC
machine control.
This session will show you how to specify how the Control interprets G-Code words and
special characters.
% - Start of data
O1000 - Program name
(TRAINING) - Comment
G90 - Absolute programming mode
G54 - Work coordinate
G1 X80.0 F6000. - Linear interpolation mode, X axis motion, Feedrate for motion
Notice error messages being displayed in the Message Area indicating that words are
not defined. Undefined words cause errors when processed, and are not acted on by
VERICUT.
Note: These basic NC codes are supported in the "starter" set of Control files
included with VERICUT installation. This control was purposely modified for this
training session.
• Ribbon Bar > Machine / Control tab > Control group > Word Format
Note: The features on the Word Format tab enable you to specify how the NC
control interprets G-Code words and special characters. Once words are defined,
they can be "grouped" with address values (via G-Code Processing) function to
perform specific actions by calling CGTech supplied or custom macros. Words
and special characters and their settings are stored in the control file.
• Control = Base
• Name = %
• Type = select Special from pull-down list
• Sub Type = select Skip from pull-down list
Note: Each column in the Word Table represents a specific feature that enables
you to define how the NC control interprets specific G-Code words or special
characters.
• Select Add
• Control = Base
• Name = O
• Type = Macro
Note: Type = Macro, indicated that this word can be paired with a value, then
configured (via G-Code Processing) to call one or more action macros.
• Select OK
• Ribbon Bar > Machine / Control tab > Control group > G-Code
Processing
Note: The G-Code Processing window tree structure consists of two distinct
areas, the Events section and the Word/Address section. The G-Code Processing
The Word/Address section of the tree structure enables you to "group" G-Code
words previously defined in the Word Format window (Configuration menu >
Word Format) with a range of address values, and associate them with action
macros to simulate an action in the control, or on the machine.
• In the Macroname text field (Filter) type Subroutine to display only the
CGTech macros which have the word Subroutine in their name
Note: Documentation about the selected CGTech Macro is displayed Help area.
Note: Use the Override Value text field to specify a value to be passed to the
macro specified in the Macroname text field. If the Override Value text field is
left blank, the address value accompanying the word is passed. Only certain
macros are designed to accept Override Value values. Mathematical expressions
and variables, understood by the control, are supported. Enter "$" to specify using
the address value accompanying the word. Enter "#", followed immediately by
the variable name/number, followed by a space, to specify a variable value.
Note: This is an Example only, used to illustrate how to alter the value
the VERICUT control interprets: with the NC code X2 if you would like
the control to process an X value of 1 then you would enter $ / 2 as shown
below.
Now let’s set the Control to track the current NC Program or Subroutine with variable
4115
• Select Variable
• Variable Name = 4115
• Variable Description = Program Name
• Select Close
Notice that NO error messages are being displayed in the Message Area.
• Ribbon Bar > Project tab > Project group > Variables > All
• Ribbon Bar > Machine / Control tab > Control group > Word Format
• Select # and then select Add
• Control = Base
• Name = (
• Type = Special
• Sub Type = Begin Comment
• Select Add
• Control = Base
• Name = )
• Type = Special
• Sub Type = End Comment
• Select OK
Note: the words in the Word Format window will be reorder in alphabetic order
automatically once this window is reopened
Now let’s associate an action (macro) to word G with the value pair 90
• Ribbon Bar > Machine / Control tab > Control group > G-Code
Processing
Note: For simplicity, we'll call each of these address/value associations a "group".
Each group can be configured to call one or more action CGTech macros. This
functionality allows you to virtually "wire" a custom NC control based on
machine code information present in the NC program file. Groups with similar
functions are arranged into a "class". The listed order of classes in the -Code
Processing window helps determine the timing of when corresponding actions
occur.
Read the help on this macro to help you understand the Override Text option
• Configure the States Group so that the word G with the value pair of 1 uses
CGTech macro MotionLinear, and VERICUT tracks this state Variable 4001
• Ribbon Bar > Machine / Control tab > Control group > G-Code
Processing
• Select **
The ** is the G-Code Processing window indicates the action which will occur if
none of the above conditions are true (or met)
• Configure the Registers Group so that the word F uses CGTech macro FeedRate,
and VERICUT tracks the active feedrate with the Variable 4109
Conclusion
This session has shown you how to specify how the Control interprets G-Code words
and special characters.