Walau kami orang Pinggiran Tapi Pengetahuan Kami Mendunia

Minggu, 18 Maret 2012

Belajar Memprogram CNC Simulator "Cutviewer"

Pendahuluan
Cut Viewer  adalah nama perangkat lunak yang merupakan paket media belajar, untuk  praktek pemrograman operasi kerja Computer Numerical Control (CNC). Dengan bantuan perangkat lunak ini, proses pemahaman  bahasa baku untuk memerintah mesin akan jadi lebih cepat dan  mudah.  Berbagai perintah yang dibuat dan dinyatakan dalam bentuk bahasa  kode G dan kode M,  akan diterjemahkan menjadi simulasi berbagai macam gerakan alat potong pada mesin perkakas CNC, yang  ditampilkan pada layar nonitor PC secara grafis.. Pada  tampilan  pada layar monitor tersebut, akan nampak bagaimana hubungan antara bahasa perintah dengan pelaksanaan operasi kerja mesin  yang bersangkutan.
Dengan bantuan perangkat lunak ini seseorang akan lebih mudah dan lebih cepat memperoleh  jawaban tentang :
  • Atas dasar perintah apa, alat potong bergerak lurus dengan kecepatan maksimum ?.
  • Atas dasar perintah apa, alat potong bergerak lurus atau lengkung dengan kecepatan terprogram.
  • Bagaimana bentuk benda kerja sebelum terjadi proses pemotongan,  bagaimana bentuk benda kerja selama proses pemotongan, dan bagaimana pula bentuknya setelah selesai mengalami proses pemotongan ?.
  • Berapa lama waktu yang dibutuhkan untuk proses pemotongan ?.
  • Berapa volume benda kerja sebelum mengalami proses pemotongan ?
  • Berapa volume benda kerja sesudah mengalami proses pemotongan, dan sekaligus berapa pula volume tatalnya ?
Untuk simulasi proses pemotongan benda kerja pada mesin bubut, dipergunakan CutViewer Turn atau CutViewer Lathe. Sedang untuk simulasi proses pemotongan benda kerja pada mesin frais dipergunakan  Cut Viewer Mill. Secara spesifik, dengan perangkat lunak tersebut, seseorang dapat membuat program dalam berbagai versi yang sesuai dengan pilihannya. Antara lain bahasa baku menurut versi :
  • Standard G code 
  • Sinumerik 840D
  • Fanuc F0TA
  • Fanuc F10TA
  • Fanuc F11TA
  • Okuma
  • Heidenhain TNC
Cut Viewer Turn  adalah  suatu aplikasi aplikasi 32 bit, yang dapat dioperasikan pada Windows 95/98/ME/NT/2000/XP. Dengan  minimum persyaratan perangkat keras prosesor Pentium, RAM – 32 MB, spasi  hard disk 20 MB dan video graphic card paling tidak 2MB dari video RAM . Sebelum dioperasikan  komputer di set pada Windows Color Pallete – 16 bit mode (65.535 warna) atau lebih.
CutViewer dapat menampilkan file-file kode G standar ISO. Selain itu juga dapat menampilakn file .dll khusus yang memungkinkan untuk membaca standar kode G yang lain. 
CutViewer versi ini didukung oleh berbagai macam pahat bubut/alat potong (tools) yang meliputi ;
§  Pahat standar (standard tools)
§  Pahat alur radius (botton tools)
§  Pahat alur rata (grooving tools)
§  Pahat ulir (threading tools)
§  Mata bor (drilling tools)
Apabila anda membuka CutViewer dengan menekan/klik  tombol nouse  sebelah kiri pada ikon :
          
, maka pada layar monitor akan nampak tampilan jendela kosong untuk gambar 2D dan 3D seperti berikut ini :
            Anda dapat menghilangkan bidang gambar untuk tampilan 3D atau menampilakannya kembali dengan menekan tombol klik saat penunjuk mouse berada pada View. Dengan menggunakan mode Setup anda dapat mengubah tampilan 2D/3D dalam posisi vertical atau horizontal. Selain itu anda juga dapat mengubah posisi Edit window yang tereletak di sebelah bawah, ke posisi lain yang sesuai dengan keinginan anda (di atas, di kiri, di kanan atau kembali di bawah). 
            Sesudah CutViewer diaktifkan hanya item File-New, File-Open, dan Setup yang tersedia. Untuk menampilkan suatu file, pilih Open File dan gerakkan ke arah direktori yang dikehendaki.
            Jika informasi tentang benda kerja dan alat potong belum ditambahkan pada baris-baris perintah  yang terdapat pada file NC, serangkaian  menu dialog  akan muncul dan medorong anda untuk menetapkan informasi tersebut  pada saat file bersangkutan dimuat. CutViewer akan menyimpan  file database setiap alat potong yang anda pilih  pada direktori CutViewer. File-file database alat-alat potong ini mempunyai sebay *.db2 extension. Anda dapat menyimpan dan mengembalikan alat-alat ptong ini untuk digunakan dalam semua simulasi. 
            Apabila telah selesai jendela Editor akan menampilkan file NC dan gambar benda kerja akan ditampilkan pada jendela-jendela pandangan 2D/3D. Gambar benda kerja dapat ditampilan dalam model tanpa dibelah, dipotong seperempat bagian atau dipotong setengah bagian. Tampilan pada 2D dapat diatur tampak potongan separo bagian sedang pada tampilan 3D tanpa potongan. Tetapi jika anda menginginkan lain, penggan tian dapat dilakukan dengan menekan tombol kanan mouse pada posisi penunjuk  pada sembarang tempat. Maka akan muncul  tampilan sebagai berikut :
Perlu dimengerti, bahwa gambaran bentuk alat potong dan lintasan gerak alat potong  tersebut hanya akan ditunjukkan pada jendela pandangan 2D. Sebelum memulai proses simulasi anda dapat memilih skala yang diinginkan, posisi dan mode bagian untuk setiap pandangan melewati item-item popup menu (Zomming, Panning, Rotation, Sectioning) …………………………
Tekan tombol “Run”
Ada dua mode simulasi :
1.      Animated : Mensimulasikan secara grafis proses pemotongan benda kerja lewat penampilan gambar bentuk benda kerja dan gerakan alat potong.
2.      Turbo :  Secara grafis hanya menampilkan lintasan alat potong dengan gambaran bentuk alat potong. Gambar benda kerja akan muncul hanya setelah akhir file NC dicapai atau  operator menekan  tombol “Step Forward”, “Pause” atau “Stop”.   
Jika anda ingin membuat  program NC secara langsung pada CutViewer, pilih item menu “File ® New”, kemudian pilih jenmis yang diinginkan, seperti Fanuc, Okuma, Traub, Standard G-code, Siemens, dengan demikian  dan file Noname.nc kosong akan di muat pada jendela Edit. Sekarang anda dapat mengetik program. Untuk menyimpan program baru pada disk pilih item menu “File ®  Save as”.  Untuk mensimulasikan program baru, pilih item menu “Run ®  Rebuild” atau tekan Ctrl + F9. Jika info tentang alat potong dan benda kerja bermasalah, CutViewer akan menampilkan dialog yang sesuai dengan info yang bermasalah.


Toolbar utama berisi tombol-tombol sebagai berikut :
    
(1)  Open File
      Tombol ikon ini berfungsi untuk membuka file NC dari folder atau dari jaringan. Tetapi sebelumnya pilih kesesuaian “File of type” pada kotak kombo untuk memerintah CutViewer menginterpretasikan bahasa mesin kode G. 
(2)  Step forward/backward
      Tombol ikon ini berfungsi untuk mensimulasikan proses pemotongan dengan mode langkah demi langkah. Jika tombol ini ditekan sekali, alat potong akan bergerak dari titik ke titik, sesuai dengan arah anak panah tombol yang ditekan, gerak maju atau gerak mundur.    
(5)   Pause
Tombol ikon ini berfungsi untuk menghentikan eksekusi untuk sementara.
(6)  Stop
       Tombol ikon ini
(7)  Dynamic Zoom
       Tombol ikon
(8)  Zoom Window
(9)  Zoom Fit
      Dengan menekan tombol ini akan menampilkan seluruh gambar benda kerja
(10) Zoom Previous
      Kembali ke Zoom sebelumnya
