It is necessary to set the PMC simulation function of NCGuide for using the
FOCAS2 function.
2
The change of Node number(case of HSSB connection) or IP address(case of
Ethernet connection) are necessary for acquiring the library handle. Please
refer to "Allocates the Library handle" for acquisition of the Library handle.
And please refer to “1.2 Limitations” for other limitation.
1 INTRODUCTION
This manual describes how to use FOCAS2 library for NCGuide.
For the specification of NCGuide, please refer to "NCGuide CNC Simulation Function OPERATOR'S
MANUAL" and "NCGuide PMC Simulation Function OPERATOR'S MANUAL" supplied in the
following NCGuide DVD disk.
And for specification of FOCAS2 Library, please refer to the “data window libraryspecification”
supplied in CNC Application Development Kit (A08B-9010-J555#ZZ12).
1.1 Features
FOCAS2 application made by MTB can be executed without actual machine and CNC. (NOTE1)
FOCAS2 application executed on NCGuide can be executed on actual machine without
modification. (NOTE2)
This function corresponds to the High Speed Serial Bus(HSSB) connection and the Ethernet(equal
with embedded Ethernet) connection.
- 3 -
1.INTRODUCTION
NOTE
FOCAS2 function on NCGuide and CNC does not have complete
interchangeability. Therefore, please do the operation test of FOCAS2
application on actual CNC after confirming the application on NCGuide.
1.2 Limitations
NCGuide differs from actual CNC, because of the difference of CPU hardware performance and of
configuration of servo/spindle, or so on.
So, all function executable in CNC cannot be executed.
The main dissimilitude of NCGuide and CNC is as follows.
CNC simulation function and PMC simulation function of the NCGuide have dissimilitude with
CNC. Please refer to ”NCGuide CNC Simulation Function OPERATOR’S MANUAL”
and ”NCGuide PMC Simulation Function OPERATOR’S MANUAL” for each dissimilitude.
When the FOCAS2 function which is not prepared CNC option in NCGuide is executed, the
function returns EW_NOOPT(6).
Please refer to “9.1 OPTION SETTINGS” of ”NCGuide CNC Simulation Function OPERATOR’S
MANUAL” for available CNC options.
- 4 -
2.Operating environment
2 Operating environment
The environment that NCGuide operate is necessary.
Please refer to “3. OPREATING ENVIRONMENT” of “NCGuide CNC Simulation Function
OPERATOR'S MANUAL” for operating environment of NCGuide.
- 5 -
3.Settings
3 Settings
The required setting for executing FOCAS2 Application on NCGuide is explained.
3.1 Options
"Extended driver and library function" option must be set for executing FOCAS2 function on NCGuide.
To enable this function, the option setting tool (OptionSetting.exe) is started after starting NCGuide.
Check the check box of the "Extended driver and library function" and finish the option setting tool.
And restart NCGuide.
Please refer to "9.1 OPTION SETTINGS" of "NCGuide CNC Simulation Function OPERATOR'S
MANUAL" for use of the option setting tool.
It is not necessary to set the option for Ethernet connection, because Ethernet connection is equal to
embedded Ethernet function.
3.2 CNC Parameters
The CNC parameters to use FOCAS2 function are the same as actual CNC. Please refer to specification
of each function of “data window library specification” in CNC Application Development Kit
(A08B-9010-J555#ZZ12) for detail of setting.
- 6 -
4.Execution method of FOCAS2 application
4 Execution method of FOCAS2 application
To execute FOCAS2 function on NCGuide, it is necessary to install "FOCAS2 library for NCGuide".
FOCAS2 library for NCGuide is included in "FOCAS2 Library¥Fwlib" folder of CNC Application
Development Kit (A08B-9010-J555#ZZ12).
4.1 Installation of FOCAS2 Libraries
FOCAS2 Libraries for NCGuide are as follows. The libraries except HSSB connection use the same
library as actual CNC.
For 32 bit version FOCAS2 library
Fwlib32.dll : CNC/PMC Data window control library
FwlibNCG.dll : Processing library for HSSB connection : Exclusive use for NCGuide of
FS31i/32i/35i and FS0i-F
Fwlib0DN.dll : Processing library for HSSB connection : Exclusive use for NCGuide of FS0i-D
Fwlibe1.dll : Processing library for Ethernet connection
For 64 bit version FOCAS2 library
Fwlib64.dll : CNC/PMC Data window control library
FwlibNCG64.dll : Processing library for HSSB connection : Exclusive use for NCGuide of
FS31i/32i/35i and FS0i-F
Fwlib0DN64.dll : Processing library for HSSB connection : Exclusive use for NCGuide of FS0i-D
Fwlibe64.dll : Processing library for Ethernet connection
Please copy the library into the folder of the system environment variable "path" of Windows or into the
same folder as the FOCAS2 application.
Installing to the Windows¥System32 folder is recommended.
Additionally, the header file and the import library necessary to develop the FOCAS2 application are the
same as actual CNC.
4.2 HSSB driver
The installation of the HSSB driver is unnecessary.
4.3 Ethernet connection
The Ethernet port is mounted in the personal computer, and it is necessary to install the network driver.
- 7 -
4.Execution method of FOCAS2 application
NOTE
The screen for the Ethernet setting is prepared on the screen of NCGuide as
well as actual CNC, but when FOCAS2/Ethernet function of NCGuide is used,
this setting is invalid.
4.4 Allocates the Library handle
To execute FOCAS2 application on NCGuide, it is necessary to get the library handle as well as actual
CNC.
1) HSSB connection
The library handle is got by the following functions.
cnc_allclibhndl : Allocate the library handle
cnc_allclibhndl2 : Allocate the library handle(for multi-connection)
The node number of the NCGuide for FS31i/32i/35i, FS0i-F and FS0i-D are "9".
If you use cnc_allclibhndl, please specify the Node number "9" by cnc_setdefnode (Set the default
node number).
2) Ethernet connection
The library handle is got by the following function.
cnc_allclibhndl3 : Allocate the library handle(for Ethernet connection)
For connecting IP address, specify the IP address from which NCGuide is executed.
Please refer to the “10.2 ETHERNET SETTING IN PC” of "NCGuide PMC Simulation Function
OPERATOR'S MANUAL" for setting of FOCAS2/Ethernet(Port number) of NCGuide.
- 8 -
5.FOCAS2 Functions
O
Available function on NCGuide.
X
Not available function on NCGuide.
-
Not supported function on FS31i/32i/35i, FS0i-F, FS0i-D.
Function Name
Brief description
FS31i/32i/35i,
FS0i-F
FS0i-D
HSSB
Ether
HSSB
Ether
1
cnc_rdnodenum
Read the number of node
X - X - 2
cnc_rdnodeinfo
Read the information of node
X - X - 3
cnc_setdefnode
Set the default node number
O - O - 4
cnc_allclibhndl
Allocate library handle
O - O
-
5
cnc_allclibhndl2
Allocate the library handle(for
multi-connection)
O - O
-
6
cnc_allclibhndl3
Get the library handle
- O - O 7
cnc_freelibhndl
Free library handle
O O O O 8
cnc_settimeout
Set timeout interval
- O - O 9
cnc_getlibopt
Get a library option
O - O - 10
cnc_setlibopt
Set a library option
O - O
-
5 FOCAS2 Functions
The specification of the FOCAS2 library for NCGuide is the same as the description of "Data window
library specification" of CNC Application Development Kit (A08B-9010-J555#ZZ12).
The reading/writing of inner information displayed on the CNC screen of NCGuide is possible.
When data is written, the data is reflected in the NCGuide at once.
The main FOCAS2 function which is not available function on NCGuide is as follows.
Function related to data server
Function related to servo learning data
Function related to Unsolicited messaging function
Function related to PROFIBUS-DP
The available FOCAS2 function on NCGuide is as follows.
“HSSB” on the list means HSSB connection and “Ether” means Ethernet connection.
5.1 CNC : Function related to library handle, node
- 9 -
5.FOCAS2 Functions
Function Name
Brief description
FS31i/32i/35i,
FS0i-F
FS0i-D
HSSB
Ether
HSSB
Ether
1
cnc_actf
Read actual axis feedrate(F)
O O O O 2
cnc_absolute
Read absolute axis position
O O O O 3
cnc_absolute2
Read absolute axis position 2
O O O O 4
cnc_machine
Read machine axis position
O O O O 5
cnc_relative
Read relative axis position
O O O O 6
cnc_relative2
Read relative axis position 2
O O O O 7
cnc_distance
Read distance to go
O O O O 8
cnc_rdposition
Read position information
O O O
O
9
cnc_rdaxisdata
Read various data relating servo axis or
spindle axis
O O O
O
10
cnc_skip
Read skip position
O O O O 11
cnc_srvdelay
Read servo delay value
O O O O 12
cnc_accdecdly
Read acceleration/deceleration delay value
O O O O 13
cnc_rddynamic
Read all dynamic data
O O O O 14
cnc_rddynamic2
Read all dynamic data (2)
O O O O 15
cnc_acts
Read actual spindle speed(S)
O O O O 16
cnc_acts2
Read actual spindle speed(S) (2)
X X X X 17
cnc_rdspcss
Read constant surface speed data
X X X X 18
cnc_rdspeed
Read speed information
O O O O 19
cnc_wrrelpos
Set origin/preset relative axis position
O O O O 20
cnc_prstwkcd
Preset work coordinate
O O O O 21
cnc_rdmovrlap
Read manual overlapped motion value
X X X X 22
cnc_canmovrlap
Cancel manual overlapped motion value
X X X X 23
cnc_rdhndintrpt
Read manual overlapped motion information
X X X X 24
cnc_rdspload
Read load information of serial spindle
X X X X 25
cnc_rdspmaxrpm
Read maximum r.p.m. ratio of serial spindle
X X X X 26
cnc_rdspgear
Read gear ratio of serial spindle
X X X X 27
cnc_rdsvmeter
Read servo load meter
O O O O 28
cnc_rdspmeter
Read spindle load meter
X X X X 29
cnc_rdaxisname
Read axis name
O O O
O
30
cnc_exaxisname
Read the name of controlled axis and
spindle name
O O O
O
31
cnc_rdspdlname
Read spindle name
O O O
O
32
cnc_rd5axmandt
Read the data for the manual feed for 5-axis
machining
X - X - 33
cnc_rd5axovrlap
Read the machine axis movement for the
manual feed for 5-axis machining
X - X
-
34
cnc_clr5axpls
Clear the pulse amount for manual feed for
5-axis machining
X - X
-
5.2 CNC : Function related to controlled axis/spindle
- 10 -
5.FOCAS2 Functions
Function Name
Brief description
FS31i/32i/35i,
FS0i-F
FS0i-D
HSSB
Ether
HSSB
Ether
1
cnc_dwnstart
Start downloading NC program
O - O
- 2 cnc_download
Download NC program
O - O
- 3 cnc_cdownload
Download NC program(conditional)
O - O
- 4 cnc_dwnend
End of downloading NC program
O - O
- 5 cnc_dwnstart3
Start downloading NC program (3)
O O O
O 6 cnc_download3
Download NC program (3)
O O O
O 7 cnc_dwnend3
End of downloading NC program (3)
O O O
O 8 cnc_dwnstart4
Start downloading NC program (4)
O O O
O 9 cnc_download4
Download NC program (4)
O O O
O
10
cnc_dwnend4
End of downloading NC program (4)
O O O
O
11
cnc_vrfstart
Start verification of NC program
X - X
-
12
cnc_verify
Verify NC program
X - X
-
13
cnc_cverify
Verify NC program(conditional)
X - X
-
14
cnc_vrfend
End of verification
X - X
-
15
cnc_vrfstart4
Start verification of NC program(4)
O O O
O
16
cnc_verify4
Verify NC program(4)
O O O
O
17
cnc_vrfend4
End of verification(4)
O O O
O
18
cnc_dncstart2
Start downloading DNC program (2)
O X O
X
19
cnc_dnc2
Download DNC program (2)
O X O
X
20
cnc_dncend2
End of downloading DNC program (2)
O X O
X
21
cnc_rddncdgndt
Read the diagnosis data of downloading DNC
program
O - O
-
22
cnc_upstart
Start uploading NC program
O O O
O
23
cnc_upload
Upload NC program
O O O
O
24
cnc_cupload
Upload NC program(conditional)
O O O
O
25
cnc_upend
End of uploading NC program
O O O
O
26
cnc_upstart3
Start uploading NC program (3)
O O O
O
27
cnc_upload3
Upload NC program (3)
O O O
O
28
cnc_upend3
End of uploading NC program (3)
O O O
O
29
cnc_upstart4
Start uploading NC program (4)
O O O
O
30
cnc_upload4
Upload NC program (4)
O O O
O
31
cnc_upend4
End of uploading NC program (4)
O O O
O
32
cnc_search
Search specified program
O O O
O
33
cnc_delall
Delete all programs
O O O
O
34
cnc_delete
Delete specified program
O O O
O
35
cnc_rdprogdir2
Read program directory (2)
O O O
O
36
cnc_rdprogdir3
Read program directory (3)
O O O
O
37
cnc_rdproginfo
Read program information
O O O
O
38
cnc_rdprgnum
Read program number under execution
O O O
O
39
cnc_exeprgname
Read program name under execution
O O O
O
40
cnc_rdseqnum
Read sequence number under execution
O O O
O
41
cnc_seqsrch
Search specified sequence number
O O O
O
42
cnc_rewind
Rewind cursor of NC program
O O O
O
43
cnc_rdblkcount
Read block counter
O O O
O
44
cnc_rdexecprog
Read program under execution
O O O
O
45
cnc_wrmdiprog
Write program for MDI operation
O O O
O
46
cnc_rdmdipntr
Read execution pointer for MDI operation
O O O
O
47
cnc_wrmdipntr
Write execution pointer for MDI operation
O O O
O
48
cnc_rdproctime
Read processing time stamp data
O - O
-
49
cnc_rdprgdirtime
Read directory for processing time stamp data
O - O
-
50
cnc_copyprog
Copy program
O O O
O
51
cnc_renameprog
Change program number
O O O
O
5.3 CNC : Function related to CNC program
- 11 -
5.FOCAS2 Functions
Function Name
Brief description
FS31i/32i/35i,
FS0i-F
FS0i-D
HSSB
Ether
HSSB
Ether
52
cnc_condense
Condense program
O O O
O
53
cnc_rdprogline
Read NC program by line basis
O - O
-
54
cnc_rdprogline2
Read NC program by line basis(2)
O - O
-
55
cnc_wrprogline
Write NC program by line basis
O - O
-
56
cnc_delprogline
Delete NC program by line basis
O - O
-
57
cnc_searchword
Search string in NC program
O O O
O
58
cnc_searchresult
Get result of string search in NC program
O O O
O
59
cnc_rdactpt
Get execution pointer
O - O
-
60
cnc_wractpt
Set execution pointer
O - O
-
61
cnc_rdpdf_drive
Read information of Program memory drive
O O O
O
62
cnc_rdpdf_inf
Read information Program memory file
O O O
O
63
cnc_rdpdf_curdir
Read information of current folder
O O O
O
64
cnc_wrpdf_curdir
Set current folder
O O O
O
65
cnc_rdpdf_subdir
Read information of subfolder
O O O
O
66
cnc_rdpdf_alldir
Read file information
O O O
O
67
cnc_rdpdf_subdirn
Read number of subfolders or files
O O O
O
68
cnc_pdf_add
Create folder or file
O O O
O
69
cnc_pdf_del
Delete folder or file
O O O
O
70
cnc_pdf_delall
Delete all programs
O O O
O
71
cnc_pdf_rename
Rename folder or file
O O O
O
72
cnc_pdf_copy
Copy file
O O O
O
73
cnc_pdf_move
Move file
O O O
O
74
cnc_pdf_cond
Rearrange the contents of the program
O O O
O
75
cnc_wrpdf_attr
Change attribute of folder or file
O O O
O
76
cnc_pdf_rdmain
Read main program
O O O
O
77
cnc_pdf_slctmain
Select main program
O O O
O
78
cnc_rdpdf_line
Read NC program by line basis(For arbitrary
file name)
O - O
-
79
cnc_wrpdf_line
Write NC program by line basis(For arbitrary
file name)
O - O
-
80
cnc_pdf_delline
Delete NC program by line basis(For arbitrary
file name)
O - O
-
81
cnc_pdf_searchword
Search string in NC program(For arbitrary file
name)
O O O
O
82
cnc_pdf_searchresult
Get result of string search in NC program(For
arbitrary file name)
O O O
O
83
cnc_pdf_rdactpt
Get execution pointer(For arbitrary file name)
O O O
O
84
cnc_pdf_wractpt
Set execution pointer(For arbitrary file name)
O O O
O
- 12 -
5.FOCAS2 Functions
Function Name
Brief description
FS31i/32i/35i,
FS0i-F
FS0i-D
HSSB
Ether
HSSB
Ether
1
cnc_rdtofs
Read tool offset value
O O O O 2
cnc_wrtofs
Write tool offset value
O O O O 3
cnc_rdtofsr
Read tool offset value(area specified)
O O O O 4
cnc_wrtofsr
Write tool offset value(area specified)
O O O O 5
cnc_rdtofsinfo
Read tool offset information
O O O O 6
cnc_rdtofsinfo2
Read tool offset information (2)
O O O
O
7
cnc_tofs_rnge
Read the effective setting range of tool offset
value
O O O
O
8
cnc_rdzofs
Read work zero offset value
O O O O 9
cnc_wrzofs
Write work zero offset value
O O O O 10
cnc_rdzofsr
Read work zero offset value(area specified)
O O O O 11
cnc_wrzofsr
Write work zero offset value(area specified)
O O O O 12
cnc_rdzofsinfo
Read work zero offset information
O O O
O
13
cnc_zofs_rnge
Read the effective setting range of work zero
offset value
O O O
O
14
cnc_rdparam
Read parameter
O O O O 15
cnc_wrparam
Write parameter
O O O O 16
cnc_rdparam3
Read parameter(3)
O O O O 17
cnc_rdparar
Read parameter(area specified)
O O O O 18
cnc_wrparas
Write parameter(area specified)
O O O O 19
cnc_rdparam_ext
Read random number parameters
O O O O 20
cnc_rdparainfo
Read parameter information
O O O
O
21
cnc_rdparanum
Read minimum, maximum, total number of
parameter
O O O
O
22
cnc_rdset
Read setting data
O O O O 23
cnc_wrset
Write setting data
O O O O 24
cnc_rdsetr
Read setting data(area specified)
O O O O 25
cnc_wrsets
Write setting data(area specified)
O O O O 26
cnc_rdsetinfo
Read setting data information
O O O
O
27
cnc_rdsetnum
Read minimum, maximum, total number of
setting data