Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

NX Shop Documentation Plug-In Base

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

IOP Conference Series: Materials Science and Engineering

PAPER • OPEN ACCESS

The Development of Shop Documentation Plug-In Based on NX


Software
To cite this article: Jiaqi Zhao et al 2019 IOP Conf. Ser.: Mater. Sci. Eng. 686 012006

View the article online for updates and enhancements.

This content was downloaded from IP address 45.40.126.214 on 06/12/2019 at 01:08


D2ME 2019 IOP Publishing
IOP Conf. Series: Materials Science and Engineering 686 (2019) 012006 doi:10.1088/1757-899X/686/1/012006

The Development of Shop Documentation Plug-In Based on


NX Software

Jiaqi Zhao*, Xiaodong Yang and Ligeng Wu


Department of Precision Manufacturing Centre, Tianjin Institute of Aerospace
Mechanical and Electrical Equipment, Tianjin, China
*
royjuventus_29@126.com

Abstract. Shop documentation is a document filled with all relevant information of product
processing, which is playing an important role in CNC machining. At present, although shop
documentation could be generated from 3D modelling software, the contents in shop
documentation are usually not up to operators’ requirement. On this condition, the data
structure of shop documentation should be rebuilt, and a new approach of generating shop
documentation should be created as soon as possible. In this paper, the data structure of shop
documentation is redesigned to make sure that the document contains the most suitable
information, and a new kind of shop documentation plug-in is developed in Siemens NX
software at the same time, which could generate PDF-format shop documentation very fluently.
The plug-in is programmed by C++, using the function library of NX software which is called
NX Open C. Finally, an example of generating shop documentation in NX software is given to
prove that the shop documentation plug-in works properly.

1. Introduction
In the last decades, with the great development of computer technology, CAD and CAM have made
great contributions to CNC machines. As the complication of workpiece shape is increasingly growing,
multi-axis machines are being used more widely [1]. It has become particularly vital of rationality of
using equipment and equipment utilization. Reasonable scheduling scheme makes the use of
production resource more efficient, reduces the production cost of enterprises, and enhances the
competitiveness of enterprises [2]. To this point, Bin Li has provided an insight into reasonable
scheduling scheme, and he commits to analysing process parameters, reducing process time and waste
of tools [3].
With the advance of NC technology, the majority of modern CNC machines are characteristic of
high speed, high precision, high reliability, intelligence and compounding [4]. Complex machine
structure makes CNC programming require software assistance [5]. For the purpose of maximizing the
performance of CNC machines, the separation of CNC programmers and operators is a major trend.
At present, companies establish digital and paperless workshops [6], including models, database-
based information management and equipment management and so on [7]. The workshop
management is applied for CNC machine management and tool management. It is also convenient for
transmitting CNC program [8], and they use the CNC program list to send message of process to
operators [9]. However, it is difficult to transmit some key information to operators and operating-
complex software elevates operators’ learning burden and company training cost.
In order to convey information more effectively, shop documentation is extremely necessary. So

Content from this work may be used under the terms of the Creative Commons Attribution 3.0 licence. Any further distribution
of this work must maintain attribution to the author(s) and the title of the work, journal citation and DOI.
Published under licence by IOP Publishing Ltd 1
D2ME 2019 IOP Publishing
IOP Conf. Series: Materials Science and Engineering 686 (2019) 012006 doi:10.1088/1757-899X/686/1/012006

far, shop documentation has been suitable for the products of similar shapes and the specific CNC
machines [10]. However, most of shop documentation is accomplished manually, which is easier to
contain human errors. Besides, the editable documents are likely to be modified by mistakes during
delivery process. Shop documentation could be generated within NX software [11], but the shop
documentation could not list important information, including clamping method, WCS, step
description and some useful process parameters.
Compared to traditional research results, the shop documentation plug-in in this paper overcomes
the shortcomings mentioned above. Firstly, the information, including model, tool parameters, WCS
and other parameters of the manufacturing process, could be fully extracted by the plug-in. Secondly,
the plug-in could generate read-only shop documentation in PDF-format. Thirdly, the shop
documentation is suitable for duplication, storage and delivery.