(11) Pan
       Menggerakkan/menggeser tampilan gambar benda kerja pada jendela. Tekan tombol “Pan”, kemudian arahkan penunjuk mouse pada gambar dan tekan tombol kiri, gerakkan mouse tersebut sambil tahan tekanan tangan pada tombol. Dengan demikian tampilan gambar akan bergeser. Apabila posisi tampilan gambar yang diinginkan sudah tercapai, lepaskan tekanan pada tombol.
(12) Rotate
       Memutar gambar tampilan. Tekan tombol  “Rotate”, kemudian arahkan penunjuk mouse pada gambar dan tekan tombol kiri, gerakkan mouse tersebut sambil tahan tekanan tangan pada tombol. Dengan demikian tampilan gambar akan berputar. Apabila posisi tampilan gambar yang diinginkan sudah tercapai, lepaskan tekanan pada tombol. Mode ini hanya tersedia pada tampilan 3D.
(13) Measurement
        Menampilkan suatu alat untuk mel;akukan pengukuran terhadap benda kerja. Seluruh pengukuran haya dapat dilakukan pada tampilan 2D.
(14) Setup
       
Penetapan bentuk benda kerja dan alat potong
            Ketika perangkat lunak ini diaktifkan, secara otomatis akan mencari informasi tentang  ukuran benda kerja, geometri alat potong dan penempatan titik nol program secara relatif terhadap titik nol benda kerja. Oleh karenanya,  pada awal pembuatan program NC, perlu ditambahkan beberapa  baris perintah yang diperlukan untuk membuat bentuk dan ukuran gambar.
Setiap file NC harus memuat tambahan baris-baris perintah khusus untuk persiapan aktivitas proses simulasi pada layar monitor :
STOCK ® perintah untuk menggambar benda kerja pada layar monitor
FROM   ® perintah untuk menetapkan koordinat posisi start/posisi awal dari alat potong
                   untuk proses simulasi
TOOL    ® perintah untuk menggambar alat potong  pada layar monitor  
Penetapan  baris perintah untuk STOCK, FROM dan TOOL harus diawali dengan tanda titik koma (;)  
Jika bentuk gambar benda kerja silindris memiliki sebuah lubang, maka perin tah untuk membuat gambar benda kerjanya adalah sebagai berikut  :
;STOCK/L,D1,D2,Z
L   -  Panjang benda kerja
D1 – Diameter sisi luar benda kerja
D2 -  Diameter lubang
z    -  Posisi titik nol program
Titik acuan benda kerja terletak pada titik tengah permukaan benda kerja sebelah kanan. Titik 0 (nol) sumbu z menunjukkan posisi titik nol program secara relatif terhadap titik nol benda kerja.

Jika benda kerja mempunyai bentuk lebih rumit ketimbang sekedar bentuk silinder, hal tersebut dapat ditetapkan dengan urutan awalan baris-baris kode G dengan karakter seperti yang digunakan pada pengendali CNC. Urutan perintah-petrintah tersebut harus ditempatkan  di antara perintah awal yang dinyatakan dengan STOCK/BEGIN dan perintah akhir yang dinyatakan dengan STOCK END.
Sebagai contoh, jika benda kerja mempunyai bentuk seperti di bawah ini, dan titik-titik  1 – 7 mempunyai nilai Z dan X sebagai berikut :
1  –   Z = 80  X = 20
2  –   Z = 80  X = 40
3  –   Z = 40  X = 40
4  –   Z = 30  X = 60
5  –   Z = 30  X = 85
6  –   Z = 0    X = 85
7  –   Z = 0    X = 20

Sebagai contoh, jika benda kerja mempunyai bentuk seperti yang ditunjukkan  gambar di atas, dan titik-titik 1 sampai 7 mempunyai harga Z dan X sebagai berikut :
;STOCK/BEGIN
;G1 Z80 X20
;Z80 X40
;Z40 X40
;G2 Z30 X60 R10
;G1 Z30 X85
;Z0 X85
;Z0 X20
;Z80 X20
;STOCK/END
Gambar benda kerja tersebut dapat disimpan dalam memori dengan item menu perintah :
“ File ®  Save Part as Stock” dan anda dapat melakukan operasi berikutnya dengan mempergunakan gambar benda kerja ini. Sebagai contoh, jika  anda mempunyai dua program NC yang terpisah, yang satu program kerja pengasaran (rounghing), yang satu lagi program pengerjaan akhir (finishing), anda dapat mengeksekusi program pengasaran terlebih dahulu, kemudian disimpan dalam suatu file tertentu, dan kemudian mempergunakan file yang pertama tersebut sebagai benda kerja awal untuk program NC yang ke dua. Untuk membuat perintah penggambaran benda kerja yang berasal dari file sebelumnya dilakukan dengan : 
;STOCK/File, File Name, Orientation, Origin
File Name adalah nama file di mana benda kerja yang sudah mengalami proses pemotongan disimpan.

Orientation angka +1 atau –1

Origin adalah posisi Z dari titik nol program relatif terhadap titik nol
Untuk penetapan berbagai macam alat potong  ikuti petunjuk sebagai perikut :
Pahat bubut luar standar (Standard Outside Diameter Tool) 

TOOL/STANDARD,BA,A,R,IC,ITP        


Pahat bubut dfalam standar (Standar Inside Diameter Tool)

TOOL/STANDARD,BA,A,R,IC,ITP        


Catatan : IC (Inside Circle) adalah diameter dasar ukuran pahat sisip (insert). IC adalah istilah standar industri yang digunakan oleh seluruh pembuat pahat sisip (insert).
ITP (Imaginary Tool Point) adalah titik imajiner pada ujung alat potong yang merupakan titik pertemuan garis vertikal dan horizontal yang menyinggung pinggir bibir pemotong. Titik ini seribng digunakan untuk pemrograman lintasan alat potong. 
Nilai titik  alat potong imajiner menunjukkan posisi  titik ujung alat potong imajiner  dengan memperhatikan titik pusat radius ujung alat potong seperti yang ditunjukkan gambar berikut :

ITP = 0 Jika titik pusat radius ujung alat potong digunakan untuk pemrograman lintasan alat potong
Pahat bubut alur radius untuk sisi luar (Botton Outside Diameter Tool):
TOOL/BUTTON,R,L,W,OA,ITP
OA=90 (orient angle)

Pahat bubut alur radius untuk sisi dalam (Botton Inside Diameter Tool) :
TOOL/BUTTON,R,L,W,OA,ITP
OA=270

Pahat bubut alur untuk sisi luar (Grooving Outside Diameter Tool) :
TOOL/GROOVE,R1,R2,L,W,A1,A2,OA,ITP

OA=90


Pahat bubut alur untuk sisi dalam (Grooving Inside Diameter Tool) :

TOOL/GROOVE,R1,R2,L,W,A1,A2,OA,ITP

OA=270

Untuk proses pembubutan bidang rata ujung benda kerja OA = 0
Catatan : Untuk menukar titik pengandalian (sudut potong kiri atau kanan), dilakukan dengan menukar tanda nilai W
Pahat bubut ulir luar (Threading Outside Diameter Tool) :

TOOL/THREAD,A,L,W,OA


Pahat bubut ulir dalam  (Threading Inside Diameter Tool) :

TOOL/THREAD,A,L,W,OA


Mata bor (drill) :

TOOL/DRILL,D,A,L


*Cataan : Anda dapat memasukkan alat potong baru ke dalam file NC pada posisi  yang diinginkan. Untuk menemukan dialog penetapan alat potong  pilih “Insert Tool definition” pada konteks teretentu saat anda mengedit program. Setwelah garis alat potong dimasukkan, anda dapat memilih item menu “Run” –“Rebuild” atau tekan Ctrl-F9 agar supaya terjadi perubahan.
Anda dapat menambahkan alat potong baru ke database alat potong. Caranya sederhana, tekan/klik tombol “Add tool to DB”  pada tampilan dialog penetapan alat potong. Sesudah itu anda dapat menemukan alat potong tersebut dari database dengan menekan/klik tombol “Get Tool from DB”
Anda dapat menentukan tampilan warna untuk setiap alat potong dengan menggunakan perintah :
COLOR,R,G,B
Perintah ini harus mengikuti perintah untuk alat potong
R – menetatapkan intensitas warna merah
G - menetatapkan intensitas warna  hijau
B - menetatapkan intensitas warna biru
Intensitas untuk setiap penetapan ada rentang pilihan dari 0 sampai 255.
Jika  tiga intensitas seluruhnya ditetapkan sama dengan 0, maka warnanya adalah hitam
Jika tiga intensitas seluruhnya ditetapkan  sama dengan 255, maka warnanya adah putih
 Sebagai contoh, anda dapat mengetik sebagai berikut :
