1
0

Initial commit

This commit is contained in:
2026-02-22 14:16:24 +01:00
commit 1692d191fa
3684 changed files with 10817616 additions and 0 deletions

View File

@@ -0,0 +1,115 @@
###############################################################################
# dbc_device_ascii.def - DBC definition file for devices stored as ascii file
###############################################################################
##############################################################################
# REVISIONS
# Date Who Reason
# 10-mar-2005 JM Initial
# 18-Jul-2017 Dieter Krach Add class Facinghead
# 07-Oct-2019 Dieter Krach Add classes Steadyrest and Tailstock
# 13-Jan-2022 Yichao Deng Add DB_ALIAS Holder
##############################################################################
DB_PREFIX "DB("
DB_SUFFIX ")"
ESS_PREFIX "ESS("
ESS_SUFFIX ")"
#############################################################################
# The DB_ALIAS of the library reference. It is mandatory that this DB_ALIAS
# appears in the alias list
#
#############################################################################
#############################################################################
# The list of DB_ALIAS
#
# DB_ALIAS <alias>
# {
# DB_ID < Attribute identifier defined in the ASCII Data File
# DB_ID_TYPE < Type of the identifier >
# d _ double
# i _ integer
# s _ string
# }
#
##############################################################################
DB_ALIAS libref
{
DB_ID LIBRF
DB_ID_TYPE s
}
DB_ALIAS Type
{
DB_ID T
DB_ID_TYPE s
}
DB_ALIAS Description
{
DB_ID DESCR
DB_ID_TYPE s
}
DB_ALIAS Holder
{
DB_ID HLD
DB_ID_TYPE s
}
LIBREF libref
#########################################################################
# The Class Hierarchy #
#########################################################################
CLASS DEVICE
{
TYPE test1
QUERY "[1] == [1]"
DIALOG libref
RSET libref Type Description Holder
CLASS Chuck
{
TYPE test2
QUERY "[DB(Type)] == [1]"
DIALOG libref
RSET libref Description
}
CLASS Toolholder
{
TYPE test2
QUERY "[DB(Type)] == [2]"
DIALOG libref
RSET libref Description
}
CLASS Head
{
TYPE test2
QUERY "[DB(Type)] == [3]"
DIALOG libref
RSET libref Description
}
CLASS Facinghead
{
TYPE test2
QUERY "[DB(Type)] == [4]"
DIALOG libref
RSET libref Description
}
CLASS Steadyrest
{
TYPE test2
QUERY "[DB(Type)] == [5]"
DIALOG libref
RSET libref Description
}
CLASS Tailstock
{
TYPE test2
QUERY "[DB(Type)] == [6]"
DIALOG libref
RSET libref Description
}
}

View File

