[go: up one dir, main page]

0% found this document useful (0 votes)
1K views137 pages

MML Reference Pro5 Eng

This document provides a reference manual for the Makino Milling Machine Libraries (MML) used to interface with Makino Machining Center control software Professional 5. It describes the requirements, library files, parameters, and functions for communicating between an external PC and Professional 5 running on the machining center display unit. The libraries allow accessing CNC data and machine status via functions that send and receive messages over Windows Message Queue or Socket connections.

Uploaded by

Erich Kreiseder
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1K views137 pages

MML Reference Pro5 Eng

This document provides a reference manual for the Makino Milling Machine Libraries (MML) used to interface with Makino Machining Center control software Professional 5. It describes the requirements, library files, parameters, and functions for communicating between an external PC and Professional 5 running on the machining center display unit. The libraries allow accessing CNC data and machine status via functions that send and receive messages over Windows Message Queue or Socket connections.

Uploaded by

Erich Kreiseder
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 137

Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

Makino Milling Machine Libraries (MML)


Reference Manual
for Professional 5

MAKINO MILLING MACHINE CO., LTD.

System Development Section

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 1/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

Edition Date Contents Editor


st th
1 14 July 2004 New created English Version. T.YAMAGUCHI
nd th
2 8 April 2005 Tool data item is added. H.HEISHI
The function to access the work data is added.
rd
3 23 May 2005 The function to access on-duty/off-duty time is added. H.HEISHI
th th
4 19 Sep. 2005 The contents of WinSock connection are added. T.YAMAGUCHI
The contents of mdfum.dll and mdncinf.dll are added.
th th
10 9 May 2006 The explanation is add to T.MAKINO
mdpro5_chk_system_mach_finish().
th th
11 21 Nov. 2006 The contents of mdpro5_tls_potno() is added. T.YAMAGUCHI
th th
12 26 Jan. 2007 Add the mdpro5_atc_random_magazine(). M.SUGA
Add the Abstract contents of mdpro5_spindle_tool() and
mdpro5_next_tool()
 Add the description of the Tool cutter data item (133). M.SUGA
th th
13 14 Nov. 2007
 Modify description of LpdwFinCondition in
mdpro5_chk_system_mach_finish function.
14th 14th Feb. 2008  The description of T.YAMAGUCHI
mdpro5_chk_system_mach_finish() is modified.
th th
15 27 Jan. 2009 Correct misentris as follows; T.YAMAGUCHI
 mdncinf_spindle_load_mter
 mdncinf_spindle_load_meter
 mdncinf_spindle_moter
 mdncinf_spindle_motor
th th
16 16 Jun 2009 Add the mdpro5_get_arbitrary_machine_status() M.SUGA
th th
17 8 Feb 2011 Add the mdncinf_spindle_load_meter2(LPDWARD T.Mizukami
load).
Add the mdncinf_servo_meter(short *data_num, long
*data).
 Add the description of the Tool data item (20)-(49).
th rd
18 3 Oct 2012 M.SUGA
 Add the description of the Tool cutter data item
(134)-(144).
 Add the description of the pallet data item (22)-(36).
 Add the mdpro5_max_tls()
 Add the mdpro5_tls_potno2()
 Add the description of the Tool data item (52)-(57).
th th
19 7 Jun 2013 M.SUGA
 Change the value of the Tool data item (16), (25) and
(26).
 Add the description of the Tool cutter data item
(159)-(163).
 Change the value of the Tool cutter data item (122).
th th
20 18 Dec 2013 Add the description of Tool data item (58)-(61) M.SUGA

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 2/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

Index

1 Introduction ............................................................................................................................. 4

2 Requirement ............................................................................................................................ 4

3 Library Files ............................................................................................................................. 8

4 MOS Parameters ..................................................................................................................... 9

5 Professional 5 Parameters ................................................................................................... 10

6 Function Specifications (MdPro5.dll) ..................................................................................11

7 Function Specifications (MdNcinf.dll) ................................................................................ 73

8 Functions List ...................................................................................................................... 124

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 3/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

1 Introduction

Professional 5 is the software to control MAKINO Machining Center, and is running in Windows CE
embedded as display unit.
This document describes how to access Machining Center with Professional 5 from external Windows
PC.

2 Requirement

Either Microsoft Message Queue (MSMQ) or Windows Socket (WinSock) is used to send/receive data
between MOS PC and Professional 5.
WinSock connection requires the following softwares.

PC-side MML 0225 or later.


MC-side Professional 5 (FS160is/180is) AA- or AB-0100-AA21 SP2, or later.
(FS300is/310is) All versions.
MSMQ connection requires MSMQ installation into MOS PC. MSMQ is bundled to Windows
2000/XP, and not supported in Windows 95/98/Me/NT.
MSMQ connection is not supported in Professional 5 with FS300is/310is.

 How to Install MSMQ (Windows 2000)

(1) Double-click “Add/Remove Programs” of


“Control Panel”.

(2) Click “Add/Remove Windows Components”.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 4/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5
(3) Check “Message Queuing Services”, and push
[Next].

(4) In the “Message Queuing Type”, select


“Independent client”.

(5) In the “Message Queuing Server”, select


“Message Queuing will not access a directory
service”.

(6) Insert CD of Windows2000 if requested, and


[OK] is pushed.

(7) When the installation is completed, the


following screens are displayed. Push [Finish].

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 5/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

 How to Install MSMQ (Windows XP)

(1) Double-click “Add/Remove Programs” of


“Control Panel”.

(2) Click “Add/Remove Windows Components”.

(3) Select “Message Queuing “ and push [Details].

(4) Don’t check “Active Directory Integration.


Check only “Common” and “Triggers”, then
push [OK].

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 6/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

(5) “Message Queuing” checkbox becomes shaded.


Push [Next].

 If “Active Directory Integration” is already checked


(installed), check off “Message Queuing” and push
[Next] to uninstall “Message Queuing”. Then back
to step (4) and re-install only necessary modules.

(6) When the installation is completed, the


following screens are displayed. Push [Finish].

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 7/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

3 Library Files

 PcDef.h
Header file in that MML constants and structures are defined.

 MdFum.dll
Library containing general-purpose functions for which communication is not performed with
CNC.
 MdFum.lib
Mdfum.dll import library.
 MdFum.vch
Prototype declaration header file for Mdfum.dll C/C++ functions.

 MdNcinf.dll
Library to access CNC data.
 MdNcinf.lib
MdNcinf.dll import library.
 MdNcinf.vch
Prototype declaration header file for MdNcinf.dll C/C++ functions.

 Pro5MosDef.h