;COLOR ,0,255,0       – maka warna tampilannya adalah hijau
atau
;COLOR, 255,255,0   - warna tampilannya adalah kuning.
Catatan : CutViewer secara otomatis memasukkan garis warna, jika anda menggunakan “dialog penetapan alat potong.”  Anda dapat mengubah warna tampilan untuk setiap alat potong dengan menekan tombol to assign display color pada mode “Setup” atau secara langsung menggunakan kombinasi tombol “Ctrl-T.” Untuk mengubah warna, secara gampang anda dapat memilih sel warna yang diinginkan pada kolom warna mode “Setup” tersebut.

FROM/Z  sart, X start

Baris perintah FROM  merupakan titik start atau posisi awal dari alat potong seecara relatif terhadap titik nol program. Sebagai contoh :
; FROM/0,60
Catatan : Simbol apapun yang  berada di depan perintah ini, tidak akan berpengatruh terhadap eksekusi program
Sebagai contoh anda dapat mengetiik sebagai berikut :
; FROM/0,120
atau
$FROM/0,120
EDITING
            Anda dapat mengedit program NC pada jendela Edit, seperti halnya anda akan mengedit sebuah file. Seluruh perubahan akan diterima hanya setalah anda memilih item menu “Run” ® “Rebuild” atau tekan Ctrl-F9 untuk menjalankan lagi program yang bersangkutan.
