16
Integrated Machine Tool Simulation & Verification Workshop S&V Commands April 9-10, 2002 Cypress, California

Integrated Machine Tool Simulation & Verification Workshop S&V Commands April 9-10, 2002 Cypress, California

Embed Size (px)

Citation preview

Page 1: Integrated Machine Tool Simulation & Verification Workshop S&V Commands April 9-10, 2002 Cypress, California

Integrated Machine Tool Simulation & Verification Workshop

S&V CommandsApril 9-10, 2002

Cypress, California

Page 2: Integrated Machine Tool Simulation & Verification Workshop S&V Commands April 9-10, 2002 Cypress, California

Simulation and Verification CommandsSimulation and Verification Commands

Purpose:

Protocol to communicate instructions and feedback from MTD to Simulation and Verification Engine in means of S&V events

S&V Engine

Input Buffer

S&V Events

Output Buffer

Simultaneous Events

S&V Commands

Customized Processor

NC

Ch

an

ne

l-n

NC

Ch

an

ne

l-3

NC

Ch

an

ne

l-2

NC

Ch

an

ne

l-1

Page 3: Integrated Machine Tool Simulation & Verification Workshop S&V Commands April 9-10, 2002 Cypress, California

Categories of S&V CommandsCategories of S&V Commands

Motion Commands: move slides or machine devices to specified locations.

Mounting Commands: mount or un-mount changeable devices and cutting tools.

Feedback Commands: issue graphical, messages, audio or any other feedback to be passed to the user or to the CAM processor.

Control Commands: used for coordinating and managing commands.

Query Commands: to allow the MTD writer to get information from the machine tool model.

Miscellaneous Commands: are anything else that doesn’t fall into the above categories.

Page 4: Integrated Machine Tool Simulation & Verification Workshop S&V Commands April 9-10, 2002 Cypress, California

S&V CommandsS&V Commands

Basic S&V Commands: The building blocks for the S&V high level commands. Each command normally creates one kind of S&V event that is directed to current NC channel and is executed in specified duration.

Example: SIM_move_linear_axis 5.3 X 50.5

High Level S&V Commands: Uses the Basic S&V commands to create new commands that are often used by MTD writer to simplify his task in development of new drivers.

Example: SIM_move_circular_zcs 0.0 0.0 1.0 X 10 Y 10 I 20 J 30

Note: Motion commands have similar syntax as G codes

Page 5: Integrated Machine Tool Simulation & Verification Workshop S&V Commands April 9-10, 2002 Cypress, California

Coordinate system for theorigin of the NC program

(ZCS=MCS)

machine tool zero coordinate system MTCS

absolute coordinate system of the whole assembly(ACS)

Equivalent to controller preset zero offset(G54-G57)

Controller programmable zero offset(G58-G59) could be handle in different ways.

Coordinate Systems used in MTDCoordinate Systems used in MTD

ACS: The Absolute Coordinate System for

entire assembly.

MCS: The UG-CAM Machine Coordinate System. NC program is output in this system.

MTCS: Machine Tool Coordinate System. An abstract coordinate system defined on every machine.

ZCS: The workpiece Zero Coordinate System. Matches the MCS on the machine tool.

XCS: The Axis Coordinate System. Degree of freedom is expressed i.r.t this system.

TCS: The Tool Coordinate System. Origin in the tool tip. +X axis of TCS points in direction of tool axis (and tool length). Matches Genius definition.

RCJ: The Reference Coordinate Junction. Reference junction used in the high level positioning S&V commands.

Axis Coordinate System XCS

Page 6: Integrated Machine Tool Simulation & Verification Workshop S&V Commands April 9-10, 2002 Cypress, California

Basic S&V CommandsBasic S&V Commands

Examples of Basic S&V Commands:

SIM_activate_tool set specified tool as the current active tool

SIM_ask_axis_position return the axis current position in axis coordinate system

SIM_ask_junction_xform get the junction transformation in current machine state with respect to the absolute coordinate system

SIM_create_junction create a new junction

SIM_mount_tool mount specified tool

SIM_move_linear_axis move one linear axis in axis coordinate system

SIM_move_rotary_axis move one rotary axis in axis coordinate system

SIM_set_channel set the current channel

SIM_set_feed set the current feed rate

SIM_step create a sub-step event to perform intermediate update of the machine state