2. System planning of shop documentation plug-in


The shop documentation plug-in could automatically extract views and manufacturing information of
the model. The views include front view, side view, top view and axonometric view, while the
manufacture information includes operation names, tool parameters, cutting parameters and non-
cutting parameters. The data structure and workflow of the plug-in are illustrated as follows.

2.1. Data structure


The data structure of the plug-in is as shown in figure 1.
Information Shop documentation
Initialization
extraction generation

Database UI info MFG info Other info Generated info


Programmers Task No. Operation Model file
Doc No.
bcy.xlsx (String) name name
Clamping Task name NC program
Tool name Model size
methods (String) name
zj.xlsx
Part No. Doc file
Tool No. Front view
Doc template (String) name
template.xlsx
Part name Tool
Side view
(String) length
Process No. Tool flute
Top view
(Integer) length
Process name Depth per Axonometric
(String) cut view
Step No. Computer
Part stock
(Integer) id
Step Floor Current
description stock datetime
(String)
Cutting
Clamping time
method
Spindle
(Enum) speed
WCS
(String) Feed rate
Programmer
(Enum)

Figure 1. The data structure of shop documentation plug-in

2
D2ME 2019 IOP Publishing
IOP Conf. Series: Materials Science and Engineering 686 (2019) 012006 doi:10.1088/1757-899X/686/1/012006

2.2. Workflow
The workflow of the plug-in is as shown in figure 2.
Open NX Click“Shop Documentation”button Input manufacturing information
software in the main menu of NX software in the coming out UI dialog

Shop documentation in Do not click “OK”button until the


PDF format is generated information is checked to be correct
Figure 2. The workflow of shop documentation plug-in

3. The development of shop documentation plug-in


The plug-in is developed by C++ on the platform Microsoft Visual Studio version 2012, and it could
be used in NX software version 10 or above. The key technologies of shop documentation plug-in
development are as follows.

3.1. The design of UI dialog


The UI dialog is created under “Block UI Styler” module of NX software. In “Block UI Styler”
module all the controls could be dragged straightforwardly to the UI dialog, and the UI dialog could be
easily made as the designer’s wish. The UI dialog interface is as shown in figure 3.

Figure 3. The UI dialog interface of shop documentation plug-in

3.2. The creation of model views


In NX software, the ACS (absolute coordinate system) is a conceptual location and orientation in
model space. It is invisible and cannot be moved. All of the model’s information is related to the ACS.
The Machine Coordinate System (MCS) determines the orientation and origin of tool paths for all
operations in the orient group. The MCS has an initial position which is matched to the ACS.
In actual processing, each face of the part may be machined. In order to express cutting area
properly, the plug-in must set appropriate views to show the MCS and cutting faces. After this, the
CNC programmer should set the top view which he wants to use, then the plug-in will calculate the
remaining views. The calculation process is shown in figure 4.

3
D2ME 2019 IOP Publishing
IOP Conf. Series: Materials Science and Engineering 686 (2019) 012006 doi:10.1088/1757-899X/686/1/012006

Start
Start

Adjust
Adjust view
view
(Press “F8”
(Press “F8” button
button of
of the
the keyboard)
keyboard)

Obtain
Obtain current
current view
view matrices
matrices
(Top,
(Top, front
front and
and right)
right)
Function:
Function: uc6433
uc6433

Calculate
Calculate out
out trimetric
trimetric
Function: uf5942
Function: uf5942

Change
Change rendering
rendering style
style to
to wireframe
wireframe mode
mode
Function:
Function: UF_VIEW_set_surface_display_options
UF_VIEW_set_surface_display_options
Parameter:
Parameter: UF_VIEW_WIREFRAME_STYLE
UF_VIEW_WIREFRAME_STYLE