Untuk program debugging anda dapat memilih item menu “Run” ® “Run to Cursor”  atau tekan kunci F4…………………………………………………………
Dynamic Zoom
ZOOM_dyn
Zoom Window
ZOOM_W
Zoom Fit
ZOOM_all
Zoom Previous
ZOOM_P
View Rotation
rotate
View Panning
Pan1
Setting
Dengan menggunakan tombol ‘Setup’ anda dapat mengubah parameter system :
Mode Simulasi :
1        Animated : Mensimulasikan secara grafis proses pemotongan benda kerja lewat penampilan gambar bentuk benda kerja dan gerakan alat potong.
2        Turbo :  Secara grafis hanya menampilkan lintasan alat potong dengan gambaran bentuk alat potong. Gambar benda kerja akan muncul hanya setelah akhir file NC dicapai atau  operator menekan  tombol “Step Forward”, “Pause” atau “Stop”.   
Update 3D View after each motion: enables or disables the animation in 3D view. This item is unavailable for Turbo mode.
Menggambar Alat potong : enables or disables the tool on screen image.
Draw Toolpath: enables or disables the toolpath on screen image.
Dwell (milliseconds): dwell at the every screen point of tool motion for slowing the on screen tool speed
Check Rapid Collision: enables or disables the detection of Rapid Collision. If this option is on then CutViwer graphically simulates any collision the tool has with the stock material while under Rapid Traverse.  Execution of the NC file will stop at the block of code where the collision occurs and a special dialog box will also appear that will display the coordinates for the current type of move in a from-to format and the buttons to define next actions. You may continue execution, pause or stop it. If you press the “Ignore All” button then execution will continue but without any Rapid Collison detections or in other words the option “Check Rapid Collision” will be Off. That’s why don’t forget to turn “Check Rapid Collision” to On if you want to have this feature beeing available for further simulations in the same session.
.
Arah Sumbu :  Pengaturan  orientasi sumbu X, Z pada padangan 2D.
Posisi jendela edit : pengaturan posisi Jendela Edit  pada jendela programs utama.
Orientasi Jendela 2D – 3D : penyetelan orientasi vertical atau horizontal jemdela pandangan 2D-3D.
Warna : penyetelan palet warna. 
*Catatan :  Jika CutViewer memuat file NC,      Note: When CutViewer loads NC file, it creates a record in memory of any tool size or tool color statements that have been inserted where the tools take effect. A different color statement can optionally follow each tool definition. 
If no color statements are found in the post, CutViewer uses the  “Part color” shown in the Setup dialog.  Changes made to tool colors by means of the setup dialog will persist only if there are no colors assigned in the NC file. A Ctrl-T key combination will directly launch the tool color dialog.
Reloading the NC file  (Rebuild – Ctrl-F9) will cause the program to use any colors added to the editor buffer and override changes made in memory through the setup dialog. Once the NC post is loaded into memory the tool colors can be changed in the setup and seen immediately.
So, for a permanent color update we should add COLOR commands to the NC file.
Customizing
CutViewer uses a simple text file with an *.nci extension to configure CutViewer for specific style of post. The nci file uses the same format the common .ini file. These files are kept in the CutViewer install directory. The *.nci configuration file defines the extension filter and description that appears in the combo-box in the open file window. The extension filter can be used to limit viewing only those files for which the configuration file is correct.
The default configuration file called _gcode.nci may be found in the CutViewer directory.  If you have only one NC machine simply edit this file.  If you start by editing the default file it would be a good idea to save the original before editing.
Several sample *.nci files are provided with the program and can be used to view some demo posts.  Move any move any of these sample nci files to another directory to shorten the list of choices in the file open combo-box.
Jika anda mempunyai beberapa mesin, membuat salinan _gcode.nci dibawah nama yang berbeda pada direktori CutViewer dan mengedit filefile ini. Notpad atau WordPad dapat digunakan untuk mengedit hal tersebut. Apabila menyimpan file-file ini, pastikan file tersebut disimpan dengan Nama File.nci dan bukan dengan Nama File.nci.txt (   When saving these files, make sure the file is saved as FileName.nci and not as FileName.nci.txt (Notepad is notorious for this). ……………
Note: A backup of the default _gcode.nci is also found under the name _gcode.def.
To load an NC file into CutViewer you must select the correct configuration file from the “Files of Type” combo-box in the file open dialog when you load a file.

Membuat file NCI baru

There are two required sections in this file:
[Common]
[Format]
NCI files are not case sensitive. Only the settings that are used by your program need to be in the file.
Comments have been added above each setting in a different font to show that they are not needed in the file.
Suatu contoh file nci nampak seperti berikut :
[Comments]
A description that, when seen in the combo=box, akan membantu menetapkan  will help describe what kind of post the configuration is for.
CNC=Fanuc FOTA
The extension filter, which is used by the open file window to filter the file list, should be the same as what appears in you NC post filename.
FileExt=*.nc
Note: multiple extensions are allowed. Example: FileExt=*.nc;*.cnc
The character that the post uses before a line that tells the machine controller not to interpret that line is,
Comment_chr=(
The word Inch or Metric, depending on which unit scheme will be used in the NC post file.
Units=metric
[Format]
The next 2 settings define the coordinate symbols
x_addr=X
z_addr=Z
The next 2 settings define the ratio X,Z value in NC file to actual         value of X,Z coordinates:
x_scale=2
Z_scale=1
i.e. if X address in NC file is the Diameter value then x_scale=2
     if X address in NC file is the Radius value then x_scale=1
The next two settings define how arc centers are read when either G90 or G91 is active and only apply to a G02/G03 line that has a center defined with I J K words but not when X Z R is used.
IJKformat_abs=
IJKformat_incr=
Ada There are exactly 5 different string values that can be used with each:
I dan K adalah  absolute
Center.
I dan K are incremental from the XZ end point of the arc
end-center.
I and K are incremental from the start point of the arc
center-start.
If the control expects that incremental centers are always a positive number an “abs” is added.
abs(end-center)
abs(start-center)
If G90 active
Ijkformat_abs=
If G91 active
Ijkformat_incr=
Example:
IJkformat_abs=end-center
IJkformat_incr=abs(end-center)
Simbol kecepatan asutan
f_addr=F
Simbol RPM
s_addr=S
Simbol alat potong
tool_addr=T
The feed rate that above which rapid color is displayed and collision is expected if the cutter has met material.
f_rapid=5000
Kode-g kompensasi alat potong
cutcom_left=G41
cutcom_right=G42
cutcom_off=G40
Please note that if your CAM system is posting profiles using the cutter centerline instead of the part profile, each one of these should be set to “Gxx” so that they are ignored when encountered.
Akhir program utama
prog_end=M30
Memanggil sub routine
sub_call=M98P
Begin sub definition
sub_begin=O
End sub definition
sub_end=M99
Sub repeat character
sub_repeat=L
contoh dari  a  _gcode.nci file :
[common]
CNC=Standard G-code
fileExt=*.nc
comment_chr=;
units=metric
[format]
x_scale=2
z_scale=1
f_scale=1
s_scale=1
IJkformat_abs=end-center
IJkformat_incr=abs(end-center)
x_addr=X
z_addr=Z
f_addr=F
s_addr=S
tool_addr=T
f_rapid=3000
cutcom_left=G41
cutcom_right=G42
cutcom_off=G40
prog_end=M30
sub_call=M98P
sub_begin=O
sub_end=M99
sub_repeat=L

Custom Control Conversion

Beberapa  CNC mempunyai siklus operasi kerja dan fungsi khusus yang tidak dapat ditetapkan  via variable pada file CNC.  Pada kasus ini pengguna harus mengembangkan konverter yang dimiliki.
Jika ada baris seksi [format]  pada file-nci. 
user_convert=mycoverter.dll

then first of all CutViewer will try to call the procedure named User_convert_proc from myconverter.dll file. User_convert_proc procedure has
2 parameters - input file name and output file name. These parameters
CutViewer passes to your procedure. If you write your programs on Delphi the declaration for the procedure in DLL looks as follows:

Procedure user_convert_proc(infile,outfile:pchar);stdcall;

Input file is NC-file to be converted and output file is a result file with
standard G-codes. In other words CutViewer calls the procedure Procedure
user_convert_proc passing 2 parameters and expects that your procedure will
create output file with the name passed by "outfile" parameter and then
CutViewer handles this file as usual. There is one rule for output file.
Every line in this file should be prefixed by number and "#" symbol.
Contoh :
.....................

10# G01 X1 Y1
11# G00 Z5
14# T1
15# G01 X1 Y0.5 F2
............................
Angka sebelum simbol "#" mempunyai arti bahwa baris yang mutakhir pada file output berhubungan dengan baris pada file input dengan indeks  ditetapkan oleh angka ini (baris pertama pada file input mempunyai indeks 1).
Penjelasan selanjutnya :
Kita harus mengubah file CNC  untuk hipotetis CNC yang memiliki format sebagai berikut :
TOOLNO, 1
SPINDLE, 500
RAPID
GOTO/X=1,Y=2,Z=5
FEEDRATE, 20
GOTO/X=1,Y=2,Z=1
FINI

Pada file input ini, prosedur yang kita buat sesuai dengan file output kode-G standar sebagai berikut : 
1# T1
4# G00 X1 Y2 Z5 S500
6# G01 Z1 F20
7# M02

Anda melihat bahwa angka sebelum # adalah indeks  baris yang sesuai dengan file input.
CutViewer needs this index to provide correct cursor navigation in the edit window during step-by-step mode because the first file will be loaded into the edit window but in fact internally CutViewer works with the second file.

The algorithm how to convert input file into output file or in other words
the program code inside the procedure is your responsibility and of course
this file in details can be different for different developers. For example
you can create the following output file in our case:

1# T1
2# S500
4# G00 X1 Y2 Z5
5# F20
6# G01 X1 Y2 Z1
7# M02

Anda dapat juga membuat exe file sebagai pengganti DLL dan baris  file NCI pada kasus ini adalah seperti berikut  :

user_convert=myconverter.exe

Pada kasus ini pertama kali CutViewer menjalankan myconverter.exe file dan langsung  melewati 2 parameter   baris perintah (nama file input dan output). Program anda harus menerima parameter-parameter tersebut dan menciptakan file output yang sesuai.
Supported codes for Fanuc  F0TA and  F10TA, F11TA
Anda dapat menemukan contoh program NC untuk Fanuc sesudah CutViewer Turn diinstalasi pada folder “FANUC F0TA Samples” dan “FANUC F11TA Samples” Perlu diperhatikan, bahwa seluruh contoh-contoh tersebut menggunakan system satuan metrik. Jika program NC yang anda miliki menggunakan sistem satuan inchi,  lakukanlah perubahan veriabel sistem satuan pada file  fanuc.nci dan fanuc1.nci sebagai berikut :
Units=inch
Anda juga perlu memperhatikan beberapa perbedaan pada penetapan siklus untuk system pengendalian Fanuc F0TA and F10TA, F11TA.
G71 – PENGURANGAN UKURAN BENDA KERJA DALAM ARAH 
           MEMANJANG
Kode ini digunakan untuk mengerjakan operasi pembubutan tirus atau radius. Dengan kode ini program menjadi sangat sederhana. Anda hanya menulis program untuk bentuk akhir dari benda kerja. Dan program dieksekusi pada kedalaman yang diambil pada arah sumbu X. Keseluruhan bentuk benda kerja dicapai dalam tahapan-tahapan yang ditetapkan dalam bentuk kedalaman pemotongan. Hal tersebut seperti yang ditunjukkan dalam  contoh beruikut ini :                
FOTA :
                            G71 U(d)  R(e)
                            G71 P__ Q__ U(u) W(w)  S__   F__
F10TA, F11TA:
                            G71 P__ Q__ U(u) W(w)  D___ S__   F__
Di sini :
U(d)    =  Kedalaman pemotongan (nilai radius untuk pelatihan adalah adalah 0,5mm).  
R(e)     =  Jumlah gerak pembebasan (sesudah kedalaman pemotongan, gerak ini akan 
kembali pada   lintasan gerak alat potong pada sumbu X + arah pada sudut   
45°)
P          =  Nomer blok awal  untuk program bentuk  benda kerja yang dikehendaki.  
Q         =  Nomer blok akhir untuk program bentruk benda kerja yang dikehendaki.1
U(u)     =  Gerak pengerjaan akhir (finishing) yang diijinkan pada arah sumbu X.
W(w)   =  Gerak pengerjaan akhir (finishing) yang diijinkan pada arah sumbu Z. Pada
                 siklus ini  harus 0.
S          =   Kecepatan putaran mesin
F          =   Kecepatan asutan.
G72 – PENGURANGAN  UKURAN BENDA KERJA PADA ARAH MELINTANG
Siklus ini sama dengan G71. Perbedaannya hanya pada operasi gerak pemotongannya dilakukan sejajar terhadap sumbu X, sedangkan kedalaman pemotongannya diukur pada atrah sumbu Z.
                                                 
Format 
FOTA :
                  G72  W(d)  R(e)
                  G72  P__ Q__ U(u)  W(w)  F__
F10TA, F11TA:
                  G72 P__ Q__ U(u) W(w)  D___   F__
Here ,
W(d)    = Kedalaman pemotongan (Untuk mesin pelatihan adalah 1mm)
R(e)     = Escaping amount ( After depth of cut, this is the return path
            for the tool in X + Direction)
P          = Starting block no. of the program for the required shape
Q         =  Final block no. of the program for the required shape
U(u)     =  Pengerjaan akhir (finishing) yang diijinkan pada arah sumbu X.
W(w)   = Pengerjaan akhir (finishing) yang diijinkan pada arah sumbu Z.
F          =  Kecepatan asutan.
 G73  PATTERN REPEATING CYCLE
This cycle allows cutting a fixed pattern repeatedly, with a pattern being displaced bit by bit.
                                     
Format 
FOTA :
                    G73  U(i)  W(k)  R(d)
                    G73  P__  Q__  U(u)  W(w)  F__
F10TA, F11TA:
                    G73 I__ K__ D__ P__ Q__ U(u)  W(w)  F__
Where ,
U(i)      =  Jarak pembebasan pada arah sumbu X.
U(i)      = (Job. Diameter - Min.Diameter pada  program) / 2
W(k)    =  Jarak pembebasan pada arah sumbu X.
R(d)     =  No. of divisions for the pattern.  R=(U(i) / Max. Depth of Cut)+1
P          =  Starting block no. of the program for the required shape
Q         =  Final block no. of the program for the required shape
U(u)     =  Proses pengerjaan akhir yang diijinkan pada arah sumbu X.
W(w)   =  Proses pengerjaan akhir yang diijinkan pada arah sumbu Z.
F          =  Kecepatan asutan untuk proses pemotongan..
G70 - FINISHING  CYCLE
Sesudah operasi kerja pengasaran , siklus ini digunakan untuk mencapai ukuran akhir After roughing operation this cycle is used to achieve the final dimensions.
Finish allowance has to be kept before starting this cycle. The tool path is same as the roughing operation.
                                                        
Format :  G70  P __  Q __
Here ,
P= blok awal  siklus pengasaran.
Q= blok akhir  siklus pengasaran.
Siklus ini digunakan sesudah kode-kode : G71,G72 & G73. Nilai pengerjaan akhir (finishing) diambil dari kode-kode tersebut di atas.
G74  SIKLUS PENGEBORAN DENGAN GERAK MAJU MUNDUR ATAU

         PEMBUATAN ALUR PADA ARAH SUMBU Z

Format 
FOTA :
                      G74  R(e)
                      G74 X(U) Z(W)  P__  Q__  R___  F__
Di mana ,
X         = Komponen X untuk Titik akhir
Z          = Komponen X untuk Titik akhir Z 
U         = Jumlah lintasan gerak dari titik ke titik pada arah sumbu X  dari Titik awal ke   
                Titik akhir
W        = Jumlah lintasan gerak dari titik ke titik pada arah sumbu Z  dari Titik awal ke   
                Titik akhir
R(e)     = Jumlah gerak pembebasan (gerak lintasan  penarikan kembali mata bor pada
    arah Z+ sesudah mengebor kedalaman tertentu)
                for the tool in Z + Direction)
P          = Jumlah gerakan pada sumbu X
Q         = Kedalaman pemotongan
R         = Escaping amount of the tool at the cutting depth
F          = Kecepatan asutan untuk proses pemotongan.
F10TA, F11TA:
                       G74 X(U) Z(W)  I__ K__ D__  F__
Di mana ,
X         = Komponen X untuk Titik akhir
Z          = Komponen Z untuk Titik akhir
U         = Incremental amount in X direction from Start point to End point
W        = Incremental amount in Z direction from Start point to End point
I           = Movement amount in X axis
K         = Depth of cut
D         = Escaping amount of the tool at the cutting depth
F          = Feed-rate for cutting.
G75 PEMBUBUTAN ALUR PADA SUMBU X
Format 
FOTA :
                          G75  R(e)
                          G75 X(U) Z(W)  P__  Q__  R___  F__
Where ,
X         = Komponen X untuk Titik akhir
Z          = Komponen Z untuk Titik akhir
U         = Incremental amount in X direction from Start point to End point
W        = Incremental amount in Z direction from Start point to End point
R(e)     =  Escaping amount ( After depth of cut, this is the return path
        for the tool in X + Direction)……………………………………………….
P          = Kedalaman pemotongan
Q         = Jumlah gerakan pada sumbu X
R         = Escaping amount of the tool at the cutting depth………………………
F          = Kecepatan asutan untuk proses pemotongan .
F10TA, F11TA:
                           G75 X(U) Z(W)  I__ K__ D__  F__
Where ,
X         = Komponen X untuk Titik akhir
Z          = Komponen Z untuk Titik akhir
U         = Jumlah incremental pada arah sumbu X dari Titik awal ke Titik akhir
W        = Jumlah incremental pada arah sumbu X dari Titik awal ke Titik akhir
I           =  Kedalaman pemotongan
K         = Jumlah gerakan pada sumbu Z is
D         = Escaping amount of the tool at the cutting depth……………………………………
F          =  Kecepatan asutan
 G76 SIKLUS PEMOTONGAN ULIR MAJEMUK
Format 
FOTA :
                      G76 P___ Q__ R__
                      G76 X__ Z__ P__ Q__  F__
Di mana blok pertama :
X    = Diameter untuk pemotongan akhir
Z     = Komponen Z dari titik akhir 
P     = Tiga dari angka 2 digit dalam format aabbcc, di mana :
           aa          adalah metoda pemotongan.
           bb         adalah suatu angka yang menunjukkan berapa kali proses pemotongan ulir
           cc          adalah sudut ulir
Q,R = Jumlah pemotongan akhir :
Blok ke dua :
I  = Perbedaan radius ulirfference of thread radius
P = Tinggi ulir
Q = Jumlah pemotongan pertama
F = Kisar ulir
A = Sudut ulir
F10TA, F11TA:
                       G76 X__ Z__ I__ K__ D__ F__ A__ P__
Di mana,
X = Diameter untuk pemotongan akhir
Z = Komponen Z untuk titik akhir 
I  = Perbedaan dari radius ulir
K= Ketinggian ulir
D= Jumlah pemotongan pertama
F= Kisar ulir
A= Sudut ulir
P = Metoda pemotongan
 G92 THREAD CUTTING CANNED CYCLE
  
Siklus pemotongan ini cocok untuk operasi pemotongan ulir luar. Siklus ini sama dengan G32 kecuali : pada G92 alat potong dikembalikan  pada posisi awal..                                                              
  Format :   G92   X___ Z___ F__
Di mana,
X = Diameter nominal ulir
Z =  Panjang ulir
F =  Kisar ulir
Pendukung kode G yang lain

G32  PEMOTONGAN ULIR

  Format :   G32   X(U)___ Z(W)___ F__
G90 SIKLUS PEMBUBUTAN DIAMETER LUAR/DIAMETER DALAM
  Format :   G90   X___ Z___ F__
G94 SIKLUS PEMBUBTABN MUKA UJUNG BENDA KERJA
  Format :   G94   X___ Z___ F__
G50  INCREMENTAL DATUM SHIFT
  Format :   G50   U___ W___

MEMANGGIL SUBPROGRAM

Jika sebuah program berisi  urutan tetap yang sudah tertentu/berisi pola pengulangan, maka urutan program  urutan pola  ini dapat dimasukkan memori sebagai sebuah subprogram, dengan tujuan untuk memudahkan pemrograman. Suatu subprogramdapat dipanggil oleh subprogam lain. Jika program utama memanggil subprogram, hal tersebut dapat dianggap memanggil suatu subprogram “satu putaran”     
Jika  suatu perintah pemanggilan suatu subpropgram ditemukan dalam program utama, maka system pengendalian akan dilakukan oleh subprogram.  Dan sistem pengendalian kembali ke program utama jika perintah pengembalian M99 di ada pada program.
            Format :      M98 P__ O__
Di mana ,
P          = pengulangan subroutine .
O         = label subroutine (numerical).
CutViewer Mill  adalah sistem perangkat lunak yang gampang  digunakan untuk mensimulasikan operasi  NC pada proses operasi pemotongan benda kerja pada pengefraisan dan pengeboran (milling & drilling)  pada lingkungan system persumbuan 2, 2-1/2 and 3. CutViewer adalah FAST. CutViewer dapat meng-edit file NC tanpa keberadaan mode simulasi , menghasilkan koreksi dan verifikasi terhadap waktu proses pada mesin yang sesungguhnya. 
CutViewer adalah suatu aplikasi 32-bit, yang diopersikan pada  Windows 95/98/ME/NT/2000 dan system operasi  Windows yang lebih mutakhir, termasuk Windows XP. Syaratnya,  perangkat kerasnya minimum menggunakan Petium dengan RAM 2 Meg dan spasi bebas pada hardisk 10 Megabyte.
Versi ini menerima masukan :
·         File kode-G
·         File CLS(UNIGRAPHICS) 
·         Teks APT
PENTING : Untuk pengguna UNIGRAPHICS : sebelum file-CLS pengaturan generasi MANUFACTURING pilih : 
  Preferences--->GeneralCAM--->CLSFdecimals--->7---> Ok
Versi ini dapat diterapkan untuk perangkat keras NC spesifik. Perubahan dari satu format ke format yang lain hanya perubahan yang meliputi file konfigurasi.
CutViewer versi ini didukung oleh berbagai macam pahat/alat potong (tools) yang meliputi ;
§  Pisau frais ujung radius (Ball End Mill)
§  Pisau frais sudut radius (Bull End mill Mill)
§  Pisau frais ujung datar (Flat End Mill)
§  Pisau frais tirus  (Tapered Mills)
§  Pisau frais chamfer (Chamfer Tools)
§  Mata Bor (Drills)
§  Bor senter (Center Drills)
Pisau frais ujung radius dapat digunakan dengan titik pengendalian terletak pada permukaan bibir potong radius atau pada titik pusat radius.
Tool and stock definition
            Begitu CutViewer memuat suatu file NC, sistemnya akan mencari informasi tentang ukuran benda kerja , geometri alat potong  dan penempatan titik program relatif  terhadap titik acuan benda kerja. Hal ini memerlukan beberapa baris perintah tambahan pada file NC. Jika baris-baris perintah ini tidak ditambahkan pada file NC, CutViewer akan menampilkan dialog singkat untuk menetapkan  informasi yang diperlukan.
Jika anda lebih suka memasukkan baris-baris perintah secara manual, ikuti petunjuk sebagai berikut :   
Setiap file NC harus berisi baris-baris perintah tambahan  : STOCK, FROM, dan  TOOL.
STOCK  adalah perintah untuk menggambar benda kerja pada layar monitor.
FROM  adalah perintah untuk menetapkan posisi awal alat potong.
TOOL adalah perintah untuk menetapkan geometris alat potong pada layar monitor.
Penetapan tampilan alat potong dan benda kerja pada layar monitor harus diawali  dengan   tanda titik-koma (;)Tool and Stock definition lines should be prefixed with a semicolon, tanda kurung kiri left atau karakter lain pada sistem pengendalian CNC milik anda yang digunakan  untuk menampilkan baris komentar.
.
Benda kerja dapat berbentuk balok atau silinder dengan suatu lubang.
Format baris perintah untuk suatu blok perintah ditetapkan sebagai berikut :
a) ;STOCK/BLOCK, Panjang, Lebar, Tinggi, Titik acuan benda kerja pada sumbu X,
 Titik acuan benda kerja pada sumbu Y, Titik acuan benda kerja pada sumbu Z,.
       Tiga variable pertama adalah ukuran benda kerja , diberikan dalam angka-angka posistif yang merepresentasikan ukuran aktual dari benda kerja. Titik acuan benda kerja ada pada sudut kiri bawah dalam sisi pandang secara isometris .