SIM_update create a step event to update the state of the machine with all prior events

Complete list of Basic S&V Commands

Example: Move the linear axes X, Y and Z to position point 10, 20, 30 respectively and move rotary axis B to 90 degrees. All

axes should move simultaneously

SIM_move_linear_axis 5.0 X 10 SIM_move_linear_axis 5.0 Y 20SIM_move_linear_axis 5.0 Z 30 SIM_move_linear_axis 5.0 B 90SIM_update

Page 7: Integrated Machine Tool Simulation & Verification Workshop S&V Commands April 9-10, 2002 Cypress, California

Basic S&V Commands Programming TipsBasic S&V Commands Programming Tips

Each command normally creates one S&V event in current NC channel.

Basic syntax of a command consists of duration and command parameters.

The name of the NC axis specified in commands is the actual axis name (i.e. physical name) not logical name.

The units of the input and output data to commands is specified in MTD units (see SIM_set_mtd_units).

All commands defined prior to SIM_step and SIM_update are executed simultaneously.

Returned values from command through mom_sim_result1, mom_sim_result2, … mom_sim_resultn

Junctions could be identified by the junction name or by the ‘parent component name’@’junction name’

Page 8: Integrated Machine Tool Simulation & Verification Workshop S&V Commands April 9-10, 2002 Cypress, California

High Level S&V CommandsHigh Level S&V Commands

Examples of High Level S&V Commands:

SIM_ask_current_ref_junction return the current reference junction

SIM_ask_last_position_mtcs return the last reference junction position in MTCS

SIM_macro_call call a predefined macro

SIM_move_circular_mtcs move axes in circular mode where coordinates are in MTCS

SIM_move_linear_zcs move axes in linear mode where coordinates are in ZCS

SIM_set_current_ref_junction set the current reference junction

SIM_set_duration_callback_fct set callback TCL function to compute duration of a delta motion

SIM_set_rotary_axes_config set the current rotary axes configuration

SIM_transform_mtcs_to_zcs transform point from MTCS to ZCS coordinate system

SIM_update_current_zcs set current ZCS junction and update ZCS <-> MTCS transformations

Complete list of High Level S&V Commands

Example: Issue command to mount tool identified by library reference name on the SPINDLE at junction

SPINDLE_JCT. The mounting is done such that the tool mounting junction coincides with SPINDLE_JCT

junction.

SIM_mount_tool 15 LIBRARY_REF UGT0201005 SPINDLE SPINDLE_JCT

Page 9: Integrated Machine Tool Simulation & Verification Workshop S&V Commands April 9-10, 2002 Cypress, California

Programming High Level Motion CommandsProgramming High Level Motion Commands

The motion commands move the current reference junction (ref_jct) origin to target position. Current reference junction is set by SIM_set_current_ref_junction.

Target position is defined i.r.t the current work junction(wrk_jct) which is MTCS or current ZCS. Current work junction is either the unique MTCS junction or the junction set by SIM_set_current_zcs_junction

The axes that could move to achieve the target position are set by SIM_set_linear_axes_config and SIM_set_rotary_axes_config. No support to collinear axes at this point.

ref_jct

(10,20,30) Target Position

wrk_jct

SIM_set_current_zcs_junction wrk_jct

SIM_set_current_ref_junction ref_jct

SIM_set_rotary_axes_config [list A B]

SIM_set_linear_axes_config [list X Y Z]

SIM_move_linear_zcs X 10 Y 20 Z 30 A 0.7

Page 10: Integrated Machine Tool Simulation & Verification Workshop S&V Commands April 9-10, 2002 Cypress, California

Macro DefinitionMacro Definition

Command Syntax:SIM_macro_def <macro_name>

SIM_macro_append_sv_cmd <S&V command>

SIM_macro_append_sv_cmd <S&V command>

...

SIM_macro_end <macro_name>

SIM_macro_call <macro_name>

The S&V commands are defined incremental i.r.t starting position set when the macro is called.

Distinguish between variables realized at time the macro is defined or at time macro is called.

Macro is defined ones and can be called as many times as needed.

Page 11: Integrated Machine Tool Simulation & Verification Workshop S&V Commands April 9-10, 2002 Cypress, California

Macro ExampleMacro Example

SIM_macro_def cycle_200

SIM_set_feed $mom_feed_rate “INCH_PER_MIN”

