Edith Cowan University
2012
SolidWorks Secondary Development with Visual Basic 6 for an Automated Modular Fixture Assembly Approach
Uday Farhan
Edith Cowan University
Simona OBrien
Edith Cowan University
Majid Tolouei Rad
Edith Cowan University
This article was originally published as: Farhan, U. H., OBrien, S. , amp; Tolouei Rad, M. (2012). SolidWorks Secondary Development with Visual Basic 6 for an Automated Modular Fixture Assembly Approach. International Journal of Engineering, 6(6), 290-304. Original article available here
This Journal Article is posted at Research Online. http://ro.ecu.edu.au/ecuworks2012/680
SolidWorks Secondary Development with Visual Basic 6 for an Automated Modular Fixture Assembly Approach
Uday H. Farhan u.farhan@ecu.edu.au
Saff Mechanical Engineer
School of Engineering, Edith Cowan University 270 Joondalup drive, Joondalup,
Western Australia , 6027
Simona Orsquo;Brien simona.obrein@ecu.edu.au
MEng Sc MIEI, School of Engineering,
Edith Cowan University, 270 Joondalup drive, Joondalup, Western Australia , 6027
Majid T. Rad m.rad@ecu.edu.au
Senior lecturer, School of Engineering Edith Cowan University
270 Joondalup drive, Joondalup Western Australia , 6027
Abstract
Modular fixtures (MFs) play an important role in terms of cost and production time reduction in manufacturing processes. In this paper, the authors illustrate an automated approach for MFs design and assembly. This approach is based on the secondary development of SolidWorks integrating with Visual Basic (VB) 6 programing language. SolidWorks API (Application programming interface) functions were applied in order to control SolidWorks commands and assembly operations. An ActiveX DLL project was created in VB 6 and a plug-in file in .dll format was generated. The outcomes were creating new menus in SolidWorks environment for selecting, inserting, and assembling MFs elements. The approach was applied for a side clamping procedure and for a semi-circular workpiece.
Keywords: Modular fixtures, SolidWorks API, Visual basic 6, Assembly simulation.
- INTRODUCTION
As a result of the rapid development of the manufacturing systems, productivity has become one of the goals that need to be achieved as well as production time consuming [1]. Given this evidence, modular fixtures (MFs) have been considered as one of the important factors for achieving these goals [1]. This became from the flexibility of MFs elements that provide several workholding procedures for different workpieces [2] and this brought many benefits in flexible manufacturing systems (FMSs) that use computer numerical control (CNC) machines. The design and assembly process of MFs was the aim for many previous studies. Some of them focused on the assembly relationships of the fixture elements [3]. Others concentrated on information presentation of MFs [4]. For more improvement of MFs design, CAD technology has been utilised for automating the design and assembly for fixture elements. Information models were used as a tool for supporting fixture decision [5].
An approach for positioning the fixtures with rapid reconfiguration method was presented for an “intelligent fixture system” [6]. ICAD system and UG-2 modelling were used for developing MFs design system based on CAD software [7]. AutoCAD with 2D drawings was applied [8] while AutoCAD 3D modelling was employed for this purpose [9]. For more effective automated MFs systems, three factors should be considered by the designer, the database of the fixture elements, the proper design approach, and a powerful 3D CAD software for modelling MFs design and assembly process. The database of standard fixture elements was created in the previous work as well as introducing the appropriate methodology in order to develop a computer – assisted fixture design (CAFD) [1]. SolidWorks was used as CAD
International Journal of Engineering (IJE), Volume (6) : Issue (6) : 2012 290
software due to its excellent 3D capabilities for performing the modelling process for MFs. Based on the previous work; the use of secondary development of SolidWorks with VB 6 for automating fixture elements design and assembly is introduced in this paper.The developed approach is shown in Figure 1. This approach includes generating ActiveX DLL project in VB 6 and integrating with SolidWorks API for creating new menus in SolidWorks environment. A 3D model of the specific workpiece was designed in SolidWorks. The database for the standard fixture elements was established in the previous work [1]. The knowledge base for the assembly relationships was created by using If-then rules. This knowledge base is based on the mating features for assembly purpose in SolidWorks.
FIGURE 1: The flow chart of the developed approach.
WORKPIECE HOLDING PRINCIPLES
The produced workpiece should meet its specifica
剩余内容已隐藏,支付完成后下载完整资料
埃迪斯科文大学
在线研究
ECU出版物2012
2012
用Visual Basic 6进行SolidWorks的二次开发 - 自动化组合夹具的装配
乌代尔汉
埃迪斯科文大学
西蒙娜·奥布莱恩
埃迪斯科文大学
马吉德拉德
埃迪斯科文大学
这篇文章最初发表为:法尔汉,U. H.,奥布莱恩,S.(2012)。 使用Visual Basic 6进行SolidWorks的二次开发
自动化组合夹具装配。国际期刊工程,6(6),290-304。提供原创文章在这里,该期刊论文发布在网上的研究。
http://ro.ecu.edu.au/ecuworks2012/680
用Visual Basic 6进行SolidWorks的二次开发 - 自动化组合夹具的装配
乌代H.法尔汉 u.farhan@ecu.edu.au
机械工程师
工程学院,埃迪斯科文大学学院,
西部的澳大利亚,6027
西蒙娜·奥布莱恩 simona.obrein@ecu.edu.au
工程硕士
工程学院,埃迪斯科文大学学院
西部的澳大利亚,6027
马吉德T.拉德 m.rad@ecu.edu.au
高级讲师
工程学院,埃迪斯科文大学学院270 西部的澳大利亚,6027
摘要
组合夹具在减少成本和生产时间上发挥了非常重要的作用。在这篇论文中,作者阐述了自动化设计和装配组合夹具的一个方法。这个方法是基于Solidworks二次开发的。Solidworks API 函数是用于控制Solidworks的指令和装配操作的。在VB 6创造一个ActiveX DLL工程和一个格式为.dll的插件文件将会生成。这些结果将是一些诸如在Solidworks开发环境下的选择,插入,和装配组合夹具的元素。这个方法将被应用到一侧面的夹紧程序和一个半圆形的工件。
关键字: 组合夹具, SolidWorks API,Visual basic 6, 装配模拟
- 引言
随着制造业的快速发展,生产效率已经成为一个目标去减少生产时间的花费[1]。列举些些证据,组合夹具已经被认为是一个很重要的元件去达到这个目标[1]。这使得组合夹具的元素的柔性将有利于夹紧不同工件[2]。这将会带来很多的好处在柔性制造系统上。柔性电脑使用电脑数字控制的。这些设计和装配组合夹具的过程成为了之前很多的目标。他们中的一些集中在装配的关系和夹具元件[3]上。其它人集中组合夹具信息的呈现上。为了改进组合夹具[4]的设计,CAD技术已经被用来自动化组合夹具的设计和装配。模型信息成为了一个工具去支持夹具准确度[5]的支撑。
用快速重组的方法来定位夹具,这是智能夹具系统[6]的展现。ICAD系统和UG-2建模被用来开发基于CAD软件[7]的组合夹具的设计系统。AutoCAD的2D草图绘制[8]被用来当AutoCAD 3D建模。为了更高效的自动化组合夹具的系统[9],作为设计者三个元件应该要被考虑的,这个夹具信息的数据库,这个设计方法的优先性,和一个强大的三维建模软件来对组合夹具建模和装配。这个标准的夹具元素的数据库被用来创造出先前的作品和用一个合适的数学技术来发展计算机辅助设计。Solidworks被用来作为CAD软件由于它在组合夹具上的出色的3D建模能力。基于之前的工作,用VB6进行Solidworks的二次开发的方法来自动化夹具的设计和装配。这个开发的方法在图1上展示了。这个方法包括在VB6上生成ActiveX DLL工程和用Solidwroks API为Soldworks环境创建新的菜单。一个特定工件的3D模型在Solidworks被设计出来。这个标准的夹具元素数据库是建立在之前的工作中[1]。这个知识是基于if-then创建的装配关系规则。这个知识也是基于在solidworks中装配体的配合。
特征 1: 开发途径的流程图。
工件定位原则
所产生的工件应符合其规范特别是对于形状,尺寸和公差,为实现这一目标,正确地定位和夹紧工件是很重要的。一些其他元件也能影响到工件装夹的配置,包括机器操作顺序[10],成本考虑,剪切力的方向和大小,机器刀具[10]的方向和能力。况且,夹具元件被用来设计特定的工件;这些都被成为专用夹具。相反,夹具在一个标准化的夹具元件数据库中被选择和组合。这叫做组合夹具[10]。每一个夹具元件都有一个特定的函数,一个完整的夹具结构将从一系列元素中构造出来,包括类型,类和函数。这些都将用来去适应合适的机器操作。
组合装夹
组合夹具被定义为一套系统,这个系统可以用来搭建一些标准件的组合,这些标准件都已经广泛地应用在各种工件上。这些夹具元件能用来装配和重复使用[2]。这可以提供各种各样的工件的构造。这个组合夹具的建造过程是构建更多有细节的系统的基础。结果,通过使用组合夹具系统[2]夹具元件被用来搭建各种工件。组合夹具的好处是通过消除专用夹具和他们特定组件[10]的使用,减少了设计和装配的时间。而且,组合夹具的数据库包含了必要的配合标准化元件的特征的设计信息。这是非常容易被修改的[10]。组合夹具系统被分类到三个主要的基于构造模块:小版块 - 凹槽,定位销[2]。
组合夹具的搭建
组合夹具包含了一套标准的元件,如底板,定位器,支撑器,夹具和其他配件。要把这些元件装配在一起。适应各种工件的合适的装夹系统能实现这[2]。装配过程开始时选择的底板取决于工件的尺寸。接着定位元件将被选择和装配到底板上。然后选择合适的夹紧工具。最后将其他的附件加在模块化系统上[2]。在搭建好装夹系统后,机器将启动去生产工件的特定的各个部分。当这个工件生产过程完成的时候,模块化系统将拆成各个元件,去运送到各个厂家去用来搭建其他的组合夹具系统[2]。
图3展示了一个组合家具系统的例子。组合夹具的重复利用导致了生产时间和成本的减少。一个小时的组合夹具的搭建过程等效六个小时的传统夹具的搭建[2]。
Visual Basic 的基础
Visual Basic (VB)是一个微软开发的编程语言。这个语言相对于其他语言[11]在开发商中应用得很广。VB是一个非常有优势的可视化的集成开发环境,拥有一套图形用户界面[12]的API。
图 2: 组合夹具的标准元件 [2].
图 3: 组合夹具系统 [13].
况且,VB在微软的软件[11]中被当成一个开发宏的引擎。因此,VB成了一个重要的工具去生成各种各样的程序。有很多种类型的程序在VB中可以生成。举个例子,标准的可执行程序是在程序员中用得非常广泛的。为了高级的程序功能,AcvtiveX 工程被使用。在这篇研究中,搭建了Active X程序。这个工程允许程序员将VB集成到不同的windows应用程序里。同时,这个工程通过创建在SolidWorks应用环境里新的菜单和工具栏控制了这些特征这个应用程序的操作。出于数据库管理的目的,VB被当成Microsoft Access 的引擎,这给了编程者很多机会去高效地[11]控制这个数据库。
SolidWorks API
API是应用程序的接口的意思,是一种用来在另一个应用里面写代码的工具。结果是,一个直接集成在不同的应用程序之间的程序将被开发出来[14]。SolidWroks API是支持不同编程语言的,如C ,VB,C#等。Solidworks API通过特定的代码[14]可以自动化地设计和装配。它的API可以用来选择特征和简化操作[15]。方先生用VB代码和Solidworks API[16]开发了一套标准的零件库。这个为提高设计效率是基于VB的窗口的。彭靖,和小袁用VB.Net在Solidworks的二次开发中模拟了在构造系统上3D建模的过程[17]。他们生成了一个嵌入进Solidworks的插件用来自动化装配的过程。SolidWorks API被用来设计离心泵的推进器[18]。这个方法是基于几何特征的二次开发环境。而且,基于KBE小程序[19].的用户界面可以帮助自定义CAD系统。软件的可重复使用性通过应用SolidWorks的API应用出来,这个系统是用VB为CAD系统的标准零件进行的二次开发[20].。珍和颖怡介绍了一个基于SolidWorks[21]的装配方法,他们通过使用Visual C 阐释了这个装配自动化的流程。他们也解释了怎样将零件的信息存储到数据库中。杨通过solidworks的二次开发为参数化建模[22]设计了一个智能的系统 。Delphi 编程语言,Solidworks API,和Access数据库是创建这个系统的技术。
创建装配体的基础
之前的工作建立在装配的数学之上,这个装配体的知识是用IF-then规则开发出来的去适应装夹的需要。下面是这些规则的例子。
规则1
如果定位方法是V形块,就将它们装配到底板的表面。
规则2
如果V型块的定位表面已经确定,则确定在V形块的底板的位置。这依赖于V形块和底板的尺寸。通过计算在底板上的位置来正确限定孔的距离。
根据以上规则,装配V型块的配合特征将在Solidworks环境中被确定。
规则3
如果表面已经确定并计算好了位置,就使用重合配合来定位。
规则4
如果表面已经确定并计算好了位置,然后使用同心配合来组装。
创建SolidWorks插件和用户界面
在这篇文章中, 插件建立在Solidworks环境中,用来自动化插入和装配程序。这些菜单是用集成在VB 6里面的Solidworks API开发的。一个ActiveX Dll工程在VB 6中被开发出来。这个工程是以Solidworks库作为引用的。在这个案例中,两个库被引用了。它们分别是Solidworks类型库和Solidworks输出类型库,把这些库加到Active Dll工程里,这样就能使用Solidworks的指令和函数。在这项研究中插件的代码是:
Dim bRet As Boolean boolean return Dim lRet As Long long return
Dim axMenuID As String
Dim lngToolbarDocTypes As Long Set axSldWorks = ThisSW axCookie = Cookie
bRet = axSldWorks.SetAddinCallbackInfo(App.hInstance, Me, axCookie) axMenuID = 'Modular Fixture System'
lRet = axSldWorks.AddMenu(swDocASSEMBLY, axMenuID, 5)
axMenu1 = 'Assembly@Side Clamping@' amp; axMenuID axMenu2 = 'Back stop@Side Clamping@' amp; axMenuID
axMenu3 = 'Pivoting Clamp@Side Clamping@' amp; axMenuID
axMenu4 = 'Riser block@Side Clamping@' amp; axMenuID axMenu5 = 'Workpiece@Side Clamping@' amp; axMenuID axMenu6 = 'V-block@Side Clamping@' amp; axMenuID axMenu7 = 'Baseplate@Side Clamping@' amp; axMenuID axMenu8 = 'Top Clamping@' amp; axMenuID
在写完这些插件的代码和把VB模块和表格窗体到ActiveX dll工程里。这个.dll文件被创建和复制到Solidworks的目录下。然后,这个.dll文件在Solidworks环境中
剩余内容已隐藏,支付完成后下载完整资料
资料编号:[148315],资料为PDF文档或Word文档,PDF文档可免费转换为Word
以上是毕业论文外文翻译,课题毕业论文、任务书、文献综述、开题报告、程序设计、图纸设计等资料可联系客服协助查找。