Titik acuan juga diidentifikasi oleh potongan sumbu warna kuning, biru dan merah, pada saat tombol untuk memutar tampilan benda ditekan.  .
Tiga angka terakhir menunjukkan posisi sumbu x, y, z titik acuan program  terhadap titik acuan benda kerja. Penetapan ini lebih menunjukkan sistem pengendalian, ketimbang sekedar menetapkan  z=0 pada permukaan atas balok, oleh karenanya hal ini  memerlukan perhatian lebih serius.
Sebagai contoh, jika benda kerja mempunyai ukuran panjang 100 mm, lebar 70 mm, tinggi 30 mm dan posisi titik nol program terletak pada tengah-tengah permukaan atas benda kerja :
;STOCK/BLOCK,100,70,30,50,35,30
Similarly, a 6"x4"x1" stock with a program origin at the center of the top surface is written as:……………………………………………………………………..
;STOCK/BLOCK,6,4,1,3,2,1





Jika benda kerja berbentuk  silinder dengan suatu lubang  :
;STOCK/CYLINDER, Diameter Luar, Diameter Dalam, Tinggi, Titik acuan benda kerja pada sumbu X,  Titik acuan benda kerja pada sumbu Y, Titik acuan benda kerja pada sumbu Z.
Pada kemungkinan parameter ke dua adalah  0. Diameter dan Tinggi menampilkan pengukuran aktual pada silinder. Titik acuan benda kerja  (origin) pada tengah-tengah silinder bagian bawah.
Sebagai contoh, jika sebuah silinder mempunyai diameter 100 mm, tinggi 30 mm dan titik acuan program (origin) pada titik pusat permukaan bagian bawah :  ;STOCK/CYLINDER,100,0,30,0,0,0
Jika titik acuan program  pada tengah-tengah permukaan bagian atas :
 ;STOCK/CYLINDER,100,0,30,0,0,30