Change
Change wireframe
wireframe into
into bold
bold
Function:
Function: UF_OBJ_set_line_width
UF_OBJ_set_line_width
Parameter:
Parameter: UF_OBJ_WIDTH_THICK
UF_OBJ_WIDTH_THICK

Place
Place the
the view
view to
to front
front Place
Place the
the view
view to
to right
right
Function:
Function: UF_VIEW_fit_view
UF_VIEW_fit_view Function:
Function: UF_VIEW_fit_view
UF_VIEW_fit_view

Obtain
Obtain the
the screenshot
screenshot of
of front
front view
view Obtain
Obtain the
the screenshot
screenshot of
of right
right view
view
Function: UF_DISP_create_image
Function: UF_DISP_create_image Function: UF_DISP_create_image
Function: UF_DISP_create_image

Place
Place the
the view
view to
to top
top Place
Place the
the view
view to
to trimetric
trimetric
Function:
Function: UF_VIEW_fit_view
UF_VIEW_fit_view Function:
Function: UF_VIEW_fit_view
UF_VIEW_fit_view

Obtain
Obtain the
the screenshot
screenshot of
of top
top view
view Obtain
Obtain the
the screenshot
screenshot of
of trimetric
trimetric view
view
Function:
Function: UF_DISP_create_image
UF_DISP_create_image Function:
Function: UF_DISP_create_image
UF_DISP_create_image

Restore
Restore the
the view
view and
and rendering
rendering style
style

End
End

Figure 4. The flow chart of obtaining the screenshots of model views


1 0 0
a) Get the view matrix. The view matrix is a unit matrix, which is like [0 1 0]. It is orientation of
0 0 1
the current view relative to the ACS.
b) The plug-in analyses whether the axis of the view is parallel (or vertical) to ACS or not. If the
view is eligible, the plug-in will keep going. Otherwise, it will remind the user to adjust views.
The view matrix is a unit matrix. In 3D space, it is a ball with a radius of 1, and the spherical
centre coordinates is (0, 0, 0) (figure 5).When the axis of the view is parallel (or vertical) to ACS,

4
D2ME 2019 IOP Publishing
IOP Conf. Series: Materials Science and Engineering 686 (2019) 012006 doi:10.1088/1757-899X/686/1/012006

it intersects the unit ball at the quadrant point .The vector may be (1, 0, 0), (0, 1, 0), (0, 0, 1), (-1, 0,
0), (0, -1, 0) or (0, 0, -1). In order to determine the eligibility of the views conveniently, the
function |𝑥| + |𝑦| + |𝑧| = 1 (figure 5) is established. In other words, when the vector meets the
condition, the plug-in will proceed.

Figure 5. Unit ball and function |𝑥| + |𝑦| + |𝑧| = 1 graph


𝑛11 𝑛12 𝑛13
c) In the previous step, the plug-in obtains the view matrix [ 21 𝑛22 𝑛23 ], in which |𝑛11 | +
𝑛
𝑛31 𝑛32 𝑛33
|𝑛12 | + |𝑛13 | = 1, |𝑛21 | + |𝑛22 | + |𝑛23 | = 1, |𝑛31 | + |𝑛32 | + |𝑛33 | = 1. Then, for the purpose of
displaying parts clearly, the plug-in will change rendering style to wireframe. In NX software,
using the function by the parameters 𝑛1 and 𝑛2, it will return the view of X-Y plane, according to
the user-defined view. In this way, the plug-in obtains the front view, side view and top view of
the part.
d) The cutting area including several faces, the plug-in could present the cutting area in the trimetric
view, which makes the processing information more intuitive.
The transformation method is 𝑀𝑐 × 𝑀𝑣 . In this function, 𝑀𝑐 is the view matrix. 𝑀𝑣 is defined as
𝑀 𝑀𝑡
[ 𝑟 ]. 𝑀𝑟 is a rotate matrix. 𝑀𝑟 = 𝑅𝑋 𝑅𝑌 𝑅𝑍 .
0 1
1 0 0
The 𝑅𝑋 is defined as: [0 cos(𝑟𝑜𝑙𝑙) sin(𝑟𝑜𝑙𝑙) ]
0 −sin(𝑟𝑜𝑙𝑙) cos(𝑟𝑜𝑙𝑙)
cos(𝑝𝑖𝑡𝑐ℎ) 0 −sin(𝑝𝑖𝑡𝑐ℎ)
The 𝑅𝑌 is defined as: [ 0 1 0 ]
sin(𝑝𝑖𝑡𝑐ℎ) 0 cos(𝑝𝑖𝑡𝑐ℎ)
cos(𝑦𝑎𝑤) sin(𝑦𝑎𝑤) 0
The 𝑅𝑍 is defined as: [−sin(𝑦𝑎𝑤) cos(𝑦𝑎𝑤) 0]
0 0 1
(roll = 45°, pitch = 45°, yaw = 45°).