@@ -0,0 +1,345 @@
###############################################################################
# dbc_device_ascii.tcl - DBC Event Handler for device database stored as ascii file
###############################################################################
##############################################################################
# REVISIONS
# Date Who Reason
# 10-Mar-2005 JM Initial
# 15-Apr-2005 JM Account for holding system
##############################################################################
#
proc ASC_m_create_filename {env_var_name filename} \
{
#
# Creates a complete filename by evaluating an environment variable
# for the directory information
#
set env_var [MOM_ask_env_var $env_var_name]
if { $env_var == "" } \
{
set message "Can't read environment variable $env_var_name"
MOM_abort "\n $message"
}
set fname ""
set fname [append fname $env_var $filename]
return $fname
}
proc MOM__boot {} \
{
# source some general procedures
#
# dbc_ascii_general.tcl
#
set filename \
[ASC_m_create_filename "UGII_UG_LIBRARY_DIR" "dbc_ascii_general.tcl"]
if { [catch {source $filename}] == "1" } \
{
set message "Can't load .tcl file: $filename"
MOM_abort "\n $message"
}
### source /cam/v160/jm_mct/dbc_ascii_general.tcl
}
proc MOM__halt {} \
{
}
#---------------------------------------------
proc DBC_init_db {} \
{
global asc_debug
global asc_file_name
global dbc_part_units
global asc_units
#
# Global variables set by DBC for Input/Output
#
global dbc_lhs_exp
global dbc_rhs_exp
global dbc_relop
global dbc_query
global dbc_subqry1
global dbc_subqry2
global dbc_boolop
global dbc_class_name
global dbc_attr_count
global dbc_attr_id
global dbc_query_count
global dbc_libref
global dbc_var_list
global dbc_rididity
set dbc_lhs_exp ""
set dbc_rhs_exp ""
set dbc_relop ""
set dbc_query ""
set dbc_subqry1 ""
set dbc_subqry2 ""
set dbc_boolop ""
set dbc_class_name ""
set dbc_attr_count 0
set dbc_attr_id ""
set dbc_query_count 0
set dbc_libref ""
set dbc_var_list ""
set dbc_rigidity 1.0
set asc_debug 0
# Create the filename for the machine_database.dat
set env_var UGII_CAM_LIBRARY_DEVICE_DATA_DIR
set asc_file_name [ASC_m_create_filename "$env_var" "device_database.dat"]
# And load the file into memory
set ret_val \
[ASC_load_data_file $asc_file_name $asc_units(unknown) 0]
if { $ret_val == "1" } \
{
set message "Open error for UG/Library ASCII Data File: $asc_file_name"
set message "$message \n $asc_file_name"
MOM_abort "\n $message"
}
}
#---------------------------------------------
proc DBC_retrieve {} {
#---------------------------------------------
#
# global input
# ------------
global asc_debug
global dbc_libref
global dbc_retrieve_var_list
#
# global output
# -------------
global dbc_holding_system
#
# manufacturer and description
global dbc_device_description
set dbc_device_description mct_unknown
#
# partfile name for machine graphics
#
global dbc_device_part_name
set dbc_device_part_name ""
append dbc_device_part_name $dbc_libref ".prt"
#
# Look for the desired libref
#
set found [ASC_array_search_machine $dbc_libref db_row]
#
# Ask the necessary attribute values
#
set dbc_device_description \
[ASC_ask_att_val DESCR $db_row "" unknown flag]
#
# Holding system
#
set dbc_holding_system [ASC_ask_att_val HLD $db_row "" 4711 flag]
}
proc ASC_array_search_machine { libref db_row_ref } \
{
upvar $db_row_ref db_row
global asc_file_name
set found [ASC_array_find_object_by_att LIBRF $libref db_row ]
if { $found == 2 } \
{
set message "Error retrieving machine data from external library."
set message "$message \n Machine with the library reference $libref"
set message "$message \n does not exist in the"
set message "$message \n ASCII Data File(s):"
set message "$message \n $asc_file_name"
MOM_log_message "\n $message"
}
return $found
}
proc DBC_ask_library_values {} \
{
#
# global input
global dbc_libref
global dbc_db_ids_count
global dbc_db_ids
#
# global output
global dbc_db_ids_value
#
# Look for the desired libref
#
ASC_array_search_machine $dbc_libref db_row
#
# and set the desired values
#
for { set inx 0 } { $inx < $dbc_db_ids_count } { incr inx } \
{
set dbc_db_ids_value($dbc_db_ids($inx)) \
[ASC_ask_att_val $dbc_db_ids($inx) $db_row "" "" flag]
}
}
#---------------------------------------------
proc DBC_translate_att_alias {} {
#---------------------------------------------
ASC_translate_att_alias
}
#---------------------------------------------
proc DBC_create_criterion {} {
#---------------------------------------------
ASC_create_criterion
}
#---------------------------------------------
proc DBC_create_query {} {
#---------------------------------------------
ASC_create_query
}
#---------------------------------------------
proc DBC_execute_query {} {
#---------------------------------------------
ASC_execute_query
}
#---------------------------------------------
proc DBC_execute_query_for_count {} {
#---------------------------------------------
ASC_execute_query_for_count
}
#------------------------------------------------------------------------
proc DBC_write { } {
#------------------------------------------------------------------------
global asc_database_name
set asc_database_name "machine_database.dat"
ASC_write
}
#---------------------------------------------------------------------
proc ASC_output_header { fileid } {
#---------------------------------------------------------------------
global dbc_attr_count
global dbc_attr_aliases
global dbc_attr_id
global dbc_logname
set daytime [clock seconds]
set out_daytime [clock format $daytime -format "%a %b %d %Y %I:%M %p"]
set headerMessage "###############################################################################
# machine_database.dat - database file for machine database stored as ascii file
###############################################################################
#############################################################################
## Data file for the Machine tool
##
##
## REVISED:
## $dbc_logname $out_daytime
##
## The following key words for Attribute ids are defined
##
## LIBRF - unique record identifier
## T - Machine type - 1-Mill machines
## - 2-Lathe machines
## - 3-Wedm machines
## - 4-MillTurn machines
## - 9-Mixed machines
##
## MNF - Manufacturer
## DESCR - Short description ( for example 3 Axis Mill)
## CNTR - indicating the controller of the machine
##
## POST - the configuration file name with the list of
## postprocessors for this machine
## (The path will be found from the search path environment variable)
## RIGID - Rigidity factor to apply to data from the machining data library
## This will normally be a number less than or equal to 1.0
##############################################################################"
puts $fileid "$headerMessage"
# load the database structure
DBC_load_rset_data
# output FORMAT line
set format_line "FORMAT"
for {set i 0} {$i < $dbc_attr_count} {incr i} \
{
DBC_ask_attr_id $dbc_attr_aliases($i)
set format_line "$format_line $dbc_attr_id"
}
puts $fileid $format_line
puts $fileid "#--------------------------------------------------------------------------------"
}

View File