Jika silinder mempunyai lubang berdiameter 40 mm :
;STOCK/CYLINDER,100,40,30,0,0,30
b) ;FROM/X start, Y start, Z start
Baris  FROM merupakan posisi awal (home position) dari alat potong secara relatif terhadap titik acuan program. Sebagai contoh dengan menggunakan benda kerja tersebut  di atas dan posisi alat potong menunjukkan 10mm di atas, maka perintahnya :  ;FROM/0,0,10
Contoh pada satuan inchi, jika posisi pertama dari alat potong adalah, .1" above the origin:
;FROM/0,0,.1
c) Baris  TOOL merupakan geometri alat potong.
Format baris untuk alat potong mesin frais (milling) ditetapkan sebagai berikut :
;TOOL/MILL, Diameter,  Radius sudut, Tinggi alat potong, Sudut taper.
*Catatan : untuk  Tool/Mill: Radius sudut akan mengindikasikan jenis alat potong yang dipergunakan. Di mana ‘r’ adalah sudut radius yang ditetapkan dan ‘D’ adalah diameter alat potong.
r = 0  untuk pisau frais ujung datar (flat end mill® (Fig.1)
r < D/2 untuk for (bull end mill)  ® (fig.2)
r = D/2 untuk pisau frais ujung radius (ball end mill)  : jika titik kendali pada ujung mata
      potong  ®  (Fig.3)
r = -D/2 for untuk pisau frais ujung radius (ball end mill) : jika titik kendali pada titik pusat radius  ® (Fig.4)
Berikut ini adalah contoh-contoh untuk pengaturan berbagai macam alat potong :
;TOOL/MILL,20,0,80,0    ;TOOL/MILL,1,0,1.5 - flat end mill
;TOOL/MILL,20,10,80,0  ;TOOL/MILL,1,.5,2  - ball mill (control point is the tool tip)
;TOOL/MILL,20,-10,80,0 ;TOOL/MILL,1,-.5,2 - ball mill (control point is the center of the ball)
;TOOL/MILL,20,3,80,0   ;TOOL/MILL,1,.125,1 - bull mill
Format baris perintah untuk pisau chamfer adalah sebagai berikut :
;TOOL/CHAMFER, Diameter, Sudut titik ujung,  Tinggi alat potong    

Format garis perintah untuk bor senter (center drill) adalah sebagai berikut :
;TOOL/CDRILL, D1, A1, L, D2, A2, H (lihat gambar dibawah ini).
 
d) ;COLOR,R,G,B
Anda dapat menetapkan tampilan warna untuk setiap alat potong. Hal tersebut harus mengikuti perintah untuk alat potong.
R – menentukan intensitas warna merah (red)
G - menentukan intensitas warna hijau  (green)
B - menentukan intensitas warna  biru (blue)
Intensitas untuk setiap argumen dalam rentang 0 sampai 255
Jika seluruh tiga intensitas adalah nol, hasilnya warna hitam.
Jika seluruh tiga intensitas adalah 255, hasilnya warna putih
Sebagai contoh anda dapat mengetik sebagai berikut :
;COLOR,0,255,0 – Tampilan warna hijau
 atau