5
D2ME 2019 IOP Publishing
IOP Conf. Series: Materials Science and Engineering 686 (2019) 012006 doi:10.1088/1757-899X/686/1/012006

0
𝑀𝑡 is a translation matrix. As trimetric view does not require translation, 𝑀𝑡 = [0]. After that, the
0
colour of cutting area in trimetric view changed into dark colour so that cutting area could be
figured out.
e) Finally, the plug-in will direct view to the X-Y plane and change rendering style to shade.

3.3. The extraction of manufacturing parameters


In manufacturing process, a large amount of information is necessary to be passed to CNC machine
operators, including the information of task, model, WCS, clamping, operation and tools. The plug-in
requires proper CNC program, cutting area and essential basic data.
In the NX manufacturing application, most of operation data is set in the same way, including tools
data, part stock, floor stock, spindle speed and feed rate. The functions and parameters needed by
extracting data are as shown in table 1.
Table 1. Functions and parameters of the extraction of manufacturing data
MFG info Data sort Function Parameter of function
Operation type String UF_OPER_ask_oper_type() Tag of operation
Tool name String UF_OBJ_ask_name() Tag of tool
Tool No. Integer UF_PARAM_ask_int_value() UF_PARAM_TL_NUMBER
Tool length Double UF_PARAM_ask_double_value() UF_PARAM_TL_HEIGHT
Tool flute length Double UF_PARAM_ask_double_value() UF_PARAM_TL_FLUTE_LN
Part stock Double UF_PARAM_ask_double_value() UF_PARAM_STOCK_PART
Floor stock Double UF_PARAM_ask_double_value() UF_PARAM_STOCK_FLOOR
Spindle speed Double UF_PARAM_ask_double_value() UF_PARAM_SPINDLE_RPM
Feed rate Double UF_PARAM_ask_subobj_ptr_value() UF_PARAM_FEED_CUT
Cutting time Double UF_PARAM_ask_double_value() 142
Cut level Double UF_PARAM_ask_double_value() Depending on operation type

The cut levels are double numbers, but the method of setting different. Planar/face milling use
Depth per Cut. Fixed/variable contour milling uses the Stock Part Offset. Cavity/zlevel/zlevel_5axis
uses Global Cut Depth. Hole milling uses Axis Pitch. Thus, when the plug-in extracts values of the
above-mentioned operations, it will identify the types of the operations and use the matched
parameters.

3.4. The generation of shop documentation


The shop documentation is generated from a template in the format of excel, and saved as a PDF
format file. The program execution procedure of the generation of shop documentation is as shown in
figure 6.
Announce variables, Attach dispatch of Get the workbook, Get the worksheet
such as workbook, workbook, worksheet namely the template, of the workbook,
worksheet and range and range and open it and open it

Release d ispatch o f
Save the workbook as a Write appointed ranges of the worksheet, such
range, worksheet and
PDF format file as UI info, MFG info and other info
workbook
Figure 6. The program execution procedure of the generation of shop documentation