SIM_macro_append_sv_cmd ”SIM_move_linear_zcs Z \[ get_z $mom_cycle_rapid_to \]"

SIM_set_feed $mom_cycle_feed_rate “INCH_PER_MIN”

SIM_macro_append_sv_cmd ”SIM_move_linear_zcs Z \[ get_z $mom_cycle_feed_to \]"

SIM_macro_append_sv_cmd "SIM_delay \$dwell_at_top"

SIM_macro_append_sv_cmd ”SIM_move_linear_zcs Z \[ get_z $mom_cycle_retract_to \]"

SIM_macro_append_sv_cmd "SIM_delay \$dwell_at_top"

SIM_macro_end cycle_200

proc get_z { delta_zl } {

global sim_last_X sim_last_Y sim_last_Z

set z [expr $sim_last_Z + $delta_z]

return $z

}

#drill cycle 200 at position 100,100,100

SIM_move_linear_zcs X 100 Y 100 Z 1000

SIM_macro_call cycle_200

d1

d2

d3

d1=mom_cycle_rapid_tod2=mom_cycle_feed_tod3=mom_cycle_retract_to

Page 12: Integrated Machine Tool Simulation & Verification Workshop S&V Commands April 9-10, 2002 Cypress, California

High Level S&V Commands Programming TipsHigh Level S&V Commands Programming Tips

Motion commands have syntax similar to G01, G02 and G03.

Coordinates related commands are set or queried i.r.t MTCS or ZCS coordinate system. The command are suffixed with _mtcs or _zcs accordingly.

By default, motion commands are followed by SIM_update command unless set differently.

The units of the input and output data to commands is specified in MTD units (see SIM_set_mtd_units).

Don’t track last positions (e.g. of tools). Query the system when needed.

Extract geometry and kinematics data from machine tool model in order to define your post kinematics data. See SIM_set_post_kinematics.

Page 13: Integrated Machine Tool Simulation & Verification Workshop S&V Commands April 9-10, 2002 Cypress, California

More TipsMore Tips

Make sure that the S&V command follow the post command (i.e. MOM_do_template and MOM_output_literal) that writes the NC block to file.

To allow simulation of one operation at a time, don’t assume that the MTD driver starts from the root object of the program view.

Remember the same driver is used for G code generation. So, check if simulation is active before invoking any simulation commands.

Page 14: Integrated Machine Tool Simulation & Verification Workshop S&V Commands April 9-10, 2002 Cypress, California

Customizing Simulation Dialog Customizing Simulation Dialog

The simulation dialog can be customized from the machine tool driver. If not defined, the system provides a default dialog.

Dialog customization is available in the three MTD modes.

A predefined set of system items is already available. Some of the system items attributes can be also altered during simulation.

The user (i.e. MTD writer) can add user items that can be set during simulation. Note that setting an item is synchronized with the other events and may not happen at the time the command is called but when the set item event is processed.

System items and user items can be mixed and positioned in any order in the dialog.

At the bottom of the simulation dialog the system adds few control items like Reset, Configure and stepping buttons.

Page 15: Integrated Machine Tool Simulation & Verification Workshop S&V Commands April 9-10, 2002 Cypress, California

Customizing Simulation Dialog (cont.)Customizing Simulation Dialog (cont.)

System Items User Items

Page 16: Integrated Machine Tool Simulation & Verification Workshop S&V Commands April 9-10, 2002 Cypress, California

Debugging ToolsDebugging Tools

Control debugging from machine tool driver. Output is directed to UG listing device.

SIM_dbg_start “Start of MILL3AX driver”

SIM_dbg_set_output <status> <keys>

status: ON/OFF

Keys: SIM_DBG_OUTPUT_ERROR, SIM_DBG_OUTPUT_NC_CMD, SIM_DBG_OUTPUT_CEVENT, SIM_DBG_OUTPUT_INPUT_SV_EVENT, SIM_DBG_OUTPUT_OUTPUT_SV_EVENT, SIM_DBG_OUTPUT_PROCESSED_SV_EVENT….. SIM_DBG_OUTPUT_ALL

SIM_dbg_write_message “Start path processing”

SIM_dbg_end

Send message to simulation info windowSIM_feedback_message “MTD: Starting computation>>”

Write debug message to output file sim_debug.logMOM_SIM_DEBUG_MSG ”Input arguments are $args”