;COLOR,255,255,0 – Tampilan warna kuning ;
Catatan : CutViewer akan memasukkan baris perintah warna jika anda menggunakan dialog penetapan alat potong. Anda dapat mengubah tampilan warna untuk setiap alat potong  dengan menekan tombol “Click here to assign display color each tool”  pada mode “Setup” atau secara langsung  menggunakan suatu kombinasi kunci sederhana “Ctrl-T”. Untuk mengubah warna  warna cara lain dengan cara meng”klik” pada sel kolom warna yang sesuai..
Catatan : Simbol arahan apapun yang menyangkut hal tersbut di atas,  tidak mempengaruhi terhadap eksekusi program.
Sebagai contoh anda dapat mengetik sebagai berikut :
;FROM/120,0,0
atau
$FROM/120,0,0
Pemilihan Stock / Tool pada file CLS APT CLDATA (ASCII) :
Setiap file yang berisi informasi tentang gambar benda kerja harus dalam format sebagai berikut :
PPRINT/BLOCK,d1,d2,d3,d4,d5,d6
atau
PPRINT/CYLINDER,d1,d2,d3,d4,d5,d6
d1,d2,d3,d4,d5,d6 – lihat  bahasan kode G
Sebagai contoh :
PPRINT/BLOCK,100.,70.,30.,50.,35.,30.
Informasi tentang alat potong untuk file-file CLS :
TLDATA/MILL,D,r.... = mill
TLDATA/DRILL....... = drill
Informasi tentang alat potong untuk file-file CLDATA (ASCII) :
CUTTER/D,r
D – Diameter alat potong (tool diameter)
r   - radius sudut (corner radius)
untuk alat potong ujung datar    (flat mill)  r = 0
untuk alat potong ujung radius  (ball mill) r = D/2
Untuk menetapkan tampilan warna untuk setiap alat potong menggunakan perintah : PPRINT/COLOR,R,G,B
Untuk contoh lebih lanjut  mengacu pada file demo.
Customizing
Pada versi 2.2 ini ,  ada files- file konfigurasi dengan  *.nci extension. 
File-file ini dibuat untuk diterapkan pada format mesin CutViewer. Informasi yang menyangkut  tentang karakter komentar, symbol sumbu,skala pengukuran,  format IJK untuk G90/G91 gerak melingkar dan sebagainya dimuat pada *.nci file. 
Jika file konfigurasi default dipanggil  _gcode.nci dapat ditemukan pada direktori  CutViewer. Jika anda hanya mempunyai satu mesin NC akan sangat gampang meng-edit file ini. Jika anda mulai dengan kegiatan mengedit file default hal tersbut akan ide yang bagus untuk menyimpan acuan sebelum pengeditan.. 
Jika anda mempunyai beberapa mesin yang membuat salinan  _gcode.nci di bawah nama –nama yang berbeda pada direktori CutViewer dan file-file edit.
File-file ini dapat diedit dengan suatu editor teks standar, seperti  NOTEPAD of WORDPAD. Jika menyimpan file-file ini, pastikan bahwa suatu file disimpan sebagai FileName.nci dan bukan pada FileName.nci.txt. Jika anda membuat beberapa file NCI anda akan melihat sebuah daftar yang sesuai dengan ‘Jenis-jenis file’ pada dialog standard FileOpen.
Catatan : Suatu dukungan dari the default _gcode.nci juga ditemukan dibawah nama _gcode.def.
Format file-nci adalah sebagai berikut :
[common]
CNC=text
  Di mana  text adalah jenis mesin  NC.  Informasi ini yang muncul  pada jenis  file dari   File Open
    dialogexample:CNC=FANUC 3000
FileExt=ext
  where ext is file extensions of the NC files
  example:FileExt=*.nc;*.tap
comment_chr=chr
  di mana chr adalah suatu karakter komentar
  example:comment_chr=;
units=METRIC  -  Mengatur sistem satuan menggunakan satuan METRIK
   atau
units=INCH    -  Mengatur sistem satuan menggunakan satuan INCH 
[format]
x_addr=s1
y_addr=s2
z_addr=s3
x_scale=d1
y_scale=d2
z_scale=d3
   di mana  s1,s2,s3 adalah symbol untuk penetapan sumbu X,Y,Z
                 d1,d2,d3 adalah rasio nilai X,Y,Z pada file NC untuk nilai  X,Y,Z
                  yang sebenarnya.
   Contoh : x_addr=X
            y_addr=Y
            z_addr=Z
            x_scale=1
            y_scale=1
            z_scale=1
f_addr=s1
s_addr=s2
f_scale=d1
s_scale=d2
s1,s2 adalah simbol untuk  penetapan kecepatan asutan dan kecepatan putaram  spindle.
                d1,d2 adalah ratio F,S nilai pada file  NC file untuk nilai F,S yang sebenarnya.      
       
   contoh : f_addr=F
            s_addr=S
            f_scale=1
            s_scale=1
f_rapid=d
        d  adalah nilai kecepatan untuk gerakan cepat/rapid   (G000)
        contoh : f_rapid=2000