6
D2ME 2019 IOP Publishing
IOP Conf. Series: Materials Science and Engineering 686 (2019) 012006 doi:10.1088/1757-899X/686/1/012006

4. Experiment and verification


This paper will use a part model to test and verify the plug-in, which is as shown in figure 7.

4.1. The description of the experiment


In this workpiece, the MCS is set at center and all surfaces need milling-finishing. This processing
work step as follows:
a) Use a D35R5 cutting tool to process four fillets and open rough.
b) Use a D17R0.8 cutting tool to process the rest of upper surface and semi-finished side.
c) Use a D6 cutting tool to finish the ground and side.
d) Use a R4 cutting tool to finish the slender groove on the top of the part.

Figure 7. The part model used for the experiment

4.2. The verification of shop documentation plug-in


When users run the plug-in, they need to fill in a dialog, which is as shown in figure 8.

Figure 8. Plug-in operation interface

7
D2ME 2019 IOP Publishing
IOP Conf. Series: Materials Science and Engineering 686 (2019) 012006 doi:10.1088/1757-899X/686/1/012006

After filling in the UI dialog, selecting the cutting area, and setting the model views, shop
documentation will be generated. The shop documentation generated from the plug-in is as shown in
figure 9, which could verify the shop documentation plug-in is working properly and friendly to use.

Figure 9. The shop documentation generated by the plug-in

8
D2ME 2019 IOP Publishing
IOP Conf. Series: Materials Science and Engineering 686 (2019) 012006 doi:10.1088/1757-899X/686/1/012006

5. Conclusion
In this paper, a kind of shop documentation plug-in has been successfully developed, which could
extract all the relevant information of the manufacturing product from NX software, and combine all
the information to generate shop documentation in PDF format. This development of the shop
documentation plug-in makes all manufacturing information shown in a file, which not only reduces
times of the communication between programmers and machine operators, but also makes NC
programming mistakes easily to be found out and corrected. Overall, the development of this kind of
shop documentation plug-in makes manufacturing process more effective and more efficient.

Acknowledgments
We wish to acknowledge the encouragement from our department leaders, Zhaohui Zhu and Huadong
He. Besides, we also appreciate for the support from Xiaobao Li Skill Master Studio of China.

References
[1] Yibo Liu and Fangrong Liu 2013 Classification and trend of NC programs Metal Processing 7
25
[2] Xin Zhou 2014 Design and implementation of workshop scheduling system on distributed
numerical control system (China: University of Chinese Academy of Sciences) p 7
[3] Bin Li 2007 Basic on Lean Production of CNC Machining (China: The College of Automation
Chongqing University) p 62
[4] Wei Liang and Xian Wang 2010 Development trend of CNC machine tools Journal of Guilin
college of Aerospace Technology 58 164
[5] Zhaoliang Liu and Zanbo Yang 2018 Deeply study the application of NX software in NC
machining World Nonferrous Metal 2018(9) 285-286
[6] Song Jin 2006 Development of Paperless Production System Based on Embedded Terminal In
Tool workshop (China: the College of Automation Chongqing University) p 50
[7] Yu Zhang 2009 Design and Implementation of CNC Workshop Management System (China:
Heilongjiang University of China) p 54
[8] Limao Mu 2003 The software development of long NC machining code transmission direct
from PC machine to NC machine Modular Machine Tool & Automatic Machining Technology
2003(6) 53-55
[9] Guoli Gao and Jiaqiang Huang 2010 Automatic generation of machining program list and
network post-process for die & mould Die & Mould Industry 2010(4) 16-17
[10] Haifeng Wang, Bin Wang and Xuehua Li Research on CNC Machining Template and Program
Automation (China: High Level Equipment for Civil Aircraft Manufacturing Technology and
Equipment) p 8-9
[11] Siemens NX10 Documentations (Germany: SIEMENS)

You might also like