@@ -0,0 +1,72 @@
###############################################################################
# device_database.dat - database file for device database stored as ascii file
###############################################################################
#############################################################################
## Data file for the machine devices
##
##
## The following key words for Attribute ids are defined
##
## LIBRF - unique record identifier
## T - device type - 1-Chuck
## 2-Tool Holder
## 3-Head
## DESCR - Short description ( for example 3 Axis Mill)
## HLD - Device Holding System, used for automatic device mounting
## on to the machine. The machine kinematics model must contain
## a _DEVICE_HOLDER component with the same holding system
##
##############################################################################
##
##############################################################################
FORMAT LIBRF T DESCR HLD
#--------------------------------------------------------------------------------
DATA |dev01_001 |1 |Chuck | CHUCK
DATA |sim09_adapter-HEAD |3 |RA Adapter| HEAD
DATA |sim10_lathe_chuck_10d |1 |Chuck 10D| CHUCK
DATA |sim10_lathe_chuck_12d |1 |Chuck 12S| CHUCK
DATA |sim10_lathe_collet_adapter |1 |Collet Adapter | CHUCK
DATA |sim11_chuck_assy |1 |Chuck | CHUCK
DATA |sim15_chuck |1 |SIM15 Chuck | CHUCK
DATA |tool_holder_axial_mill_high |2 | Axial Mill Toolholder High| TOOL_HOLDER
DATA |tool_holder_duo_turn |2 | Duo Turn Tool Holder | TOOL_HOLDER
DATA |tool_holder_single_turn |2 | Single Turn Tool Holder | TOOL_HOLDER
DATA |tool_holder_id_bore |2 | Turn Holder ID Bore | TOOL_HOLDER
DATA |tool_holder_radial_mill |2 | Radial Mill Tool | TOOL_HOLDER
DATA |sim16_Vertical-Head |3 | VERT_HEAD | HEAD
DATA |sim16_RightAngle-Head |3 | RA_HEAD | HEAD
DATA |sim16_AC-Head |3 | AC_HEAD | HEAD
DATA |head_45_degree |3 | Head 45 Degree, mount jct +Z | HEAD
DATA |head_45_degree_kuka |3 | Head 45 Degree, mount jct +X | HEAD
DATA |head_45_degree_kuka_sinumerik |3 | Head 45 Degree Sinumerik | HEAD
DATA |force_sensor_2500 |3 | Force Sensor 2500, mount jct +Z | HEAD
DATA |sim17_Dual_Holder-Head |3 | DUAL_HOLDER_HEAD | HEAD
DATA |sim17_Turnholder_horizontal-Head |3 | Horizontal_Turnholder_HEAD | HEAD
DATA |sim17_Turnholder_vertical-Head |3 | Vertical_Turnholder_HEAD | HEAD
DATA |sim17_Universal-Head |3 | Universal_BC_HEAD | HEAD
DATA |sim17_Vertical-Head |3 | Vertical_HEAD | HEAD
DATA |sim17_Adapter-Head |3 | Adapter_HEAD | HEAD
DATA |sim17_mill_B-Head |3 | B_HEAD | HEAD
DATA |Head_Welding_Generic |3 | Generic Welding Head | HEAD
DATA |Head_Welding_Generic_static |3 | Generic Welding Static Head | HEAD
DATA |Head_Welding_Generic_sinumerik |3 | Generic Welding Head Sinumerik| HEAD
DATA |head_45_degree_fanuc |3 | Head 45 Degree, mount jct +z +X up fanuc | HEAD
DATA |QUILLSPINDLE |3 | QUILLSPINDLE | HEAD
DATA |QUILLSPINDLE_SINUMERIK |3 | QUILLSPINDLE_SINUMERIK | HEAD
DATA |Tape_Layup_and_Fused_Filament_Head |3 | Tape Head with Extruders | HEAD
DATA |Tailstock_Device|6 |Tailstock Device| TOOL_HOLDER
DATA |Steady_Rest|5 |Steady Rest| TOOL_HOLDER
#### Legacy - reuse for legacy setups only ####
#DATA |sim10_turn_tool_block |2 | OD Toolholder | TOOL_HOLDER
#DATA |sim10_id_tool_block |2 | ID Toolholder | TOOL_HOLDER
#DATA |sim10_blank_tool_block |2 | Blank Tool | TOOL_HOLDER
#DATA |sim10_axial_mill |2 | Axial Mill Tool | TOOL_HOLDER
#DATA |sim10_radial_mill |2 | Radial Mill Tool | TOOL_HOLDER
#DATA |sim11_toolblock_holder |2 |Toolholder | TOOL_HOLDER
#DATA |sim15_axial_mill |2 | Axial Mill Toolholder - Legacy | TOOL_HOLDER
#DATA |sim15_axial_mill_high |2 | Axial Mill Toolholder High - Legacy | TOOL_HOLDER
#DATA |sim15_radial_mill |2 | Radial Mill Toolholder - Legacy | TOOL_HOLDER
#DATA |sim15_turn_block |2 | Turn Toolholder - Legacy | TOOL_HOLDER
#DATA |sim15_turn_block_duo |2 | Duo Turn Toolholder - Legacy | TOOL_HOLDER

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More