IJKFormat_abs="expression"
IJKFormat_incr="expression"
     Di mana  "expression" menetapkan format I,J,K untuk gerak melingkar untuk absolut (G90) dan incremental (G91)     
 Berikut ini pernyataan yang digunakan.
     center
     end-center
     center-start
     abs(end-center)
     abs(start-center)
     example:IJformat_abs=center
             IJformat_incr=end-center
             (I and J are X,Y values of the arc center
             for absolute mode(G90) and I,J are incremental and
             describe the position of the end point of an arc 
             relatively to it's center for incremental (G91) mode.
cutcom_left=xx – kompensasi alat potong, kiri
cutcom_right=xx - kompensasi alat potong, kanan
cutcom_off=xx – membatalkan kompensasi alat potong 
di mana  xx adalah kode G yang sesuai 
contoh :
cutcom_left=G41
cutcom_right=G42
cutcom_off=G40
Catatan  : Nilai default kompensasi alat potong sama dengan radius  alat potong.
Jika anda ingin menetapkan suatu nilai eksak, sisipkan baris file NC sebagai berikut :
;REGISTER/D
 di mana  D – nilai kompensasi alat potong 
sebagai contoh :
;REGISTER/0.32
prog_end=s1
sub_call=s2
sub_begin=s3
sub_end=s4
sub_repeat=s5
s1 adalah perintah “akhir dari program utama”  
s2 adalah perintah  "memanggil subprogram"
s3 adalah perintah  "memulai subprogram"
s4 adalah perintah  "mengakhiri  subprogram"
s5 adalah perintah yang menetapkan berapa kali subprogram akan dieksekusi. 
Sebagai contoh :
prog_end=M30
sub_call=M98P
sub_begin=O
sub_end=M99
sub_repeat=L
example of a  _gcode.nci file :
[common]
CNC=Standard G-code
fileExt=*.nc
comment_chr=;
units=metric
[format]
x_scale=1
y_scale=1
z_scale=1
f_scale=1
s_scale=1
IJkformat_abs=end-center
IJkformat_incr=abs(end-center)
x_addr=X
y_addr=Y
z_addr=Z
f_addr=F
s_addr=S
tool_addr=T
f_rapid=3000
cutcom_left=G41
cutcom_right=G42
cutcom_off=G40
prog_end=M30
sub_call=M98P
sub_begin=O
sub_end=M99
sub_repeat=L
Running CutViewer
Sebelum Before running CutViewer set the Windows Color Palette to 16-bit mode(65535 colors) or higher.  After starting CutViewer only the “File-New”,”File-Open” and Setup items are available.  Choose FileOpen and select the NC file.  After the file loads, the Edit window will appear on the screen.  The "Run" and the "Trace forward" buttons become enabled.  You may change the Edit window size/location or minimize it.  Press the "Run" button and an NC simulation will appear on the screen and the 'Trace back','Pause', 'Stop' buttons become enabled.
'Trace forward/back' - switches to step-by-step mode.  As this button is pressed repeatedly, the tool moves incrementally forward or backward the amount of steps specified in Setup (by default 1). When in Trace mode, the line being executed will be highlighted in the Edit window and a separate dialog will display the current coordinates and cutting parameters. This is helps in identifying the lines to edit. To cancel the incremental trace mode press the 'Run' button.
Note: you can simply press the 'Space' key instead of the 'Trace' button for step-by-step motions and the 'Return' key to cancel the incremental trace mode.
'Pause' - suspends execution.  While processing is paused, you may view the machined part, apply zooming and measurements, as well change the Setup parameters and EDIT the code. You may, for instance, change the mode of simulation, a color palette, the viewing rotation or sectioning. The 'Run' button will restart simulation from the paused position with provision for new parameters. You can also edit the file, but you have to select the "Running"-"Rebuild" menu item or press Ctrl-F9 in order to implement the changes.
'Stop' Stops execution of the simulation.  Unlike 'Pause', you cannot restart from the current position after pressing 'Stop'.  Pressing  'Run' following 'Stop' will start the simulation from the beginning of the file. Also press 'Run' following 'Stop' if you want to restart process after finish of the simulation.
To make the on screen cutter speed slower you can define 'Dwell' value (milliseconds) in 'Setup' mode and the process will be suspended for the specified dwell time at the end of every tool motion.
To make the cutter move faster during processing simply press '+' key
and press the '-' key to slow it down. Press 'PgUp' key for the fastest cutter speed.
The 'ISO view', 'Top view' ... 'Rear View' buttons allow you to view the part from standard angles.  These buttons are available after the
simulation has finished or at any time after pressing 'Pause' or 'Stop'.
There are three modes of operation accessible through Setup:
1. Solid: Graphically simulates the material removal process by updating the stock solid shape as the tool moves (by default).
2. Toolpath: Graphically updates only the toolpath with the tool image. The machined part appears only when the user presses 'Pause' or 'Stop' button and then presses one of 'View' buttons.  This mode is faster then mode 1.
3. Background: Fastest mode without dynamically graphical output.
Switching between these modes is possible at any time after pressing
'Pause'.
Jika anda ingin membuat program NC baru secara langsung pada CutViewer pilih item menu  “File ® New”, kemudian pilih jenis program CNC yang diinginkan, dan suatu file
emty Noname.nc akan dimuat ke jendela Edit. Saat ini anda dapat menulis/mengetik program. Untuk menyimpan program baru ini ke disk, pilih item menu “File ® Save As”. Untuk mensimulasikan program baru tersebut pilih item menu “Run ® Rebuild, atau tekan gabungan tombol Ctrl-F9. Jika informasi tentang alat potong dan benda kerja diabaikan, maka CutViewer akan menampilkan dialog cepat atas informasi yang seharusnya ada.
Editing
Anda dapat memodifikasi suatu program NC pada jendela Edit  seperti  layaknya anda akan mengedit suatu file. Seluruh perubahan akan diterima hanya setelah anda memilih item menu "Running"-"Rebuild" atau menekan Ctrl-F9 untuk menjalankan kembali. Jika anda berada pada mode “Trace”, anda harus menetapkan mode ini untuk menjalankankan program lagi.
Untuk program debugging anda dapat memilih item menu “Run ® Run to Cursor” atau tekan tombol F4 pada key board. Perintah
For program debugging you can select the menu item "Running"-"Run to Cursor" or simply press F4 key.  The "Run to Cursor" command runs your program from the current point to the line the cursor is on in the edit window and then switches to the "Trace" mode.  For example, if you are checking a big NC file you may select fast Toolpath or Background mode of operation then select the desired line in the edit window and press F4. When the program stops at selected line you can switch to the Solid mode and continue processing.  You can also use Ctrl-F4 after modifying the program.  This would be the same as "Rebuild" and "Run to Cursor", but before doing this you must terminate "Trace" mode by pressing the "Pause" or "Stop" button.
You may also set breakpoints on lines in the NC file where you want the program execution to pause during a run.  Running to a breakpoint is similar to Running to a cursor position in that the program runs until it reaches a certain line.  However, unlike Run To Cursor, you can have multiple breakpoints in your file.  To set a breakpoint, select the line in the file where you want the breakpoint set, then do one of the following:
a)      Press F5 
b)      Choose Toggle Breakpoint from the Running menu
c)      Choose Toggle Breakpoint from the Edit window context menu.
When you set a breakpoint, the line on which the breakpoint is set becomes highlighted.
View Rotation
For view rotation press the 'Rotation' button.  To rotate the view, hold the left mouse button down while moving the mouse. The outline of the stock block will appear and it will move or rotate to indicate the changing stock orientation.  When the view is in the desired position, press the right mouse button to restore the image.
*Note: you can enact the "Rotation" command directly using a simple hot key without pressing a button. Press the Alt key and click-drag with the left mouse button. When the view is in the desired position, press the right mouse button to restore the image or press the Esc key to cancel command.
View Panning
For view panning press the 'Panning' button.  To pan the view, hold the left mouse button down while moving the mouse. The outline of the stock block will appear and it will move to indicate the changing stock position.  When the view is in the desired position, press the right mouse button to restore the image.
*Note: you can enact the "Panning" command directly using a simple hot key without pressing a button. Press the Ctrl key and click-drag with the left mouse button. When the view is in the desired position, press the right mouse button to restore the image or press the Esc key to cancel command.
Sectioning
The part can be sectioned to see invisible elements.  CutViewer supports two modes of sectioning, "Parallel to Axis" and 'Through 2 points". 
'Parallel to Axis" generates a sectioned part slicing it with a plane parallel to the Axis.  Press the "Parallel to Axis" button and an outline of one face appears (for ISO only the top face).  Place the cursor on the outline and while holding down the left mouse button move it to the desired position.  Repeat this for other edges if necessary.  These edges can be repositioned if desired.  When you are satisfied with the positions of the sections, Press the right mouse button and the sectioning operation will be completed. 
"Through 2 points section"- allows you to cut away a portion of the part through any vertical plane defined by two points.  This option is available only on the Top and ISO views.  Move the cursor to the first position and press the left mouse button down.  While holding the button pull a "rubber band line" to the desired position.  Release the mouse button and correct the position of the points as necessary.  When you are satisfied with the position of the section line, move the cursor to the side of part you want to remove and press the right mouse button.  To restore the sectioned part press the "Unsectioning" button or choose the menu item 'Section', 'Unsectioning'.
Zooming
To magnify or zoom in on a part, press the "Zoom Window" button and while holding down the left mouse button select the desired window and then release the mouse button.  Magnifying may take from several seconds to several minutes for big NC program.
*Note: The resulting part will be sectioned because of memory restrictions and for faster processing.
For restoring the source part press the "Zoom Previous" button.
Measurements
A tool has also been supplied for making measurements of the part. For making measurements press the "Measure' button" and then press the appropriate button.  Measurements are only available only on the Top View except for calculation of machining time and sections through vertical planes. To build sections through vertical planes press the "Measure"-"Section" button and input explicit coordinates of the first and second points and step value or move the cursor to the first position and press a left mouse button down.  While holding the button pull a "rubber band line" to the desired position.  Release the mouse button and correct the position of points as necessary.  When you are satisfied with the position of the section line, press the right mouse button and input a step value in the dialog box.  The section will appear on the screen. You can see real coordinates in the X,Y,Z box  by clicking at a point of the section.  You may zoom in on a section .You may also choose the 'coordinates' page and save X,Y,Z values in the file. 
*Note: The values of PART and REMOVED VOLUMES are approximate and relate to current display representation of part (taking into account all sections).
Starting with version 2.7, there is the "STL Compare" function. This function allows the user to perform a check of the cut model to 3D CAD model in STL format. For making comparison press the "STL Compare" button. The STL Compare dialog box appears. Load the STL file. You can see the following fields and the buttons:
dx,dy,dz and xa,ya,za are used for setting the STL orientation relatively to the program origin.
dx,dy,dz  indicate the STL origin relatively to the program origin.
xa(ya,za)  indicates the angle of STL rotation around the X(Y,Z)-axis. Press the "Show STL" button to show STL model and to make certain of STL position and orientation.
InTol - the tolerance value for the gouges.
OutTol - the tolerance value for the uncut areas.
Press the "Start" button to begin the comparison.
The process is slow, especially for big STL files. The gouges will be displayed in Red, uncut ares - in Yellow, and all area's within
tolerance - in Green colour. You can change the colours pressing the appropriate coloured buttons and choosing desired colour.
Settings
Through the 'Setup' button you can change and save the following
system parameters:
Mode of operation:
1. Solid: Graphically simulates the material removal process by updating the stock solid shape as the tool moves (by default).
2. Toolpath: Graphically updates only the toolpath with the tool image.  The machined part appears only when the user presses 'Pause' or 'Stop' button and then presses one of 'View' buttons.  This mode is much faster then mode 1.
3. Background: Fastest mode without dynamically graphical output.
Switching between these modes is possible at any time after pressing
'Pause'.
View: ISO, TOP, FRONT, LEFT, RIGHT, REAR
Tool View: enables or disables the tool on screen image.
View update step: determines step of updating the stock solid shape as the tool moves when Solid mode is On.
Trace step: amount of motions for trace mode when the tool moves incrementally
Dwell(milliseconds):dwell at the end of every tool motion for slowing the on screen tool speed
Warna : pengaturan warna palet. 
·         Catatan : anda dapat mengubah warna tampilan alat potong menggunakan cara  sebagai berikut :
Dengan  kombinasi tombol tekan "Ctrl-T".
Untuk mengubah tampilan warna alat potong secara sedetrhana dapat dilakukan dengan meng “klik” sel yang sesuai pada kolom warna.
Warna penampilan benda kerja bila terjadi tabrakan :  Secara grafis akan disimulasikan peristiwa tabrakan antara alat potong dengan benda kerja, apabila alat potong yang sedang kontak langsung dengan benda kerja bergerak dibawah perintah G00 (Rapid Traverse) . Eksekusi file NC akan berhenti pada blok kode di mana peristiwa tabrakan terjadi. 



http://sang-abdi.blogspot.com/2011/11/belajar-memprogram-cnc-simulator.html

Pengikut