0% found this document useful (0 votes)
13 views

Session 106-Introduction to the Control

Session 106 provides an introduction to configuring the Control file in VERICUT to interpret G-Code words and special characters for NC machine simulation. It outlines steps to define various NC codes, associate actions with them, and test the configuration to ensure proper processing without errors. The session concludes by demonstrating how to monitor the simulation using Variables and Status windows.

Uploaded by

Diogenes Cardoso
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Session 106-Introduction to the Control

Session 106 provides an introduction to configuring the Control file in VERICUT to interpret G-Code words and special characters for NC machine simulation. It outlines steps to define various NC codes, associate actions with them, and test the configuration to ensure proper processing without errors. The session concludes by demonstrating how to monitor the simulation using Variables and Status windows.

Uploaded by

Diogenes Cardoso
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

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.

The Welcome Screen has opened file


session_106m_introduction_to_the_control.vcproject

VERICUT V9.3 Session 106 1


In this session we will configure the Control to support the below NC codes (words).

% - 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

1. Single step the NC Program

• Simulation Controls > Single Step until M30

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.

• From the Simulation Controls select Reset Model

VERICUT V9.3 Session 106 2


2. Specify how the Control interprets the word “%”

• 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.

• Select # and then select Add

• 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.

VERICUT V9.3 Session 106 3


3. Specify how the Control interprets the word “O”

• 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.

• Sub Type = Numeric


• Metric Format = 4.0

• Select OK

Now let’s associate an action (macro) to word O

• 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

VERICUT V9.3 Session 106 4


window consists of a "Menu Bar" and a "tree" structure representing the
configuration of a particular NC control.
The Events section of the tree structure enables you to specify the macros called
and/or variables set based on key events that occur during NC program file
processing. The Events section of the tree structure displays the event
configurations of a particular NC control. When you expand an "event" object, the
macro calls associated with that particular event are displayed.

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.

• Select N and then right-click and select Add/Modify

VERICUT V9.3 Session 106 5


Note: The features on the Add/Modify Word/Address window enable you to maintain
groups/conditions in the control configuration. Here words can be "grouped" with address
values function to perform specific actions by calling CGTech supplied or custom macros.

• Control Type = Base


• Word = O
• Range = *
• Description = Subroutine Sequence number

• In the Macroname text field (Filter) type Subroutine to display only the
CGTech macros which have the word Subroutine in their name

• Select CGTech Macro SubroutineSequenceEnd from the list

Note: Documentation about the selected CGTech Macro is displayed Help area.

VERICUT V9.3 Session 106 6


• Leave blank the Override Value and Override Text fields

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.

Note: Override Text field is similar to Override Value, except that it is


used to specify text to be passed to the macro. Only certain macros are
designed to accept Override Text values.

VERICUT V9.3 Session 106 7


• Select Add (at bottom of window)

Note: you have now associated an action the word O

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 Add (at bottom of window)

• Select Close

VERICUT V9.3 Session 106 8


4. Test the configuration of words “%” and “O”

• Simulation Controls > Single Step until O1000

Notice that NO error messages are being displayed in the Message Area.

• Ribbon Bar > Project tab > Project group > Variables > All

5. Specify how the Control interprets the words “(” “)”

• 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

VERICUT V9.3 Session 106 9


6. Specify how the Control interprets the word “G90”
• Select Add
• Control = Base
• Name = G
• Type = Macro
• Sub Type = Numeric
• Metric Format = 4.0

• 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

• Expand (+) group States and select G 80.8

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.

• Right-click and select Add/Modify


• Control Type = Base
• Word = G
• Range = 90
• Description = Absolute command
• Macroname text field > absolute
• Select CGTech Macro ModeAbsolute from the list
• Select Add (at bottom of window)
• Select Variable
• Variable Name = 4003
• Variable Description = Mode Absolute/Incremental
VERICUT V9.3 Session 106 10
• Select Add (at bottom of window)

7. Specify how the Control interprets the word “G54”


Since the Word G is already defined, we can go and associate an action (macro) to
word G with the value pair 54

• Expand (+) group G-Prep and select G 52


• Right-click and select Add/Modify

• Control Type = Base


• Word = G
• Range = 54
• Description = Additional work offset coordinate system
• Macroname text field > WorkCoord
• Select CGTech Macro WorkCoord from the list
• Override Text = ERROR

Read the help on this macro to help you understand the Override Text option

• Select Add (at bottom of window)


• Select Variable
• Variable Name = 4014
• Variable Description = Active coordinate system
• Select Add (at bottom of window)

VERICUT V9.3 Session 106 11


8. Specify how the Control interprets the word “G1”

• 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

9. Specify how the Control interprets the word “X”

• Configure the Word Format for the word X as shown below

• Ribbon Bar > Machine / Control tab > Control group > G-Code
Processing

• Expand (+) group Registers


• Expand (+) X

VERICUT V9.3 Session 106 12


In NC control, the word X can mean many different things, depending on what other
word/value pairs are on the same line (ex; G10 X causes different action then G1 X) or
which state is active. In VERICUT you can specify one or more Conditions, which if
met, causes the group to perform different action(s).

• Select **

The ** is the G-Code Processing window indicates the action which will occur if
none of the above conditions are true (or met)

• Right-click and select Add/Modify


• Configure the X word to use CGTech macro XAxisMotion

VERICUT V9.3 Session 106 13


10. Specify how the Control interprets the word “F”

• Configure the Word Format for the word F as shown below

• Configure the Registers Group so that the word F uses CGTech macro FeedRate,
and VERICUT tracks the active feedrate with the Variable 4109

• Close G-Code Processing window

11. Single step the NC Program

• Simulation Controls > Single Step until M30

Use the Variables and Status windows to monitor the simulation.

Conclusion
This session has shown you how to specify how the Control interprets G-Code words
and special characters.

VERICUT V9.3 Session 106 14

You might also like