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 or menu selections or toolbar buttons can be pressed to start control emulation. Once the program is started, it will run to completion, unless interrupted by a menu selection, or a debugging breakpoint, or by clicking with the left-mouse in a tracing window, or by a user dialog requesting additional information. Choose one of the menu selections to again continue processing after a pause. Select when you are finished.
The simulation can be viewed from one or more Virtual Machine
windows, which are activated by a menu
selection. You use a combination of keyboard and mouse functions to
pan, zoom and rotate about the simulation windows (see “Simulation»
Diagnostics
Diagnostic messages can be reviewed in the Diagnostics Window, activated by a menu selection. Diagnostics are recorded whether the window is activated or not. A function is available for the Diagnostic window, using the right-mouse context sensitive pop-up menu. Synchronizing on a diagnostic will cause the simulation, trace and source windows to identify the corresponding point they were at when the diagnostic was output.
Diagnostic messages are also output to the Console trace window but only when activated by a menu selection. Diagnostic messages are also written to the listing verification file and as well to the log file if one was requested in the launch panel “Options” settings. Once the program has completed, you can view a summary of diagnostics in the verification listing using the menu function.
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 menu selection.
Tracing
There are four trace windows that trace (i.e., list) various types of input and output records. CERUN provides and commands to pause processing whenever something is written to one of these windows. The trace windows are:
traces NC program data (MCD) as it is readtraces output processing and actions of the control emulatortraces diagnostics, operator messages and other console I/O 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 menu function. Processing will continue until the next line is output to the selected trace window.
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 selection toggles between side-by-side vs. sequential tracing of information.
A 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 menu Trace tab. When “Save for review” is enabled, these limits are ignored on the Input and Console windows, so that the complete program can be reviewed.
More information on the 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/
The simulation windows are:
views the model, fixtures and partsviews/modifies compensation and other controller features 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 window and the Controller window Time Line tab: to toggle between viewing the GENER and CERUN (the default) representations of the simulation.
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 menu as follows:
defines parts (design/stock) and holding fixtures defines cutting tools and holders; selects active headdefines tool and fixture compensation amountsdefines 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 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:
lists MCD and macro source.enables viewing and setting of macro variables.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 , and menu commands and keyboard shortcuts to single step through MCD and macros. steps to the selected MCD block or macro line. Finally, sets the selected MCD block as the next one to process.
CERUN provides a menu function as well as , and menu functions and keyboard shortcuts to set or clear stopping points in macros and MCD. Finally, CERUN provides a menu function to individually enable or disable macros for testing purposes.
CERUN also provides , and menu commands and keyboard shortcuts to start, pause and step processing. A menu command starts processing, bringing up a progress bar instead of the full interface, for faster execution.
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 menu selection or Multi-Kernels toolbar. In a multi-kernel environment, the various debug windows and debug features all are with respect to the selected kernel. When debugging a merged PSE process, the menu selection can be used to switch between the GENER and CERUN kernels, allowing independent debugging of the post-processor or control emulator. When a breakpoint is triggered, the active kernel is automatically switched to the one that encountered the breakpoint.
More information on the and menu selection options can be found in “Run Menu” and “Debug Menu”.