Generate NC program code and control machine tool

advertisement
Integrated Machine Tool Simulation & Verification
Workshop
Machine Tool Driver(MTD)
April 9-10, 2002
Cypress, California
Machine Tool Driver
Purpose:
Generate NC program code and control
machine tool simulation behavior and
feedback.
Virtual NC
Controller
Post
Handler
Machine Tool
Driver
Machine Tool Driver Functions
 Generates NC-Program.
 Emulates the NC controller.
 Motion control - accurate path
Events
Events
Machine
Machine Tool Driver
Driver
Process
Data
Process
Data
based on machine configuration.
 Handles specific machine tool
features such as macros, cycles,
subroutine call.
 Key role in machine tool simulation.
 Fully customizable as TCL program.
 Textual, graphical and audio
feedback triggered by events.
Post
Event Handler
CL File
G01 X3.4
G03 Y3.1 I3.3
NCcode
code
NC
Virtual NC
Controller
S&V
Commands
S&V
S&V Events
Events
S&V
Engine
NC Controller
Plug-IN
MTD Architecture
Event Generator
Tool path
Event
MTD Handler
Data from KIM-Model
Machine Filters
Axis mapping
generic part of
inverse Kinematik
CEvent
Processing
(Converter)
Inverse Kinematics
Axis Mapping
machine tool dependent
MTD Event Handler
SIM Event
Mode
C Event
POST Event
NC-Program
G01 X3.4
G03 Y3.1 I3.3
POST-Event
Handler
SIM Event
Direct Mode
The handler controls which of the
three modes is in use
VNC
Virtual NC Controller
POST Event
POST-Event
Handler
+
Calls to S&V
commands
Plugin
Mode
POST Event
POST-Event
Handler
'G' Code
Plugin
Black Box
SIM-Event
Handler
S&V Commands
S&V Event
feedback to CAM
processors or Display
inverse kinematics module
should cover also the generic
part of process generator in the
future
S&V Engine
Virtual NC Controller(VNC)
Purpose: To Emulate a specific NC Controller
Functions in the three different modes
Approximate circular& splinar motions
Interpolate linear motions(optional)
Map logical to physical axes
Handle controller specific functions:
SIM/Post
Event
S&V Command
(C-Function or TCL procedure)
Linear Approximation
Interpolator
Mapping to Machine Axes
macros, cycles, subroutines,...
S&V Events
Virtual NC Controller Modes
SIM Events
For each Post event a SIM
event is triggered which
emulates the NC controller.
Quick &Simple to implement
VNC Modes
Events
Direct VNC
The S&V commands are
imbedded inside the post
event handler.
Accurate Simulation
VNC Plugin
An external program (ideally)
supplied by the controller
builder that converts NC
program to axis motions
and feedback.
‘Close to Reality’ Simulation
VNC SIM Event Mode
For each MOM event the system generates MOM_SIM event
Pros



Quick and simple to implement
Doesn’t need to touch post
Useful for training & demonstration purposes
Cons
 Double the number of events
 G codes might not be in sync with S&V events
 Duplicate Post handler logic in SIM event.
VNC Direct Mode
The S&V commands are imbedded inside the post event handler
Pros
 One set of events
 One logic for NC program generation and simulation
 Useful for training & demonstration purposes
 Equivalent to parsing G codes or even better.
 Reasonable development effort
Cons

Difficult to provide generic template
VNC Plugin Mode
Interface to external NC controller emulation software
Pros




With a controller builder box we can get ‘close to reality’ results
Runs based on G codes
Could be adapted to support other standards as StepNC
This is the future...
Cons

Such boxes are not yet standard and are not yet available in
the market by the ‘big’ controller guys.


High development cost.
Requires software programming skills
VNC Plugin Architecture
UG
MOM-SIM
Constructor
TCL
Trigger Event
Set Controller
Mode
SIM_mtd_init
Prepare next
NC command
Set TCL
variable
mom_sim_nc_
command
MOM_initialise
mtd
Format NCCommand
Trigger Event
SIM_mtd_reset
Native
Controller
Initialization
Code
Post Event
Handlers
MOM_execute_n
c_command
User Functions:
Trigger Event
SIM_PLUGI
N_initialize
Initialize
TCL-MTD
S&V Commands
S&V Engine Functions
KIM Functions
Others
MOM-SIM
Distructor
Virtual NC Controller
MOM_exit_mtd
Cleanup
TCL-MTD
SIM_PLUGIN
_execute_nc_c
ommand
SIM_PLUGI
N_exit
Native
Controller
NCCommands
Processing
Code
Native
Controller
Cleanup
Code
VNC Plugin Example
• The plugin DLL uses an existing
virtual controller from dCade
(used by Unisim) for the
Sinumerik 840 controller.
• The Plugin DLL is written in C
and accesses a TCL software to
parse the G codes and call the
corresponding S&V commands
user functions.
UG
API for S&V User
functions
Plugin DLL
PLUG - IN
Create TCL
Interpreter
with 3 function
SIM_PLUGIN_initialise
SIM_PLUGIN_exit
SIM_PLUGIN_execute_nc_command
Use user function from
S&V commands
Work with existing
dCADE TCL
controller of the
Unisign machine tool
(NCTK Funk’s)
Plug-In approach for the example
based on the existing TCL code of
the dCADE controller for the
Unisign machine tool
Download