Using CERUN with Virtual Machine
The Control Emulator run-time module “CERUN” provides the capability to emulate the processing of MCD by a CNC machine. When coupled with Icam’s Virtual Machine product, CERUN can also emulate the motions of the CNC machine’s axes, while testing for over-travel conditions and collisions between the various machine, tool, part and fixture components. When coupled with Icam’s Material Removal Simulation product, CERUN can simulate the cutting actions of the tool on the stock and also include the in-process stock when testing for collisions.
CERUN should be run in a “full interface” mode to take full advantage of Virtual Machine and material removal simulation features. The full interface contains:
A Diagnostic window that lists all diagnostic messages (see “Diagnostics”).
Tracing windows that show the flow of processing of CERUN by listing events as they occur (see “Tracing”).
Simulation windows to view the machine model and material removal simulation, as well as to view or change tool and workpiece compensation amounts (see “Simulation”).
Debugging windows that aid the Control Emulator developer to better understand the relationship between MCD data, macro processing and resultant simulation. It does this by tracing the processing of various types of data and also by providing the capabilities of a fully functional debugger (see “Debugging”).
Menu bar functions, keyboard shortcuts and associated toolbar buttons to access the many features of CERUN (see “Menus”).
When CERUN is run in full interface mode, control emulation starts in
a paused state. The Run»
The simulation can be viewed from one or more Virtual Machine
windows, which are activated by a Simulation»
Diagnostics
Diagnostic messages can be reviewed in the Diagnostics Window,
activated by a View»
Diagnostic messages are also output to the Console trace window but
only when activated by a View»
A count of diagnostics will appear in the Status bar at the bottom of
the CERUN full interface window. Status bar visibility can be toggled
using the View»
Tracing
There are four trace windows that trace (i.e., list) various types of
input and output records. CERUN provides Run»
View»Input traces NC program data (MCD) as it is read View»Output traces output processing and actions of the control emulator View»Console traces diagnostics, operator messages and other console I/O View»Macro traces macro commands as they are processed
You can single-step the control emulator by clicking with the
left-mouse button in any trace window. This produces the same effect
as setting the focus on the trace window and selecting the Run»
For PSE processing, the trace windows will have buttons on the title-bar labelled “0:GENER” and “1:CERUN”, that cause traced output to be shown only for the selected product. For a multiple channelmachine, the trace windows will have buttons on the title bar labeled “0:name”, “2:name”, etc., that cause traced output to be shown only for the selected channels. A right-mouse pop-up menu “Split View” selection toggles between side-by-side vs. sequential tracing of information.
A Synchronize function is available for the trace windows, using the right-mouse pop-up menu. Synchronizing on a line of output in one trace window will cause the other trace windows as well as the source and simulation windows to identify the corresponding point they were at when the selected line was output. The up and down arrows can be used to change the line of output being synchronized.
Tracing windows will continue to record information when minimized, which may speed up processing since the screen does not have to be updated as frequently. Tracing information will not be recorded to any trace window that has been closed, which may significantly speed up processing.
The maximum number of lines remembered in each of the trace windows
can be set from the Tools»
More information on the View menu selection options can be found in “View Menu”.
Simulation
There are three windows that are used to view and control the Virtual Machine model and/or material removal process. These windows will only be available if machine simulation and/or material removal simulation were selected when CERUN was started (see “VM Tab”).
The simulation windows are:
Simulation»Virtual Machine views the model, fixtures and parts Simulation»Controller views/ modifies compensation and other controller features Simulation»Manager views/ modifies tooling, parts, fixtures and setups
The Virtual Machine window is where you view the actions of the machine when running with a Virtual Machine model. Up to four independent viewing windows are supported. If material removal simulation is active, then the in-process stock will be displayed within the machine model environment and collision detection will include the in-process stock as one of the components to be checked against the tool and any other collision enabled objects that can move with respect to the stock.
For PSE processing, a right-mouse pop-up menu can be used in the
Virtual Machine and Controller»
This same Virtual Machine window is used when running Material Removal Simulation without a Virtual Machine model. In this case, only the tooling, stock, part and fixture components are drawn (i.e., the machine is not shown). Collision detection checks tool vs. part, tool vs. in-process stock and tool vs. fixtures. All motions are viewed from the perspective of the part (e.g., a table rotation will appear as the tool arcing through space).
All of the physical components of the simulation will be automatically setup on entry when running with a Manufacturing Extractor (see “Starting CERUN from an Extractor”). These include parts (design parts and their in-process stock), fixtures, as well as tools and their holders. The manufacturing extractors also have the ability to set tool compensation amounts to their nominal values and to automatically define appropriate offsets for workpiece compensation. Some extractors can determine multiple setup requirements as defined by supporting CAM systems. All of these settings can be reviewed or modified from the Simulation menu as follows:
Simulation»Parts/ Fixtures defines parts (design/ stock) and holding fixtures Simulation»Tools/ Holders/ Heads defines cutting tools and holders; selects active head Simulation»Controller defines tool and fixture compensation amounts Simulation»Manager defines setups; views/ modifies all of the above
The parts and fixtures define the various components that are
attached to the Stock Axis of the model. The tools and their holders
define the various components that are attached to the Tool Axis of
the model. Fixture (workpiece) compensation is generally required to
ensure the correct relationship between parts/
More information on the Simulation menu selection options can be found in “Simulation Menu”.
Debugging
There are three debugging windows that can be used to perform more advanced Visual debugging and testing of a control emulator. The debugging windows are:
Debug»Source lists MCD and macro source. Debug»Variables enables viewing and setting of macro variables. Debug»Stack Shows the current MCD block and all active macros.
At the start of the program, the Source window shows the MCD input file to be processed. This window is updated whenever processing is paused to show the current MCD block or macro line being processed.
The Variables window shows the macro variables and CNC variables (if using a pre-processor) that are currently in use by the program. Variables can be viewed and modified if necessary from this window.
The Stack window shows the nesting of MCD, subprograms and macros.
CERUN provides Debug»
CERUN provides a Debug»
CERUN also provides Run»
When debugging a control emulator that supports multiple independent
kernels (e.g., a merging mill-turn lathe), then the “active” kernel
for debugging purposes can be set using the Debug»
More information on the Run and Debug menu selection options can be found in “Run Menu” and “Debug Menu”.