Header file in that data values to retrieve/set are defined as MACRO (#define).
 Pro5MosMsg.h
Header file in that data structures to be sent/received between MOS and Professional 5 are
defined.
 MdPro5.dll
DLL file itself to access Professional 5.
 MdPro5.lib
Import library file.
 MdPro5.vch
Prototype declaration file of export functions for Visual C++.

NOTE:
Every function of MML uses __stdcall naming conversion. Therefore, It is necessary
for C++ programming to use extern “C” explicitly, as follows:

extern “C”
{
#include <MdPro5.vch>
}

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 8/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

4 MOS Parameters

It is necessary to set the following MOS parameters, to connect Professional 5.


Set the appropriate vaules in MACHINE*** section as follows:
(***: Machine Number, with 3-digit, with leading 0)

Format: (MOS parameter name) = (Setting value)

MOS Parameter Name Descriptions


PC_NAME Computer Name of MOS PC.
Set comuter name of Windows PC in that MdPro5.dll is installed.
CONTROLLER_TYPE Type of Controll Software.
Set “9” indicating Professional 5.
NODE_NO Node number.
PRO5_PC_NAME Computer Name of Windows CE.
Refer to “Communication”  “Device” in Windows CE.
In the case of WinSock connection, append “/11212” to the tail of
Devive name.
PRO5_MSMQ_SEND_TIMEOUT Time-out interval, in milliseconds, from when MOS sends
MSMQ message, to when Professional 5 receives the message.
If set to 0, time-out event never occurs.
This setting depends on LAN environment. By default, set to
“10000”.
PRO5_MSMQ_REPLY_TIMEOUT Time-out interval, in milliseconds, from when Professional 5
sends MSMQ message, to when MOS receives the message.
If set to 0, time-out event never occurs.
This setting depends on LAN environment. By default, set to
“10000”.
PRO5_COMM_LOG_LEVEL Type of communication log written into the file.
Set to the one or more of the following values:
0: NOT written into the file.
1: basic information of send/receive data (label, date&time, etc.).
2: response information of send/receive data.
4: dump information of send/receive data.
By default, set to “3”. If you want to run the software with the
task that retrieve the MC information frequently, set to “1”.

Refer to the following document for Setting procedure and Node Number:
“Makino Milling Machine Libraries (MML) Dynamic Link Library (DLL) Reference Manual”
Chap.2 Node Numbers
Chap.3 MOS Parameters

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 9/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

5 Professional 5 Parameters

Professional 5 parameters associated with MOS are as follows:

No. Descriptions Default


12034 Machining Abort for System is automatically sent to MOS when DNC 0
machining from MOS is canceled by [NC Reset] key.
0: NOT Perform.
1: Perform (only [NC Reset] can report Machining Abnornally).
12035 [Power Out] switch is enable when system mode is ON 0
0: Disable
1: Enable (When power out instruction is sent from MOS, power out is not
performed if [Power Out] switch is OFF.)
49204 MOS Connection Log Setting 00000000
Bit0: Send/Receive data log
Bit1: Send/Receive response log
Bit2: Send/Receive data dump log
By default, set to “0” to prevent from bad influence to the machining.
49205 Time-out interval to read return message stored in process result of demand 10000
message by MOS. [ms]
0: Do not detect time over

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 10/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

6 Function Specifications (MdPro5.dll)

The most of MML functions return BOOL. If the function returns FALSE (i.e. fails), call the following
functions to get error information:

LONG mdpro5_GetLastSubError();
Abstract
Retrieves the error number indicating immediate cause by which last DLL function failed.
Arguments
None.
Return Values
Value #define in Pro5MosMsg.h Contents
0 PMS_SUCCESS Succeeded without error.
1 to 99: Errors detected by Professional 5.
1 PMS_PRO5_MSG_LABEL MSMQ message label (function name) is invalid. *
2 PMS_PRO5_NO_QUEUE (Reserved)
3 PMS_PRO5_VERSION MSMQ message label (function version) is invalid. *
4 PMS_PRO5_BODY_SIZE MSMQ data size is invalid. *
5 PMS_PRO5_BUSY Cannot execute because NC is processing.
6 PMS_PRO5_DATA Specified value is invalid
7 PMS_PRO5_MODE Cannot execute because MC-side operation mode (NC
operation, system, etc) is not appropriate.
8 PMS_PRO5_DUPLICATION Previous machining procedure commanded by MOS is
not finished yet. (i.e. duplicate commanded).
9 PMS_PRO5_TIMEOUT (Reserved)
10 PMS_PRO5_STATUS Cannot execute because Machine status (except mode)
is not appropriate.
11 PMS_PRO5_NO_OPTION Cannot execute because of the lack of NC options or
of MC options.
100 to 199: Errors detected by MOS.
100 PMS_MOS_NODE_NO mdpro5_set_node() is not called/succeeded yet.
101 PMS_MOS_MSG_LABEL MSMQ message label (function name) is invalid. *
102 PMS_MOS_NO_QUEUE (Reserved)
103 PMS_MOS_VERSION MSMQ message label (function version) is invalid. *
104 PMS_MOS_BODY_SIZE MSMQ data size is invalid. *
105 PMS_MOS_BUSY Previous message sending/receiving in the same thread
is not finished yet. This error rarely occurs. Contact to
MAKINO Service Senter.
106 PMS_MOS_DATA Invalid argument/parameters.
107 PMS_MOS_SND Failed in sending message to Professional 5.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 11/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

108 PMS_MOS_RCV There is no response from Professional 5 after


specified time-out interval was elapsed. Confirm as
follows:
 Professional 5 is running.
 Setting of MOS parameter “PRO5_PC_NAME”
is appropriate.
If this error rarely occurs while professional 5 is
running, adjust the settings of MOS parameters
“PRO5_MSMQ_SEND_TIMEOUT” and
“PRO5_MSMQ_REPLY_TIMEOUT”.
109 PMS_MOS_TIMEOUT (Reserved)
110 PMS_MOS_INTERNAL Internal error. Generally, some errors raised in
Windows API.
 Versions betweens Professional 5 and MOS seems no correspondence. Contact to MAKINO Field
Technical Service.

LONG mdpro5_GetLastMainError();
Abstract
Retrieves the unique error number to detect the point where the last error occurred.
Arguments
None.
Return Values
Depends on the last-executed function.
Refer to the following specifications of each function.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 12/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdpro5_set_node(
LONG lNodeNo,
LONG lDevSymbol);
Abstract
Your application must call this function at first after Professional 5 started, to retrieve static data
of connected MC, to retrieve MOS parameters, and to create MSMQ on MOS PC.
Arguments
lNodeNo [Set] Specify node number registered in MOS parameter.
LDevSymbol [Set] If more than one node numbers are equal to lNodeNo in device
sections of MOS parameters, specify one of the following device
types.
VHC (=1): Vehicle.
MCW (=3): Machining Center.
WSS (=5): Work Setting Station.
If lNodeNo is unique in MOS parameters, you can specify 0.
Return Values
TRUE Succeeded
FALSE Failed
Remarks
 It is necessary to set the following MOS parameters to appropriate values:
“PC_NAME”
“CONTROLLER_TYPE”
“NODE_NO”
“PRO5_PC_NAME”
“PRO5_MSMQ_SEND_TIMEOUT”

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 13/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdpro5_software_info(
LPSTR szPlatform,
LPSTR szSeries,
LPSTR szVersion,
LPSTR szServicePack,
LPSTR szMcName);
Abstract
Retrieves the series and version of Professional 5.
Arguments
szPlatform [Get] Pointer to a string with maximum 5 characters (including the
terminating null character), indicating the series of NC and
Windows CE.
SzSeries [Get] Pointer to a string with maximum 9 characters (including the
terminating null character), indicating the series of MC.
SzVersion [Get] Pointer to a string with maximum 9 characters (including the
terminating null character), indicating the version.
SzServicePack [Get] Pointer to a string with maximum 37 characters (including the
terminating null character), indicating the special release (such as
“SP1”).
SzMcName [Get] Pointer to a string with maximum 37 characters (including the
terminating null character), indicating the MC model (such as
“V33”, “V56”).
Return Values
TRUE Succeeded
FALSE Failed
Remarks
 Set to NULL for the arguments of unnecessary information.
 Generally, a set of szPlatform and szSeries is the series of Professional 5.
 Genarally, a set of szVersion and szServicePack is the version of Professional 5.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 14/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdpro5_get_mcpara(
LPDWORD lpdwParaNo,
LPLONG lplValue,
DWORD dwSumArray);
Abstract
Retrieves the settings of specified MC parameter(s).
Arguments
lpdwParaNo [Set] Pointer to the array, filled with the numbers of MC parameters to
retrieve.
LplValue [Get] Pointer to the array, filled with the settings of MC parameters.
DwSumArray [Set] Specify the number of elements of lpdwParaNo and lplValue.
Return Values
TRUE Succeeded
FALSE Failed
Remarks
 If specified MC parameter doesn’t exist, this function returns TRUE, and lplValue is filled
with 0.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 15/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdpro5_max_atc_magazine(
LPDWORD lpdwSumActualMgzn,
LPBOOL lpfOutMcMgzn);
Abstract
Retrieves the count of ATC magazines.
Arguments
lpdwSumActualMgzn [Get] Filled with the count of ATC magazines。
LpfOutMcMgzn [Get] Filled with the flag indicating whether “Outside Tools” exist.
Return Values
TRUE Succeeded
FALSE Failed
Remarks
 Set to NULL for the arguments of unnecessary information.
 “Outside Tools” is the storage area of tools data outside of ATC magazine. If MC parameter
No.12012 “No. of the Outside Tools” is set, lpfOutMcMgzn filled with TRUE.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 16/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdpro5_atc_magazine_info(
DWORD dwMgznNo,
LPDWORD lpdwMaxPotNo,
LPLONG lplMgznType,
LPDWORD lpdwEmptyPotNo);
Abstract
Retrieves the information of ATC magazine (count of tools, type, etc).
Arguments
dwMgznNo [Set] Specify the ATC magazine number.
Specify PMC_MAGAZINE_OUTMC (=0) defined in
<Pro5MosDef.h> to retrieve outer tools.
LpdwMaxPotNo [Get] Filled with the count of tools.
LplMgznType [Get] Filled with the type of ATC magazine.
 PMC_ATC_MGZN_TYPE_CHAIN (=1)
Chain type
 PMC_ATC_MGZN_TYPE_MATRIX (=2)
Matrix type
 PMC_ATC_MGZN_TYPE_DISC (=3)
Disc type.
If dwMgznNo is PMC_MAGAZINE_OUTMC, filled with 0.
LpdwEmptyPotNo [Get] In the case of V-series, filled with 0.
Return Values
TRUE Succeeded
FALSE Failed
Remarks
 Set to NULL for the arguments of unnecessary information.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 17/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdpro5_tool_info(
LPBOOL lpfInchUnit,
LPDWORD lpdwFtnFig,
LPDWORD lpdwItnFig,
LPDWORD lpdwPtnFig,
LPDWORD lpdwFtnPtnManageType);
Abstract
Retrieves the tool information (unit, effective digits, etc).
Arguments
lpfInchUnit [Get] Filled with the flag indicating whether length/diameter of
tools are measured in inches:
TRUE: inch
FALSE: mm
lpdwFtnFig [Get] Filled with effective digits of FTN (Functional Tool
lpdwItnFig Numer), ITN (Individual Tool Number), PTN (Program
lpdwPtnFig Tool Number).
LpdwFtnPtnManageType [Get] Filled with the method how to decide next tool.
=0: FTN is tool type number.
=1: PTN is tool type number.
=2: tool type numbers are not used. (Spare tool change
function is disabled).
Return Values
TRUE Succeeded
FALSE Failed
Remarks
 Set to NULL for the arguments of unnecessary information.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 18/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdpro5_apc_info(
LPLONG lplApcArmType,
LPDWORD lpdwMgznPalletCount,
LPDWORD lpdwOutPalletCount,
LPDWORD lpdwFacePerPallet);
Abstract
Retrieve the information of Pallet Changer.
Arguments
lplApcArmType [Get] Filled with the type of Pallet Changer Arm.
 PMC_APC_TYPE_NO_APC (=0)
Without Pallet Changer.
 PMC_APC_TYPE_TURN (=1)
Turn type.
 PMC_APC_TYPE_SHUTTLE (=2)
Shuttle type.
LpdwMgznPalletCount [Get] Filled with the count of pallets in the magazine.
LpdwOutPalletCount [Get] Filled with the count of pallets out of magazine.
LpdwFacePerPallet [Get] Filled with the count of faces per Pallet.
Return Values
TRUE Succeeded
FALSE Failed
Remarks
 Set to NULL for the arguments of unnecessary information.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 19/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdpro5_chk_system_mode(
LPBOOL lpfSysMode);
Abstract
Retrieves the system mode.
Arguments
lpfSysMode [Get] Filled with system mode (ON/OFF).
TRUE: ON
FALSE: OFF
Return Values
TRUE Succeeded
FALSE Failed

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 20/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdpro5_chk_maintenance_mode(
LPBOOL lpfMaintMode);
Abstract
Retrieves the maintenance mode.
Arguments
lpfMaintMode [Get] Filled with maintenance mode (ON/OFF).
TRUE: ON
FALSE: OFF
Return Values
TRUE Succeeded
FALSE Failed

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 21/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdpro5_chk_auto_unloading_mode(
LPBOOL lpfUnloadMode);
Abstract
Retrieves the auto-unloading mode.
Arguments
lpfUnloadMode [Get] Filled with auto-unloading mode (ON/OFF)
TRUE: ON
FALSE: OFF
Return Values
TRUE Succeeded
FALSE Failed

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 22/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdpro5_chk_operator_call(
LPLONG lplOpeCall);
Abstract
Retrieves the operator-call status.
Arguments
lplOpeCall [Get] Filled with operator-call status.
TRUE: On operator-call.
FALSE: NOT operator-call
Return Values
TRUE Succeeded
FALSE Failed

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 23/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdpro5_spindle_status(
DWORD dwSpindleNo,
LPLONG lplGear,
LPLONG lplDirection);
Abstract
Retrieve the gear-position and status of spindle.
Arguments
dwSpindleNo [Set] Specify spindle number. Normaly, set to “1”.
LplGear [Get] Filled with spindle gear-position.
 PMC_SPDL_GEAR_NON (=0)
Undecided.
 PMC_SPDL_GEAR_LOW (=1)
Low speed gear.
 PMC_SPDL_GEAR_HIGH (=2)
High-speed gear.
 PMC_SPDL_GEAR_MID (=3)
Middle-speed gear.
LplDirection [Get] Filled with spindle status.
 PMC_SPDL_STOP (=0)
Stopped.
 PMC_SPDL_CW (=1)
Rotated with CW.
 PMC_SPDL_CCW (=2)
Rotated with CCW.
 PMC_SPDL_ORIENTATION_STOP (=3)
Stopped at orientation position.
 PMC_SPDL_CS_CONTROL (=4)
Under Cs-axis control.
 PMC_SPDL_RIGID_TAP (=5)
Under rigid tapping.
Return Values
TRUE Succeeded
FALSE Failed
Remarks
 Set to NULL for the arguments of unnecessary information.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 24/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdpro5_spindle_speed(
DWORD dwSpindleNo,
LPDWORD lpdwSCode,
LPDWORD lpdwInstruct,
LPDWORD lpdwActual);
Abstract
Retrieves the spindle speed.
Arguments
dwSpindleNo [Set] Specify spindle number. Normaly, set to “1”.
LpdwSCode [Get] Filled with S-code value.
LpdwInstruct [Get] Filled with commanded value including override.
LpdwActual [Get] Filled with actual speed,
Return Values
TRUE Succeeded
FALSE Failed
Remarks
 Set to NULL for the arguments of unnecessary information.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 25/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdpro5_atc_status(
LPBOOL lpfArmStandby,
LPLONG lplMgznStatus);
Abstract
Retrieve the status of ATC magazine.
Arguments
lpfArmStandby [Get] Filled with the status of ATC arm.
TRUE: Standby.
FALSE: Moving.
LplMgznStatus [Get] Filled with the manual intervention mode of ATC magazine.
 PMC_MAS_MODE_OFF (=0)
Manual intervention OFF.
 PMC_MAS_MODE_TURNING_ON (=1)
Waiting for manual intervention to turn ON (ATC magazine pot
indexing).
 PMC_MAS_MODE_ON (=2)
Manual intervention ON.
 PMC_MAS_MODE_ TURNING_OFF (=3)
Waiting for manual intervention to turn OFF (ATC magazine
pot going back to the original position).
Return Values
TRUE Succeeded
FALSE Failed
Remarks
 Set to NULL for the arguments of unnecessary information.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 26/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdpro5_apc_status(
LPBOOL lpfArmStandby,
LPLONG lplStckStatus);
Abstract
Retrieves the status of pallet changer.
Arguments
lpfArmStandby [Get] Filled with the status of pallet changer arm.
TRUE: Standby.
FALSE: Moving.
LplStckStatus [Get] Filled with the manual intervention mode of pallet buffer.
 PMC_MAS_MODE_OFF (=0)
Manual intervention OFF.
 PMC_MAS_MODE_TURNING_ON (=1)
Waiting for manual intervention to turn ON (pallet changer
moving).
 PMC_MAS_MODE_ON (=2)
Manual intervention ON.
Return Values
TRUE Succeeded
FALSE Failed
Remarks
 Set to NULL for the arguments of unnecessary information.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 27/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdpro5_mc_alarm(
LPDWORD lpdwAlarmNo,
LPBYTE lpbAlarmType,
LPBYTE lpbSeriousLevel,
LPBYTE lpbPoutDisable,
LPBYTE lpbCycleStartDisable,
LPBYTE lpbRetryEnable,
LPBOOL lpfFailedNcReset,
LPSYSTEMTIME lptOccuredTime,
LPDWORD lpdwSumArray,
LPSTR szNcMessage);
Abstract
Retrieves the data of current MC alarms.
Arguments
lpdwAlarmNo [Get] Pointer to the array, filled with MC alarms numbers.
LpbAlarmType [Get] Pointer to the array, filled with MC alarms types.
 PMC_ALM_ALARM (=1)
Alarm
 PMC_ALM_WARNING (=2)
Warning
lpbSeriousLevel [Get] Pointer to the array, filled with serious levels.
 PMC_ALM_LEVEL_NORMAL (=0)
Normal MC alarm.
 PMC_ALM_LEVEL_DAMAGE (=1)
Serious MC alarm that can damage MC.
LpbPoutDisable [Get] Pointer to the array, filled with flags of auto power off.
 PMC_ALM_POUT_ENABLE (=0)
requires auto power off.
 PMC_ALM_POUT_DISABLE (=1)
need not power off. Ex. Mistake operation.
LpbCycleStartDisable [Get] Pointer to the array, filled with flags indicating whether
it is possible to execute cycle-start.
 PMC_ALM_CYCLE_ENABLE (=0)
Possible to execute cycle-start.
 PMC_ALM_CYCLE_DISABLE (=1)
Impossible to execute cycle-start.
LpbRetryEnable [Get] Pointer to the array, filled with flags indicating whether
it is possible to retry.
 PMC_ALM_RETRY_DISABLE (=0)
Impossible to retry.
 PMC_ALM_RETRY_ENABLE (=1)
Possible to retry.
LpfFailedNcReset [Get] Pointer to the array, filled with flags indicating whether
reset operation for MC alarm make NC reset execute.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 28/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5
Pointer to the array, filled with flags indicating whether
=0: not NC reset.
=1: NC reset execute.
LptOccuredTime [Get] Pointer to the array, filled with structure
SYSTEMTIME of date and time when alarms occurred.
LpdwSumArray [Set/Get] Specify the number of elements of above arguments.
This function fills this argument with the current
number of MC alarms.
SzNcMessage [Get] Specify NULL.
Return Values
TRUE Succeeded
FALSE Failed
Remarks
 Set to NULL for the arguments of unnecessary information.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 29/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdpro5_chk_mc_alarm(
LPDWORD lpdwTotalAlarm,
LPDWORD lpdwTotalWarn);
Abstract
Retrieve the numbers of current MC alarms and warnings.
Arguments
lpdwTotalAlarm [Get] Filled with the number of current MC alarms.
LpdwTotalWarn [Get] Filled with the number of current MC warnings
Return Values
TRUE Succeeded
FALSE Failed
Remarks
 Set to NULL for the arguments of unnecessary information.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 30/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdpro5_max_alarm_history(
LPDWORD lpdwMaxHistory);
Abstract
Retrieve the maxinum number of MC alarms history.
Arguments
lpdwMaxHistory [Get] Filled with the maximum number of MC alarms history.
Return Values
TRUE Succeeded
FALSE Failed

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 31/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdpro5_mc_alarm_history(
LPDWORD lpdwAlarmNo,
LPBYTE lpbAlarmType,
LPBYTE lpbSeriousLevel,
LPBYTE lpbResetType,
LPSYSTEMTIME lptOccuredTime,
LPSYSTEMTIME lptResetTime,
LPDWORD lpdwSumArray,
LPSTR szNcMessage);
Abstract
Retrieve the history of MC alarms data.
Arguments
lpdwAlarmNo [Get] Pointer to the array, filled with MC alarms numbers.
LpbAlarmType [Get] Pointer to the array, filled with MC alarms types.
 PMC_ALM_ALARM (=1)
Alarm
 PMC_ALM_WARNING (=2)
Warning
 PMC_ALM_NOTICE (=3)
Notification
lpbSeriousLevel [Get] Pointer to the array, filled with serious levels.
 PMC_ALM_LEVEL_NORMAL (=0)
Normal MC alarm.
 PMC_ALM_LEVEL_DAMAGE (=1)
Serious MC alarm that can damage MC.
LpbResetType [Get] Pointer to the array, filled with causes why MC alarms was
released.
 PMC_ALM_RESET_NONE (=0)
Alarm occurs (NOT released yet).
 PMC_ALM_RESET_SWITCH (=1)
with the alarm reset switch.
 PMC_ALM_RESET_RETRY (=2)
with the retry operation.
 PMC_ALM_RESET_EMERGENCY (=3)
with the emergency stop
 PMC_ALM_RESET_NC_RESET (=4)
with the NC reset.
 PMC_ALM_RESET_AUTOMATIC (=5)
automatically released.
 PMC_ALM_RESET_POWER_OUT (=6)
with the power OFF.
 PMC_ALM_RESET_MAINT_MODE (=7)
with the maintenance mode.
LptOccuredTime [Get] Pointer to the array, filled with structure SYSTEMTIME of date

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 32/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5
and time when alarms occurred.
LptResetTime [Get] Pointer to the array, filled with structure SYSTEMTIME of date
and time when alarms were released.
LpdwSumArray [Get] Specify the number of elements of above arguments.
This function fills this argument with the actual number of MC
alarms in the history.
SzNcMessage [Get] Specify NULL.
Return Values
TRUE Succeeded
FALSE Failed
Remarks
 Set to NULL for the arguments of unnecessary information.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 33/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdpro5_change_nc_mode(
DWORD dwNcMode,
BOOL fModeLockEffective);
Abstract
Change NC operation mode.
Arguments
dwNcMode [Set] Specify new NC operation mode.
 PMC_NC_MDI_MODE (=1)
MDI
 PMC_NC_REF_MODE (=2)
Reference
 PMC_NC_EDIT_MODE (=3)
Edit
 PMC_NC_MEM_MODE (=4)
Memory
 PMC_NC_TAPE_MODE (=6)
Tape(Remote)
 PMC_NC_HANDLE_MODE (=7)
Handle
 PMC_NC_JOG_MODE (=8)
Jog Feed
 PMC_NC_RAPID_MODE (=9)
Rapid Traverse
 PMC_NC_DNC_MODE (=17)
DNC operation
fModeLockEffective [Set] Specify whether mode-lock status of MC is effective.
TRUE: NOT change NC mode under mode-lock.
FALSE: Change NC mode regardless of mode-lock.
This argument is ignored in the case of MC without
mode-lock function.
Return Values
TRUE Succeeded
FALSE Failed

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 34/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdpro5_optional_block_skip_is_enable(
LPBOOL lpfEnable);
Abstract
Retrieves whether optional block skip option is enabled.
Arguments
lpfEnable [Get] Optional block skip is:
TRUE: Enabled.
FALSE: Disabled.
Return Values
TRUE Succeeded
FALSE Failed

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 35/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdpro5_set_optional_block_skip(
BYTE bBDT2,
BYTE bBDT3,
BYTE bBDT4,
BYTE bBDT5,
BYTE bBDT6,
BYTE bBDT7,
BYTE bBDT8,
BYTE bBDT9);
Abstract
Changes the status of optional block skip.
Arguments
bBDT2 [Set] Specify ON/OFF of block skip /2 to /9.
…  PMC_BDT_OFF (=0)
bBDT9 ON
 PMC_BDT_ON (=1)
OFF
 PMC_BDT_XX (=0xFF)
Not change.
Return Values
TRUE Succeeded
FALSE Failed

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 36/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdpro5_chk_backedit(
LPBOOL lpfMode,
LPDWORD lpdwONumber);
Abstract
Retrieve the background-edit status of Professional 5.
Arguments
lpfMode [Get] Filled with the background-edit mode (ON/OFF).
=0: OFF
=1: ON
lpdwONumber [Get] Filled with O-number of background-editing NC program in NC
memory.
Return Values
TRUE Succeeded
FALSE Failed
Remarks
 Background-edit function of Professional 5 is differs from the background-edit of NC.
 In the following case, the background-edit mode is ON and O-number is 0:
 Operator turns the background-edit mode ON, and does’nt search back-editing
O-number.
 NC program file stored in other than NC memory (i.e. internal card, external card, host
computer) is open.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 37/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdpro5_system_cycle_start(
BOOL fOpeCall);
Abstract
Request the execution of cycle-start to Professinoal 5.
Arguments
fOpeCall [Set] Specify whether it is necessary to push cycle-start button on MC.
TRUE: Machining does’nt start until the cycle-start button is pushed.
FALSE: Machining starts immediately.
Return Values
TRUE Succeeded
FALSE Failed

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 38/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdpro5_chk_system_mach_finish(
LPBOOL lpfFinish,
LPDWORD lpdwFinCondition);
Abstract
Retrieves whether the cycle-start with mdpro5_system_cycle_start() is already finished.
Arguments
lpfFinish [Get] Filled with the machining status.
TRUE: Machining is already finished.
FALSE: Still machining.
LpdwFinCondition [Get] Filled with one or more of the following values indicating
maching finish status.
 0: Normal Finish
 0x00000001: Auto work measurement alarm (i.e. alarm with
M940).
 0x00010000: BTS alarm.
 0x00020000: BTS2 alarm.
 0x00040000: AC alarm.
 0x00080000: SL over-load/no-load alarm.
 0x00100000: Normal Finish (TL occurred).
 0x00400000: Normal Finish (STS occurred)
 0x01000000: Abnormally finished (“System Machining
Abort”, NC reset while DNC)
 0x04000000:Abnormally pallet seated.
Return Values
TRUE Succeeded
FALSE Failed
Remarks
 Set to NULL for the arguments of unnecessary information.
 The machining is not abnormal when TL alarm or STS alarm occur,

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 39/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdpro5_system_cycle_abort(
BOOL fAbnormalFinish);
Abstract
Execute the same procedure as when flexible switch “System Machining Abort” or “System
Machining Finish” on the Professional 5 is pushed.
Arguments
fAbnormalFinish [Set] TRUE: execute “System Machining Abort”.
FALSE: execute “System Machining Finish”.
Return Values
TRUE Succeeded
FALSE Failed
Remarks
 If this function returns FALSE, call mdpro5_GetLastSubError() to detect the cause.
Value #define in <Pro5MosMsg.h> Contents
5 PMS_PRO5_BUSY STL(F0000#5) is ON, or
on operator call with mdpro5_system_cycle_start().
7 PMS_PRO5_MODE System mode is OFF, or
NC operation mode is not Memory/Remote.
10 PMS_PRO5_STATUS mdpro5_system_cycle_start() is not called yet, or
already finished.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 40/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdpro5_can_auto_poweroff(
LPBOOL lpfYes);
Abstract
Retrieves whether it is possible to execute auto power-off when MC alarms occur.
Arguments
lpfYes [Get] Filled with the flag indicating whether it is possible to execute auto
power-off.
TRUE: Possible
FALSE: Current alarms prevent from executing auto power-off.
Return Values
TRUE Succeeded
FALSE Failed

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 41/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdpro5_auto_poweroff();
Abstract
Request MC to power off.
Arguments
None
Return Values
TRUE Succeeded
FALSE Failed
Remarks
 Auto power-off is not executed until the following conditions are all met.
(1) System mode is ON.
(2) If MC parameter No.12035 is “1”, power-off switch on MC is ON.
(3) mdpro5_can_auto_poweroff() indicates it is possible to execute auto power-off.
(4) No battery alarms in NC.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 42/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdpro5_get_milling_time(
LPDWORD lpdwTime);
Abstract
Retrieves the total time of spindle rotation commanded by MOS.
Arguments
lpdwTime [Get] Filled with the total time of spindle rotation, in milliseconds.
Return Values
TRUE Succeeded
FALSE Failed
Remarks
 Spindle rotation time is counted-up while the following conditions are all met.
(1) On machining commanded from MOS.
(2) Auto-machining (STL<F000#5>=ON).
(3) Not stopped of M00/M01.
(4) Spindle is neither stopped nor stopped with orientation.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 43/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdpro5_toollife_info(
LPBOOL lpfCountTypeRemain,
LPBOOL lpfAlarmResetMaxLife);
Abstract
Retrieves the information of tool life.
Arguments
lpfCountTypeRemain [Get] Filled with the flag indicating whether tool life count type is
“remaining”.
Refer to MC parameter No. 1019.
TRUE: Remaining. (No.1019 = 1)
FALSE: Accumulation. (No.1019 = 0)
lpfAlarmResetMaxLife [Get] Filled with the flag indicating whether remaining life is
changed to full when TL alarm is reset.
Refer to MC parameter No. 1030.
TRUE: Change to full. (No.1030 = 1)
FALSE: NOT change. (No.1030 = 0)
Return Values
TRUE Succeeded
FALSE Failed
Remarks
 Set to NULL for the arguments of unnecessary information.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 44/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdpro5_tool_data_item_is_enable(
LPDWORD lpdwItem,
LPDWORD lpdwEnable,
DWORD dwSumArray);
Abstract
Retrieves whether specified tool data items are valid.
Arguments
lpdwItem [Get] Pointer to the array, filled with the numbers indicating tool data
items.
LpdwEnable [Get] Filled with the flags indicating whether specified items are valid.
DwSumArray [Set] Specify the number of elements of lpdwItem and lpfEnable.
Tool Data Items
Value Contents
1 Magazine Number
2 Pot Number
3 Kind of Pot (=0: BT, =1: HSK, =2: Adapter)
4 PTN (Program Tool Number)
5 FTN (Functional Tool Number)
6 ITN (Individual Tool Number)
7 Priority for STS
8 Comment
9 Through Spindle Coolant Enabled (=0: Disabled, =1: Enabled)
10 Through Spindle Coolant Suction/Purge Time, in milliseconds.
11 ATC Arm Turn Speed (=0; Normal, =1: Slow, =2: Middle)
12 M60 Prohibition Flag (=0: Possible, =1: Prohibit)
13 Use Prohibition Tool (=0: Possible, =1: Prohibit)
14 STS is done / not done at TL alarm is generated for the MMC (system).
(=0: Disabled, =1: Enabled)
15 Count of Cutters
16 Pot Size (=0: Standard, =1: Middle, =2: Large, =3: Extra-large, =4: Small, =5:
Extra-Large2)
17 Prohibit Rotation
18 Empty Pot
19 Irregular Shape
20 Specified T Code
21 TLS Continuous Search
22 B Axis Rotation Prohibit (=0: Possible, =1: Prohibit)
23 One Touch Prohibit (=0: Possible, =1: Prohibit)
25 Tool Size (=0: Standard, =1: Middle, =2: Large, =3: Extra-large, =4: Small, =5:
Extra-Large2)
26 TSC Removal (=0:Default, =1:Air Discharge, =2:Draw Back)
28 Tool Length(Check)
29 Tool Radius(Check)

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 45/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

31 O Number 1
32 O Number 2
33 O Number 3
34 TSC Frequency
35 TSC Flow Check
38 TSC Frequency Setting (=0: Incomplete, =1: Complete, =2: Max)
39 Controlled Point (X)
40 Controlled Point (Y)
41 Controlled Point (Z)
42 Tool Vector (X)
43 Tool Vector (Y)
44 Tool Vector (Z)
45 Ret. Prohibit at PWR Failure (=0: Possible, =1: Prohibit)
46 STS (=0:New, =1:Wait, =2:OK, =3:NOK, =4:Test, =5:Measure)
47 Tool MGZ Vibration Control
49 Multi Purpose Flag
52 Fixed Pot (=0(Random Pot), =1:Fixed Pot, =2:Dummy Pot)
53 Group No
56 Shank Count
57 Seat Check (=0:Possible, =1:Prohibit)
58 Vibration Warning (Rapid)
59 Vibration Alarm (Rapid)
60 Vibration Warning (Cutting)
61 Vibration Alarm (Cutting)
102 Kind of Cutter
103 Tool Length (Geometry) [0.0001mm] or [0.00001inch]
104 Tool Length (Wear) [0.0001mm] or [0.00001inch]
105 Tool Diameter (Geometry) [0.0001mm] or [0.00001inch]
106 Tool Diameter (Wear) [0.0001mm] or [0.00001inch]
107 Tool Life (Time) Management =0: Disabled, =1: Enabled
108 Tool Life (Time) Alarm [0.1s]
109 Tool Life (Time) Warning [0.1s]
110 Tool Life (Time) Measured [0.1s]
111 Tool Life (Distance) Management =0: Disabled, =1: Enabled
112 Tool Life (Distance) Alarm [mm] or [0.1inch]
113 Tool Life (Distance) Warning [mm] or [0.1inch]
114 Tool Life (Distance) Measured [mm] or [0.1inch]
115 Tool Life (Count) Management =0: Disabled, =1: Enabled
116 Tool Life (Count) Alarm [mm] or [0.1inch]
117 Tool Life (Count) Warning [mm] or [0.1inch]
118 Tool Life (Count) Measured [mm] or [0.1inch]
119 SL upper limit [0.01%]
120 SL lower limit [0.01%]

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 46/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

121 AC limit [0.01%]


122 Tool Alarm Flag
Bit0: Tool Broken (Detect Long), Bit1: Tool Broken, Bit2: AC Monitor,
Bit3: SL Monitor, Bit4: SL Monitor (No Load), Bit5: ToolLife, Bit6: Tool ID,
Bit8: NOK
123 Tool Warning Flag
Bit0: Tool Life
124 ATC-side BTS Enable Flag =0: NOT execute, =1: Execute
125 BTS measurement interval before Machining [msec]
126 BTS measurement interval after Machining [msec]
127 BTS measurement length [0.0001mm] or [0.00001inch]
128 Operator Call Tool Flag =0: Disabled, =1: Enabled
129 First Used Tool Flag =0: Disabled, =1: Enabled
130 Spindle Rotation Speed immediately after M6
131 Selection of Coolant immediately after M6
132 Limit Value of Spindle Rotation Speed at Machining
133 BTS action type (=0:Regular, =1: Vibration control, =2: High accuracy)
134 Surface Speed Limit Value
137 H Standard
138 Blade
139 R Geometry
140 R Wear
141 Radial Max. Load
142 Axial Max. Load
143 Instructed Speed (AST4)
144 Shifted Speed (AST4)
159 Instructed Speed (AST4)2
160 Shifted Speed (AST4)2
161 Instructed Speed (AST4)3
162 Shifted Speed (AST4)3
163 Cut Type (=0:Standard, =1:Light Cut)
Return Values
TRUE Succeeded
FALSE Failed
Remarks
 Some data items are disable in some MC models or with some options.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 47/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdpro5_get_tool_data_item(
DWORD dwItem,
LPDWORD lpdwMgznNo,
LPLONG lplPotNo,
LPLONG lplValue,
DWORD dwSumArray);
Abstract
Retrieves the values of specified tool data item.
Arguments
dwItem [Set] Specify the following tool data item to retrieve.
LpdwMgznNo [Set] Pointer to the array, filled with magazine numbers of tools.
LplPotNo [Set] Pointer to the array, filled with pot numbers of tools.
LplValue [Get] Filled with retrieved values.
DwSumArray [Set] Specify the number of elements of lpdwMgznNo, lplPotNo,
lplValue.
Tool Data Items
Value Contents
3 Kind of Pot (=0: BT, =1: HSK, =2: Adapter)
4 PTN
5 FTN
6 ITN
7 Priority for STS
9 Through Spindle Coolant Enabled (=0: Disabled, =1: Enabled)
10 Through Spindle Coolant Suction/Purge Time, in milliseconds.
11 ATC Arm Turn Speed (=0; Normal, =1: Slow, =2: Middle)
12 M60 Prohibition Flag (=0: Possible, =1: Prohibit)
13 Use Prohibition Tool (=0: Possible, =1: Prohibit)
14 STS is done / not done at TL alarm is generated for the MMC (system).
(=0: Disabled, =1: Enabled)
15 Count of Cutters
16 Pot Size (=0: Standard, =1: Middle, =2: Large, =3: Extra-large, =4: Small, =5:
Extra-Large2)
17 Prohibit Rotation
18 Empty Pot
19 Irregular Shape
20 Specified T Code
21 TLS Continuous Search
22 B Axis Rotation Prohibit (=0: Possible, =1: Prohibit)
23 One Touch Prohibit (=0: Possible, =1: Prohibit)
25 Tool Size (=0: Standard, =1: Middle, =2: Large, =3: Extra-large, =4: Small, =5:
Extra-Large2)
26 TSC Removal (=0:Default, =1:Air Discharge, =2:Draw Back)
28 Tool Length(Check)

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 48/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

29 Tool Radius(Check)
31 O Number 1
32 O Number 2
33 O Number 3
34 TSC Frequency
35 TSC Flow Check
38 TSC Frequency Setting (=0: Incomplete, =1: Complete, =2: Max)
39 Controlled Point (X)
40 Controlled Point (Y)
41 Controlled Point (Z)
42 Tool Vector (X)
43 Tool Vector (Y)
44 Tool Vector (Z)
45 Ret. Prohibit at PWR Failure (=0: Possible, =1: Prohibit)
46 STS (=0:New, =1:Wait, =2:OK, =3:NOK, =4:Test, =5:Measure)
47 Tool MGZ Vibration Control
49 Multi Purpose Flag
52 Fixed Pot (=0(Random Pot), =1:Fixed Pot, =2:Dummy Pot)
53 Group No
56 Shank Count
57 Seat Check (=0:Possible, =1:Prohibit)
58 Vibration Warning (Rapid)
59 Vibration Alarm (Rapid)
60 Vibration Warning (Cutting)
61 Vibration Alarm (Cutting)
Return Values
TRUE Succeeded
FALSE Failed
Remarks
 Some data items are disable in some MC models or with some options. Refer to
mdpro5_tool_data_item_is_enable()

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 49/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdpro5_get_cutter_data_item(
DWORD dwItem,
LPDWORD lpdwMgznNo,
LPLONG lplPotNo,
LPDWORD lpdwCutterNo,
LPLONG lplValue,
DWORD dwSumArray);
Abstract
Retrieves the values of specified cutter data item.
Arguments
dwItem [Set] Specify the following cutter data item to retrieve.
LpdwMgznNo [Set] Pointer to the array, filled with magazine numbers of tools.
LplPotNo [Set] Pointer to the array, filled with pot numbers of tools.
LpdwCutterNo [Set] Pointer to the array, filled with cutter numbers.
LplValue [Get] Filled with retrieved values.
DwSumArray [Set] Specify the number of elements of lpdwMgznNo, lplPotNo,
lpdwCutterNo, lplValue.
Cutter Data Items
Value Contents
102 Kind of Cutter
103 Tool Length (Geometry) [0.0001mm] or [0.00001inch]
104 Tool Length (Wear) [0.0001mm] or [0.00001inch]
105 Tool Diameter (Geometry) [0.0001mm] or [0.00001inch]
106 Tool Diameter (Wear) [0.0001mm] or [0.00001inch]
107 Tool Life (Time) Management =0: Disabled, =1: Enabled
108 Tool Life (Time) Alarm [0.1s]
109 Tool Life (Time) Warning [0.1s]
110 Tool Life (Time) Measured [0.1s]
111 Tool Life (Distance) Management =0: Disabled, =1: Enabled
112 Tool Life (Distance) Alarm [mm] or [0.1inch]
113 Tool Life (Distance) Warning [mm] or [0.1inch]
114 Tool Life (Distance) Measured [mm] or [0.1inch]
115 Tool Life (Count) Management =0: Disabled, =1: Enabled
116 Tool Life (Count) Alarm [mm] or [0.1inch]
117 Tool Life (Count) Warning [mm] or [0.1inch]
118 Tool Life (Count) Measured [mm] or [0.1inch]
119 SL upper limit [0.01%]
120 SL lower limit [0.01%]
121 AC limit [0.01%]
122 Tool Alarm Flag
Bit0: Tool Broken (Detect Long), Bit1: Tool Broken, Bit2: AC Monitor,
Bit3: SL Monitor, Bit4: SL Monitor (No Load), Bit5: ToolLife, Bit6: Tool ID,
Bit8: NOK

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 50/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

123 Tool Warning Flag


Bit0: Tool Life
124 ATC-side BTS Enable Flag =0: NOT execute, =1: Execute
125 BTS measurement interval before Machining [msec]
126 BTS measurement interval after Machining [msec]
127 BTS measurement length [0.0001mm] or [0.00001inch]
128 Operator Call Tool Flag =0: Disabled, =1: Enabled
129 First Used Tool Flag =0: Disabled, =1: Enabled
130 Spindle Rotation Speed immediately after M6
131 Selection of Coolant immediately after M6
132 Limit Value of Spindle Rotation Speed at Machining
133 BTS action type (=0:Regular, =1: Vibration control, =2: High accuracy)
134 Surface Speed Limit Value
137 H Standard
138 Blade
139 R Geometry
140 R Wear
141 Radial Max. Load
142 Axial Max. Load
143 Instructed Speed (AST4)
144 Shifted Speed (AST4)
159 Instructed Speed (AST4)2
160 Shifted Speed (AST4)2
161 Instructed Speed (AST4)3
162 Shifted Speed (AST4)3
163 Cut Type (=0:Standard, =1:Light Cut)
Return Values
TRUE Succeeded
FALSE Failed
Remarks
 If MC parmeter No.12024 “Composite Tool Existence” is 1, each tool has some cutters.
 Some data items are disable in some MC models or with some options. Refer to
mdpro5_tool_data_item_is_enable()

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 51/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdpro5_set_tool_data_item(
DWORD dwItem,
LPDWORD lpdwMgznNo,
LPLONG lplPotNo,
LPLONG lplValue,
DWORD dwSumArray);
Abstract
Changes the values of specified tool data item.
Arguments
dwItem [Set] Specify the following tool data item to change.
lpdwMgznNo [Set] Pointer to the array, filled with magazine numbers of tools.
lplPotNo [Set] Pointer to the array, filled with pot numbers of tools.
lplValue [Set] Pointer to the array, filled with new values to change.
dwSumArray [Set] Specify the number of elements of lpdwMgznNo, lplPotNo, lplValue.
Tool Data Items
Value Contents
4 PTN
5 FTN
6 ITN
7 Priority for STS
9 Through Spindle Coolant Enabled (=0: Disabled, =1: Enabled)
10 Through Spindle Coolant Suction/Purge Time, in milliseconds.
11 ATC Arm Turn Speed (=0; Normal, =1: Slow, =2: Middle)
12 M60 Prohibition Flag (=0: Possible, =1: Prohibit)
13 Use Prohibition Tool (=0: Possible, =1: Prohibit)
14 STS is done / not done at TL alarm is generated for the MMC (system).
(=0: Disabled, =1: Enabled)
15 Count of Cutters
17 Prohibit Rotation
18 Empty Pot
19 Irregular Shape
20 Specified T Code
21 TLS Continuous Search
22 B Axis Rotation Prohibit (=0: Possible, =1: Prohibit)
23 One Touch Prohibit (=0: Possible, =1: Prohibit)
25 Tool Size (=0: Standard, =1: Middle, =2: Large, =3: Extra-large, =4: Small, =5:
Extra-Large2)
26 TSC Removal (=0:Default, =1:Air Discharge, =2:Draw Back)
28 Tool Length(Check)
29 Tool Radius(Check)
31 O Number 1
32 O Number 2
33 O Number 3

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 52/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

34 TSC Frequency
35 TSC Flow Check
38 TSC Frequency Setting (=0: Incomplete, =1: Complete, =2: Max)
39 Controlled Point (X)
40 Controlled Point (Y)
41 Controlled Point (Z)
42 Tool Vector (X)
43 Tool Vector (Y)
44 Tool Vector (Z)
46 STS (=0:New, =1:Wait, =2:OK, =3:NOK, =4:Test, =5:Measure)
45 Ret. Prohibit at PWR Failure (=0: Possible, =1: Prohibit)
47 Tool MGZ Vibration Control
49 Multi Purpose Flag
56 Shank Count
57 Seat Check (=0:Possible, =1:Prohibit)
58 Vibration Warning (Rapid)
59 Vibration Alarm (Rapid)
60 Vibration Warning (Cutting)
61 Vibration Alarm (Cutting)
Return Values
TRUE Succeeded
FALSE Failed
Remarks
 Some data items are disable in some MC models or with some options. Refer to
mdpro5_tool_data_item_is_enable()

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 53/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdpro5_set_cutter_data_item(
DWORD dwItem,
LPDWORD lpdwMgznNo,
LPLONG lplPotNo,
LPDWORD lpdwCutterNo,
LPLONG lplValue,
DWORD dwSumArray);
Abstract
Changes the values of specified cutter data item.
Arguments
dwItem [Set] Specify the following cutter data item to change.
lpdwMgznNo [Set] Pointer to the array, filled with magazine numbers of tools.
lplPotNo [Set] Pointer to the array, filled with pot numbers of tools.
lpdwCutterNo [Set] Pointer to the array, filled with cutter numbers.
lplValue [Set] Filled with new values to change.
dwSumArray [Set] Specify the number of elements of lpdwMgznNo, lplPotNo,
lpdwCutterNo, lplValue.
Cutter Data Items
Value Contents
102 Kind of Cutter
103 Tool Length (Geometry) [0.0001mm] or [0.00001inch]
104 Tool Length (Wear) [0.0001mm] or [0.00001inch]
105 Tool Diameter (Geometry) [0.0001mm] or [0.00001inch]
106 Tool Diameter (Wear) [0.0001mm] or [0.00001inch]
107 Tool Life (Time) Management =0: Disabled, =1: Enabled
108 Tool Life (Time) Alarm [0.1s]
109 Tool Life (Time) Warning [0.1s]
110 Tool Life (Time) Measured [0.1s]
111 Tool Life (Distance) Management =0: Disabled, =1: Enabled
112 Tool Life (Distance) Alarm [mm] or [0.1inch]
113 Tool Life (Distance) Warning [mm] or [0.1inch]
114 Tool Life (Distance) Measured [mm] or [0.1inch]
115 Tool Life (Count) Management =0: Disabled, =1: Enabled
116 Tool Life (Count) Alarm [mm] or [0.1inch]
117 Tool Life (Count) Warning [mm] or [0.1inch]
118 Tool Life (Count) Measured [mm] or [0.1inch]
119 SL upper limit [0.01%]
120 SL lower limit [0.01%]
121 AC limit [0.01%]
122 Tool Alarm Flag
Bit0: Tool Broken (Detect Long), Bit1: Tool Broken, Bit2: AC Monitor,
Bit3: SL Monitor, Bit4: SL Monitor (No Load), Bit5: ToolLife, Bit6: Tool ID,
Bit8: NOK

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 54/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

123 Tool Warning Flag


Bit0: Tool Life
124 ATC-side BTS Enable Flag =0: NOT execute, =1: Execute
125 BTS measurement interval before Machining [msec]
126 BTS measurement interval after Machining [msec]
127 BTS measurement length [0.0001mm] or [0.00001inch]
128 Operator Call Tool Flag =0: Disabled, =1: Enabled
129 First Used Tool Flag =0: Disabled, =1: Enabled
130 Spindle Rotation Speed immediately after M6
131 Selection of Coolant immediately after M6
132 Limit Value of Spindle Rotation Speed at Machining
133 BTS action type (=0:Regular, =1: Vibration control, =2: High accuracy)
134 Surface Speed Limit Value
137 H Standard
138 Blade
139 R Geometry
140 R Wear
141 Radial Max. Load
142 Axial Max. Load
143 Instructed Speed (AST4)
144 Shifted Speed (AST4)
159 Instructed Speed (AST4)2
160 Shifted Speed (AST4)2
161 Instructed Speed (AST4)3
162 Shifted Speed (AST4)3
163 Cut Type (=0:Standard, =1:Light Cut)
Return Values
TRUE Succeeded
FALSE Failed
Remarks
 If MC parmeter No.12024 “Composite Tool Existence” is 1, each tool has some cutters.
 Some data items are disable in some MC models or with some options. Refer to
mdpro5_tool_data_item_is_enable()

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 55/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdpro5_spindle_tool(
LPDWORD lpdwMgznNo,
LPLONG lplPotNo,
LPDWORD lpdwCutterNo,
LPDWORD lpdwFtn,
LPDWORD lpdwItn,
LPDWORD lpdwPtn);
Abstract
Retrieve the information of spindle tool.
Arguments
lpdwMgznNo [Get] Filled with magazine number of spindle tool.
lplPotNo [Get] Filled with pot number of spindle tool.
lpdwCutterNo [Get] Filled with cutter number of spindle tool.
lpdwFtn [Get] Filled with FTN of spindle tool.
lpdwItn [Get] Filled with ITN of spindle tool.
lpdwPtn [Get] Filled with PTN of spindle tool.
Return Values
TRUE Succeeded
FALSE Failed
Remarks
 Set to NULL for the arguments of unnecessary information.
 This function cannot be used for a random pot number management (Refer to
mdpro5_atc_random_magazine). (A correct value is not filled though does not become
an error.)
The pot number in the spindle is sure to become "magazine number =1, pot number = 0" for
a random pot number management.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 56/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdpro5_next_tool(
LPDWORD lpdwMgznNo,
LPLONG lplPotNo,
LPDWORD lpdwCutterNo,
LPDWORD lpdwFtn,
LPDWORD lpdwItn,
LPDWORD lpdwPtn);
Abstract
Retrieve the information of next tool.
Arguments
lpdwMgznNo [Get] Filled with magazine number of next tool.
lplPotNo [Get] Filled with pot number of next tool.
lpdwCutterNo [Get] Filled with cutter number of next tool.
lpdwFtn [Get] Filled with FTN of next tool.
lpdwItn [Get] Filled with ITN of next tool.
lpdwPtn [Get] Filled with PTN of next tool.
Return Values
TRUE Succeeded
FALSE Failed
Remarks
 Set to NULL for the arguments of unnecessary information.
 Only the magazine number and the pot number can be used for a random pot number
management (Refer to mdpro5_atc_random_magazine). (A correct value is not filled
in the value of cutter number, FTN, ITN, and PTN)

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 57/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdpro5_clear_tool_data(
LPDWORD lpdwMgznNo,
LPLONG lplPotNo,
DWORD dwSumArray);
Abstract
Clear specified tools data. More than one tools can be cleared at a time.
Arguments
lpdwMgznNo [Get] Pointer to the array, filled with magazine numbers of tools to clear.
lplPotNo [Get] Pointer to the array, filled with pot numbers of tools to clear.
dwSumArray [Set] Specify the number of elements of lpdwMgznNo and lplPotNo.
Return Values
TRUE Succeeded
FALSE Failed

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 58/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdpro5_get_pallet_no(
DWORD dwDevice,
DWORD dwDevNo,
DWORD dwPosition,
LPDWORD lpdwPalletNo);
Abstract
Retrieves the pallet number at the specified position in the specified devive.
Arguments
dwDevice [Set] Specify the number indicating device type.
 VHC (=1) Vehicle
 PST (=2) Pallet Storage
 MCW (=3) Machining Center
 WSS (=5) Work Setting Station
 CLS (=6) Cleaning Station
dwDevNo [Set] Specify the device number.
dwPosition [Set] Specify the number indicating position in devices.
 DEV_TABLE (=1) Table
 DEV_FRONT (=2) Front
 DEV_BACK (=3) Back
lpdwPalletNo [Get] Filled with pallet number.
Return Values
TRUE Succeeded
FALSE Failed

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 59/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdpro5_set_pallet_no(
DWORD dwDevice,
DWORD dwDevNo,
DWORD dwPosition,
DWORD dwPalletNo);
Abstract
Changes the pallet number at the specified position in the specified devive.
Arguments
dwDevice [Set] Specify the number indicating device type.
 VHC (=1) Vehicle
 PST (=2) Pallet Storage
 MCW (=3) Machining Center
 WSS (=5) Work Setting Station
 CLS (=6) Cleaning Station
dwDevNo [Set] Specify the device number.
dwPosition [Set] Specify the number indicating position in devices.
 DEV_TABLE (=1) Table
 DEV_FRONT (=2) Front
 DEV_BACK (=3) Back
dwPalletNo [Get] Specify the pallet number.
Return Values
TRUE Succeeded
FALSE Failed

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 60/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdpro5_get_pallet_data_item(
DWORD dwItem,
LPDWORD lpdwPalletNo,
LPLONG lplValue,
DWORD dwSumArray);
Abstract
Retrieves the values of specified pallet data item.
Arguments
dwItem [Set] Specify the following pallet data item to retrieve.
lpdwPalletNo [Set] Pointer to the array, filled with pallet numbers.
lplValue [Get] Filled with retrieved values.
dwSumArray [Set] Specify the number of elements of lpdwPalletNo, lplValue.
Pallet Data Items
Value Contents
3 Priority (0...999)
5 Express Flag
20 Pallet Alarm
Bit0: Prior Tool Check, Bit1: Tool Broken (Detect Long), Bit2: Tool Broken,
Bit3: AC Monitor, Bit4: SL Monitor, Bit5: SL Monitor(No Load) ,
Bit6: Tool Life, Bit7: Spare Tool Selected, Bit8: NC Program Unregistered,
Bit9: Pallet Seating Checked, Bit10: Measuring System Alarm,
Bit11: Vacuum Checked
22 Ignore Seating
23 RWH Axis
24 B Axis Rot Limit
25 WHP Trans. Limit
35 Empty Pot
36 Work Size
Return Values
TRUE Succeeded
FALSE Failed

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 61/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdpro5_get_face_data_item(
DWORD dwItem,
LPDWORD lpdwPalletNo,
LPDWORD lpdwFaceNo,
LPLONG lplValue,
DWORD dwSumArray);
Abstract
Retrieves the values of specified face data item.
Arguments
dwItem [Set] Specify the following face data item to retrieve.
lpdwPalletNo [Set] Pointer to the array, filled with pallet numbers.
lpdwFaceNo [Set] Pointer to the array, filled with face numbers.
lplValue [Get] Filled with retrieved values.
dwSumArray [Set] Specify the number of elements of lpdwPalletNo, lpdwFaceNo,
lplValue.
Face Data Items
Value Contents
103 Ready Flag
104 Suspend Flag
105 Machining Status (=0; Not Machining, =1: Machining, =2: Normal Termination,
=3: Abnormal Termination)
106 Program No.
107 Offset X
108 Offset Y
109 Offset Z
110 Index Position
111 Block Skip
Bit0: Block Skop 2, Bit1: Block Skop 3, Bit2: Block Skop 4, Bit3: Block Skop 5,
Bit4: Block Skop 6, Bit5: Block Skop 7, Bit6: Block Skop 8, Bit7: Block Skop 9,
115 Face Alarm
Bit0: Prior Tool Check, Bit1: Tool Broken (Detect Long), Bit2: Tool Broken,
Bit3: AC Monitor, Bit4: SL Monitor, Bit5: SL Monitor(No Load) ,
Bit6: Tool Life, Bit7: Spare Tool Selected, Bit8: NC Program Unregistered,
Bit9: Pallet Seating Checked, Bit10: Measuring System Alarm,
Bit11: Vacuum Checked
116 Face Alarm Program No.
117 Face Alarm Sequenct No.
118 Face Alarm PTN
Return Values
TRUE Succeeded
FALSE Failed

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 62/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdpro5_set_pallet_data_item(
DWORD dwItem,
LPDWORD lpdwPalletNo,
LPLONG lplValue,
DWORD dwSumArray);
Abstract
Changes the values of specified pallet data item.
Arguments
dwItem [Set] Specify the following pallet data item to change.
lpdwPalletNo [Set] Pointer to the array, filled with pallet numbers.
lplValue [Set] Pointer to the array, filled with new values to change.
dwSumArray [Set] Specify the number of elements of lpdwPalletNo, lplValue.
Pallet Data Items
Value Contents
3 Priority (0...999)
5 Express Flag
20 Pallet Alarm
Bit0: Prior Tool Check, Bit1: Tool Broken (Detect Long), Bit2: Tool Broken,
Bit3: AC Monitor, Bit4: SL Monitor, Bit5: SL Monitor(No Load) ,
Bit6: Tool Life, Bit7: Spare Tool Selected, Bit8: NC Program Unregistered,
Bit9: Pallet Seating Checked, Bit10: Measuring System Alarm,
Bit11: Vacuum Checked
22 Ignore Seating
23 RWH Axis
24 B Axis Rot Limit
25 WHP Trans. Limit
35 Empty Pot
36 Work Size
Return Values
TRUE Succeeded
FALSE Failed

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 63/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdpro5_set_face_data_item(
DWORD dwItem,
LPDWORD lpdwPalletNo,
LPDWORD lpdwFaceNo,
LPLONG lplValue,
DWORD dwSumArray);
Abstract
Changes the values of specified face data item.
Arguments
dwItem [Set] Specify the following face data item to change.
lpdwPalletNo [Set] Pointer to the array, filled with pallet numbers.
lpdwFaceNo [Set] Pointer to the array, filled with face numbers.
lplValue [Set] Filled with new values to change.
dwSumArray [Set] Specify the number of elements of lpdwPalletNo, lpdwFaceNo,
lplValue.
Face Data Items
Value Contents
103 Ready Flag
104 Suspend Flag
105 Machining Status (=0; Not Machining, =1: Machining, =2: Normal Termination,
=3: Abnormal Termination)
106 Program No.
107 Offset X
108 Offset Y
109 Offset Z
110 Index Position
111 Block Skip
Bit0: Block Skop 2, Bit1: Block Skop 3, Bit2: Block Skop 4, Bit3: Block Skop 5,
Bit4: Block Skop 6, Bit5: Block Skop 7, Bit6: Block Skop 8, Bit7: Block Skop 9,
115 Face Alarm
Bit0: Prior Tool Check, Bit1: Tool Broken (Detect Long), Bit2: Tool Broken,
Bit3: AC Monitor, Bit4: SL Monitor, Bit5: SL Monitor(No Load) ,
Bit6: Tool Life, Bit7: Spare Tool Selected, Bit8: NC Program Unregistered,
Bit9: Pallet Seating Checked, Bit10: Measuring System Alarm,
Bit11: Vacuum Checked
116 Face Alarm Program No.
117 Face Alarm Sequenct No.
118 Face Alarm PTN
Return Values
TRUE Succeeded
FALSE Failed

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 64/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdpro5_clear_work_data(
LPDWORD lpdwPalletNo,
DWORD dwSumArray);
Abstract
Clear the pallet data and face data.
Arguments
lpdwPalletNo [Get] Pointer to the array, filled with pallet numbers to clear.
dwSumArray [Set] Specify the number of elements of lpdwPalletNo.
Return Values
TRUE Succeeded
FALSE Failed

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 65/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdpro5_get_on_duty(
LPBOOL lpfFlag);
Abstract
Retrieves the on-duty / off-duty mode
Arguments
lpfFlag [Get] Filled with on-duty / off-duty mode.
TRUE: On-duty mode
FALSE: Off-duty mode
Return Values
TRUE Succeeded
FALSE Failed

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 66/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdpro5_set_on_duty(
BOOL fFlag);
Abstract
Changes the on-duty / off-duty mode
Arguments
fFlag [Set] Specifies the on-duty / off-duty mode.
TRUE: On-duty mode
FALSE: Off-duty mode
Return Values
TRUE Succeeded
FALSE Failed

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 67/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdpro5_tls_potno(
LPDWORD lpdwMgznNo,
LPLONG lplPotNo);
Abstract
Retrieve the information of TLS pot.
Arguments
lpdwMgznNo [Get] Filled with magazine number of TLS pot.
lplPotNo [Get] Filled with pot number of TLS pot.
Return Values
TRUE Succeeded
FALSE Failed
Remarks
 Set to NULL for the arguments of unnecessary information.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 68/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdpro5_atc_random_magazine(
LPBOOL lpfRandomAtc);
Abstract
Retrieves the management type of tool number data of the ATC magazine.
Arguments
lpfFlag [Get] Filled the management type of tool number data of the ATC magazine.
TRUE: Random pot number
FALSE: Fixed pot number
Return Values
TRUE Succeeded
FALSE Failed

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 69/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdpro5_get_arbitrary_machine_status(
DWORD dwStatusKind1, DWORD dwStatusKind2,
DWORD dwStatusKind3, DWORD dwStatusKind4,
LPLONG lplOutputData1, LPLONG lplOutputData2,
LPLONG lplOutputData3, LPLONG lplOutputData4);
Abstract
Retrieve an arbitrary machine states.
Arguments
Refer to the argument setting table for a set value.
dwStatusKind1 [Set] Specifies the kind of machine status to get.
dwStatusKind2 [Set] Specifies the kind of machine status to get.
dwStatusKind3 [Set] Specifies the kind of machine status to get.
dwStatusKind4 [Set] Specifies the kind of machine status to get.
lplOutputData1 [Get] Filled with the machine status.
lplOutputData2 [Get] Filled with the machine status.
lplOutputData3 [Get] Filled with the machine status.
lplOutputData4 [Get] Filled with the machine status.
Argument setting table
dwStatusKind lplOutputData Note
1 2 3 4 1 2 3 4
1: APC 1: Arm Not Use Not Use 0: Undef Not Use Not Use Not Use Effect in

relations CW/CCW 1: CW turn type


Status 2: CCW P/C

Return Values
TRUE Succeeded
FALSE Failed
Remarks
 Set to “0” for the argument of unnecessary setting.
 Set to NULL for the arguments of unnecessary information.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 70/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdpro5_max_tls (
LPDWORD lpdwMaxTls);
Abstract
Retrieve the number of TLS.
Arguments
lpdwMaxTls [Get] Filled with number of TLS.
Return Values
TRUE Succeeded
FALSE Failed
Remarks
 Set to NULL for the arguments of unnecessary information.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 71/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdpro5_tls_potno2(
LPDWORD lpdwMgznNo,
LPLONG lplPotNo,
DWORD dwTlsNo);
Abstract
Retrieve the information of TLS pot of the specified TLS number.
Arguments
lpdwMgznNo [Get] Filled with magazine number of TLS pot.
lplPotNo [Get] Filled with pot number of TLS pot.
dwTlsNo [Set] Specifies the TLS number.
Return Values
TRUE Succeeded
FALSE Failed
Remarks
 Set to NULL for the arguments of unnecessary information.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 72/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

7 Function Specifications (MdNcinf.dll)

long mdncinf_GetLastMError()
Explanation
Returns last error that occurred for mdncinf.dll function.
Return Value
0: Last mdncinf.dll function called was completed normally.
Other than 0: Error number.
Note
 This function returns “0” when the function executed after an error occurred finished
normally.

long mdncinf_GetLastFError()
Explanation
Returns last Fanuc Library error number that occurred for mdncinf.dll function.
Return Value
0: Last Fanuc Library function called was completed normally.
Other than 0: Error number.
Note
 This function returns “0” when the function executed after an error occurred finished
normally.

BOOL mdncinf_set_node(
long node)
Explanation
Acquires (gets) the FOCAS1 Library Handle in order to use the FOCAS1 function within
mdncinf.dll. The acquired library handle is stored/used within mdncinf.dll.
Therefore, execute this function once after communication is established between the
CNC and PC.
Argument
node [Set] Specify the node number set in the MOS parameters.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 The node number data must be set in the MOS parameters in order to execute this
function. Refer to 3. MOS Parameters for the setting procedure.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 73/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdncinf_chk_axis_no(
WORD axisNo)
Explanation
Checks whether or not an axis number was specified for axisNo.
Argument
axisNo [Set] Specify axis number.
Return Value
True : Specified axis number exists.
False : Does not exist.

BOOL mdncinf_get_cncpara(
WORD paraNo,
WORD dataType,
long *value)
Explanation
Acquires (gets) specified NC parameter value.
Argument
paraNo [Set] Specify NC parameter number.
dataType [Set] Specify the type of data as indicated below:
 BYTE_PARA(1): Byte type parameter
 WORD_PARA(2): Word type parameter
 LONG_PARA(3): Two-word type parameter
 BYTE_AXIS_PARA(5): Byte axis type parameter
 WORD_AXIS_PARA(6): Word axis type parameter
 LONG_AXIS_PARA(7): Two-word axis type parameter
value [Get] Specify the variable or array variable where the acquired value is
stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 For axis type parameters, the value argument must be an array number array
variable equal to or more than the number of control axes.
 Use mdncinf_get_cncpara_bit() to acquire (get) bit type parameters and bit axis type
parameters.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 74/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdncinf_set_cncpara(
WORD paraNo,
WORD dataType,
long *value)
Explanation
Sets specified NC parameter value.
Argument
paraNo [Set] Specify NC parameter number.
dataType [Set] Specify the type of data as indicated below:
 BYTE_PARA(1): Byte type parameter
 WORD_PARA(2): Word type parameter
 LONG_PARA(3): Two-word type parameter
 BYTE_AXIS_PARA(5): Byte axis type parameter
 WORD_AXIS_PARA(6): Word axis type parameter
 LONG_AXIS_PARA(7): Two-word axis type parameter
value [Set] Specify the variable or array variable where the set value is stored.
Return Value
True : Set operation succeeded.
False : Set operation failed.
Note
 For axis type parameters, the value argument must be an array number array
variable equal to or more than the number of control axes.
 Use mdncinf_set_cncpara_bit() to set bit type parameters and bit axis type
parameters.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 75/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdncinf_get_cncpara_bit(
WORD paraNo,
WORD bitNo,
WORD dataType,
BITINF *onoff)
Explanation
Acquires (gets) the specified bit type NC parameter.
Argument
paraNo [Set] Specify the NC parameter number.
bitNo [Set] Specify the bit number (0 – 7).
dataType [Set] Specify the type of data as indicated below:
 BIT_PARA(0): Bit type parameter
 BIT_AXIS_PARA(4): Bit axis type parameter
onoff [Set] Specify the variable or array variable where the set value is stored.
Return Value
True : Set operation succeeded.
False : Set operation failed.
Note
 For axis type parameters, the onoff argument must be an array number array
variable equal to or more than the number of control axes.

BOOL mdncinf_set_cncpara_bit(
WORD paraNo,
WORD bitNo,
WORD dataType,
BITINF *onoff)
Explanation
Sets the specified bit type NC parameter value.
Argument
paraNo [Set] Specify the NC parameter number.
bitNo [Set] Specify the bit number (0 – 7).
dataType [Set] Specify the type of data as indicated below:
 BIT_PARA(0): Bit type parameter
 BIT_AXIS_PARA(4): Bit axis type parameter
onoff [Set] Specify the variable or array variable where the set value is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 For axis type parameters, the onoff argument must be an array number array
variable equal to or more than the number of control axes.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 76/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

short mdncinf_asciitoadrtype(
short adrType)
Explanation
Converts the ASCII code PMC address name into PMC address type data.
Argument
adrType [Set] Specify the ASCII code expressed by the PMC address.
Return Value
ADR_G(0) “G” address.
ADR_F(1) “F” address.
ADR_Y(2) “Y” address.
ADR_X(3) “X” address.
ADR_A(4) “A” address.
ADR_R(5) “R” address.
ADR_T(6) “T” address.
ADR_K(7) “K” address.
ADR_C(8) “C” address.
ADR_D(9) “D” address.
APERR(-1) Argument specification error

short mdncinf_adrtypetoascii(
short adrType)
Explanation
Converts the PMC address data into ASCII code PMC address name.
Argument
adrType [Set] Specify the PMC address data.
 ADR_G(0)
 ADR_F(1)
 ADR_Y(2)
 ADR_X(3)
 ADR_A(4)
 ADR_R(5)
 ADR_T(6)
 ADR_K(7)
 ADR_C(8)
 ADR_D(9)
Return Value
„G‟, „F‟,‟Y‟, ASCII code for PMC address name.
‟X‟,‟A‟,‟R‟,
‟T‟,‟K‟,‟C‟,
‟D‟
APERR(-1) Argument specification error

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 77/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdncinf_get_pmcdata(
WORD adrType,
WORD adrNo,
WORD dataSize,
long *value)
Explanation
Acquires (gets) specified PMC address data.
Argument
adrType [Set] Specify type of PMC address.
adrNo [Set] Specify PMC address number.
dataSize [Set] Specify data byte size.
value [Get] Specify variable where acquired PMC data is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed. Error in Argument.

BOOL mdncinf_set_pmcdata(
WORD adrType,
WORD adrNo,
WORD dataSize,
long value)
Explanation
Sets data to specified PMC address.
Argument
adrType [Set] Specify type of PMC address.
adrNo [Set] Specify PMC address number.
dataSize [Set] Specify data byte size.
value [Set] Specify variable where PMC data set is stored.
Return Value
True : Set operation succeeded.
False : Set operation failed. Error in Argument.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 78/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdncinf_get_pmcbit(
WORD adrType,
WORD adrNo,
WORD bitNo,
BITINF *onoff)
Explanation
Acquires (gets) specified PMC address bit data.
Argument
adrType [Set] Specify type of PMC address.
adrNo [Set] Specify PMC address number.
bitNo [Set] Specify bit number (0 – 7).
onoff [Get] Specify variable where acquired PMC data is stored (ON(1),
OFF(0)).
Return Value
True : Get operation succeeded.
False : Get operation failed. Error in Argument.

BOOL mdncinf_set_pmcbit(
WORD adrType,
WORD adrNo,
WORD bitNo,
BITINF onoff)
Explanation
Sets specified PMC address bit data.
Argument
adrType [Set] Specify type of PMC address.
adrNo [Set] Specify PMC address number.
bitNo [Set] Specify bit number (0 – 7).
onoff [Set] Specify variable where set PMC data is stored (ON(1), OFF(0)).
Return Value
True : Set operation succeeded.
False : Set operation failed. Error in Argument.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 79/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdncinf_get_pmcbyteary(
WORD adrType,
WORD adrNo,
WORD rdSize,
char *value)
Explanation
Continuously acquires (gets) specified PMC address data in BYTE units.
Argument
adrType [Set] Specify type of PMC address.
adrNo [Set] Specify starting number for PMC addresses to be acquired.
rdSize [Set] Specify data byte size to be acquired.
value [Get] Specify variable where acquired PMC data is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 The value argument must be an array number array variable equal to or more than
the number of bytes acquired.
 This function cannot be called from Visual Basic.

BOOL mdncinf_set_pmcbyteary(
WORD adrType,
WORD adrNo,
WORD wrSize,
char *value)
Explanation
Continuously sets data to specified PMC type and address in BYTE units.
Argument
adrType [Set] Specify type of PMC address.
adrNo [Set] Specify starting number for PMC addresses to be set.
wrSize [Set] Specify data byte size to be set.
value [Set] Specify variable where set PMC data is stored.
Return Value
True : Set operation succeeded.
False : Set operation failed.
Note
 The value argument must be an array number array variable equal to or more than
the number of bytes set.
 This function cannot be called from Visual Basic.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 80/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdncinf_get_pmccntlgrp(
short *grpNo)
Explanation
Reads total number of data table control data groups used to manage PMC data table
(address D).
Argument
grpNo [Get] Specify variable where total number of data table control data
groups is stored.
Return Value
True : Read operation succeeded.
False : Read operation failed.

BOOL mdncinf_set_pmccntlgrp(
short grpNo)
Explanation
Writes total number of data table control data groups used to manage PMC data table
(address D).
Argument
grpNo [Set] Specify total number of data table control data groups.
Return Value
True : Write operation succeeded.
False : Write operation failed.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 81/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdncinf_get_pmccntldata(
short startGrpNo,
short endGrpNo,
short *tblParam,
short *dataType,
short *dataSize,
short *dataAddr)
Explanation
Reads data table control data used to manage PMC data table (address D).
Argument
startGrpNo [Set] Specify read start group number.
endGrpNo [Set] Specify read end group number.
tblParam [Get] Specify variable where table parameters are stored.
bit 0 : Type of data table data
0 : Binary 1 : BCD
bit 1 : Data table content protect
0 : No 1 : Yes
bit 2 : Type of data table data
0 : Binary or BCD 1 : HEX
bit 3 – 7 : (Not used)
dataType [Get] Specify variable where data type (0:BYTE, 1:WORD, 2:LONG) is
stored.
dataSize [Get] Specify variable where size of group data (Number of bytes) is
stored.
dataAddr [Get] Specify variable where beginning address of group data (within
address D) is stored.
Return Value
True : Read operation succeeded.
False : Read operation failed.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 82/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdncinf_set_pmccntldata(
short startGrpNo,
short endGrpNo,
short *tblParam,
short *dataType,
short *dataSize,
short *dataAddr)
Explanation
Writes data table control data used to manage PMC data table (address D).
Argument
startGrpNo [Set] Specify write start group number.
endGrpNo [Set] Specify write end group number.
tblParam [Set] Specify variable where table parameters are stored.
bit 0 : Type of data table data
0 : Binary 1 : BCD
bit 1 : Data table content protect
0 : No 1 : Yes
bit 2 : Type of data table data
0 : Binary or BCD 1 : HEX
bit 3 – 7 : (Not used)
dataType [Set] Specify variable where data type (0:BYTE, 1:WORD, 2:LONG) is
stored.
dataSize [Set] Specify variable where size of group data (Number of bytes) is
stored.
dataAddr [Set] Specify variable where beginning address of group data (within
address D) is stored.
Return Value
True : Write operation succeeded.
False : Write operation failed.

BOOL mdncinf_axis_name(
LPSTR rtnBuf, short axisNo)
Explanation
Acquires (gets) each axis name (X, Y, Z...). This function is only valid in Visual C++.
Argument
rtnBuf [Get] Specify variable where axis name is stored.
axisNo [Set] Specify number of axes (1 – 8).
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 This function cannot be called from Visual Basic.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 83/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdncinf_axis_name_vb(
BSTR *rtnBuf,
short axisNo)
Explanation
Acquires (gets) each axis name (X, Y, Z...). This function is only valid in Visual Basic.
Argument
rtnBuf [Get] Specify variable where axis name is stored.
axisNo [Set] Specify number of axes (1 – 8).
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 This function cannot be called from Visual C++.

BOOL mdncinf_tool_unit(
short *incUnit)
Explanation
Acquires (gets) minimum setting unit for tool offset/macro variable.
Argument
incUnit [Get] Specify variable where minimum setting unit is stored.
 MM1000(1) // unit 1/1000 mm
 MM10000(2) // unit 1/10000 mm
 INCH10000(11) // unit 1/10000 inch
 INCH100000(12) // unit 1/100000 inch
Return Value
True : Get operation succeeded.
False : Get operation failed.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 84/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdncinf_axis_unit(
short *incUnit,
short axisNo)
Explanation
Acquires (gets) minimum setting unit for axes.
Argument
incUnit [Get] Specify variable where acquired unit is stored.
 MM1000(1) // unit 1/1000 mm
 MM10000(2) // unit 1/10000 mm
 INCH10000(11) // unit 1/10000 inch
 INCH100000(12) // unit 1/100000 inch
 DEG1000(21) // unit 1/1000 degree
 DEG10000(22) // unit 1/10000 degree
axisNo [Set] Specify axis number.
Return Value
True : Get operation succeeded.
False : Get operation failed.

BOOL mdncinf_num_of_axis(
short *numAxis)
Explanation
Acquires (gets) number of controlled axes.
Argument
numAxis [Get] Specify variable where number of controlled axes is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 85/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdncinf_cnc_version(
long *cncType,
LPSTR typeStr,
LPSTR serStr,
LPSTR verStr)
Explanation
Acquires (gets) CNC type and version data. This function is only valid in Visual C++.
Argument
cncType [Get] Specify variable where CNC type is stored.
 CNCTYPE_160M(1) // Series 160/180/210
 CNCTYPE_150M(2) // Series 150
 CNCTYPE_PMATE(3) // Power Mate
 CNCTYPE_PMATEI(4) // Power Mate-i
typeStr [Get] Specify variable where CNC type character string is stored (max. 4
characters).
serStr [Get] Specify variable where CNC series number character string is stored
(max. 4 characters).
verStr [Get] Specify variable where CNC version character string is stored (max.
4 characters).
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 This function cannot be called from Visual Basic.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 86/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdncinf_cnc_version_vb(
long *cncType,
BSTR *typeStr,
BSTR *serStr,
BSTR *verStr)
Explanation
Acquires (gets) CNC type and version data. This function is only valid in Visual Basic.
Argument
cncType [Get] Specify variable where CNC type is stored.
 CNCTYPE_160M(1) // Series 160/180/210
 CNCTYPE_150M(2) // Series 150
 CNCTYPE_PMATE(3) // Power Mate
 CNCTYPE_PMATEI(4) // Power Mate-i
typeStr [Get] Specify variable where CNC type character string is stored (max. 4
characters).
serStr [Get] Specify variable where CNC series number character string is stored
(max. 4 characters).
verStr [Get] Specify variable where CNC version character string is stored (max.
4 characters).
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 This function cannot be called from Visual C++.

BOOL mdncinf_cnc_status(
LPWORD ncMode,
LPWORD ncRun,
LPWORD ncMotion,
LPWORD mstCodeFin,
LPWORD ncEmg,
LPWORD editOpe)
Explanation
Acquires (gets) CNC status data (machining, emergency stop, aixs moving, CNC mode,
etc.)
Argument
ncMode [Get] Auto/Manual operation mode selection status
 CNCMODE_MDI(0) // MDI
 CNCMODE_MEM(1) // MEMORY
 CNCMODE_EDT(3) // EDIT
 CNCMODE_HNDL(4) // HANDLE
 CNCMODE_JOG(5) // JOG
 CNCMODE_REF(9) // G28: Reference return
 CNCMODE_RMT(10) // REMOTE
 CNCMODE_RPD (100) // Rapid mode
 CNCMODE_DNC (101) // DNC mode

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 87/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5
ncRun [Get] Auto operation status
 MCRUN_RESET(0)
 MCRUN_STOP(1)
 MCRUN_HOLD(2)
 MCRUN_RUN(3)
ncMotion [Get] Axis movement/Dwell status
 AXIS_STOP(0)
 AXIS_MOVE(1) // Moving status
 AXIS_DWLL(2) // Dwell status
mstCodeFin [Get] M, S, T, B function status
 MST_ETC(0) // Otherwise M,S,T code completed
 MST_FIN(1) // M,S,T code completed
ncEmg [Get] Emergency stop status
 MC_NOT_EMG(0)
 MC_EMG_STT(1)
 MC_EMG_RST(2) // MC status EMG->normal changing
editOpe [Get] Program editing status
 NC_EDIT_OPE(1) // Edit
 NC_SRCH_OPE(2) // Search
 NC_PNCH_OPE(3) // Output operation
 NC_READ_OPE(4) // Input operation
 NC_COMP_OPE(5) // Compare operation
 NC_LSK_OPE(6) // Label skip status
 NC_OFST_OPE(7) // Offset
 NC_WOOK_SFT(8) // Work shift
 NC_RESTART(9) // Re-Start status
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 When NULL is set for the argument, the value is not acquired.
 The Tape mode switch on the machine corresponds to the CNC remote mode.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 88/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdncinf_cnc_syssoftver(
LPSTR pmcser,
LPSTR pmcver,
LPSTR ladser,
LPSTR ladver,
LPSTR cexelibser,
LPSTR cexelibver,
LPSTR cexeaplser,
LPSTR cexeaplver)
Explanation
Reads CNC system software series/version. This function is only valid in Visual C++.
Argument
pmcser [Get] PMC management software series.
pmcver [Get] PMC management software version
ladser [Get] Ladder series.
ladver [Get] Ladder version.
cexelibser [Get] C language executor library series
cexelibver [Get] C language executor library version
cexeaplser [Get] C language executor application series
cexeaplver [Get] C language executor application version
Return Value
True : Read operation succeeded.
False : Read operation failed.
Note
 When NULL is set for the argument, the value is not acquired.
 This function cannot be called from Visual Basic.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 89/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdncinf_cnc_syssoftver_vb(
BSTR *pmcser,
BSTR *pmcver,
BSTR *ladser,
BSTR *ladver,
BSTR *cexelibser,
BSTR *cexelibver,
BSTR *cexeaplser,
BSTR *cexeaplver)
Explanation
Reads CNC system software series/version. This function is only valid in Visual Basic.
Argument
pmcser [Get] PMC management software series.
pmcver [Get] PMC management software version
ladser [Get] Ladder series.
ladver [Get] Ladder version.
cexelibser [Get] C language executor library series
cexelibver [Get] C language executor library version
cexeaplser [Get] C language executor application series
cexeaplver [Get] C language executor application version
Return Value
True : Read operation succeeded.
False : Read operation failed.
Note
 When NULL is set for the argument, the value is not acquired.
 This function cannot be called from Visual C++.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 90/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdncinf_modal_gcode(
LPWORD upperVal,
LPWORD underVal,
LPSTR gCodeStr,
LPWORD request,
short gCodeGrp)
Explanation
Acquires (gets) modal G codes. This function is only valid in Visual C++.
Argument
upperVal [Get] Specify variable where G code value integer is stored.
“42” is returned for “G42.1”
underVal [Get] Specify variable where G code decimal fraction is stored.
“1” is returned for “G42.1”
gCodeStr [Get] Specify variable where G code character string is stored.
“42.1” or other value is returned
request [Get] Whether or not the current block has been requested specifies the
variable returned.
 NOT_REQUEST(0): Current block has not been requested.
 NOW_REQUEST(1): Current block has been requested.
gCodeGrp [Set] Specify the type of modal data.
MODAL_GRP0(0) – MODAL_GRP20(20)。
Return Value
True : Read operation succeeded.
False : Read operation failed.
Note
 When NULL is set for the argument, the value is not acquired.
 This function cannot be called from Visual Basic.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 91/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdncinf_modal_gcode_vb(
LPWORD upperVal,
LPWORD underVal,
BSTR *gCodeStr,
LPWORD request,
short gCodeGrp)
Explanation
Acquires (gets) modal G codes. This function is only valid in Visual Basic.
Argument
upperVal [Get] Specify variable where G code value integer is stored.
“42” is returned for “G42.1”
underVal [Get] Specify variable where G code decimal fraction is stored.
“1” is returned for “G42.1”
gCodeStr [Get] Specify variable where G code character string is stored.
“42.1” or other value is returned
request [Get] Whether or not the current block has been requested specifies the
variable returned.
 NOT_REQUEST(0): Current block has not been requested.
 NOW_REQUEST(1): Current block has been requested.
gCodeGrp [Set] Specify the type of modal data.
MODAL_GRP0(0) – MODAL_GRP20(20)。
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 When NULL is set for the argument, the value is not acquired.
 This function cannot be called from Visual C++.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 92/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdncinf_modal_hcode(
LPDWORD codeVal,
LPSTR codeStr,
LPWORD request)
Explanation
Acquires (gets) modal H code character string and value. This function is only valid in
Visual C++.
Argument
codeVal [Get] Specify the variable where the H code value is stored.
codeStr [Get] Specify the variable where the H code character string is stored.
request [Get] Whether or not the current block has been requested specifies the
variable returned.
 NOT_REQUEST(0): Current block has not been requested.
 NOW_REQUEST(1): Current block has been requested.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 When NULL is set for the argument, the value is not acquired.
 This function cannot be called from Visual Basic.

BOOL mdncinf_modal_hcode_vb(
LPDWORD codeVal,
BSTR *codeStr,
LPWORD request)
Explanation
Acquires (gets) modal H code character string and value. This function is only valid in
Visual Basic.
Argument
codeVal [Get] Specify the variable where the H code value is stored.
codeStr [Get] Specify the variable where the H code character string is stored.
request [Get] Whether or not the current block has been requested specifies the
variable returned.
 NOT_REQUEST(0): Current block has not been requested.
 NOW_REQUEST(1): Current block has been requested.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 When NULL is set for the argument, the value is not acquired.
 This function cannot be called from Visual C++.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 93/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdncinf_modal_dcode(
LPDWORD codeVal,
LPSTR codeStr,
LPWORD request)
Explanation
Acquires (gets) modal D code character string and value. This function is only valid in
Visual C++.
Argument
codeVal [Get] Specify the variable where the D code value is stored.
codeStr [Get] Specify the variable where the D code character string is stored.
request [Get] Whether or not the current block has been requested specifies the
variable returned.
 NOT_REQUEST(0): Current block has not been requested.
 NOW_REQUEST(1): Current block has been requested.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 When NULL is set for the argument, the value is not acquired.
 This function cannot be called from Visual Basic.

BOOL mdncinf_modal_dcode_vb(
LPDWORD codeVal,
BSTR *codeStr,
LPWORD request)
Explanation
Acquires (gets) modal D code character string and value. This function is only valid in
Visual Basic.
Argument
codeVal [Get] Specify the variable where the D code value is stored.
codeStr [Get] Specify the variable where the D code character string is stored.
request [Get] Whether or not the current block has been requested specifies the
variable returned.
 NOT_REQUEST(0): Current block has not been requested.
 NOW_REQUEST(1): Current block has been requested.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 When NULL is set for the argument, the value is not acquired.
 This function cannot be called from Visual C++.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 94/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdncinf_modal_mcode(
LPDWORD codeVal,
LPSTR codeStr,
LPWORD request)
Explanation
Acquires (gets) modal M code character string and value. This function is only valid in
Visual C++.
Argument
codeVal [Get] Specify the variable where the M code value is stored.
codeStr [Get] Specify the variable where the M code character string is stored.
request [Get] Whether or not the current block has been requested specifies the
variable returned.
 NOT_REQUEST(0): Current block has not been requested.
 NOW_REQUEST(1): Current block has been requested.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 When NULL is set for the argument, the value is not acquired.
 This function cannot be called from Visual Basic.

BOOL mdncinf_modal_mcode_vb(
LPDWORD codeVal,
BSTR *codeStr,
LPWORD request)
Explanation
Acquires (gets) modal M code character string and value. This function is only valid in
Visual Basic.
Argument
codeVal [Get] Specify the variable where the M code value is stored.
codeStr [Get] Specify the variable where the M code character string is stored.
request [Get] Whether or not the current block has been requested specifies the
variable returned.
 NOT_REQUEST(0): Current block has not been requested.
 NOW_REQUEST(1): Current block has been requested.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 When NULL is set for the argument, the value is not acquired.
 This function cannot be called from Visual C++.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 95/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdncinf_modal_scode(
LPDWORD codeVal,
LPSTR codeStr,
LPWORD request)
Explanation
Acquires (gets) modal S code character string and value. This function is only valid in
Visual C++,
Argument
codeVal [Get] Specify the variable where the S code value is stored.
codeStr [Get] Specify the variable where the S code character string is stored.
request [Get] Whether or not the current block has been requested specifies the
variable returned.
 NOT_REQUEST(0): Current block has not been requested.
 NOW_REQUEST(1): Current block has been requested.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 When NULL is set for the argument, the value is not acquired.
 This function cannot be called from Visual Basic.

BOOL mdncinf_modal_scode_vb(
LPDWORD codeVal,
BSTR *codeStr,
LPWORD request)
Explanation
Acquires (gets) modal S code character string and value. This function is only valid in
Visual Basic.
Argument
codeVal [Get] Specify the variable where the S code value is stored.
codeStr [Get] Specify the variable where the S code character string is stored.
request [Get] Whether or not the current block has been requested specifies the
variable returned.
 NOT_REQUEST(0): Current block has not been requested.
 NOW_REQUEST(1): Current block has been requested.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 When NULL is set for the argument, the value is not acquired.
 This function cannot be called from Visual C++.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 96/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdncinf_modal_tcode(
LPDWORD codeVal,
LPSTR codeStr,
LPWORD request)
Explanation
Acquires (gets) modal T code character string and value. This function is only valid in
Visual C++.
Argument
codeVal [Get] Specify the variable where the T code value is stored.
codeStr [Get] Specify the variable where the T code character string is stored.
request [Get] Whether or not the current block has been requested specifies the
variable returned.
 NOT_REQUEST(0): Current block has not been requested.
 NOW_REQUEST(1): Current block has been requested.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 When NULL is set for the argument, the value is not acquired.
 This function cannot be called from Visual Basic.

BOOL mdncinf_modal_tcode_vb(
LPDWORD codeVal,
BSTR *codeStr,
LPWORD request)
Explanation
Acquires (gets) modal T code character string and value. This function is only valid in
Visual Basic.
Argument
codeVal [Get] Specify the variable where the T code value is stored.
codeStr [Get] Specify the variable where the T code character string is stored.
request [Get] Whether or not the current block has been requested specifies the
variable returned.
 NOT_REQUEST(0): Current block has not been requested.
 NOW_REQUEST(1): Current block has been requested.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 When NULL is set for the argument, the value is not acquired.
 This function cannot be called from Visual C++.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 97/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdncinf_modal_fcode(
LPDWORD upperVal,
LPDWORD underVal,
LPSTR fCodeStr,
LPWORD request)
Explanation
Acquires (gets) modal F code character string and value. This function is only valid in
Visual C++.
Argument
upperVal [Get] Specify the variable where the F code value integer is stored.
underVal [Get] Specify the variable where the F code value decimal fraction is
stored.
fCodeStr [Get] Specify the variable where the F code character string is stored.
request [Get] Whether or not the current block has been requested specifies the
variable returned.
 NOT_REQUEST(0): Current block has not been requested.
 NOW_REQUEST(1): Current block has been requested.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 When NULL is set for the argument, the value is not acquired.
 This function cannot be called from Visual Basic.

BOOL mdncinf_modal_fcode_vb(
LPDWORD upperVal,
LPDWORD underVal,
BSTR *fCodeStr,
LPWORD request)
Explanation
Acquires (gets) modal F code character string and value. This function is only valid in
Visual Basic.
Argument
upperVal [Get] Specify the variable where the F code value integer is stored.
underVal [Get] Specify the variable where the F code value decimal fraction is
stored.
fCodeStr [Get] Specify the variable where the F code character string is stored.
request [Get] Whether or not the current block has been requested specifies the
variable returned.
 NOT_REQUEST(0): Current block has not been requested.
 NOW_REQUEST(1): Current block has been requested.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 When NULL is set for the argument, the value is not acquired.
 This function cannot be called from Visual C++.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 98/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdncinf_set_workoffset(
LPDWORD offsetValue,
WORD offsetMode)
Explanation
Sets workpiece reference (zero) point offset value.
Argument
offsetValue [Set] Specify array variable that sets workpiece offset values for each
axis. The array is 0 to number of axes controlled.
offsetMode [Set] Specify the offset mode to be set.
G54_MODE, G55_MODE, G56_MODE, G57_MODE
G58_MODE, G59_MODE, EXT_MOD
G54_1P+1 .... G54_1P+300
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 CNC parameter 1004#0, #1 are related.

BOOL mdncinf_get_workoffset(
LPDWORD offsetValue,
WORD offsetMode)
Explanation
Acquires (gets) workpiece reference (zero) point offset value.
Argument
offsetValue [Get] Specify array variable where workpiece offset values for each axis
are stored. The array is 0 to number of axes controlled.
offsetMode [Set] Specify the offset mode to be acquired.
G54_MODE, G55_MODE, G56_MODE, G57_MODE
G58_MODE, G59_MODE, EXT_MOD
G54_1P+1 .... G54_1P+300
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 CNC parameter 1004#0, #1 are related.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 99/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdncinf_modal_workoffset(
LPDWORD offsetValue,
short *offsetMode)
Explanation
Acquires (gets) the current workpiece offset value and offset mode.
Argument
offsetValue [Get] Specify array variable where workpiece offset values for each axis
are stored. The array is 0 to number of axes controlled.
offsetMode [Get] Specify the variable where the offset mode is stored.
G54_MODE, G55_MODE, G56_MODE, G57_MODE
G58_MODE, G59_MODE, EXT_MOD
G54_1P+1 .... G54_1P+300
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 CNC parameter 1004#0, #1 are related.
 When NULL is set for the argument, the value is not acquired.

BOOL mdncinf_tooloffset_type(
short *range,
LPWORD memType)
Explanation
Acquires (gets) the tool offset memory type and number of offsets that can be used..
Argument
range [Get] Specify array variable where the number of offsets that can be used
is stored (32/64/99/200/400/499/999).
memType [Get] Specify the variable where the memory type is stored.
 TOOL_OFFSET_MEM_A(0): Type-A
 TOOL_OFFSET_MEM_B(1): Type-B
 TOOL_OFFSET_MEM_C(2): Type-C
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 When NULL is set for the argument, the value is not acquired.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 100/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdncinf_set_tooloffset(
DWORD hValue,
DWORD dValue,
WORD hNo,
WORD dNo)
Explanation
Sets the tool offset (shape compensation) values.
Argument
hValue [Set] Specify the tool length offset (shape compensation) value.
dValue [Set] Specify the tool diameter offset (shape compensation) value.
hNo [Set] Specify the tool length offset number (H number).
dNo [Set] Specify the tool diameter offset number (D number).
Return Value
True : Set operation succeeded.
False : Set operation failed.

BOOL mdncinf_get_tooloffset(
LPDWORD hValue,
LPDWORD dValue,
WORD hNo,
WORD dNo)
Explanation
Acquires (gets) the tool offset (shape compensation) values.
Argument
hValue [Get] Specify the variable where the tool length offset (shape
compensation) value is stored.
dValue [Get] Specify the variable where the tool diameter offset (shape
compensation) value is stored.
hNo [Set] Specify the tool length offset number (H number).
dNo [Set] Specify the tool diameter offset number (D number).
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 When NULL is set for the argument, the value is not acquired.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 101/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdncinf_modal_tooloffset(
LPDWORD hValue,
LPDWORD dValue,
LPWORD hNo,
LPWORD dNo)
Explanation
Acquires (gets) the current tool offset values and H/D numbers.
Argument
hValue [Get] Specify the variable where the tool length offset (shape
compensation) value is stored.
dValue [Get] Specify the variable where the tool diameter offset (shape
compensation) value is stored.
hNo [Get] Specify the tool length offset number (H number).
dNo [Get] Specify the tool diameter offset number (D number).
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 When NULL is set for the argument, the value is not acquired.

BOOL mdncinf_exec_ncp(
LPDWORD oNum,
LPDWORD execOnum,
LPDWORD seqNo)
Explanation
Acquires (gets) the data for the CNC program being executed.
Argument
oNum [Get] Specify the variable where the main O number is stored.
execOnum [Get] Specify the variable where the O number being executed is stored.
seqNo [Get] Specify the variable where the sequence number being executed
is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 When NULL is set for the argument, the value is not acquired.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 102/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdncinf_exec_block(
LPSTR execBlock,
short bufLen)
Explanation
Acquires (gets) the specified number of characters in the program being executed. This
function can only be used in Visual C++.
Argument
execBlock [Get] Specify the character string variable where the content of the
program being executed is stored.
bufLen [Set] Specify the number of characters to be read.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 This function cannot be called from Visual Basic.

BOOL mdncinf_exec_block_vb(
BSTR *execBlock)
Explanation
Acquires (gets) the specified number of characters in the program being executed. This
function can only be used in Visual Basic.
Argument
execBlock [Get] Specify the character string variable where the content of the
program being executed is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 This function cannot be called from Visual C++.
 A maximum of 256 characters can be acquired.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 103/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdncinf_mem_info(
short *regiNCP,
short *remainNCP,
LPDWORD usedSize,
LPDWORD remainSize)
Explanation
Acquires (gets) the machining program management data that is already registered on
the CNC side.
Argument
regiNCP [Get] Variable where number of registered programs is stored.
remainNCP [Get] Variable where remaining number of registered programs that can
be registered is stored.
usedSize [Get] Variable where used memory area (number of characters) is
stored.
remainSize [Get] Variable where remaining available memory area (number of
characters) is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 When NULL is set for the argument, the value is not acquired.

BOOL mdncinf_mem_dir(
DWORD oNumber,
LPBOOL exist,
LPSTR comment,
LPDWORD size)
Explanation
Acquires (gets) the data for the specified program number. This function can only be
used in Visual C++.
Argument
oNumber [Set] Specify the program number.
exist [Get] Variable indicating whether or not program is registered in CNC
memory.
True: Registered / False: Not registered
comment [Get] Variable where program comment character string is stored.
size [Get] Variable where program size in memory is stored (bytes).
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 When NULL is set for the argument, the value is not acquired.
 This function cannot be called from Visual Basic.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 104/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdncinf_mem_dir_vb(
DWORD oNumber,
LPBOOL exist,
BSTR *comment,
LPDWORD size)
Explanation
Acquires (gets) the data for the specified program number. This function can only be
used in Visual Basic.
Argument
oNumber [Set] Specify the program number.
exist [Get] Variable indicating whether or not program is registered in CNC
memory.
True: Registered / False: Not registered
comment [Get] Variable where program comment character string is stored.
size [Get] Variable where program size in memory is stored (bytes).
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 When NULL is set for the argument, the value is not acquired.
 This function cannot be called from Visual C++.

BOOL mdncinf_mem_dirall(
short dataLen,
LPDWORD oNumber,
LPSTR *comment,
LPDWORD size,
LPWORD numProg)
Explanation
Acquires (gets) a list of all machining program numbers registered on the CNC side. This
function can only be used in Visual C++.
Argument
dataLen [Set] Specify the maximum data length that can be acquired.
oNumber [Get] Array variable where O number is stored.
comment [Get] Array variable where NC program comment string is stored.
size [Get] Array variable where size is stored.
numProg [Get] Array variable where number of acquired programs is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 The array number for the oNumber, comment and size must be equal or larger than
the dataLen.
 When NULL is set for the argument, the value is not acquired.
 This function cannot be called from Visual Basic.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 105/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdncinf_mem_dirall_vb(
short dataLen,
LPDWORD oNumber,
VARIANT *comment,
LPDWORD size,
LPWORD numProg)
Explanation
Acquires (gets) list of all machining program numbers registered on the CNC side. This
function can only be used in Visual Basic.
Argument
dataLen [Set] Specify maximum data length to be acquired.
oNumber [Get] Array variable where O number is stored.
comment [Get] Array variable where NC program comment string is stored.
size [Get] Array variable where size is stored.
numProg [Get] Variable where number of programs (O numbers) acquired is
stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 The array number for the oNumber, comment and size must be equal or larger than
the dataLen.
 When NULL is set for the argument, the value is not acquired.
 This function cannot be called from Visual C++.

BOOL mdncinf_chk_macrono(
WORD macroNo,
short *macroType)
Explanation
Checks whether or not specified macro variable number can be used.
Argument
macroNo [Set] Specify macro variable number.
macroType [Get] Variable where macro variable type is stored.
 LOCAL_VARIABLE(1)
 COMMON_VARIABLE(2)
 NOTUSE_VARIABLE(-1)
Return Value
True : Check operation succeeded.
False : Check operation failed.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 106/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdncinf_get_macro_string(
WORD macroNo,
LPSTR macroVal)
Explanation
Acquires (gets) macro variable as a character string. This function can only be used in
Visual C++.
Argument
macroNo [Set] Specify macro variable number.
macroVal [Get] Variable where macro value character string is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 This function cannot be called from Visual Basic.

BOOL mdncinf_get_macro_string_vb(
WORD macroNo,
BSTR *macroVal)
Explanation
Acquires (gets) macro variable as a character string. This function can only be used in
Visual Basic.
Argument
macroNo [Set] Specify macro variable number.
macroVal [Get] Variable where macro value character string is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 This function cannot be called from Visual C++.

BOOL mdncinf_set_macro_string(
WORD macroNo,
LPSTR macroVal)
Explanation
Sets macro variable character string.
Argument
macroNo [Set] Specify macro variable number.
macroVal [Get] Variable where macro value character string is stored.
Return Value
True : Set operation succeeded.
False : Set operation failed.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 107/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdncinf_cnc_alarm(
LPWORD almNum,
LPWORD axisNo,
LPSTR *almMsg,
LPWORD almType,
LPWORD numAlm)
Explanation
Acquires (gets) current NC alarm. This function can only be used in Visual C++.
Argument
almNum [Get] Array variable where alarm number is stored.
axisNo [Get] Array variable where alarm axis data is stored.
almMsg [Get] Array variable where alarm message character string is stored.
almType [Get] Array variable where alarm type is stored.
numAlm [Get] Variable where number of alarms acquired is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 In each argument, an array number equal to (Controlled axes x MAX_CNC_ALARM
(5) x (TYPE_EXTERNAL+1)) is required.
 When NULL is set for the argument, the value is not acquired.
 This function cannot be called from Visual Basic.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 108/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdncinf_cnc_alarm_vb(
LPWORD almNum,
LPWORD axisNo,
VARIANT *almMsg,
LPWORD almType,
LPWORD numAlm)
Explanation
Acquires (gets) current NC alarm. This function can only be used in Visual Basic.
Argument
almNum [Get] Array variable where alarm number is stored.
axisNo [Get] Array variable where alarm axis data is stored.
almMsg [Get] Array variable where alarm message character string is stored.
almType [Get] Array variable where alarm type is stored.
numAlm [Get] Variable where number of alarms acquired is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 In each argument, an array number equal to (Controlled axes x MAX_CNC_ALARM
(5) x (TYPE_EXTERNAL+1)) is required.
 When NULL is set for the argument, the value is not acquired.
 This function cannot be called from Visual C++.

BOOL mdncinf_chk_cnc_alarm(
LPWORD numAlarm)
Explanation
Acquires (gets) current number of CNC alarms that have occurred.
Argument
numAlarm [Get] Variable where number of CNC alarms is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note

BOOL mdncinf_total_cnc_alarm_history(
LPWORD numHistory)
Explanation
Acquires (gets) CNC alarm history data.
Argument
numHistory [Get] Specify variable where CNC alarm history data is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 109/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdncinf_cnc_alarm_history(
LPWORD almNum,
LPWORD axisNo,
LPSTR *almMsg,
LPWORD year,
LPWORD month,
LPWORD day,
LPWORD hour,
LPWORD min,
LPWORD sec,
LPWORD numHistory)
Explanation
Acquires (gets) CNC alarm history data. This function can only be used in Visual C++.
Argument
almNum [Get] Array variable where alarm number is stored.
axisNo [Get] Array variable where alarm axis data is stored.
almMsg [Get] Array variable where alarm message character string is stored.
year [Set] Array variable where year alarm occurred is stored.
month [Set] Array variable where month alarm occurred is stored.
day [Set] Array variable where day alarm occurred is stored.
hour [Set] Array variable where hour alarm occurred is stored.
min [Set] Array variable where minute alarm occurred is stored.
sec [Set] Array variable where second alarm occurred is stored.
numHistory [Set] Variable where number of alarms acquired is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 An appropriate array number is required in the argument array variable.
 When NULL is set for the argument, the value is not acquired.
 This function cannot be called from Visual Basic.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 110/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdncinf_cnc_alarm_history_vb(
LPWORD almNum,
LPWORD axisNo,
VARIANT *almMsg,
LPWORD year,
LPWORD month,
LPWORD day,
LPWORD hour,
LPWORD min,
LPWORD sec,
LPWORD numHistory)
Explanation
Acquires (gets) CNC alarm history data. This function can only be used in Visual Basic.
Argument
almNum [Get] Array variable where alarm number is stored.
axisNo [Get] Array variable where alarm axis data is stored.
almMsg [Get] Array variable where alarm message character string is stored.
year [Set] Array variable where year alarm occurred is stored.
month [Set] Array variable where month alarm occurred is stored.
day [Set] Array variable where day alarm occurred is stored.
hour [Set] Array variable where hour alarm occurred is stored.
min [Set] Array variable where minute alarm occurred is stored.
sec [Set] Array variable where second alarm occurred is stored.
numHistory [Set] Variable where number of alarms acquired is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 An appropriate array number is required in the argument array variable.
 When NULL is set for the argument, the value is not acquired.
 This function cannot be called from Visual C++.

BOOL mdncinf_machine(
LPLONG data)
Explanation
Acquires (gets) machine coordinate values.
Argument
data [Get] Array variable where coordinate data for each axis is stored.
(Array [0,..., Number of controlled axes])
Return Value
True : Get operation succeeded.
False : Get operation failed.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 111/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdncinf_absolute(
LPLONG data)
Explanation
Acquires absolute coordinate values.
Argument
data [Get] Array variable where coordinate data for each axis is stored.
(Array [0,..., Number of controlled axes])
Return Value
True : Get operation succeeded.
False : Get operation failed.

BOOL mdncinf_relative(
LPLONG data)
Explanation
Acquires relative coordinate values.
Argument
data [Get] Array variable where coordinate data for each axis is stored.
(Array [0,..., Number of controlled axes])
Return Value
True : Get operation succeeded.
False : Get operation failed.

BOOL mdncinf_distance(
LPLONG data)
Explanation
Acquires remaining movement distance.
Argument
data [Get] Array variable where coordinate data for each axis is stored.
(Array [0,..., Number of controlled axes])
Return Value
True : Get operation succeeded.
False : Get operation failed.

BOOL mdncinf_chk_cnc_reset(
LPBOOL reset)
Explanation
Checks NC reset On/Off status (F1#1).
Argument
reset [Get] Variable where reset status is stored.
True: NC being reset / False: NC not being reset.
Return Value
True : Get operation succeeded.
False : Get operation failed.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 112/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdncinf_cnc_reset()
Explanation
Executes NC reset from PC.
The external reset signal ERS <G008#7> is turned On, and 50[msec] after the reset
being performed signal RST<F001#1> goes On, the external reset signal ERS<G008#7>
is turned Off
Argument
Return Value
True : Execution succeeded.
False : Execution failed.

BOOL mdncinf_chk_eop(
LPBOOL eop)
Explanation
Checks EOP (End Of Program : G52#2) bit.
Argument
Eop [Get] Variable where EOP status is stored.
True: EOP is On / False: EOP is Off.
Return Value
True : Get operation succeeded.
False : Get operation failed.

BOOL mdncinf_chk_start_bit(
LPBOOL start)
Explanation
Checks On/Off status of start bit (G7#2).
Argument
start [Get] Variable where start bit status is stored.
True: Start bit is On / False: Start bit is Off.
Return Value
True : Get operation succeeded.
False : Get operation failed.

BOOL mdncinf_cnc_start()
Explanation
Executes CNC cycle start.
Argument
Return Value
True : Execution succeeded.
False : Execution failed.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 113/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdncinf_feed_hold()
Explanation
Executes feed hold (G8#5 OFF and ON).
Argument
Return Value
True : Execution succeeded.
False : Execution failed.

BOOL mdncinf_chk_mem_protect(
LPBOOL protect)
Explanation
Checks memory protect status (G46#3-6).
Argument
protect [Get] Variable where protect status is stored.
True: Protect is On / False: Protect is Off.
Return Value
True : Get operation succeeded.
False : Get operation failed.

BOOL mdncinf_chk_backedit(
LPBOOL edit)
Explanation
Acquires background editing status (F53#4).
Argument
edit [Set] Variable where background editing status is stored.
True: Background editing is being performed.
False: Background editing is not being performed.
Return Value
True : Get operation succeeded.
False : Get operation failed.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 114/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdncinf_delete_onumber(
DWORD minNumber,
DWORD maxNumber,
LPWORD numDel)
Explanation
Deletes specified O number range from CNC O number memory.
Argument
minNumber [Set] Specifies minimum (starting) O number to be deleted.
maxNumber [Set] Specifies maximum (ending) O number to be deleted.
numDel [Get] Specifies variable where number of O numbers to be deleted is
stored.
Return Value
True : Delete operation succeeded.
False : Delete operation failed.
Note
 Causes for Failure of Deletion:
- Illegal O number was specified.
- Write protect is On.
- Background editing being performed.
- Downloading or referencing being executed.
- CNC is in alarm (PS000, PS101) status.
- CNC is in MDI mode.
- Machining program being run.
- Included in program selected in foreground.
- Communication problem with machine, machine power off, etc.

BOOL mdncinf_onumber_search(
DWORD oNumber)
Explanation
Executed foreground search for specified O number.
Argument
oNumber [Set] Specify O number to be found.
Return Value
True : Execution succeeded.
False : Execution failed.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 115/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdncinf_spindle_feed(
LPDWORD feed)
Explanation
Acquires (gets) the spindle feed rate (mm/min).
Argument
feed [Get] Specify variable where spindle feed rate [mm/min] is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.

BOOL mdncinf_prepare_zero(
BOOL OnOff)
Explanation
Sets parameter that specifies allowable axis movement when zero (reference) point
return has not been performed. This is used by the One touch function to perform zero
point return in the DNC operation mode.
Argument
OnOff [Set] Set the parameter bit.
True: Parameter is turned On / False: Parameter is turned Off.
Return Value
True : Set operation succeeded.
False : Set operation failed.

BOOL mdncinf_chk_single_block(
LPBOOL sbk)
Explanation
Acquires (gets) the single block (F4#3) status.
Argument
sbk [Get] Specify variable where the single block (F4#3) status is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.

BOOL mdncinf_set_cnc_timer()
Explanation
Sets the PC side date and time to the CNC calendar timer.
Argument
Return Value
True : Set operation succeeded.
False : Set operation failed.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 116/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdncinf_get_max_node(
long *max_node)
Explanation
Acquires (gets) total number of HSSB nodes.
Argument
max_node [Get] Specify variable where the total number of nodes is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.

BOOL mdncinf_get_node_info(
long nodeNo,
long *ioBase,
long *status,
long *cncType,
char *nodeName)
Explanation
Acquires (gets) the specified HSSB node data. This function is only valid in Visual C++.
Argument
nodeNo [Set] Specify the node number to be acquired.
ioBase [Get] Specify variable where I/O port base address is stored.
status [Get] Specify variable where device installation status is stored.
(0: Not installed / 1: Installed)
cncType [Get] Specify variable where CNC type is stored.
 1: Series 160/180/210
 2: Series 150
 3: Power Mate
 4: Power Mate i
 5: Series 160i/180i-W
 6: Series 150i
 7: Series 0i
nodeName [Get] Specify variable where node name is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 This function cannot be called from Visual Basic.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 117/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdncinf_get_node_info_vb(
long nodeNo,
long *ioBase,
long *status,
long *cncType,
BSTR *nodeName)
Explanation
Acquires (gets) the specified HSSB node data. This function is only valid in Visual Basic.
Argument
nodeNo [Set] Specify the node number to be acquired.
ioBase [Get] Specify variable where I/O port base address is stored.
status [Get] Specify variable where device installation status is stored.
(0: Not installed / 1: Installed)
cncType [Get] Specify variable where CNC type is stored.
 1: Series 160/180/210
 2: Series 150
 3: Power Mate
 4: Power Mate i
 5: Series 160i/180i-W
 6: Series 150i
 7: Series 0i
nodeName [Get] Specify variable where node name is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 This function cannot be called from Visual C++.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 118/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdncinf_get_pmc_addr_info(
short adrType,
short *adrNum,
short *pmcAdr,
short *adrAttr,
short *topOfs,
short *lastOfs)
Explanation
Acquires (gets) PMC type attributes, valid address range and other data.
Argument
adrType [Set] Specify PMC address type.
ADR_G(0)/ADR_F(1) / ADR_Y(2)/ADR_X(3) /
ADR_A(4)/ADR_R(5) / ADR_T(6)/ADR_K(7) /
ADR_C(8)/ADR_D(9) / (-1): all address information
adrNum [Get] Specify variable where PMC data quantity (1 – 64) is stored.
pmcAdr [Get] Specify variable where PMC address type is stored.
ADR_G/ADR_F/ADR_Y/ADR_X/ADR_A/ADR_R/
ADR_T/ADR_K/ADR_C/ADR_D
adrAttr [Get] Specify variable where PMC address type is stored.
(0: Write enable / 1: Write prohibit)
topOfs [Get] Specify variable where first PMC address number is stored.
lastOft [Get] Specify variable where last PMC address number is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.

BOOL mdncinf_set_toolwear(
DWORD hValue,
DWORD dValue,
WORD hNo,
WORD dNo)
Explanation
Sets tool offset (wear compensation) values.
Argument
hValue [Set] Specify tool length offset (wear compensation) value.
dValue [Set] Specify tool diameter offset (wear compensation) value.
hNo [Set] Specify tool length offset number (H number).
dNo [Set] Specify tool diameter offset number (H number).
Return Value
True : Set operation succeeded.
False : Set operation failed.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 119/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdncinf_get_toolwear(
LPDWORD hValue,
LPDWORD dValue,
WORD hNo,
WORD dNo)
Explanation
Acquires (gets) tool offset (wear compensation) values.
Argument
hValue [Get] Specify variable where tool length offset (wear compensation)
value is stored.
dValue [Get] Specify variable where diameter length offset (wear
compensation) value is stored.
hNo [Set] Specify tool length offset number (H number). When 0 is specified,
the tool length offset (wear compensation) value is not acquired.
dNo [Set] Specify tool diameter offset number (D number). When 0 is
specified, the tool diameter offset (wear compensation) value is
not acquired.
Return Value
True : Get operation succeeded.
False : Get operation failed.

BOOL mdncinf_rapid_override(
LPWORD rate)
Explanation
Acquires (gets) rapid feed override value [%].
Argument
rate [Get] Specify variable where rapid feed override value [%] is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.

BOOL mdncinf_feed_override(
LPWORD rate)
Explanation
Acquires (gets) cutting feed override value [%].
Argument
rate [Set] Specify variable where cutting feed override value [%] is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 When the override cancel signal (G6#4) is turned On, the rate returns to 100%.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 120/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdncinf_foreground_search(
DWORD oNumber)
Explanation
Performs foreground search for specified O number.
Argument
oNumber [Set] Specify O number to be found.
Return Value
True : Succeeded.
False : Failed.
Note
 The basic operation is the same as mdncinf_onumber_search().

BOOL mdncinf_get_tool_compensation(
WORD compenType,
WORD fromNo,
WORD toNo,
LPDWORD value)
Explanation
Acquires (gets) the tool offset values for the specified type and numbers.
Argument
compenType [Set] Set the type of tool offset.
 COMPEN_TYPE_H_GEOMETRY(0): Tool length shape
compensation
 COMPEN_TYPE_H_WEAR(1): Tool length wear
compensation
 COMPEN_TYPE_D_GEOMETRY(2): Tool diameter shape
compensation
 COMPEN_TYPE_D_WEAR(3): Tool diameter wear
compensation
fromNo [Set] Specify the tool offset starting (from) number.
toNo [Set] Specify the tool offset ending (to) number.
value [Get] Specify the array variable where tool offset values are stored.
An array number equal to (fromNo-toNo+1) is required.
Return Value
True : Get operation succeeded.
False : Get operation failed.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 121/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdncinf_set_tool_compensation(
WORD compenType,
WORD fromNo,
WORD toNo,
LPDWORD value)
Explanation
Sets the tool offset values for the specified type and numbers.
Argument
compenType [Set] Set the type of tool offset.
 COMPEN_TYPE_H_GEOMETRY(0): Tool length shape
compensation
 COMPEN_TYPE_H_WEAR(1): Tool length wear
compensation
 COMPEN_TYPE_D_GEOMETRY(2): Tool diameter shape
compensation
 COMPEN_TYPE_D_WEAR(3): Tool diameter wear
compensation
fromNo [Set] Specify the tool offset starting (from) number.
toNo [Set] Specify the tool offset ending (to) number.
value [Set] Specify the array variable where tool offset values to be set are
stored.
An array number equal to (fromNo-toNo+1) is required.
Return Value
True : Set operation succeeded.
False : Set operation failed.
BOOL mdncinf_spindle_load_meter(
LPDWARD load) *5 added
Explanation
Acquires (gets) the spindle motor load [%]. The unit is 0.1%.
When the acquired value is 123, the acquired value means 12.3%.
Argument
load [Get] Specify the variable where the load is stored.
Return Value
True : Set operation succeeded.
False : Set operation failed.

BOOL mdncinf_spindle_motor_speed(
LPDWARD speed) *5 added
Explanation
Acquires (gets) the spindle motor speed [rpm].
Argument
Speed [Get] Specify the variable where the speed is stored.
Return Value
True : Set operation succeeded.
False : Set operation failed.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 122/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

BOOL mdncinf_spindle_motor(
LPDWARD load,
LPWORD speed) *5 added
Explanation
Acquires (gets) the spindle motor load [%] and rotation speed [rpm]. The load unit is
0.1%.
When the acquired value is 123, the acquired value means 12.3%.
Argument
load [Get] Specify the variable where the load is stored.
speed [Get] Specify the variable where the speed is stored.
Return Value
True : Set operation succeeded.
False : Set operation failed.

BOOL mdncinf_spindle_load_meter2(
LPDWARD load) *17 added
Explanation
Acquires (gets) the spindle motor load [%]. The unit is 0.01%.
When the acquired value is 1234, the acquired value means 12.34% and dances.
Argument
load [Get] Specify the variable where the load is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.

BOOL mdncinf_servo_meter(
short *data_num,
long *data)
Explanation
Acquires (gets) the load [%] of each controlled axises. The unit is 0.1%.
When the acquired value is 123, the acquired value means 12.3%.
Argument
load [Get] The number of controlled axises taken the load is set into the
variable.
speed [Get] Specify the array that each axises load is stored.
Specify the array size more than the number of maximum
axises of control unit.
Return Value
True : Get operation succeeded.
False : Get operation failed.

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 123/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5

8 Functions List

LONG mdpro5_GetLastSubError(); .............................................................................................11

Retrieves the error number indicating immediate cause by which last DLL function failed. ..................11

LONG mdpro5_GetLastMainError();........................................................................................... 12

Retrieves the unique error number to detect the point where the last error occurred. .......................... 12

BOOL mdpro5_set_node( LONG lNodeNo, LONG lDevSymbol); ......................................... 13

Your application must call this function at first after Professional 5 started, to retrieve static data of
connected MC, to retrieve MOS parameters, and to create MSMQ on MOS PC.................................. 13

BOOL mdpro5_software_info( LPSTR szPlatform, LPSTR szSeries, LPSTR szVersion,


LPSTR szServicePack, LPSTR szMcName); ............................................................................. 14

Retrieves the series and version of Professional 5. ........................................................................... 14

BOOL mdpro5_get_mcpara( LPDWORD lpdwParaNo, LPLONG lplValue, DWORD


dwSumArray); ............................................................................................................................... 15

Retrieves the settings of specified MC parameter(s). ........................................................................ 15

BOOL mdpro5_max_atc_magazine( LPDWORD lpdwSumActualMgzn, LPBOOL


lpfOutMcMgzn); ............................................................................................................................ 16

Retrieves the count of ATC magazines. ............................................................................................ 16

BOOL mdpro5_atc_magazine_info( DWORD dwMgznNo, LPDWORD lpdwMaxPotNo,


LPLONG lplMgznType, LPDWORD lpdwEmptyPotNo); ........................................................... 17

Retrieves the information of ATC magazine (count of tools, type, etc). ............................................... 17

BOOL mdpro5_tool_info( LPBOOL lpfInchUnit, LPDWORD lpdwFtnFig, LPDWORD


lpdwItnFig, LPDWORD lpdwPtnFig, LPDWORD lpdwFtnPtnManageType); ..................... 18

Retrieves the tool information (unit, effective digits, etc). .................................................................. 18

BOOL mdpro5_apc_info( LPLONG lplApcArmType, LPDWORD lpdwMgznPalletCount,


LPDWORD lpdwOutPalletCount, LPDWORD lpdwFacePerPallet); ...................................... 19

Retrieve the information of Pallet Changer. ..................................................................................... 19

BOOL mdpro5_chk_system_mode( LPBOOL lpfSysMode); ................................................... 20

Retrieves the system mode. ............................................................................................................. 20

BOOL mdpro5_chk_maintenance_mode( LPBOOL lpfMaintMode); ...................................... 21

Retrieves the maintenance mode. .................................................................................................... 21

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 124/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5
BOOL mdpro5_chk_auto_unloading_mode( LPBOOL lpfUnloadMode); ............................... 22

Retrieves the auto-unloading mode. ................................................................................................ 22

BOOL mdpro5_chk_operator_call( LPLONG lplOpeCall); ....................................................... 23

Retrieves the operator-call status. ................................................................................................... 23

BOOL mdpro5_spindle_status( DWORD dwSpindleNo, LPLONG lplGear, LPLONG


lplDirection); ................................................................................................................................. 24

Retrieve the gear-position and status of spindle. .............................................................................. 24

BOOL mdpro5_spindle_speed( DWORD dwSpindleNo, LPDWORD lpdwSCode, LPDWORD


lpdwInstruct, LPDWORD lpdwActual); ...................................................................................... 25

Retrieves the spindle speed. ............................................................................................................ 25

BOOL mdpro5_atc_status( LPBOOL lpfArmStandby, LPLONG lplMgznStatus); ................. 26

Retrieve the status of ATC magazine. .............................................................................................. 26

BOOL mdpro5_apc_status( LPBOOL lpfArmStandby, LPLONG lplStckStatus); .................. 27

Retrieves the status of pallet changer............................................................................................... 27

BOOL mdpro5_mc_alarm( LPDWORD lpdwAlarmNo, LPBYTE lpbAlarmType, LPBYTE


lpbSeriousLevel, LPBYTE lpbPoutDisable, LPBYTE lpbCycleStartDisable, LPBYTE
lpbRetryEnable, LPBOOL lpfFailedNcReset, LPSYSTEMTIME lptOccuredTime, LPDWORD
lpdwSumArray, LPSTR szNcMessage); ..................................................................................... 28

Retrieves the data of current MC alarms. ........................................................................................ 28

BOOL mdpro5_chk_mc_alarm( LPDWORD lpdwTotalAlarm, LPDWORD lpdwTotalWarn); 30

Retrieve the numbers of current MC alarms and warnings. ............................................................... 30

BOOL mdpro5_max_alarm_history( LPDWORD lpdwMaxHistory); ....................................... 31

Retrieve the maxinum number of MC alarms history. ....................................................................... 31

BOOL mdpro5_mc_alarm_history( LPDWORD lpdwAlarmNo, LPBYTE lpbAlarmType,


LPBYTE lpbSeriousLevel, LPBYTE lpbResetType, LPSYSTEMTIME lptOccuredTime,
LPSYSTEMTIME lptResetTime, LPDWORD lpdwSumArray, LPSTR szNcMessage); ........... 32

Retrieve the history of MC alarms data. .......................................................................................... 32

BOOL mdpro5_change_nc_mode( DWORD dwNcMode, BOOL fModeLockEffective); ....... 34

Change NC operation mode. .......................................................................................................... 34

BOOL mdpro5_optional_block_skip_is_enable( LPBOOL lpfEnable); .................................. 35

Retrieves whether optional block skip option is enabled. .................................................................. 35

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 125/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5
BOOL mdpro5_set_optional_block_skip( BYTE bBDT2, BYTE bBDT3, BYTE bBDT4, BYTE
bBDT5, BYTE bBDT6, BYTE bBDT7, BYTE bBDT8, BYTE bBDT9); ........................................ 36

Changes the status of optional block skip. ....................................................................................... 36

BOOL mdpro5_chk_backedit( LPBOOL lpfMode, LPDWORD lpdwONumber); .................... 37

Retrieve the background-edit status of Professional 5. ...................................................................... 37

BOOL mdpro5_system_cycle_start( BOOL fOpeCall); ............................................................ 38

Request the execution of cycle-start to Professinoal 5. ...................................................................... 38

BOOL mdpro5_chk_system_mach_finish( LPBOOL lpfFinish, LPDWORD


lpdwFinCondition); ....................................................................................................................... 39

Retrieves whether the cycle-start with mdpro5_system_cycle_start() is already finished...................... 39

BOOL mdpro5_system_cycle_abort( BOOL fAbnormalFinish); ............................................. 40

Execute the same procedure as when flexible switch “System Machining Abort” or “System Machining
Finish” on the Professional 5 is pushed........................................................................................... 40

BOOL mdpro5_can_auto_poweroff( LPBOOL lpfYes); ............................................................ 41

Retrieves whether it is possible to execute auto power-off when MC alarms occur. ............................. 41

BOOL mdpro5_auto_poweroff(); ................................................................................................ 42

Request MC to power off. ............................................................................................................... 42

BOOL mdpro5_get_milling_time( LPDWORD lpdwTime); ....................................................... 43

Retrieves the total time of spindle rotation commanded by MOS........................................................ 43

BOOL mdpro5_toollife_info( LPBOOL lpfCountTypeRemain, LPBOOL


lpfAlarmResetMaxLife); ............................................................................................................... 44

Retrieves the information of tool life. .............................................................................................. 44

BOOL mdpro5_tool_data_item_is_enable( LPDWORD lpdwItem, LPDWORD lpdwEnable,


DWORD dwSumArray); ................................................................................................................ 45

Retrieves whether specified tool data items are valid. ....................................................................... 45

BOOL mdpro5_get_tool_data_item( DWORD dwItem, LPDWORD lpdwMgznNo, LPLONG


lplPotNo, LPLONG lplValue, DWORD dwSumArray); ............................................................... 48

Retrieves the values of specified tool data item. ............................................................................... 48

BOOL mdpro5_get_cutter_data_item( DWORD dwItem, LPDWORD lpdwMgznNo, LPLONG


lplPotNo, LPDWORD lpdwCutterNo, LPLONG lplValue, DWORD dwSumArray); ................. 50

Retrieves the values of specified cutter data item. ............................................................................ 50

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 126/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5
BOOL mdpro5_set_tool_data_item( DWORD dwItem, LPDWORD lpdwMgznNo, LPLONG
lplPotNo, LPLONG lplValue, DWORD dwSumArray); ............................................................... 52

Changes the values of specified tool data item. ................................................................................ 52

BOOL mdpro5_set_cutter_data_item( DWORD dwItem, LPDWORD lpdwMgznNo, LPLONG


lplPotNo, LPDWORD lpdwCutterNo, LPLONG lplValue, DWORD dwSumArray); ................. 54

Changes the values of specified cutter data item. ............................................................................. 54

BOOL mdpro5_spindle_tool( LPDWORD lpdwMgznNo, LPLONG lplPotNo, LPDWORD


lpdwCutterNo, LPDWORD lpdwFtn, LPDWORD lpdwItn, LPDWORD lpdwPtn); ........... 56

Retrieve the information of spindle tool. .......................................................................................... 56

BOOL mdpro5_next_tool( LPDWORD lpdwMgznNo, LPLONG lplPotNo, LPDWORD


lpdwCutterNo, LPDWORD lpdwFtn, LPDWORD lpdwItn, LPDWORD lpdwPtn); ........... 57

Retrieve the information of next tool. .............................................................................................. 57

BOOL mdpro5_clear_tool_data( LPDWORD lpdwMgznNo, LPLONG lplPotNo, DWORD


dwSumArray); ............................................................................................................................... 58

Clear specified tools data. More than one tools can be cleared at a time. ........................................... 58

BOOL mdpro5_get_pallet_no( DWORD dwDevice, DWORD dwDevNo, DWORD


dwPosition, LPDWORD lpdwPalletNo);................................................................................... 59

Retrieves the pallet number at the specified position in the specified devive. ...................................... 59

BOOL mdpro5_set_pallet_no( DWORD dwDevice, DWORD dwDevNo, DWORD


dwPosition, DWORD dwPalletNo);........................................................................................... 60

Changes the pallet number at the specified position in the specified devive. ....................................... 60

BOOL mdpro5_get_pallet_data_item( DWORD dwItem, LPDWORD lpdwPalletNo, LPLONG


lplValue, DWORD dwSumArray); ................................................................................................ 61

Retrieves the values of specified pallet data item. ............................................................................. 61

BOOL mdpro5_get_face_data_item( DWORD dwItem, LPDWORD lpdwPalletNo, LPDWORD


lpdwFaceNo, LPLONG lplValue, DWORD dwSumArray); ........................................................ 62

Retrieves the values of specified face data item. ............................................................................... 62

BOOL mdpro5_set_pallet_data_item( DWORD dwItem, LPDWORD lpdwPalletNo, LPLONG


lplValue, DWORD dwSumArray); ................................................................................................ 63

Changes the values of specified pallet data item............................................................................... 63

BOOL mdpro5_set_face_data_item( DWORD dwItem, LPDWORD lpdwPalletNo, LPDWORD


lpdwFaceNo, LPLONG lplValue, DWORD dwSumArray); ........................................................ 64

Changes the values of specified face data item................................................................................. 64

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 127/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5
BOOL mdpro5_clear_work_data( LPDWORD lpdwPalletNo, DWORD dwSumArray);.......... 65

Clear the pallet data and face data. ................................................................................................ 65

BOOL mdpro5_get_on_duty( LPBOOL lpfFlag); ....................................................................... 66

Retrieves the on-duty / off-duty mode .............................................................................................. 66

BOOL mdpro5_set_on_duty( BOOL fFlag); ............................................................................... 67

Changes the on-duty / off-duty mode ............................................................................................... 67

BOOL mdpro5_tls_potno( LPDWORD lpdwMgznNo, LPLONG lplPotNo); .......................... 68

Retrieve the information of TLS pot................................................................................................. 68

BOOL mdpro5_atc_random_magazine( LPBOOL lpfRandomAtc); ........................................ 69

Retrieves the management type of tool number data of the ATC magazine. ......................................... 69

BOOL mdpro5_get_arbitrary_machine_status( DWORD dwStatusKind1, DWORD


dwStatusKind2, DWORD dwStatusKind3, DWORD dwStatusKind4, LPLONG
lplOutputData1, LPLONG lplOutputData2, LPLONG lplOutputData3, LPLONG
lplOutputData4); ........................................................................................................................... 70

Retrieve an arbitrary machine states. .............................................................................................. 70

BOOL mdpro5_max_tls ( LPDWORD lpdwMaxTls); ................................................................. 71

Retrieve the number of TLS. ........................................................................................................... 71

BOOL mdpro5_tls_potno2( LPDWORD lpdwMgznNo, LPLONG lplPotNo, DWORD


dwTlsNo); ...................................................................................................................................... 72

Retrieve the information of TLS pot of the specified TLS number. ...................................................... 72

long mdncinf_GetLastMError() ................................................................................................... 73

Returns last error that occurred for mdncinf.dll function. ........................................................... 73

long mdncinf_GetLastFError() .................................................................................................... 73

Returns last Fanuc Library error number that occurred for mdncinf.dll function........................ 73

BOOL mdncinf_set_node( long node) ....................................................................................... 73

Acquires (gets) the FOCAS1 Library Handle in order to use the FOCAS1 function within
mdncinf.dll. The acquired library handle is stored/used within mdncinf.dll. ............................... 73

BOOL mdncinf_chk_axis_no( WORD axisNo) .......................................................................... 74

Checks whether or not an axis number was specified for axisNo. ............................................ 74

BOOL mdncinf_get_cncpara( WORD paraNo, WORD dataType, long *value) ................. 74

Acquires (gets) specified NC parameter value. .......................................................................... 74

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 128/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5
BOOL mdncinf_set_cncpara( WORD paraNo, WORD dataType, long *value) ................. 75

Sets specified NC parameter value. ........................................................................................... 75

BOOL mdncinf_get_cncpara_bit( WORD paraNo, WORD bitNo, WORD dataType,


BITINF *onoff) ............................................................................................................................... 76

Acquires (gets) the specified bit type NC parameter. ................................................................. 76

BOOL mdncinf_set_cncpara_bit( WORD paraNo, WORD bitNo, WORD dataType, BITINF


*onoff) ............................................................................................................................................ 76

Sets the specified bit type NC parameter value. ........................................................................ 76

short mdncinf_asciitoadrtype( short adrType) ......................................................................... 77

Converts the ASCII code PMC address name into PMC address type data. ............................ 77

short mdncinf_adrtypetoascii( short adrType) ......................................................................... 77

Converts the PMC address data into ASCII code PMC address name. .................................... 77

BOOL mdncinf_get_pmcdata( WORD adrType, WORD adrNo, WORD dataSize, long


*value) ............................................................................................................................................ 78

Acquires (gets) specified PMC address data. ............................................................................ 78

BOOL mdncinf_set_pmcdata( WORD adrType, WORD adrNo, WORD dataSize, long


value) ............................................................................................................................................. 78

Sets data to specified PMC address. ......................................................................................... 78

BOOL mdncinf_get_pmcbit( WORD adrType, WORD adrNo, WORD bitNo, BITINF


*onoff) ............................................................................................................................................ 79

Acquires (gets) specified PMC address bit data. ....................................................................... 79

BOOL mdncinf_set_pmcbit( WORD adrType, WORD adrNo, WORD bitNo, BITINF onoff)
........................................................................................................................................................ 79

Sets specified PMC address bit data.......................................................................................... 79

BOOL mdncinf_get_pmcbyteary( WORD adrType, WORD adrNo, WORD rdSize, char


*value) ............................................................................................................................................ 80

Continuously acquires (gets) specified PMC address data in BYTE units. ............................... 80

BOOL mdncinf_set_pmcbyteary( WORD adrType, WORD adrNo, WORD wrSize, char


*value) ............................................................................................................................................ 80

Continuously sets data to specified PMC type and address in BYTE units. .............................. 80

BOOL mdncinf_get_pmccntlgrp( short *grpNo) ....................................................................... 81

Reads total number of data table control data groups used to manage PMC data table (address

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 129/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5
D). ............................................................................................................................................... 81

BOOL mdncinf_set_pmccntlgrp( short grpNo) ......................................................................... 81

Writes total number of data table control data groups used to manage PMC data table (address
D). ............................................................................................................................................... 81

BOOL mdncinf_get_pmccntldata( short startGrpNo, short endGrpNo, short *tblParam,


short *dataType, short *dataSize, short *dataAddr) ............................................................ 82

Reads data table control data used to manage PMC data table (address D). .......................... 82

BOOL mdncinf_set_pmccntldata( short startGrpNo, short endGrpNo, short *tblParam,


short *dataType, short *dataSize, short *dataAddr) ............................................................ 83

Writes data table control data used to manage PMC data table (address D). ........................... 83

BOOL mdncinf_axis_name( LPSTR rtnBuf, short axisNo) ...................................................... 83

Acquires (gets) each axis name (X, Y, Z...). This function is only valid in Visual C++. .............. 83

BOOL mdncinf_axis_name_vb( BSTR *rtnBuf, short axisNo) .............................................. 84

Acquires (gets) each axis name (X, Y, Z...). This function is only valid in Visual Basic. ............ 84

BOOL mdncinf_tool_unit( short *incUnit) ................................................................................. 84

Acquires (gets) minimum setting unit for tool offset/macro variable. ......................................... 84

BOOL mdncinf_axis_unit( short *incUnit, short axisNo) ...................................................... 85

Acquires (gets) minimum setting unit for axes. .......................................................................... 85

BOOL mdncinf_num_of_axis( short *numAxis)........................................................................ 85

Acquires (gets) number of controlled axes. ................................................................................ 85

BOOL mdncinf_cnc_version( long *cncType, LPSTR typeStr, LPSTR serStr, LPSTR


verStr) ............................................................................................................................................ 86

Acquires (gets) CNC type and version data. This function is only valid in Visual C++. ............. 86

BOOL mdncinf_cnc_version_vb( long *cncType, BSTR *typeStr, BSTR *serStr, BSTR


*verStr) ........................................................................................................................................... 87

Acquires (gets) CNC type and version data. This function is only valid in Visual Basic. ........... 87

BOOL mdncinf_cnc_status( LPWORD ncMode, LPWORD ncRun, LPWORD ncMotion,


LPWORD mstCodeFin, LPWORD ncEmg, LPWORD editOpe) ........................................... 87

Acquires (gets) CNC status data (machining, emergency stop, aixs moving, CNC mode, etc.) 87

BOOL mdncinf_cnc_syssoftver( LPSTR pmcser, LPSTR pmcver, LPSTR ladser, LPSTR


ladver, LPSTR cexelibser, LPSTR cexelibver, LPSTR cexeaplser, LPSTR cexeaplver)89

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 130/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5
Reads CNC system software series/version. This function is only valid in Visual C++. ............ 89

BOOL mdncinf_cnc_syssoftver_vb( BSTR *pmcser, BSTR *pmcver, BSTR *ladser, BSTR


*ladver, BSTR *cexelibser, BSTR *cexelibver, BSTR *cexeaplser, BSTR *cexeaplver) 90

Reads CNC system software series/version. This function is only valid in Visual Basic. .......... 90

BOOL mdncinf_modal_gcode( LPWORD upperVal, LPWORD underVal, LPSTR gCodeStr,


LPWORD request, short gCodeGrp) .......................................................................................... 91

Acquires (gets) modal G codes. This function is only valid in Visual C++. ................................ 91

BOOL mdncinf_modal_gcode_vb( LPWORD upperVal, LPWORD underVal, BSTR


*gCodeStr, LPWORD request, short gCodeGrp) .................................................................... 92

Acquires (gets) modal G codes. This function is only valid in Visual Basic. .............................. 92

BOOL mdncinf_modal_hcode( LPDWORD codeVal, LPSTR codeStr, LPWORD request)


........................................................................................................................................................ 93

Acquires (gets) modal H code character string and value. This function is only valid in Visual
C++. ............................................................................................................................................ 93

BOOL mdncinf_modal_hcode_vb( LPDWORD codeVal, BSTR *codeStr, LPWORD


request).......................................................................................................................................... 93

Acquires (gets) modal H code character string and value. This function is only valid in Visual
Basic. .......................................................................................................................................... 93

BOOL mdncinf_modal_dcode( LPDWORD codeVal, LPSTR codeStr, LPWORD request)


........................................................................................................................................................ 94

Acquires (gets) modal D code character string and value. This function is only valid in Visual
C++. ............................................................................................................................................ 94

BOOL mdncinf_modal_dcode_vb( LPDWORD codeVal, BSTR *codeStr, LPWORD


request).......................................................................................................................................... 94

Acquires (gets) modal D code character string and value. This function is only valid in Visual
Basic. .......................................................................................................................................... 94

BOOL mdncinf_modal_mcode( LPDWORD codeVal, LPSTR codeStr, LPWORD request)


........................................................................................................................................................ 95

Acquires (gets) modal M code character string and value. This function is only valid in Visual
C++. ............................................................................................................................................ 95

BOOL mdncinf_modal_mcode_vb( LPDWORD codeVal, BSTR *codeStr, LPWORD


request).......................................................................................................................................... 95

Acquires (gets) modal M code character string and value. This function is only valid in Visual
Basic. .......................................................................................................................................... 95

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 131/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5
BOOL mdncinf_modal_scode( LPDWORD codeVal, LPSTR codeStr, LPWORD request)
........................................................................................................................................................ 96

Acquires (gets) modal S code character string and value. This function is only valid in Visual
C++, ............................................................................................................................................ 96

BOOL mdncinf_modal_scode_vb( LPDWORD codeVal, BSTR *codeStr, LPWORD


request).......................................................................................................................................... 96

Acquires (gets) modal S code character string and value. This function is only valid in Visual
Basic. .......................................................................................................................................... 96

BOOL mdncinf_modal_tcode( LPDWORD codeVal, LPSTR codeStr, LPWORD request)


........................................................................................................................................................ 97

Acquires (gets) modal T code character string and value. This function is only valid in Visual
C++. ............................................................................................................................................ 97

BOOL mdncinf_modal_tcode_vb( LPDWORD codeVal, BSTR *codeStr, LPWORD


request).......................................................................................................................................... 97

Acquires (gets) modal T code character string and value. This function is only valid in Visual
Basic. .......................................................................................................................................... 97

BOOL mdncinf_modal_fcode( LPDWORD upperVal, LPDWORD underVal, LPSTR fCodeStr,


LPWORD request) ........................................................................................................................ 98

Acquires (gets) modal F code character string and value. This function is only valid in Visual
C++. ............................................................................................................................................ 98

BOOL mdncinf_modal_fcode_vb( LPDWORD upperVal, LPDWORD underVal, BSTR


*fCodeStr, LPWORD request) ................................................................................................... 98

Acquires (gets) modal F code character string and value. This function is only valid in Visual
Basic. .......................................................................................................................................... 98

BOOL mdncinf_set_workoffset( LPDWORD offsetValue, WORD offsetMode) ................... 99

Sets workpiece reference (zero) point offset value. ................................................................... 99

BOOL mdncinf_get_workoffset( LPDWORD offsetValue, WORD offsetMode) ................... 99

Acquires (gets) workpiece reference (zero) point offset value. .................................................. 99

BOOL mdncinf_modal_workoffset( LPDWORD offsetValue, short *offsetMode) ............. 100

Acquires (gets) the current workpiece offset value and offset mode. ...................................... 100

BOOL mdncinf_tooloffset_type( short *range, LPWORD memType) ................................ 100

Acquires (gets) the tool offset memory type and number of offsets that can be used............. 100

BOOL mdncinf_set_tooloffset( DWORD hValue, DWORD dValue, WORD hNo, WORD


dNo).............................................................................................................................................. 101

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 132/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5
Sets the tool offset (shape compensation) values. .................................................................. 101

BOOL mdncinf_get_tooloffset( LPDWORD hValue, LPDWORD dValue, WORD hNo,


WORD dNo) ................................................................................................................................. 101

Acquires (gets) the tool offset (shape compensation) values. ................................................. 101

BOOL mdncinf_modal_tooloffset( LPDWORD hValue, LPDWORD dValue, LPWORD hNo,


LPWORD dNo) ............................................................................................................................ 102

Acquires (gets) the current tool offset values and H/D numbers. ............................................ 102

BOOL mdncinf_exec_ncp( LPDWORD oNum, LPDWORD execOnum, LPDWORD seqNo)


...................................................................................................................................................... 102

Acquires (gets) the data for the CNC program being executed. .............................................. 102

BOOL mdncinf_exec_block( LPSTR execBlock, short bufLen) ......................................... 103

Acquires (gets) the specified number of characters in the program being executed. This function
can only be used in Visual C++. ............................................................................................... 103

BOOL mdncinf_exec_block_vb( BSTR *execBlock) .............................................................. 103

Acquires (gets) the specified number of characters in the program being executed. This function
can only be used in Visual Basic. ............................................................................................. 103

BOOL mdncinf_mem_info( short *regiNCP, short *remainNCP, LPDWORD usedSize,


LPDWORD remainSize).............................................................................................................. 104

Acquires (gets) the machining program management data that is already registered on the CNC
side............................................................................................................................................ 104

BOOL mdncinf_mem_dir( DWORD oNumber, LPBOOL exist, LPSTR comment,


LPDWORD size) .......................................................................................................................... 104

Acquires (gets) the data for the specified program number. This function can only be used in
Visual C++. ............................................................................................................................... 104

BOOL mdncinf_mem_dir_vb( DWORD oNumber, LPBOOL exist, BSTR *comment,


LPDWORD size) .......................................................................................................................... 105

BOOL mdncinf_mem_dirall( short dataLen, LPDWORD oNumber, LPSTR *comment,


LPDWORD size, LPWORD numProg) .................................................................................... 105

Acquires (gets) a list of all machining program numbers registered on the CNC side. This
function can only be used in Visual C++. ................................................................................. 105

BOOL mdncinf_mem_dirall_vb( short dataLen, LPDWORD oNumber, VARIANT


*comment, LPDWORD size, LPWORD numProg) ................................................................ 106

Acquires (gets) list of all machining program numbers registered on the CNC side. This function
can only be used in Visual Basic. ............................................................................................. 106

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 133/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5
BOOL mdncinf_chk_macrono( WORD macroNo, short *macroType) ............................... 106

Checks whether or not specified macro variable number can be used. .................................. 106

BOOL mdncinf_get_macro_string( WORD macroNo, LPSTR macroVal) .......................... 107

Acquires (gets) macro variable as a character string. This function can only be used in Visual
C++. .......................................................................................................................................... 107

BOOL mdncinf_get_macro_string_vb( WORD macroNo, BSTR *macroVal) .................... 107

Acquires (gets) macro variable as a character string. This function can only be used in Visual
Basic. ........................................................................................................................................ 107

BOOL mdncinf_set_macro_string( WORD macroNo, LPSTR macroVal) .......................... 107

Sets macro variable character string. ....................................................................................... 107

BOOL mdncinf_cnc_alarm( LPWORD almNum, LPWORD axisNo, LPSTR *almMsg,


LPWORD almType, LPWORD numAlm) ................................................................................ 108

Acquires (gets) current NC alarm. This function can only be used in Visual C++. .................. 108

BOOL mdncinf_cnc_alarm_vb( LPWORD almNum, LPWORD axisNo, VARIANT *almMsg,


LPWORD almType, LPWORD numAlm) ................................................................................ 109

Acquires (gets) current NC alarm. This function can only be used in Visual Basic. ................ 109

BOOL mdncinf_chk_cnc_alarm( LPWORD numAlarm) ......................................................... 109

Acquires (gets) current number of CNC alarms that have occurred. ....................................... 109

BOOL mdncinf_total_cnc_alarm_history( LPWORD numHistory) ....................................... 109

Acquires (gets) CNC alarm history data. .................................................................................. 109

BOOL mdncinf_cnc_alarm_history( LPWORD almNum, LPWORD axisNo, LPSTR


*almMsg, LPWORD year, LPWORD month, LPWORD day, LPWORD hour, LPWORD
min, LPWORD sec, LPWORD numHistory) ............................................................................110

Acquires (gets) CNC alarm history data. This function can only be used in Visual C++. .........110

BOOL mdncinf_cnc_alarm_history_vb( LPWORD almNum, LPWORD axisNo, VARIANT


*almMsg, LPWORD year, LPWORD month, LPWORD day, LPWORD hour, LPWORD
min, LPWORD sec, LPWORD numHistory) ............................................................................ 111

Acquires (gets) CNC alarm history data. This function can only be used in Visual Basic. ....... 111

BOOL mdncinf_machine( LPLONG data) ................................................................................. 111

Acquires (gets) machine coordinate values. ............................................................................. 111

BOOL mdncinf_absolute( LPLONG data) .................................................................................112

Acquires absolute coordinate values.........................................................................................112

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 134/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5
BOOL mdncinf_relative( LPLONG data) ...................................................................................112

Acquires relative coordinate values. ..........................................................................................112

BOOL mdncinf_distance( LPLONG data) .................................................................................112

Acquires remaining movement distance. ..................................................................................112

BOOL mdncinf_chk_cnc_reset( LPBOOL reset)......................................................................112

Checks NC reset On/Off status (F1#1)......................................................................................112

BOOL mdncinf_cnc_reset() ........................................................................................................113

Executes NC reset from PC. .....................................................................................................113

BOOL mdncinf_chk_eop( LPBOOL eop) ..................................................................................113

Checks EOP (End Of Program : G52#2) bit. .............................................................................113

BOOL mdncinf_chk_start_bit( LPBOOL start) .........................................................................113

Checks On/Off status of start bit (G7#2). ..................................................................................113

BOOL mdncinf_cnc_start() .........................................................................................................113

Executes CNC cycle start. .........................................................................................................113

BOOL mdncinf_feed_hold()........................................................................................................114

Executes feed hold (G8#5 OFF and ON). .................................................................................114

BOOL mdncinf_chk_mem_protect( LPBOOL protect) ............................................................114

Checks memory protect status (G46#3-6). ...............................................................................114

BOOL mdncinf_chk_backedit( LPBOOL edit) ..........................................................................114

Acquires background editing status (F53#4). ............................................................................114

BOOL mdncinf_delete_onumber( DWORD minNumber, DWORD maxNumber, LPWORD


numDel) ........................................................................................................................................115

Deletes specified O number range from CNC O number memory............................................115

BOOL mdncinf_onumber_search( DWORD oNumber) ...........................................................115

Executed foreground search for specified O number. ...............................................................115

BOOL mdncinf_spindle_feed( LPDWORD feed) ......................................................................116

Acquires (gets) the spindle feed rate (mm/min). .......................................................................116

BOOL mdncinf_prepare_zero( BOOL OnOff) ...........................................................................116

Sets parameter that specifies allowable axis movement when zero (reference) point return has
not been performed. This is used by the One touch function to perform zero point return in the

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 135/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5
DNC operation mode. ................................................................................................................116

BOOL mdncinf_chk_single_block( LPBOOL sbk) ...................................................................116

Acquires (gets) the single block (F4#3) status. .........................................................................116

BOOL mdncinf_set_cnc_timer() ................................................................................................116

Sets the PC side date and time to the CNC calendar timer. .....................................................116

BOOL mdncinf_get_max_node( long *max_node) ..................................................................117

Acquires (gets) total number of HSSB nodes............................................................................117

BOOL mdncinf_get_node_info( long nodeNo, long *ioBase, long *status, long *cncType,
char *nodeName) .........................................................................................................................117

Acquires (gets) the specified HSSB node data. This function is only valid in Visual C++. .......117

BOOL mdncinf_get_node_info_vb( long nodeNo, long *ioBase, long *status, long


*cncType, BSTR *nodeName) ..................................................................................................118

Acquires (gets) the specified HSSB node data. This function is only valid in Visual Basic. .....118

BOOL mdncinf_get_pmc_addr_info( short adrType, short *adrNum, short *pmcAdr,


short *adrAttr, short *topOfs, short *lastOfs) .....................................................................119

Acquires (gets) PMC type attributes, valid address range and other data. ..............................119

BOOL mdncinf_set_toolwear( DWORD hValue, DWORD dValue, WORD hNo, WORD


dNo)...............................................................................................................................................119

Sets tool offset (wear compensation) values.............................................................................119

BOOL mdncinf_get_toolwear( LPDWORD hValue, LPDWORD dValue, WORD hNo,


WORD dNo) ................................................................................................................................. 120

Acquires (gets) tool offset (wear compensation) values. ......................................................... 120

BOOL mdncinf_rapid_override( LPWORD rate)...................................................................... 120

Acquires (gets) rapid feed override value [%]. ......................................................................... 120

BOOL mdncinf_feed_override( LPWORD rate) ....................................................................... 120

Acquires (gets) cutting feed override value [%]. ....................................................................... 120

BOOL mdncinf_foreground_search( DWORD oNumber) ...................................................... 121

Performs foreground search for specified O number. .............................................................. 121

BOOL mdncinf_get_tool_compensation( WORD compenType, WORD fromNo, WORD


toNo, LPDWORD value)........................................................................................................... 121

Acquires (gets) the tool offset values for the specified type and numbers. ............................. 121

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 136/137


Makino Milling Machine Libraries (MML) Reference Manual for Professional 5
BOOL mdncinf_set_tool_compensation( WORD compenType, WORD fromNo, WORD
toNo, LPDWORD value)........................................................................................................... 122

Sets the tool offset values for the specified type and numbers. ............................................... 122

BOOL mdncinf_spindle_load_meter( LPDWARD load) *5 added ....................................... 122

Acquires (gets) the spindle motor load [%]. The unit is 0.1%. ................................................. 122

BOOL mdncinf_spindle_motor_speed( LPDWARD speed) *5 added ................................ 122

Acquires (gets) the spindle motor speed [rpm]......................................................................... 122

BOOL mdncinf_spindle_motor( LPDWARD load, LPWORD speed) *5 added .................. 123

Acquires (gets) the spindle motor load [%] and rotation speed [rpm]. The load unit is 0.1%. . 123

BOOL mdncinf_spindle_load_meter2( LPDWARD load) *17 added ................................... 123

Acquires (gets) the spindle motor load [%]. The unit is 0.01%. ............................................... 123

BOOL mdncinf_servo_meter( short *data_num, long *data) .............................................. 123

Acquires (gets) the load [%] of each controlled axises. The unit is 0.1%. ............................... 123

L:¥PC¥Doc¥MML¥MML_Reference_Pro5_Eng.doc Page 137/137

You might also like