Professional Documents
Culture Documents
OCX
Data Server Function (M198) with PC
McComm.OCX
Data Server Function (M198) with PC
for Professional A / 3 / 5
1/12
Makino Milling Machine Libraries (MML) McComm.OCX
Data Server Function (M198) with PC
Index
1 Introduction ........................................................................................................................................3
2 NC Parameters ....................................................................................................................................4
2.1 Fixed Parameter ...........................................................................................................................4
2.2 I/O Channel .................................................................................................................................4
3 Flow of Procedures ..............................................................................................................................5
4 Specification of McComm.ocx ..............................................................................................................7
4.1 Methods & Properties ...................................................................................................................7
MMm198Start(ByRef onumber As Long, ByRef fileName As String, ByVal arraySize As Integer, ByVal
synchroCNC As Boolean).....................................................................................................................7
MMm198Terminate() As Boolean .........................................................................................................8
MMgetM198DncSize(ByRef onumber As Long, ByRef fileName As String, ByRef dncSize As Long) ........9
MMgetM198DncStatus(ByRef onumber As Long, ByRef fileName As String, ByRef status As Integer).......9
MPm198Action As Boolean [Get].......................................................................................................9
MPm198DefDir As String [Get/Set]..................................................................................................10
MPm198DefExtension As String [Get/Set] .......................................................................................10
MPncpPrep As Boolean [Get/Set] .....................................................................................................10
MPdncTmpFname As String [Get/Set] ..............................................................................................11
4.2 Events .......................................................................................................................................11
MVm198Finish(ByVal errorNo As Long).............................................................................................11
MVm198DncFinish(ByVal onumber As Long, ByVal fileName As String, ByVal errorNo As Long) ..........11
MVm198DncSize(ByVal onumber As Long, ByVal fileName As String, ByVal size As Long) ................12
MVm198DncStatus(ByVal onumber As Long, ByVal fileName As String, ByVal status As Integer) ........12
2/12
Makino Milling Machine Libraries (MML) McComm.OCX
Data Server Function (M198) with PC
1 Introduction
The two methods which exist to transfer/execute NC programs from a PC without using CNC memory
are as follows;
CNC PC
O1000 O2000
: :
M198P2000 M99
:
M198P3001 O3000
: :
M30 M99
M198 operation can be used with manual functions such as cycle-start of NC program in CNC memory
with memory mode, cycle-start with MDI mode, and also functions that start execution of the NC
program automatically such as random operation of the Professional 3/5.
3/12
Makino Milling Machine Libraries (MML) McComm.OCX
Data Server Function (M198) with PC
2 NC Parameters
It is necessary to set the following NC parameters to the appropriate values to use the M198 function.
Refer to the Capt. 2 “Setting the Parameters (MDI)” in FANUC “PARAMETER MANUAL”.
It is necessary to set the I/O channel (to select I/O devices) to the following value to use with the M198
function.
I/O channel can be confirmed/changed in the CNC Setting screen (push [OFFSET SETTING]
[Setting]).
※ It is NOT necessary to turn off the MC power after changing this NC parameter.
4/12
Makino Milling Machine Libraries (MML) McComm.OCX
Data Server Function (M198) with PC
3 Flow of Procedures
The flows of basic procedures between client applications, McComm.ocx and CNC are shown as
follows;
The details of methods and events of McComm.ocx (MMm198Start(), MVm198DncFinish(), and so
on) are described in the next chapter.
5/12
Makino Milling Machine Libraries (MML) McComm.OCX
Data Server Function (M198) with PC
※ Status of (2) through (11) are called “Waiting for M198”, status of (4) through (7) are called
“Executing M198”.
※ If one main program includes multiple M198 blocks, step (4) through (9) will be repeated. If
multiple main programs are executed while waiting for M198, step (3) through (9) will be repeated.
※ It is not possible to execute M198 while using DNC operation. It is not possible to execute M198
during execution of an existing M198 operation (i.e. duplicate call of M198).
※ You cannot use IF, GOTO, WHILE in NC programs using M198 operation, as these NC programs
are not executed using CNC memory.
※ If the NC programs executing from DNC or M198 include M98 (sub program call), G65, G66
(macro call) blocks, the CNC searches and executes the specified programs in CNC memory, using
the same method as standard memory operation.
6/12
Makino Milling Machine Libraries (MML) McComm.OCX
Data Server Function (M198) with PC
4 Specification of McComm.ocx
4.1 Methods & Properties
7/12
Makino Milling Machine Libraries (MML) McComm.OCX
Data Server Function (M198) with PC
Example
Sub Func()
McComm.MMM198Start( … )
Exit Sub
ERR_TRAP:
Case 3400
End Select
End Sub
Notes
When using this function, it is necessary to set I/O channel of the CNC.
The onumber and filename arrays must use a 1 to 1 association.
The fileName method parameter must be specified with the full-path.
If onumber or filename are not specified (i.e. arraySize = 0), or if there is no O-number specified
with M198P**** in array onumber, the appropriate file name will be decided with MPm198DefDir
and MPm198DefExtension properties automatically.
MMm198Terminate() As Boolean
Remark
Release the waiting for M198 with MMm198Start().
Return Values
TRUE Release the waiting for M198.
FALSE Not waiting for M198, or executing M198.
8/12
Makino Milling Machine Libraries (MML) McComm.OCX
Data Server Function (M198) with PC
9/12
Makino Milling Machine Libraries (MML) McComm.OCX
Data Server Function (M198) with PC
10/12
Makino Milling Machine Libraries (MML) McComm.OCX
Data Server Function (M198) with PC
4.2 Events
11/12
Makino Milling Machine Libraries (MML) McComm.OCX
Data Server Function (M198) with PC
12/12