MML Reference Pro3 Eng

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

Makino Milling Machine Libraries (MML) DLL Reference Manual

Makino Milling Machine Libraries (MML)

Dynamic Link Library (DLL)


Reference Manual

for Professional A / 3

Makino Milling Machine Co., Ltd.


Control Systems Development

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 1/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

Edition Date Contents Editor


st
1 2001/01/21 First edition
nd
2 2001/05/25 Added descriptions of tool-related access functions. Mayumi Suga
rd
3 2002/02/06 Added missing Library reference. Masanori Abe
2002/03/07 Corrected sigType values. H.Morita
(mdmcinf_pm_get_vhc_signal)
th
4 2002/04/17 Added Mdmcinf.dll access functions. T.Makino
th
5 2002/06/14 Added Mdncinf.dll access functions. T.Makino
th T.Yamaguchi
6 2002/06/27 Added Mdmcinf.dll access functions.
th
7 2002/07/03 Modified table of contents, layout. I.Harada
th
8 2002/07/08 Added Mdmcinf.dll access functions. T.Makino
th
9 2006/05/09 The explanation is added to T.Makino
mdmcinf_chk_system_mach_finish().
th T.Yamaguchi
10 2008/02/14 The description of
mdmcinf_chk_system_mach_finish() is modified.
th T.Yamaguchi
11 2009/01/27 Correct misetntry as follows;
 mdncinf_spindle_load_mter
 mdncinf_spindle_load_meter
 mdncinf_spindle_moter
 mdncinf_spindle_motor

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 2/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

Contents

1 File Configuration ........................................................................................................... 4

2 Node Numbers................................................................................................................. 5

3 MOS Parameters ............................................................................................................. 6

4 Cycle Start Via Professional 3.......................................................................................... 7

5 Function Return Values and Error Data Acquisition Function Specifications .................. 8

6 Function Specifications (MdMcinf.dll) ............................................................................. 9

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

8 Function Specifications (MdTldt.dll) .............................................................................. 91

9 Function Specifications (MdWkdt.dll) .......................................................................... 115

10 List of Functions ...................................................................................................... 136

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 3/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

1 File Configuration

ProDef.h
Constant definition file used by MdMcinf, Mdtldt and Mdwkdt

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.

MdMcinf.dll
Library to access data that is dependent on machine software.
MdMcinf.lib
MdMcinf.dll import library.
MdMcinf.vch
Prototype declaration header file for MdMcinf.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.

MdTldt.dll
Library to access Professional 3 tool data.
MdTldt.lib
MdTldt.dll import library.
MdTldt.vch
Prototype declaration header file for MdTldt.dll C/C++ functions.

MdWkdt.dll
Library to access Professional 3 work data.
MdWkdt.lib
MdWkdt.dll import library.
MdWkdt.vch
Prototype declaration header file for MdWkdt.dll C/C++ functions.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 4/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

2 Node Numbers

When making an HSSB connection, the node numbers (0 to 7) are used to identify the HSSB
port in order to differentiate between the respective CNC units. When making an Ethernet
connection, the IP address is used with Fwlib32.DL to differentiate between the CNC units
instead of node numbers.
However, the Makino DLL has been designed to use node numbers (8 to 99) in order to
differentiate between the CNC units. The reason for this is to alleviate the differences
between HSSB and Ethernet connections.
Furthermore, in order to realize this function, it is necessary to set the node number and IP
address correspondence in the initialization files (.ini file). Refer to 3. MOS Parameters for
the parameters.

When developing an application where Fwlib32.DLL is directly called, it is necessary to


acquire a library handle number with “cnc_allclibhndl()” or “cnc_allclibhndl2()”, and deliver this
to the respective CNC access function. Furthermore, since that library handle number is only
valid within the thread, when a sub-thread is generated, it is necessary to reacquire the
handle number with “cnc_allclibhndl()”.
In order to eliminate these complications, the Makino DLL has adopted the above node
number concept and embedded the library handle numbers into the DLL. Furthermore, the
DLL judges whether or not it is being called from a sub-thread, and internally retrieves the
handle number when necessary. Therefore, please take note of the following when using the
Makino DLL:

 Make sure to specify the node number for the DLL being used when the primary thread
start procedure is performed. Node setting is performed with the xxxxx_set_node()
function for each DLL.
 Since the node number set when the primary thread is started is transferred to the
sub-thread node number, you do not need to worry about node number setting within
sub-threads.
 Conversely, it is not possible to perform coding where different node numbers are
accessed for each thread.
 An error is triggered when the xxxxx_set_node() function is executed multiple times for
each DLL within the same process.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 5/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

3 MOS Parameters

The parameters that are referred to for operation of Makino software on the PC are called
MOS parameters. The MOS parameter file name is “Mos_Param.ini”.
The node number-related MOS parameter setting procedure that is required to use the
Makino DLL system is described in this section.

Step 1) Setting of MAKINO Environment Variable


Set the MAKINO Environment Variable in the Autoexec.bat file in the format shown below
to specify the location of the MOS parameter file (Mos_Param.ini).
SET MAKINO=(Folder name)

Step 2) Setting of Node Number


Create Mos_Param.ini in the (Folder name)¥Data¥ directory, and enter the machine
number section and node data parameters according to the format shown below:

For HSSB Connection:


[MACHINE001]
NODE_NO=(Node number 0 to 7)
For Ethernet Connection:
[MACHINE001]
NODE_NO=( Node number 8 to 99)/(IP address)/(TCP port number)

Example:
This example shows the parameter settings for an Ethernet connection to the CNC with
an IP address of “192.1.1.1”, TCP port of “5001” and virtual node number of “10”. The
node number and IP address parameters are set in “C:¥Makino¥Data¥Mos_param.ini”.

 Create C:¥Autoexec.bat with the following content:

SET MAKINO=C:¥MAKINO

 Create C:¥Makino¥Data¥Mos_Param.ini with the following content:

[MACHINE001]
NODE_NO=10/192.1.1.1/5001

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 6/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

4 Cycle Start Via Professional 3

Cycle start of the CNC from the PC is performed via the machine PMC software (hereinafter
called Professional 3). Specifically, the PC inverts the start request signal (STX) from the
Professional 3, and issues a machining start request.
Likewise, the PC detects ending of NC programs by inverting the NC program end signal
(EOPX) from the Professional 3. At this time, the Professional 3 writes the NC program end
status (FINCND) to a fixed address.

A timing chart, from the start to the end of NC programs, is shown below:

PC  Pro 3 (STX)

Pro 3  PC (EOPX)

Pro 3  CNC (ST)

Pro 3  PC
(FINCND: Data)
①② ③ ④⑤ ⑥

① Program start request (PC inverts STX after completing NC program search,
then executes mdmcinf_system_cycle_start() function)
② NC program start (Pro 3 checks start conditions and starts NC program)
③ NC program finish (Pro 3 sets FINCND (data) and inverts EOPX)
④ NC program restart request (PC inverts STX after completion of NC program search)
⑤ NC program start (Pro 3 checks start conditions and starts NC program)
⑥ NC program finish (Pro 3 sets FINCND (data) and inverts EOPX)

Inverting of the Professional 3 EOPX signal is limited to the following three cases:

 When M30 or M02 is executed with STX in the inverted status.


 When [SYSTEM INTERRUPT] is pressed on the CRT/MDI custom screen while the
STX signal is in the inverted status and CNC operation is in the reset status.
 When the mdmcinf_system_cycle_abort() function is used with STX in the inverted
status to arbitrarily invert EOPX from the PC.

In other words, when the NC program is ended with the [NC RESET] button, the system will
not be able to detect ending of the NC program since EOPX is not inverted, and the next cycle
start request cannot be executed.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 7/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

5 Function Return Values and Error Data Acquisition Function Specifications

Excluding special functions, the return values for Makino DLL functions are BOOL type.
Normally, when an error occurs during the execution of a FOCAS1 function, a FALSE value is
returned.
When the FALSE status is returned, the error content can be obtained with the following two
functions: (*_GetLastFError(), *_GetLastMError())

long mdncinf_GetLastFError()
long mdmcinf_GetLastFError()
long mdtldt_GetLastFError()
long mdwkdt_GetLastFError()
Explanation
When the return value for the last DLL (MdMcinf.dll, MdNcinif.dll) function executed is
FALSE, the return value for the FOCAS1 function that was the direct cause is acquired:
Argument
None
Return Value
FOCAS1 function return value

long mdncinf_GetLastMError()
long mdmcinf_GetLastMError()
long mdtldt_GetLastMError()
long mdwkdt_GetLastMError()
Explanation
When the return value for the last DLL (MdMcinf.dll, MdNcinif.dll) function executed is
FALSE, the number (specified by Makino) which enables the cause to be determined that
is not duplicated in the DLL is acquired:
Argument
None
Return Value
This differs depending upon the last function executed.
Functions for which this function may be beneficial are described in the respective
Function Specifications.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 8/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

6 Function Specifications (MdMcinf.dll)

long mdmcinf_GetLastMError()
Explanation
The last error that occurred in the mdmcinf.dll function is returned.
Return Value
0: The last mdmcinf.dll function that was called ended normally.
Other than 0 : Error number.
Note
 When the function that was executed after the error occurred ended normally, “0” is
returned by this function.

long mdmcinf_GetLastFError()
Explanation
The number of the last Fanuc library error that occurred in the mdmcinf.dll function is
returned.
Return Value
0: The last Fanuc library function that was called ended normally.
Other than 0 : Error number.
Note
 When the function that was executed after the error occurred ended normally, “0” is
returned by this function.

BOOL mdmcinf_set_node(
long node)
Explanation
Acquires (gets) the FOCAS1 Library Handle in order to use the FOCAS1 function within
mdmcinf.dll. The acquired library handle is stored/used within mdmcinf.dll.
Therefore, execute this function once after communication is established between the
CNC and PC.
Argument
node [Set] Specifies node number set for MOS parameter.
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 details.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 9/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdmcinf_pro_version(
LPSTR verString)
Explanation
Acquires (gets) the Professional 3 version character string. This can only be called from
Visual C++.
Argument
verString [Get] Specify the character string where the version string is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 This function cannot be called from Visual Basic.

BOOL mdmcinf_pro_version_vb(
BSTR *verString)
Explanation
Acquires (gets) the Professional 3 version character string. This can only be called from
Visual Basic.
Argument
verString [Get] Specify the character string where the version string is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 This function cannot be called from Visual C++.

BOOL mdmcinf_atc_type(
LPWORD atcMag,
LPWORD dtcMag)
Explanation
Acquires (gets) the ATC magazine type and DTC magazine type.
Argument
atcMag [Get] Specify the data in which the ATC magazine type is stored.
dtcMag [Get] Specify the data in which the DTC magazine type 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.
 Refer to ProDef.h for details of the atcMag, dtcMag values.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 10/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdmcinf_apc_type(
LPWORD apcArm,
LPWORD pltMag)
Explanation
Acquires (gets) the APC arm type and pallet magazine type.
Argument
apcArm [Get] Specify the data in which the APC arm type is stored.
pltMag [Get] Specify the data in which the pallet magazine type 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.
 Refer to ProDef.h for details of the apcArm, pltMag values.

BOOL mdmcinf_machineif2_request(
LPBOOL success)
Explanation
Request from PC to Professional 3 for processing of Machine Items Table Interface 2
data.
Argument
success [Get] When True : Request succeeded.
When False : Waiting for response for previous process.
Return Value
True : Succeeded. Refer to success argument value for results of the actual
process requested.
False : Processing failed.

BOOL mdmcinf_machineif2_request_cancel(
LPBOOL success)
Explanation
Cancels request from PC to Professional 3 for processing of Machine Items Table
Interface 2 data.
Argument
success [Get] When True : Cancel request succeeded.
When False : No request for processing has been sent.
Return Value
True : Succeeded. Refer to success argument value for results of the actual
cancel operation.
False : Cancel operation failed.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 11/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdmcinf_machineif2_response(
LPBOOL finish)
Explanation
Checks status of Professional 3 Machine Items Table Interface 2 data processing
request.
Argument
finish [Get] When True : Data processing has been completed.
When False : Data processing is being performed.
Return Value
True : Succeeded.
False : Failed.

BOOL mdmcinf_get_mcpara(
WORD paraNo,
long *value,
long defValue)
Explanation
Acquires (gets) specified machine parameter value.
Argument
paraNo [Set] Specify the machine parameter number.
value [Get] Specify the variable where the acquired value is stored.
defValue [Set] Specify the default value when the machine parameter number
does not exist on the machine.
Return Value
True : Get operation succeeded.
False : Get operation failed.

BOOL mdmcinf_set_mcpara(
WORD paraNo,
long value)
Explanation
Sets the specified machine parameter value.
Argument
paraNo [Set] Specify the machine parameter number.
value [Set] Specify the variable where the set value is stored.
Return Value
True : Set operation succeeded.
False : Set operation failed.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 12/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdmcinf_spindle_status(
LPWORD position,
LPWORD direction)
Explanation
Acquires (gets) the spindle status.
Argument
position [Get] Set the variable where the gear position is stored.
 SPDL_NO_GEAR(0) No gear.
 SPDL_LOW_GEAR(1) Low speed gear.
 SPDL_HI_GEAR(2) High speed gear.
 SPDL_MID_GEAR(3) Medium speed gear.
direction [Get] Set the variable where the spindle rotation direction is stored.
 SPDL_STOP(0) Spindle is stopped.
 SPDL_FORWARD(1) Spindle is rotating clockwise.
 SPDL_REVERSE(2) Spindle is rotating counterclockwise.
 SPDL_ORIENT(3) Orientation being performed.
 SPDL_CONTOUR(4) Contouring being performed.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 When NULL is set for the argument, the value is not acquired.
 Refer to ProDef.h for details of the position, direction values.

BOOL mdmcinf_apc_status(
LPWORD armStdby,
LPWORD stckStatus)
Explanation
Acquires (gets) the pallet changer status.
Argument
armStdby [Get] Set the variable where the APC arm status is stored.
 PC_ARM_NOTRDY(0) Not in standby (ready) status.
 PC_ARM_STANDBY(1) Standby status.
stckStatus [Get] Set the variable where the stocker status is stored.
 PC_STCK_AUTO (0) In auto mode.
 PC_STCK_MANUAL (1) In manual mode.
 PC_MANUAL_IDX (2) Performing manual indexing.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 When NULL is set for the argument, the value is not acquired.
 Refer to ProDef.h for details of the armStdby, stckStatus values.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 13/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdmcinf_atc_status(
LPWORD armStdby,
LPWORD magStatus)
Explanation
Acquires (gets) the ATC magazine status.
Argument
armStdby [Get] Set the variable where the ATC arm status is stored.
 ATC_ARM_NOTRDY(0) Not in standby (ready) status.
 ATC_ARM_STANDBY(1) Standby status.
magStatus [Get] Set the variable where the magazine status is stored.
 ATC_MAG_AUTO (0) In auto mode.
 ATC_MAG_MANUAL (1) In manual mode.
 ATC_MAG_INDEX (2) Manual indexing being performed.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 When NULL is set for the argument, the value is not acquired.
 Refer to ProDef.h for details of the armStdby, magStatus values.

BOOL mdmcinf_spindle_speed(
LPWORD spdlSpeed)
Explanation
Acquires (gets) spindle rotation speed [min-1].
Argument
spdlSpeed [Get] Set the variable where the spindle rotation speed [min-1] is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 The acquired value is the command value.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 14/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdmcinf_toolmoni_setting(
LPWORD slUppLmt,
LPWORD acUppLmt,
LPWORD acLowLmt)
Explanation
Acquires (gets) tool monitor setting values.
Argument
slUppLmt [Get] Specify the variable where the SL upper limit [0.1%] is stored.
acUppLmt [Get] Specify the variable where the AC upper limit [0.1%] is stored.
acLowLmt [Get] Specify the variable where the AC lower limit [0.1%] 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 mdmcinf_spindle_load(
LPWORD loadVal,
LPWORD noLoadVal,
LPWORD actualVal)
Explanation
Acquires (gets) the tool monitor current values.
Argument
loadVal [Get] Specify the variable where the spindle load value [0.1%] is
stored.
noLoadVal [Get] Specify the variable where the no load value [0.1%] is stored.
actualVal [Get] Specify the variable where the actual spindle load current value
[0.1%] 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 mdmcinf_chk_mc_alarm(
LPBOOL alarm)
Explanation
Acquires (gets) Professional 3 MC alarm status.
Argument
alarm [Get] When True : MC alarm has occurred.
Return Value
True : Get operation succeeded.
False : Get operation failed.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 15/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdmcinf_mc_alarm(
LPWORD taskID,
LPDWORD almNum,
LPWORD almWarn,
LPWORD rtyOk,
LPWORD numAlm)
Explanation
Acquires (gets) messages for alarms that have occurred on Professional 3.
Argument
taskID [Get] Array variable where task ID is stored.
almNum [Get] Array variable where alarm number is stored.
almWarn [Get] Array variable where alarm (1) / warning (2) is stored.
rtyOk [Get] Array variable where retry OK (1) / retry not possible (2) is
stored.
numAlm [Get] Variable where total number of alarms acquired is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 The array number for the type of index specified for PRO3_TASK_L(=64) is required
for arguments other than numAlm. The acquired alarm data is stored starting at the
beginning of the array (0 number index).

BOOL mdmcinf_max_alarm_history(
LPWORD numHis)
Explanation
Acquires (gets) maximum number of alarm history records
Argument
numHis [Get] Specify the variable where the history record number is stored.
(PRO3_HIS_L(20)/PRO3_HIS2_L(100) )
Return Value
True : Get operation succeeded.
False : Get operation failed.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 16/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdmcinf_mc_alarm_history(
LPWORD taskID,
LPDWORD almNum,
LPWORD almWarn,
LPWORD rtyOk,
LPWORD year,
LPWORD month,
LPWORD day,
LPWORD hour,
LPWORD min,
LPWORD sec,
LPWORD numHis)
Explanation
Acquires (gets) Professional 3 alarm history data.
Argument
taskID [Get] Array variable where task ID is stored.
almNum [Get] Array variable where alarm number is stored.
almWarn [Get] Array variable where alarm (1) / warning (2) is stored.
rtyOk [Get] Array variable where retry OK (1) / retry not possible (2) is
stored.
year [Get] Array variable where year alarm occurred is stored.
month [Get] Array variable where month alarm occurred is stored.
day [Get] Array variable where day alarm occurred is stored.
hour [Get] Array variable where hour alarm occurred is stored.
min [Get] Array variable where minute alarm occurred is stored.
sec [Get] Array variable where second alarm occurred is stored.
numHis [Get] Variable where total number of alarms acquired is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 The array number (quantity) for the type of index specified for PRO3_HIS_L(=20) or
PRO3_HIS2_L(=100) is required for arguments other than numHis. The acquired
alarm data is stored starting at the beginning of the array (0 number index).

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 17/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdmcinf_can_auto_poweroff(
LPBOOL yes)
Explanation
Acquires (gets) status indicating whether or not machine power can be automatically
turned off.
Argument
yes [Get] Specify variable where True/False value is stored.
When True : Auto power off operation can be performed.
Return Value
True : Get operation succeeded.
False : Get operation failed.

BOOL mdmcinf_set_auto_poweroff(
BOOL flg)
Explanation
Sets/releases Professional 3 auto power off request data.
Argument
flg [Set] When True : Sets auto power off request data.
When False : Releases auto power off request data.
Return Value
True : Succeeded.
False : Failed.
Note
 Even when TRUE is set for this function, if both conditions (1) and (2) below are not
satisfied, the auto power off operation will not be executed. (If one of the conditions
is satisfied, the auto power off operation will be executed). Confirm before executing
this function.
(1) System mode(mdmcinf_chk_system_mode() argument sysMode=TRUE
(2) DNC operation mode(mdncinf_cnc_status() argument ncMode=100
 The machine looks at the leading edge where the auto power off bit goes from Off to
On. When this function is set to TRUE in the status where the bit is already On, the
bit will be automatically turned Off and then back On again after 1000[msec].
Therefore, you do not need to worry about the On/Off status of the auto power off bit
before executing this function.

BOOL mdmcinf_get_auto_poweroff(
LPBOOL apo)
Explanation
Acquires (gets) the Professional 3 auto power off request data.
Argument
apo [Get] Specify variable where True/False value is stored.
When True : Auto power off request has been set.
Return Value
True : Get operation succeeded.
False : Get operation failed.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 18/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdmcinf_tldt_edit_start(
LPBOOL success)
Explanation
Turns On Professional 3 PC tool data edit mode, enabling Professional 3 tool data to be
edited from the PC.
Argument
success [Get] Specify variable where True/False value is stored.
When True : Setting of mode succeeded.
When False : Mode cannot be set since edit mode on machine
side is On.
Return Value
True : Succeeded. Refer to success argument for results of actual mode setting.
False : Failed.

BOOL mdmcinf_tldt_edit_finish()
Explanation
Turns Off Professional 3 PC tool data edit mode, ending editing of Professional 3 tool
data from PC.
Return Value
True : Set operation succeeded.
False : Set operation failed.

BOOL mdmcinf_chk_tldt_edit(
LPBOOL editPC,
LPBOOL editPro3)
Explanation
Checks status of Not-If-Then flag for editing of tool data between Professional 3 and PC.
Argument
editPC [Get] Specify variable where True/False value is stored.
When True : PC Not-If-Then flag is On.
editPro3 [Get] Specify variable where True/False value is stored.
When True : Professional 3 Not-If-Then flag is On.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 When NULL is set for the argument, the value is not acquired.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 19/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdmcinf_set_maint_mode(
BOOL flg)
Explanation
Sets/Releases Professional 3 maintenance mode.
Argument
flg [Set] When True : Sets maintenance mode.
Return Value
True : Setting/releasing of mode succeeded.
False : Failed.

BOOL mdmcinf_get_maint_mode(
LPBOOL mntMode)
Explanation
Acquires (gets) On/Off status of Professional 3 maintenance mode.
Argument
mntMode [Get] Specify variable where True/False value is stored.
When True : Maintenance mode is active (On).
Return Value
True : Get operation succeeded.
False : Get operation failed.

BOOL mdmcinf_chk_system_mode(
LPBOOL sysMode)
Explanation
Acquires (gets) On/Off status of Professional 3 system mode.
Argument
sysMode [Get] Specify variable where True/False value is stored.
When True : System mode is active (On).
Return Value
True : Get operation succeeded.
False : Get operation failed.

BOOL mdmcinf_chk_auto_unloading_mode(
LPBOOL aumMode)
Explanation
Acquires (gets) On/Off status of Professional 3 auto unload mode.
Argument
aumMode [Get] Specify variable where True/False value is stored.
When True : Auto unload mode is On.
Return Value
True : Get operation succeeded.
False : Get operation failed.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 20/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdmcinf_chk_no_more_pallet_mode(
LPBOOL nmpMode)
Explanation
Acquires (gets) On/Off status of Professional 3 load prohibit (no more pallets) mode.
Argument
sysMode [Get] Specify variable where True/False value is stored.
When True : Load prohibit (no more pallets) mode is On.
Return Value
True : Get operation succeeded.
False : Get operation failed.

BOOL mdmcinf_set_trans_error(
BOOL flg)
Explanation
Sets/Releases Professional 3 external device alarm bit.
Argument
flg [Set] When True : External device alarm is set.
Return Value
True : Setting/releasing of mode succeeded.
False : Failed.

BOOL mdmcinf_get_trans_error(
LPBOOL alarm)
Explanation
Acquires (gets) On/Off status of Professional 3 external device alarm bit.
Argument
alarm [Get] Specify variable where True/False value is stored.
When True : External device alarm bit mode is On.
Return Value
True : Get operation succeeded.
False : Get operation failed.

BOOL mdmcinf_set_start_disable(
BOOL flg)
Explanation
Sets/Releases Professional 3 cycle start disable bit during DNC mode.
Argument
flg [Set] When True : Cycle start disable bit during DNC mode is set.
Return Value
True : Setting/releasing of mode succeeded.
False : Failed.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 21/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdmcinf_get_tls_disable(
LPBOOL disable)
Explanation
Acquires (gets) On/Off status of Professional 3 tool loading station control panel disable
mode.
Argument
disable [Get] Specify variable where True/False value is stored.
When True : Tool loading station control panel disable mode is
On.
Return Value
True : Get operation succeeded.
False : Get operation failed.

BOOL mdmcinf_set_tls_disable(
BOOL disableFlag)
Explanation
Sets/Releases Professional 3 tool loading station control panel disable mode.
Argument
disableFlag [Set] When True : Sets tool loading station control panel disable
mode.
Return Value
True : Setting/releasing of mode succeeded.
False : Failed.

BOOL mdmcinf_chk_operator_call(
LPBOOL opeCall)
Explanation
Acquires (gets) Professional 3 operator call status.
Argument
opeCall [Get] Specify variable where True/False value is stored.
When True : Operator call status is On.
Return Value
True : Get operation succeeded.
False : Get operation failed.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 22/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdmcinf_system_cycle_start(
BOOL opeCall,
LPBOOL success)
Explanation
Requests execution of cycle start for Professional 3 (Reversal of STX)
Argument
opeCall [Set] Sets whether or not operator must press cycle start button on
machine.
When True : Machining is started after cycle start button is
pressed.
When False : Machining is immediately started.
success [Get] Specify variable where True/False value is stored.
When True : Cycle start request was received by Professional 3.
When False : Cycle start request was rejected since previous
machining process has not been completed (STX xor EOPX = 1).
Return Value
True : Succeeded. Refer to success argument for actual request.
False : Failed.
Note
 Use the functions listed below to confirm whether or not the machine is ready before
executing this function:
(1) Machine in system mode (Refer to mdmcinf_chk_system_mode()).
(2) Maintenance mode is Off (Refer to mdmcinf_chk_maintenance_mode()).
(3) No machine alarm has occurred (Refer to mdmcinf_chk_mc_alarm()).
(4) Automatic operation mode has been reset, emergency stop status has been
reset, and operation mode is appropriate (Refer to mdncinf_cnc_status()).

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 23/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdmcinf_chk_system_mach_finish(
LPBOOL finish,
long *condition)
Explanation
Use mdmcinf_system_cycle_start() to acquire (get) the status indicating whether or not
cycle start via Professional 3 has been completed.
Argument
finish [Get] Specify variable where True/False value is stored.
When True : Machining has been completed (STX xor EOPX = 0)
When False : Machining being performed (STX xor EOPX = 1)
condition [Get] Specify variable where machining completion status is stored.
Gets last machining completion status. Set NULL when status
does not need to be acquired.
0: Normal completion.
 0x00000001: Auto workpiece measurement alarm (triggered by
M940).
 0x00010000: BTS alarm occurred during machining.
 0x00020000: BTS2 alarm occurred during machining.
 0x00040000: AC alarm occurred during machining.
 0x00080000: SL alarm occurred during machining.
 0x00100000: Normal completion (TL occurred).
 0x00400000: Normal completion (STS occurred).
 0x01000000: Abnormal completion (This includes [System Abort]
operation from CUSTOM screen and NC reset
during DNC operation).
 0x04000000: Abnormal pallet seating.

Note
 The machining is not abnormal when TL alarm or STS alarm occur,

BOOL mdmcinf_get_milling_time(
long *value)
Explanation
Acquires (gets) cumulative time spindle has been rotating during automatic operation
since machining was started (STx was reversed).
Argument
value [Get] Cumulative time spindle has rotated during automatic operation
[sec]
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 Since the Professional 3 is reset by the machining start (reversal of STx) operation,
only the cumulative time for one machining process can be acquired by the get
operation.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 24/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdmcinf_chk_maintenance_mode(
LPBOOL maintMode)
Explanation
Acquires (gets) Professional 3 maintenance mode status.
Argument
maintMode [Set] Specify variable where True/False value is stored.
When True : Maintenance mode is active.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 xxx.

BOOL mdmcinf_chk_system_mach_status(
LPBOOL stx,
LPBOOL eopx,
long *condition)
Explanation
Acquires (gets) machining start request signal (STX), program end signal (EOPX) and
machining end status (condition) data between PC and Professional 3.
Argument
stx [Get] Specify variable where On/Off status of machining start request
signal (STX) is stored.
eopx [Get] Specify variable where On/Off status of program end signal
(EOPX) is stored.
condition [Get] Specify variable where machining end status (condition) is stored.
Refer to mdmcinf_chk_system_mach_finish() for data values.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 When NULL is set for the argument, the value is not acquired.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 25/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdmcinf_pm_type(
LPWORD pmType)
Explanation
Acquires (gets) type of pallet magazine.
Argument
pmType [Get] Specify variable where pallet magazine type is stored.
 PMTYPE_NO_PM(0): No pallet magazine
 PMTYPE_TYPE1(1): Traverser type
 PMTYPE_TYPE2(2): Type without traverser
 PMTYPE_TYPE3(3): Direct type
Return Value
True : Get operation succeeded.
False : Get operation failed.

BOOL mdmcinf_pm_plt(
LPWORD pmPlt)
Explanation
Acquires (gets) total number of pallets on pallet magazine.
Argument
pmPlt [Get] Specify variable where total number of pallets is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.

BOOL mdmcinf_pm_pst(
LPWORD pmPst)
Explanation
Acquires (gets) total number of pallet stockers in pallet magazine.
Argument
pmPst [Get] Specify variable where total number of pallet stockers is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.

BOOL mdmcinf_pm_wss(
LPWORD pmWss)
Explanation
Acquires (gets) total number of WSS units on pallet magazine.
Argument
pmWss [Get] Specify variable where total number of WSS units is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 26/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdmcinf_pm_get_vhc_command_data(
pmVhcCmnd_r *cmndData)
Explanation
Acquires (gets) vehicle transport command data in pallet magazine data area specified
from PC. This can only be called from Visual C++.
Argument
cmndData [Get] Specify variable where vehicle transport command data is stored.
Refer to promem.h for the data type.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 This function cannot be called from Visual Basic.

BOOL mdmcinf_pm_get_vhc_command_state(
pmVhcCmndStat_r *cmndStat)
Explanation
Acquires (gets) vehicle transport command status data from PC. This can only be called
from Visual C++.
Argument
cmndStat [Get] Specify variable where status data is stored.
Refer to promem.h for the data type.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 This function cannot be called from Visual Basic.

BOOL mdmcinf_pm_get_vhc_signal(
WORD sigType,
long *stat)
Explanation
Acquires (gets) On/Off status of vehicle transport command start signal, cancel signal
and finish signal from PC.
Argument
sigType [Set] Set type of data to be acquired.
 SIGTYP_START(1): Start signal.
 SIGTYP_CANCEL(2): Cancel signal.
 SIGTYP_FINISH(3): Finish signal.
stat [Get] Specify variable where On/Off status is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 27/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdmcinf_pm_set_vhc_signal(
WORD sigType, long stat)
Explanation
Sets/Releases vehicle transport command start and cancel signals from PC.
Argument
sigType [Set] Set type of data to be acquired.
 SIGTYP_START(1): Start signal.
 SIGTYP_CANCEL(3): Cancel signal.
stat [Set] Specify True/False.
Return Value
True : Setting/releasing of mode succeeded.
False : Failed.
Note
 When SIGTYP_FINISH is specified as the sigType, “False” comes back as the
Return Value.

BOOL mdmcinf_pm_set_vhc_command_data(
long fromTo,
long cmdType,
long palletNo,
unit_t srcUnit,
unit_t dstUnit)
Explanation
Sets the value for the vehicle transport command data in pallet magazine data area
specified from PC. This can only be called from Visual C++.
Argument
fromTo [Set] Set the From-To mode or the System mode.
0: System mode, 1: From-To mode.
cmdType [Set] Set command type.
 1: Loading/unloading continuous operation.
 2: Load operation.
 4: Unload operation.
 8: Positioning (indexing) operation.
palletNo [Set] Set pallet number.
scrUnit [Set] Set load address.
Refer to PcDef.h for the unit_t data format.
dstUnit [Set] Set unload address.
Refer to PcDef.h for the unit_t data format.
Return Value
True : Set operation succeeded.
False : Set operation failed.
Note
 This function cannot be called from Visual Basic.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 28/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdmcinf_mc_alarm_reset(
long execTime)
Explanation
Turns On the Professional 3 machine alarm reset request signal for the specified time,
enabling alarms to be reset from the PC.
Argument
execTime [Set] Set the time the alarm reset request signal is turned On [msec].
Normally, 1000msec is specified.
Return Value
True : Succeeded.
False : Failed.

BOOL mdmcinf_get_table_pltno(
LPWORD pltNo)
Explanation
Acquires (gets) the pallet number on the machine table.
Argument
pltNo [Get] Specify the variable where the pallet number is stored.
“-1” is set when the number has not been determined.
Return Value
True : Get operation succeeded.
False : Get operation failed.

BOOL mdmcinf_get_front_pltno(
LPWORD pltNo)
Explanation
Acquires (gets) the pallet number on the machine front buffer.
Argument
pltNo [Get] Specify the variable where the pallet number is stored.
“-1” is set when the number has not been determined.
Return Value
True : Get operation succeeded.
False : Get operation failed.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 29/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdmcinf_get_back_pltno(
LPWORD pltNo)
Explanation
Acquires (gets) the pallet number on the machine discharge side stocker of the shuttle
type P/C.
Argument
pltNo [Get] Specify the variable where the pallet number is stored.
“-1” is set when the number has not been determined.
Return Value
True : Get operation succeeded.
False : Get operation failed.

BOOL mdmcinf_set_table_pltno(
WORD pltNo)
Explanation
Sets the pallet number on the machine table.
Argument
pltNo [Set] Specify the pallet number.
“-1” is set when the number has not been determined.
Return Value
True : Set operation succeeded.
False : Set operation failed.

BOOL mdmcinf_set_front_pltno(
WORD pltNo)
Explanation
Sets the pallet number on the machine front buffer.
Argument
pltNo [Set] Specify the pallet number.
“-1” is set when the number has not been determined.
Return Value
True : Set operation succeeded.
False : Set operation failed.

BOOL mdmcinf_set_back_pltno(
WORD pltNo)
Explanation
Sets the pallet number on the machine discharge side buffer of the shuttle type P/C.
Argument
pltNo [Set] Specify the pallet number.
“-1” is set when the number has not been determined.
Return Value
True : Set operation succeeded.
False : Set operation failed.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 30/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdmcinf_system_cycle_abort(
LPBOOL success)
Explanation
Uses mdmcinf_system_cycle_start() to arbitrarily complete cycle start request (cycle
abort) to Professional 3 (reverses EOPX).
Argument
success [Get] Specify variable where True/False is stored.
When True : Cycle abort succeeded.
When False : Machining already completed (STX xor EOPX = 0).
Return Value
True : Succeeded. Refer to success argument for actual system cycle abort
operation.
False : Failed.
Note
 Confirm that the CNC automatic operation status is reset before executing this
function.

BOOL mdmcinf_get_machineIF5(
LPDWORD data)
Explanation
Acquires (gets) the data in the Machine Items Table Interface 5.
Argument
date [Get] Specify the variable where the acquired data is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 “Machine Items Table Interface 5” is shared 32-bit data between the PC and
Professional 3, and is a data area that is written by the Professional 3.

BOOL mdmcinf_get_machineIF4(
LPDWORD data)
Explanation
Acquires (gets) the data in the Machine Items Table Interface 4.
Argument
date [Get] Specify the variable where the acquired data is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 “Machine Items Table Interface 4” is shared 32-bit data between the PC and
Professional 3, and is a data area that is written by the PC.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 31/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdmcinf_refresh_custom_screen()
Explanation
Requests refreshing of custom screen from PC to Professional 3.
Argument
Return Value
True : Request succeeded.
False : Request failed.

BOOL mdmcinf_macro_read_finish()
Explanation
Notifies finishing of macro data reading from PC to Professional 3.
Argument
Return Value
True : Succeeded.
False : Failed.
Note
 Reading of macro variables is normally performed by M480 in NC programs. When
M480 is executed, the macro variable read request signal from the Professional 3 to
the PC is reversed. The PC side performs reading of the macro variable according to
this signal, and this function is called upon completion.
 The macro variable area that is read is set in the MOS parameter file (Mos_Param.
ini).

BOOL mdmcinf_chk_shutdown_request(
LPBOOL reqBit)
Explanation
Acquires (gets) the Professional 3 power shutdown signal.
Argument
regBit [Get] Specify variable where True/False is stored.
When True : Machine power is being shut down.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 When the PC shares the same power source as the machine, it is necessary to shut
down Windows on the PC when the power shutdown signal is On (True).

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 32/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdmcinf_set_machineIF4_bit(
DWORD bitMask,
BOOL value)
Explanation
Sets On/Off status for Machine Items Table Interface 4 specify bit.
Argument
bitMask [Set] Specify master data to set bit.
valuet [Set] Specify On/Off status.
When On (True) : Turns On all bits specified by bitMask.
When Off (False) : Turns Off all bits specified by bitMask.
Return Value
True : Set operation succeeded.
False : Set operation failed.
Note
 “Machine Items Table Interface 4” is shared 32-bit data between the PC and
Professional 3, and is a data area that is written by the PC.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 33/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdmcinf_spindle_monitor_parameter(
LPWORD dataType,
LPWORD warnLevel,
LPWORD alarmLevel,
WORD numAry,
LPWORD numLegalData)
Explanation
Acquires (gets) setting values for spindle temperature and vibration management
functions.
Argument
dataType [Get] Specify array variable where type of spindle measurement
data is stored.
 SPDLMONI_NO_DATA(0): No data
 SPDLMONI_CORE_BEARING1(1): Spindle core bearing temp. 1
 SPDLMONI_CORE_BEARING2(2): Spindle core bearing temp. 2
 SPDLMONI_HOUSING_BEARING1(3): Spindle housing bearing
temperature 1
 SPDLMONI_HOUSING_BEARING2(3): Spindle housing bearing
temperature 2
 SPDLMONI_MOTOR_COIL(5): Motor coil temperature
 SPDLMONI_VIBRATION(6): Spindle vibration monitor
warnLevel [Get] Specify array variable where spindle measurement data
warning value [12bit measure data] is stored.
alarmLevel [Get] Specify array variable where spindle measurement data alarm
value [12bit measure data] is stored.
numAry [Set] Set array variable for array dataType, warnLevel, alarmLevel.
numLegalData [Get] Specify variable where legal (valid) spindle measurement data
values are stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 NULL can be set for arguments where the data does not need to be acquired.
 When the return value is True and numAry < numLegalData, it indicates there is data
such as array dataType that could not be stored.
 Even when the data type is for temperature, the value obtained with this function is
12-bit data rather than a C value. This value needs to be converted.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 34/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdmcinf_spindle_monitor(
LPWORD dataType,
LPWORD measuredData,
WORD numAry,
LPWORD numLegalData,
LPWORD waitTime)
Explanation
Acquires (gets) measured values for spindle temperature and vibration management
functions.
Argument
dataType [Get] Specify array variable where type of spindle measurement
data is stored.
 SPDLMONI_NO_DATA(0): No data
 SPDLMONI_CORE_BEARING1(1): Spindle core bearing temp. 1
 SPDLMONI_CORE_BEARING2(2): Spindle core bearing temp. 2
 SPDLMONI_HOUSING_BEARING1(3): Spindle housing bearing
temperature 1
 SPDLMONI_HOUSING_BEARING2(3): Spindle housing bearing
temperature 2
 SPDLMONI_MOTOR_COIL(5): Motor coil temperature
 SPDLMONI_VIBRATION(6): Spindle vibration monitor
measuredData [Get] Specify array variable where spindle measurement data [12bit
measure data] is stored.
numAry [Set] Specify variable where array variable for array dataType,
warnLevel, alarmLevel is stored.
numLegalData [Get] Specify variable where legal (valid) spindle measurement data
values are stored.
waitTime [Get] Specify variable where the time [sec] to wait until the spindle
can be rotated is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 NULL can be set for arguments where the data does not need to be acquired.
 When the return value is True and numAry < numLegalData, it indicates there is data
such as array dataType that could not be stored.
 Even when the data type is for temperature, the value obtained with this function is
12-bit data rather than a C value. This value needs to be converted.

long mdmcinf_check_eachmcelm_type()
Explanation
Acquires (gets) type of EACH MACHINE ELEMENT data in Machine ItemsTable.
Argument
None
Return Value
The type of EACH MACHINE ELEMENT data is returned. For details, refer to
“EACH_MCELM_?????” in ProDef.h.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 35/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdmcinf_get_mag_data(LPWORD ldrType,


LPWORD mcPln,
LPWORD wssPln,
LPWORD stbyPln,
LPWORD idxStt,
LPDWORD idxPos,
LPDWORD ldrPos)
Explanation
Acquires (gets) the unique MAG data specified in the EACH MACHINE ELEMENT area
in the Machine Items Table.
Argument
ldrType [Get] Specify the variable where the pallet loader type is stored.
0: Work indexer only / 1: Pallet loader
mcPln [Get] Specify the variable where the pallet number on the machine (work
indexer) is stored.
wssPln [Get] Specify the variable where the pallet number on the WSS is
stored.
stbyPln [Get] Specify the variable where the pallet number at the pallet loader
standby position is stored.
idxStt [Get] Specify the variable where the index pin (LS342) status
(1: Advance, 0: Retract) is stored.
“1” results in judgment that work indexer face is indexed.
idxPos [Get] Specify the variable where the work indexer indexed position is
stored
ldrPos [Get] Specify the variable where the pallet loader position is stored
Return Value
True : Get operation succeeded.
False : Get operation failed.

BOOL mdmcinf_get_magapc_power_status(
LPBOOL powerStt)
Explanation
Acquires (gets) the power source status for the pallet changer when the machine is an
independent MAG.
Argument
powerStt [Get] Stores the power source status.
True : Power is ON.
False : Power is OFF.
Return Value
True : Get operation succeeded.
False : Get operation failed.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 36/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdmcinf_chk_magapc_poweron_request( )
Explanation
Checks whether or not power On request has been set for the pallet changer when the
machine is an independent MAG.
Argument
flg [Get] Power On request status is stored.
True : Request has been issued.
False : No request has been issued.
Return Value
True : Get operation succeeded.
False : Get operation failed.

BOOL mdmcinf_set_magapc_poweron( )
Explanation
Issues power On request has been set for the pallet changer when the machine is an
independent MAG.
Argument
None
Return Value
True : Get operation succeeded.
False : Get operation failed.

BOOL mdmcinf_chg_magapc_manual_intervention( )
Explanation
Issues request to change the pallet changer manual intervention mode when the
machine is an independent MAG.
Argument
None
Return Value
True : Get operation succeeded.
False : Get operation failed.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 37/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdminf_spindle_monitor_all(
LPWORD dataType,
LPWORD measuredData,
LPWORD warnLevel,
LPWORD alarmLevel,
WORD numAry,
LPWORD numLegalData,
LPWORD waitTime)
Explanation
Acquires (gets) all setting values/measured values for spindle temperature management
and vibration management functions.
Argument
dataType [Get] Specify array variable where type of spindle measurement
data is stored.
 SPDLMONI_NO_DATA(0): No data
 SPDLMONI_CORE_BEARING1(1): Spindle core bearing temp. 1
 SPDLMONI_CORE_BEARING2(2): Spindle core bearing temp. 2
 SPDLMONI_HOUSING_BEARING1(3): Spindle housing bearing
temperature 1
 SPDLMONI_HOUSING_BEARING2(3): Spindle housing bearing
temperature 2
 SPDLMONI_MOTOR_COIL(5): Motor coil temperature
 SPDLMONI_VIBRATION(6): Spindle vibration monitor
measuredData [Get] Specify array variable where spindle measurement data [12bit
measure data] is stored.
warnLevel [Get] Specify array variable where spindle measurement data
warning value [12bit measure data] is stored.
alarmLevel [Get] Specify array variable where spindle measurement data alarm
value [12bit measure data] is stored.
numAry [Set] Set array variable for array dataType, warnLevel, alarmLevel.
numLegalData [Get] Specify variable where legal (valid) spindle measurement data
values are stored.
waitTime [Get] Specify variable where the time [sec] to wait until the spindle
can be rotated is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 NULL can be set for arguments where the data does not need to be acquired.
 When the return value is True and numAry < numLegalData, it indicates there is data
such as array dataType that could not be stored.
 Even when the data type is for temperature, the value obtained with this function is
12-bit data rather than a C value. This value needs to be converted.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 38/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdmcinf_get_on_duty(LPBOOL flag)


Explanation
Acquires (gets) the On duty/Off duty mode.
Argument
flag [Get] Specify the variable where the True/False value is stored.
When True : Tool loading station control panel prohibit mode is
On.
Return Value
True : Get operation succeeded.
False : Get operation failed.

BOOL mdmcinf_set_on_duty(BOOL flag)


Explanation
Sets the On duty/Off duty mode.
Argument
Flag [Set] True : On duty mode.
False : Off duty mode.
Return Value
True : Setting/releasing of mode succeeded.
False : Failed.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 39/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 40/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 41/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 42/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 43/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 44/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 45/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 46/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 47/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 48/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 49/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 50/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 51/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 52/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 53/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 54/153


Makino Milling Machine Libraries (MML) DLL Reference Manual
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.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 55/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 56/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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++.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 57/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 58/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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++.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 59/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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++.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 60/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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++.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 61/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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++.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 62/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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++.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 63/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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++.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 64/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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++.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 65/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 66/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 67/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 68/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 69/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 70/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 71/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 72/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 73/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 74/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 75/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 76/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 77/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 78/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 79/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 80/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 81/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 82/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 83/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 84/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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++.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 85/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 86/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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%.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 87/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 88/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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%.
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.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 89/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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%.
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.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 90/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

8 Function Specifications (MdTldt.dll)

long mdtldt_GetLastMError ()
Explanation
Returns the last error number that occurred with a mdtldt.dll function.
Return Value
0: Last mdtldt.dll function called finished normally.
Other than 0: Error number.
Note
 When the function executed after the error occurred finished normally, this function
returns “0”.

long mdtldt_GetLastFError ()
Explanation
Returns the last Fanuc Library error number that occurred with a mdtldt.dll function.
Return Value
0: Last mdtldt.dll Fanuc Library function called finished normally.
Other than 0: Error number.
Note
 When the function executed after the error occurred finished normally, this function
returns “0”.

BOOL mdncinf_set_node(long node)


Explanation
Acquires (gets) the FOCAS1 Library Handle in order to use the FOCAS1 function within
mdtldt.dll. The acquired library handle is stored/used within mdtldt.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.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 91/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdtldt_toollife_info(
short *lifeType,
short *countType,
BOOL *alarmReset)
Explanation
Acquires (gets) the Professional 3 tool life management type.
Argument
lifeType [Get] Specify the variable where the tool life management type is
stored.
 TLTYPE_SEC(0): Cutting time [sec]
 TLTYPE_DISTANCE(1): Cutting distance [m] or [inch]
 TLTYPE_COUNT(2): Machining quantity
 TLTYPE_01SEC(3): Cutting time in 0.1 sec. units
countType [Get] Specify the variable where the tool life counting method is stored.
 TLCNT_TYPE_ACCUMULATE(0): Cumulative life method
 TLCNT_TYPE_REMAIN(1): Remaining life method
alarmReset [Get] Specify the variable where the setting method is stored for the
remaining life when a tool life (TL) alarm is reset.
 True: Resets remaining life to life value.
 False: Does not change remaining life.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 When NULL is set for the argument, the value is not acquired.

BOOL mdtldt_tool_info(
short *unit,
short *ftn,
short *itn,
short *ptn)
Explanation
Acquires (gets) Professional 3 tool management function parameters.
Argument
unit [Get] Specify variable where tool length/diameter unit (inches/mm) is
stored.
 MM_UNIT (0): Millimeters
 INCH_UNIT (1): Inches
ftn [Get] Specify variable where FTN (Functional tool No.) digits are stored.
itn [Get] Specify variable where ITN (Individual tool No.) digits are stored.
ptn [Get] Specify variable where PTN (Tool No.=T No.) digits are stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 When NULL is set for the argument, the value is not acquired.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 92/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdtldt_max_pot(
LPWORD numPot)
Explanation
Acquires (gets) ATC magazine pot size.
Argument
numPot [Get] Specify variable where ATC magazine size (No. of pots) is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.

BOOL mdtldt_chk_value(
short item,
long value,
BOOL *suitable)
Explanation
Checks whether or not entered value is valid for specified tool data item.
Argument
item [Set] Specify the constant indicating the tool data item to be checked.
Refer to mdtldt_get_common_item() for the constants.
value [Set] Specify the value to be checked.
suitable [Get] Specify the variable where the legal/illegal status is stored.
True: Legal (valid) value / False: Illegal (invalid) value
Return Value
True : Get operation succeeded.
False : Get operation failed.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 93/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdtldt_get_common_item(
WORD pot,
short item,
long *value)
Explanation
Acquires (gets) the values for the specified pot number and tool data item.
Argument
pot [Set] Specify the pot number to be acquired.
item [Set] Specify the tool data item to be acquired.
TD_PTN(1): Tool number (T number)
TD_ITN(2): ITN (Individual tool number)
TD_TL(3): Tool life [sec], [mm], [count]
TD_REMAIN(4): Remaining or cumulative life value [sec], [mm],
[count]
TD_LEN(5): Tool length compensation value [1/1000mm] or
[1/10000inch]
TD_DIA(6): Tool diameter compensation value [1/1000mm] or
[1/10000inch]
TD_FTN(7): FTN (Functional tool number)
TD_TYPE(8): Tool type
TD_ALM(9): Tool alarm
TD_AC(10): AC monitor spindle load value [0.1A]
TD_SL(11): SL monitor spindle load value [0.1A]
value [Get] Specify the variable where the acquired data is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 The units acquired with this function for tool life (TD_TL) and remaining tool life
(TD_REMAIN) differ from the display units on the tool data screen as indicated below.
The tool life type can be acquired with mdtldt_toollife_info().
Tool Life Type Acquired Unit Display Unit
Cutting time (TLTYPE_SEC) [sec] [min]
Cutting distance (TLTYPE_DISTANCE) [mm] [m] or [inch]
Cutting time (0.1 sec. units) [0.1sec] [min]
(TLTYPE_01SEC)
 The total number of tool alarms is stored under (TD_ALM). The acquired value can
be separated with mdtldt_split_common_alarm().

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 94/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdtldt_set_common_item(
WORD pot,
short item,
long data)
Explanation
Sets the value for the specified pot number and tool data item.
Argument
pot [Set] Specify the pot number to be set.
item [Set] Specify the tool data item to be set. For the constant, refer to
mdtldt_get_common_item().
value [Set] Specify the value to be set.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 The units acquired with this function for tool life (TD_TL) and remaining tool life
(TD_REMAIN) differ from the display units on the tool data screen as indicated below.
The tool life type can be acquired with mdtldt_toollife_info().
Tool Life Type Acquired Unit Display Unit
Cutting time (TLTYPE_SEC) [sec] [min]
Cutting distance (TLTYPE_DISTANCE) [mm] [m] or [inch]
Cutting time (0.1 sec. units) [0.1sec] [min]
(TLTYPE_01SEC)
 The total number of tool alarms is stored under (TD_ALM). The acquired value can
be separated with mdtldt_split_common_alarm().

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 95/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdtldt_get_common(
WORD fromPot,
WORD toPot,
LPDWORD ptn,
LPDWORD ftn,
LPDWORD itn,
LPDWORD tl,
LPDWORD remain,
LPLONG len,
LPLONG dia,
LPWORD type,
LPWORD alm,
LPWORD ac,
LPWORD sl)
Explanation
Acquires (gets) all data for the specified pot numbers.
Argument
fromPot [Set] Specify the pot number of the lower (from) tool to be acquired.
toPot [Set] Specify the pot number of the upper (to) tool to be acquired.
ptn [Get] Specify the array variable where the T number (PTN) is stored.
ftn [Get] Specify the array variable where the FTN is stored.
itn [Get] Specify the array variable where the ITN is stored.
tl [Get] Specify the array variable where the tool life value [sec], [mm],
[count] is stored.
remain [Get] Specify the array variable where the remaining or cumulative tool life
value [sec], [mm], [count] is stored.
len [Get] Specify the array variable where the tool length compensation value
[1/1000mm], [1/10000inch] is stored.
dia [Get] Specify the array variable where the tool diameter compensation
value [1/1000mm], [1/10000inch] is stored.
type [Get] Specify the array variable where the tool type number is stored.
alarm [Get] Specify the array variable where the tool alarm status is stored.
ac [Get] Specify the array variable where the AC monitor spindle load value
[0.1A] is stored.
sl [Get] Specify the array variable where the SL monitor spindle load value
[0.1A] is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 Set NULL for any argument where the data is not required.
 The total number of alarms is stored under tool alarm status. The acquired value can
be separated with mdtldt_split_common_alarm().

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 96/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdtldt_set_common(
WORD fromPot,
WORD toPot,
LPDWORD ptn,
LPDWORD ftn,
LPDWORD itn,
LPDWORD tl,
LPDWORD remain,
LPDWORD len,
LPDWORD dia,
LPWORD type,
LPWORD alm,
LPWORD ac,
LPWORD sl)
Explanation
Sets all data for the specified pot numbers.
Argument
fromPot [Set] Specify the pot number of the lower (from) tool to be set.
toPot [Set] Specify the pot number of the upper (to) tool to be set.
ptn [Set] Specify the array variable where the T number (PTN) is stored.
ftn [Set] Specify the array variable where the FTN is stored.
itn [Set] Specify the array variable where the ITN is stored.
tl [Set] Specify the array variable where the tool life value [sec], [mm],
[count] is stored.
remain [Set] Specify the array variable where the remaining or cumulative tool life
value [sec], [mm], [count] is stored.
len [Set] Specify the array variable where the tool length compensation value
[1/1000mm], [1/10000inch] is stored.
dia [Set] Specify the array variable where the tool diameter compensation
value [1/1000mm], [1/10000inch] is stored.
type [Set] Specify the array variable where the tool type number is stored.
alarm [Set] Specify the array variable where the tool alarm status is stored.
ac [Set] Specify the array variable where the AC monitor spindle load value
[0.1A] is stored.
sl [Set] Specify the array variable where the SL monitor spindle load value
[0.1A] is stored.
Return Value
True : Set operation succeeded.
False : Set operation failed.
Note
 The total number of tool alarms obtained with mdtldt_make_common_alarm() is
displayed under the tool alarm status.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 97/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdtldt_split_common_alarm(
WORD almData,
BOOL *bts2,
BOOL *bts,
BOOL *ac,
BOOL *sl,
BOOL *tl)
Explanation
Splits tool alarm data acquired with mdtldt_get_common_item(), mdtldt_get_common()
into respective types of tool alarms.
Argument
almData [Set] Specify the bit field data (total of respective types of tool alarms) for
the tool alarm data.
bts2 [Get] True : BTS2 (tool broken long detection) alarm occurred.
bts [Get] True : BTS (tool broken) alarm occurred.
ac [Get] True : AC monitor alarm occurred.
sl [Get] True : SL monitor alarm occurred.
tl [Get] True : TL (tool life) alarm occurred.
Return Value
True : Succeeded.
False : Failed.

BOOL mdtldt_make_common_alarm(
BOOL bts2,
BOOL bts,
BOOL ac,
BOOL sl,
BOOL tl,
LPWORD almData)
Explanation
Converts tool alarm data got with mdtldt_set_common_item(), mdtldt_set_common() into
respective types of tool alarms.
Argument
bts2 [Set] True : BTS2 (tool broken long detection) alarm occurred.
bts [Set] True : BTS (tool broken) alarm occurred.
ac [Set] True : AC monitor alarm occurred.
sl [Set] True : SL monitor alarm occurred.
tl [Set] True : TL (tool life) alarm occurred.
almData [Get] Specify variable where the bit field data (total of respective types of
tool alarms) for the tool alarm data is stored.
Return Value
True : Convert operation succeeded.
False : Convert operation failed.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 98/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdtldt_get_mmc(
WORD fromPot,
WORD toPot,
LPSTR *toolType,
LPWORD status,
LPWORD size)
Explanation
Acquires (gets) module MMC tool data items. This function is only valid with Visual C++.
Argument
fromPot [Set] Specify the pot number of the lower (from) tool to be acquired.
toPot [Set] Specify the pot number of the upper (to) tool to be acquired.
toolType [Get] Specify the array variable where the Tool Type is stored.
status [Get] Specify the array variable where the Tool Status is stored.
size [Get] Specify the array variable where the Tool size (Class) is stored.
(TOOLCLS_STD(1) / TOOLCLS_MID(2) / TOOLCLS_LARGE(3) /
TOOLCLS_EXTRA(4) / TOOLCLS_FIXED(5) / TOOLCLS_EMP(8))
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.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 99/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdtldt_get_mmc_vb(
WORD fromPot,
WORD toPot,
LPSTR *toolType,
LPWORD status,
LPWORD size)
Explanation
Acquires (gets) module MMC tool data items. This function is only valid with Visual Basic.
Argument
fromPot [Set] Specify the pot number of the lower (from) tool to be acquired.
toPot [Set] Specify the pot number of the upper (to) tool to be acquired.
toolType [Get] Specify the array variable where the Tool Type is stored.
status [Get] Specify the array variable where the Tool Status is stored.
size [Get] Specify the array variable where the Tool size (Class) is stored.
(TOOLCLS_STD(1) / TOOLCLS_MID(2) / TOOLCLS_LARGE(3) /
TOOLCLS_EXTRA(4) / TOOLCLS_FIXED(5) / TOOLCLS_EMP(8))
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++.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 100/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdtldt_set_mmc(
WORD fromPot,
WORD toPot,
LPSTR *toolType,
LPWORD status,
LPWORD size)
Explanation
Sets module MMC tool data items. This function is only valid with Visual C++.
Argument
fromPot [Set] Specify the pot number of the lower (from) tool to be set.
toPot [Set] Specify the pot number of the upper (to) tool to be set.
toolType [Set] Specify the array variable where the Tool Type is stored.
status [Set] Specify the array variable where the Tool Status is stored.
size [Set] Specify the array variable where the Tool size (Class) is stored.
(TOOLCLS_STD(1) / TOOLCLS_MID(2) / TOOLCLS_LARGE(3) /
TOOLCLS_EXTRA(4) / TOOLCLS_FIXED(5) / TOOLCLS_EMP(8))
Return Value
True : Set operation succeeded.
False : Set operation failed.
Note
 This function cannot be called from Visual Basic.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 101/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdtldt_set_mmc_vb(
WORD fromPot,
WORD toPot,
VARIANT *toolType,
LPWORD status,
LPWORD size)
Explanation
Sets module MMC tool data items. This function is only valid with Visual Basic.
Argument
fromPot [Set] Specify the pot number of the lower (from) tool to be set.
toPot [Set] Specify the pot number of the upper (to) tool to be set.
toolType [Set] Specify the array variable where the Tool Type is stored.
status [Set] Specify the array variable where the Tool Status is stored.
size [Set] Specify the array variable where the Tool size (Class) is stored.
(TOOLCLS_STD(1) / TOOLCLS_MID(2) / TOOLCLS_LARGE(3) /
TOOLCLS_EXTRA(4) / TOOLCLS_FIXED(5) / TOOLCLS_EMP(8))
Return Value
True : Set operation succeeded.
False : Set operation failed.
Note
 This function cannot be called from Visual C++.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 102/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdtldt_split_mmctype(
WORD bitField,
BOOL *firstUse,
BOOL *opeCall,
BOOL *alarm,
BOOL *notUse,
BOOL *almDisable,
BOOL *Weight,
BOOL *thruCoolant)
Explanation
Separates tool data acquired with mdtldt_get_mmc() 、 mdtldt_get_mmc_vb() into
respective MMC Tool Type items.
Argument
bitField [Set] Specify the Tool Type.
firstUse [Get] True : First use flag is On.
opeCall [Get] True : Operator tool flag is On.
alarm [Get] True : Alarm tool flag is On.
notUse [Get] True : Use prohibit flag is On.
almDisable [Get] True : Use enable flag during TL alarm is On.
Weight [Get] True : Lightweight tool flag is On.
thruCoolant [Get] True : Through-spindle coolant tool flag is On.
Return Value
True : Succeeded.
False : Failed.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 103/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdtldt_make_mmctype(
BOOL firstUse,
BOOL opeCall,
BOOL alarm,
BOOL notUse,
BOOL almDisable,
BOOL Weight,
BOOL thruCoolant,
LPWORD bitField)
Explanation
Converts respective MMC tool type bit data into tool type data that can be used with
mdtldt_set_mmc().
Argument
firstUse [Set] True : First use flag is On.
opeCall [Set] True : Operator tool flag is On.
alarm [Set] True : Alarm tool flag is On.
notUse [Set] True : Use prohibit flag is On.
almDisable [Set] True : Use enable flag during TL alarm is On.
Weight [Set] True : Lightweight tool flag is On.
thruCoolant [Set] True : Through-spindle coolant tool flag is On.
bitField [Get] Specify the variable where the Tool Type is stored.
Return Value
True : Convert operation succeeded.
False : Convert operation failed.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 104/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdtldt_get_bts(
WORD fromPot,
WORD toPot,
BOOL *btsOn,
LPWORD firstTime,
LPWORD secondTime)
Explanation
Acquires (gets) ATC side BTS tool data.
Argument
fromPot [Set] Specify the pot number of the lower (from) tool to be acquired.
toPot [Set] Specify the pot number of the upper (to) tool to be acquired.
btsOn [Get] Specify the array variable where the valid/invalid (On/Off) setting
for the broken tool sensor is stored.
firstTime [Get] Specify the array variable where the measuring time [msec]
before machining for the broken tool sensor is stored.
secondTime [Get] Specify the array variable where the measuring time [msec] after
machining for the broken tool sensor is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 When a get operation argument is not needed, set NULL for the argument.
 The array variable elements for the get operation should be equal to or more than
(toPot-fromPot+1).
 This function can only be used when the mdtldt_optional_tldt_define() bts Data
argument is True.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 105/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdtldt_set_bts(
WORD fromPot,
WORD toPot,
LPBOOL btsOn,
LPWORD firstTime,
LPWORD secondTime)
Explanation
Sets ATC side BTS tool data.
Argument
fromPot [Set] Specify the pot number of the lower (from) tool to be set.
toPot [Set] Specify the pot number of the upper (to) tool to be set.
btsOn [Set] Specify the array variable where the valid/invalid (On/Off) setting
for the broken tool sensor is stored.
firstTime [Set] Specify the array variable where the measuring time [msec]
before machining for the broken tool sensor is stored.
secondTime [Set] Specify the array variable where the measuring time [msec] after
machining for the broken tool sensor is stored.
Return Value
True : Set operation succeeded.
False : Set operation failed.
Note
 The array variable elements for the set operation should be equal to or more than
(toPot-fromPot+1).
 This function can only be used when the mdtldt_optional_tldt_define() bts Data
argument is True.

BOOL mdtldt_get_air(
WORD fromPot,
WORD toPot,
LPWORD time)
Explanation
Acquires (gets) the through-spindle coolant air purge time setting (tool data).
Argument
fromPot [Set] Specify the pot number of the lower (from) tool to be acquired.
toPot [Set] Specify the pot number of the upper (to) tool to be acquired.
time [Get] Array variable where the through-spindle coolant air purge time
[msec] is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 The array variable elements for the time argument should be equal to or more than
(toPot-fromPot+1).
 This function can only be used when the mdtldt_optional_tldt_define() bts Data
argument is True.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 106/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdtldt_set_air(
WORD fromPot,
WORD toPot,
LPWORD time)
Explanation
Sets the through-spindle coolant air purge time (tool data).
Argument
fromPot [Set] Specify the pot number of the lower (from) tool to be set.
toPot [Set] Specify the pot number of the upper (to) tool to be set.
time [Set] Array variable where the through-spindle coolant air purge time
[msec] is stored.
Return Value
True : Set operation succeeded.
False : Set operation failed.
Note
 The array variable elements for the time argument should be equal to or more than
(toPot-fromPot+1).
 This function can only be used when the mdtldt_optional_tldt_define() air Data
argument is True.

BOOL mdtldt_get_slow(
WORD fromPot,
WORD toPot,
LPDWORD slowTool)
Explanation
Acquires (gets) the slow ATC valid/invalid tool data.
Argument
fromPot [Set] Specify the pot number of the lower (from) tool to be acquired.
toPot [Set] Specify the pot number of the upper (to) tool to be acquired.
slowTool [Get] Array variable where the slow ATC valid/invalid status is stored.
True : Valid / False : Invalid
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 The array variable elements for the slowTool argument should be equal to or more
than (toPot-fromPot+1).
 This function can only be used when the mdtldt_optional_tldt_define() air Data
argument is True.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 107/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdtldt_set_slow(
WORD fromPot,
WORD toPot,
LPDWORD slowTool)
Explanation
Sets the slow ATC valid/invalid tool data.
Argument
fromPot [Set] Specify the pot number of the lower (from) tool to be set.
toPot [Set] Specify the pot number of the upper (to) tool to be set.
slowTool [Set] Array variable where the slow ATC valid/invalid status is stored.
True : Valid / False : Invalid
Return Value
True : Set operation succeeded.
False : Set operation failed.
Note
 The array variable elements for the slowTool argument should be equal to or more
than (toPot-fromPot+1).
 This function can only be used when the mdtldt_optional_tldt_define() air Data
argument is True.

BOOL mdtldt_optional_tldt_define(
LPBOOL cmn2Data,
LPBOOL btsData,
LPBOOL airData,
LPDWORD slowData,
LPBOOL btsLenData)
Explanation
Tool data items are added depending on the machine specifications and options. This
function acquires (gets) whether or not these items (optional tool data) exist.
Argument
cmn2Data [Get] TRUE : Tool data items used with MMC can be used.
btsData [Get] TRUE : Tool data items used with ATC side BTS can be used.
airData [Get] TRUE : Through-spindle coolant air purge time data can be used.
slowData [Get] Slow ATC data can be used.
btsLenData [Get] Broken tool sensor actual measured value data can be used.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 When NULL is set for the argument, the value is not acquired.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 108/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdtldt_ spindle _tool(


LPWORD pot,
LPDWORD ftn,
LPDWORD itn,
LPDWORD ptn)
Explanation
Acquires (gets) spindle tool pot number, FTN, ITN and PTN.
Argument
pot [Get] Variable where spindle tool pot number is stored. This is “0” when
there is no tool.
ftn [Get] Variable where spindle tool FTN is stored. This is “0” when there is
no tool.
bitn [Get] Variable where spindle tool ITN stored. This is “0” when there is no
tool.
ptn [Get] Variable where spindle tool PTN is stored. This is “0” when there is
no tool.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 When NULL is set for the argument, the value is not acquired.

BOOL mdtldt_next_tool(
LPWORD pot,
LPDWORD ftn,
LPDWORD itn,
LPDWORD ptn)
Explanation
Acquires (gets) next tool pot number, FTN, ITN and PTN.
Argument
pot [Get] Variable where next tool pot number is stored. This is “0” when there
is no tool.
ftn [Get] Variable where next tool FTN is stored. This is “0” when there is no
tool.
bitn [Get] Variable where next tool ITN stored. This is “0” when there is no tool.
ptn [Get] Variable where next tool PTN is stored. This is “0” when there is no
tool.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 When NULL is set for the argument, the value is not acquired.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 109/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdtldt_get_bts_length(
WORD fromPot,
WORD toPot,
LPLONG length)
Explanation
Acquires (gets) broken tool sensor actual measured length (tool data).
Argument
fromPot [Set] Specify the pot number of the lower (from) tool to be acquired.
toPot [Set] Specify the pot number of the upper (to) tool to be acquired.
length [Get] Array variable where the broken tool sensor actual measured length
[mm] is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 The array variable elements for the length argument should be equal to or more than
(toPot-fromPot+1).
 This function can only be used when the mdtldt_optional_tldt_define() btsLenData
argument is True.

BOOL mdtldt_set_bts_length(
WORD fromPot,
WORD toPot,
LPLONG length)
Explanation
Sets broken tool sensor actual measured length (tool data).
Argument
fromPot [Set] Specify the pot number of the lower (from) tool to be set.
toPot [Set] Specify the pot number of the upper (to) tool to be set.
length [Set] Array variable where the broken tool sensor actual measured length
[mm] is stored.
Return Value
True : Set operation succeeded.
False : Set operation failed.
Note
 The array variable elements for the length argument should be equal to or more than
(toPot-fromPot+1).
 This function can only be used when the mdtldt_optional_tldt_define() btsLenData
argument is True.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 110/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdtldt_tls_potno(
LPWORD pot)
Explanation
Acquires (gets) tool pot number indexed to tool loading station (TLS).
Argument
pot [Get] Specify variable where tool pot number indexed to TLS is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.

BOOL mdtldt_set_toolin_accept(
BOOL onOff,
BYTE status,
WORD potNo)
Explanation
Sets On/Off status for Professional 3 side tool in request response data (TIA).
Argument
onOff [Set] Set On/Off status for tool in request response data (TIA).
status [Set] Set status data for tool in request response data (TIA).
potNo [Set] Set pot number of tool to be input.
Return Value
True : Set operation succeeded.
False : Set operation failed.

BOOL mdtldt_set_toolout_accept(
BOOL onOff,
BYTE status,
WORD potNo)
Explanation
Sets On/Off status for Professional 3 side tool out request response data (TOA).
Argument
onOff [Set] Set On/Off status for tool out request response data (TOA).
status [Set] Set status data for tool out request response data (TOA).
potNo [Set] Set pot number of tool to be output.
Return Value
True : Set operation succeeded.
False : Set operation failed.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 111/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdtldt_get_toolin_accept(
LPBOOL onOff,
LPBYTE status,
LPWORD potNo)
Explanation
Acquires (gets) Professional 3 side tool in request response data (TIA).
Argument
onOff [Get] Variable where On/Off status for tool in request response data (TIA)
is stored.
status [Get] Variable where status data for tool in request response data (TIA) is
stored.
potNo [Get] Variable where pot number of tool to be input is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.

BOOL mdtldt_get_toolout_accept(
LPBOOL onOff,
LPBYTE status,
LPWORD potNo)
Explanation
Acquires (gets) Professional 3 side tool out request response data (TOA).
Argument
onOff [Get] Variable where On/Off status for tool out request response data
(TOA) is stored.
status [Get] Variable where status data for tool out request response data (TOA)
is stored.
potNo [Get] Variable where pot number of tool to be output is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 112/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdtldt_chk_toolin(
LPBOOL request,
LPBOOL finish,
LPBYTE status)
Explanation
Acquires (gets) Professional 3 side setting data for interface between PC and Pro 3
related to tool in operation.
Argument
request [Get] Variable where tool in request signal (TIR) is stored.
finish [Get] Variable where tool in finish signal (TIF) is stored.
status [Get] Variable where tool in finish status data is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.

BOOL mdtldt_chk_toolout(
LPBOOL request,
LPBOOL finish,
LPBYTE status)
Explanation
Acquires (gets) Professional 3 side setting data for interface between PC and Pro 3
related to tool out operation.
Argument
request [Get] Variable where tool out request signal (TOR) is stored.
finish [Get] Variable where tool out finish signal (TOF) is stored.
status [Get] Variable where tool out finish status data is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.

BOOL mdtldt_get_toolid_data(
toolIdData_r *data)
Explanation
Acquires (gets) data ready by Professional 3 when tool input is performed. This function
can only be used with Visual C++.
Argument
data [Set] Specify variable where data read from ID chip is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 Refer to ProMem.h for toolIdData_r type data argument.
 This function cannot be called from Visual Basic.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 113/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdtldt_get_toolid_data_vb(
toolIdDataVB_r *data)
Explanation
Acquires (gets) data read by Professional 3 from ID chip during tool input/output. This
function is only valid in Visual Basic.
Argument
data [Set] Specify variable where data read from ID chip is stored. ID
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 Refer to ProMem.h for toolIdData_r type data argument.
 This function cannot be called from Visual C++.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 114/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

9 Function Specifications (MdWkdt.dll)

long mdwkdt_GetLastMError ()
Explanation
Returns last error number that occurred for function within mdwkdt.dll.
Return Value
0: Last mdwkdt.dll function called finished normally.
Other than 0: Error number.
Note
 When the function executed after the error occurred finished normally, this function
returns “0”.

long mdwkdt_GetLastFError ()
Explanation
Returns last Fanuc Library error number that occurred for function within mdwkdt.dll.
Return Value
0: Last Fanuc Library function called finished normally.
Other than 0: Error number.
Note
 When the function executed after the error occurred finished normally, this function
returns “0”.

BOOL mdwkdt_set_node(
long node)
Explanation
Acquires (gets) the FOCAS1 Library Handle in order to use the FOCAS1 function within
mdwkdt.dll. The acquired library handle is stored/used within mdwkdt.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.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 115/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdwkdt_chk_value(
WORD item,
long value,
LPBOOL suitable)
Explanation
Checks whether or not input value is within allowable range for each data item.
Argument
item [Set] Specify the constant indicating the work data item to be checked.
Refer to ProDef.h for (WD_OFFSET(1) – WD_AUX3(25))
value [Set] Input value (Cast in LONG)
suitable [Get] True (within value range)
False (value for specified item cannot be used)
Return Value
True : Check operation succeeded.
False : Check operation failed.
Note
 Some work data items are expressed in WORD, but make sure to cast in LONG with
this function.
 The WD_RUNTIME and WD_AUTOTIME are displayed in minutes on the custom
screen of the Professional 3, but with this DLL, data is accessed in second units.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 116/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdwkdt_get_item(
WORD pltNo,
WORD faceNo,
WORD item,
LPLONG value)
Explanation
Acquires (gets) specified work data item (other than comment) values for specified pallet
face.
Argument
pltNo [Set] Set the pallet number.
faceNo [Set] Specify the face number for the specified pallet.
item [Set] Specify the constant that indicates the work data item.
 WD_OFFSET_X (2) X axis offset value
 WD_OFFSET_Y (3) Y axis offset value
 WD_OFFSET_Z (4) Z axis offset value
 WD_ALMPTN (5) Tool No. when alarm occurred
 WD_ALMNO (6) Alarm number
 WD_STAMON (7) Month machining started
 WD_STADAY (8) Day machining started
 WD_STAHOUR (9) Hour machining started
 WD_STAMIN (10) Minute machining started
 WD_ENDMON (11) Month machining ended
 WD_ENDDAY (12) Day machining ended
 WD_ENDHOUR (13) Hour machining ended
 WD_ENDMIN (14) Minute machining ended
 WD_RUNTIME (15) Machining time [sec]
 WD_AUTOTIME (16) Spindle rotation time [sec]
 WD_ALM_O (18) O number when alarm occurred
 WD_PROGNO (19) NC program number
 WD_ALMFLG (20) Alarm status
 WD_RDYFLG (21) Ready status
 WD_BKSKIP (22) Optional block skip
 WD_ENDFLG (23) Machining end flag
(Only for pallet magazine)
value [Get] Specify variable where acquired data is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 The work offset value is expressed in the minimum setting unit. For example, when
the X axis offset value is 999.999, the value for the x_axis is 999999.
 The machining time (WD_RUNTIME) and spindle rotating time (WD_AUTOTIME)
are displayed in minutes [min] on the work data screen, but the unit for this function
is seconds [sec].

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 117/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdwkdt_get_offset(
WORD pltNo,
WORD faceNo,
LPLONG x_axis,
LPLONG y_axis,
LPLONG z_axis)
Explanation
Acquires (gets) workpiece offset value from specified pallet face.
Argument
pltNo [Set] Set the pallet number.
faceNo [Set] Specify the face number for the specified pallet.
x_axis [Get] Specify the variable where the X axis offset value is stored.
y_axis [Get] Specify the variable where the Y axis offset value is stored.
z_axis [Get] Specify the variable where the Z axis offset value is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 The acquired work offset value is expressed in the minimum setting unit. For
example, when the X axis offset value is 999.999, the value for the x_axis is 999999.
 Set NULL for the argument for any data items that are not needed.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 118/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdwkdt_get_start_date(
WORD pltNo,
WORD faceNo,
LPWORD startMonth,
LPWORD startDay,
LPWORD startHour,
LPWORD startMinute)
Explanation
Acquires (gets) the date/time machining started for the specified pallet face.
Argument
pltNo [Set] Set the pallet number.
faceNo [Set] Specify the face number for the specified pallet.
startMonth [Get] Specify the variable where the machining start month is stored.
startDay [Get] Specify the variable where the machining start day is stored.
startHour [Get] Specify the variable where the machining start hour is stored.
startMinute [Get] Specify the variable where the machining start minute is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 Set NULL for the argument for any data items that are not needed.

BOOL mdwkdt_get_finish_date(
WORD pltNo,
WORD faceNo,
LPWORD endMonth,
LPWORD endDay,
LPWORD endHour,
LPWORD endMinute)
Explanation
Acquires (gets) the date/time machining ended (M30 executed) for the specified pallet
face.
Argument
pltNo [Set] Set the pallet number.
faceNo [Set] Specify the face number for the specified pallet.
endMonth [Get] Specify the variable where the machining end month is stored.
endDay [Get] Specify the variable where the machining end day is stored.
endHour [Get] Specify the variable where the machining end hour is stored.
endMinute [Get] Specify the variable where the machining end minute is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 Set NULL for the argument for any data items that are not needed.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 119/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdwkdt_get_comment(
WORD pltNo,
WORD faceNo,
LPSTR cmt)
Explanation
Acquires the comment for the specified pallet face. This function is only valid in Visual
C++.
Argument
pltNo [Set] Set the pallet number.
faceNo [Set] Specify the face number for the specified pallet.
cmt [Get] Specify the variable where the comment character string is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 A number of bytes equal to or more than WKDT_CMT_S is required for the cmt
argument.
 This function cannot be called from Visual Basic.

BOOL mdwkdt_get_comment_vb(
WORD pltNo,
WORD faceNo,
BSTR *cmt)
Explanation
Acquires the comment for the specified pallet face. This function is only valid in Visual
Basic.
Argument
pltNo [Set] Set the pallet number.
faceNo [Set] Specify the face number for the specified pallet.
cmt [Get] Specify the variable where the comment character string is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 A number of bytes equal to or more than WKDT_CMT_S is required for the cmt
argument.
 This function cannot be called from Visual C++.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 120/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdwkdt_get_all(
WORD pltNo,
WORD faceNo,
LPLONG workOffset,
LPDWORD almPtn,
LPDWORD almNo,
LPWORD startMonth,
LPWORD startDay,
LPWORD startHour,
LPWORD startMinute,
LPWORD endMonth,
LPWORD endDay,
LPWORD endHour,
LPWORD endMinute,
LPDWORD runTime,
LPDWORD autoTime,
LPSTR cmt,
LPDWORD alarm_o,
LPDWORD programNo,
LPDWORD alarmFlg,
LPWORD readyFlg,
LPWORD blockSkip,
LPWORD endFlg)
Explanation
Acquires (gets) all work data items for the specified pallet face. This function is only valid
in Visual C++.
Argument
pltNo [Set] Set the pallet number.
faceNo [Set] Specify the face number for the specified pallet.
workOffset [Get] Specify the array variable where the workpiece offset value for
each axis is stored.
almPtn [Get] Specify the variable where the alarm tool number is stored.
almNo [Get] Specify the variable where the MC alarm number is stored.
startMonth [Get] Specify the variable where the machining start month is stored.
startDay [Get] Specify the variable where the machining start day is stored.
startHour [Get] Specify the variable where the machining start hour is stored.
startMinute [Get] Specify the variable where the machining start minute is stored.
endMonth [Get] Specify the variable where the machining end month is stored.
endDay [Get] Specify the variable where the machining end day is stored.
endHour [Get] Specify the variable where the machining end hour is stored.
endMinute [Get] Specify the variable where the machining end minute is stored.
runTime [Get] Specify the variable where the machining time [min] is stored.
autoTime [Get] Specify the variable where the spindle rotation time [min] is
stored.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 121/153


Makino Milling Machine Libraries (MML) DLL Reference Manual
cmt [Get] Specify the variable where the comment is stored.
alarm_o [Get] Specify the variable where the O number for which the alarm
occurred is stored.
programNo [Get] Specify the variable where the main program number is stored.
alarmFlg [Get] Specify the variable where the alarm status data is stored.
Refer to mdwkdt_split_alarm().
readyFlg [Get] Specify the variable where the ready flag is stored.
blockSkip [Get] Specify the variable where the block skip status is stored.
Refer to mdwkdt_split_bkskip().
endFlg [Get] Specify the variable where the machining end status data is
stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 A number of bytes equal to or more than WKDT_CMT_S is required for the cmt
argument.
 An array that provides 3 elements (X, Y, Z) is required in the workOffset argument:
workOffset[0] = (X axis offset value)
workOffset[1] = (Y axis offset value)
workOffset[2] = (Z axis offset value)
 The acquired work offset value is expressed in the minimum setting unit. For
example, when the X axis offset value is 999.999, the value for workOffset[0] is
999999.
 The machining time (WD_RUNTIME) and spindle rotating time (WD_AUTOTIME)
are displayed in minutes [min] on the work data screen, but the unit for this function
is seconds [sec].
 Set NULL for the argument for any data items that are not needed.
 This function cannot be called from Visual Basic.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 122/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdwkdt_get_all_vb(
WORD pltNo,
WORD faceNo,
LPLONG workOffset,
LPDWORD almPtn,
LPDWORD almNo,
LPWORD startMonth,
LPWORD startDay,
LPWORD startHour,
LPWORD startMinute,
LPWORD endMonth,
LPWORD endDay,
LPWORD endHour,
LPWORD endMinute,
LPDWORD runTime,
LPDWORD autoTime,
BSTR *cmt,
LPDWORD alarm_o,
LPDWORD programNo,
LPDWORD alarmFlg,
LPWORD readyFlg,
LPWORD blockSkip,
LPWORD endFlg)
Explanation
Acquires (gets) all work data items for the specified pallet face. This function is only valid
in Visual Basic.
Argument
pltNo [Set] Set the pallet number.
faceNo [Set] Specify the face number for the specified pallet.
workOffset [Get] Specify the array variable where the workpiece offset value for
each axis is stored.
almPtn [Get] Specify the variable where the alarm tool number is stored.
almNo [Get] Specify the variable where the MC alarm number is stored.
startMonth [Get] Specify the variable where the machining start month is stored.
startDay [Get] Specify the variable where the machining start day is stored.
startHour [Get] Specify the variable where the machining start hour is stored.
startMinute [Get] Specify the variable where the machining start minute is stored.
endMonth [Get] Specify the variable where the machining end month is stored.
endDay [Get] Specify the variable where the machining end day is stored.
endHour [Get] Specify the variable where the machining end hour is stored.
endMinute [Get] Specify the variable where the machining end minute is stored.
runTime [Get] Specify the variable where the machining time [min] is stored.
autoTime [Get] Specify the variable where the spindle rotation time [min] is
stored.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 123/153


Makino Milling Machine Libraries (MML) DLL Reference Manual
cmt [Get] Specify the variable where the comment is stored.
alarm_o [Get] Specify the variable where the O number for which the alarm
occurred is stored.
programNo [Get] Specify the variable where the main program number is stored.
alarmFlg [Get] Specify the variable where the alarm status data is stored.
Refer to mdwkdt_split_alarm().
readyFlg [Get] Specify the variable where the ready flag is stored.
blockSkip [Get] Specify the variable where the block skip status is stored.
Refer to mdwkdt_split_bkskip().
endFlg [Get] Specify the variable where the machining end status data is
stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 A number of bytes equal to or more than WKDT_CMT_S is required for the cmt
argument.
 An array that provides 3 elements (X, Y, Z) is required in the workOffset argument:
workOffset[0] = (X axis offset value)
workOffset[1] = (Y axis offset value)
workOffset[2] = (Z axis offset value)
 The acquired work offset value is expressed in the minimum setting unit. For
example, when the X axis offset value is 999.999, the value for workOffset[0] is
999999.
 The machining time (WD_RUNTIME) and spindle rotating time (WD_AUTOTIME)
are displayed in minutes [min] on the work data screen, but the unit for this function
is seconds [sec].
 Set NULL for the argument for any data items that are not needed.
 This function cannot be called from Visual C++.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 124/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdwkdt_set_item(
WORD pltNo,
WORD faceNo,
WORD item,
long data)
Explanation
Sets specified work data item (other than comment) values for specified pallet face.
Argument
pltNo [Set] Set the pallet number.
faceNo [Set] Specify the face number for the specified pallet.
item [Set] Specify the constant that indicates the work data item.
 WD_OFFSET_X (2) X axis offset value
 WD_OFFSET_Y (3) Y axis offset value
 WD_OFFSET_Z (4) Z axis offset value
 WD_ALMPTN (5) Tool No. when alarm occurred
 WD_ALMNO (6) Alarm number
 WD_STAMON (7) Month machining started
 WD_STADAY (8) Day machining started
 WD_STAHOUR (9) Hour machining started
 WD_STAMIN (10) Minute machining started
 WD_ENDMON (11) Month machining ended
 WD_ENDDAY (12) Day machining ended
 WD_ENDHOUR (13) Hour machining ended
 WD_ENDMIN (14) Minute machining ended
 WD_RUNTIME (15) Machining time [sec]
 WD_AUTOTIME (16) Spindle rotation time [sec]
 WD_ALM_O (18) O number when alarm occurred
 WD_PROGNO (19) NC program number
 WD_ALMFLG (20) Alarm status
 WD_RDYFLG (21) Ready status
 WD_BKSKIP (22) Optional block skip
 WD_ENDFLG (23) Machining end flag
(Only for pallet magazine)
date [Set] Specify setting value.
Return Value
True : Set operation succeeded.
False : Set operation failed.
Note
 Some work data items are expressed in WORD, but make sure to cast all items in
LONG for setting with this function.
 Use mdwkdt_get_comment(), mdwkdt_get_comment_vb() when setting the
comment from the work data.
 WD_RUNTIME and WD_AUTOTIME are displayed in minutes on the custom screen,
but access is performed in second units with this DLL.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 125/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdwkdt_set_offset(
WORD pltNo,
WORD faceNo,
long x_axis,
long y_axis,
long z_axis)
Explanation
Sets the workpiece offset value for the specified pallet face.
Argument
pltNo [Set] Set the pallet number.
faceNo [Set] Specify the face number for the specified pallet.
x_axis [Set] Specify the variable where the X axis workpiece offset value to be
set is stored.
y_axis [Set] Specify the variable where the Y axis workpiece offset value to be
set is stored.
z_axis [Set] Specify the variable where the Z axis workpiece offset value to be
set is stored.
Return Value
True : Set operation succeeded.
False : Set operation failed.

BOOL mdwkdt_set_comment(
WORD pltNo,
WORD faceNo,
LPSTR cmt)
Explanation
Sets a comment for the specified pallet face.
Argument
pltNo [Set] Set the pallet number.
faceNo [Set] Specify the face number for the specified pallet.
cmt [Set] Specify the variable where the comment character string to be set is
stored.
Return Value
True : Set operation succeeded.
False : Set operation failed.
Note
 The maximum length of the comment character string is WKDT_CMT_L characters.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 126/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdwkdt_set_all(
WORD pltNo,
WORD faceNo,
LPLONG workOffset,
DWORD almPtn,
DWORD almNo,
WORD startMonth,
WORD startDay,
WORD startHour,
WORD startMinute,
WORD endMonth,
WORD endDay,
WORD endHour,
WORD endMinute,
DWORD runTime,
DWORD autoTime,
LPSTR cmt,
DWORD alarm_o,
DWORD programNo,
DWORD alarmFlg,
WORD readyFlg,
WORD blockSkip,
WORD endFlg)
Explanation
Sets all work data items for the specified pallet face. This function is only valid in Visual
C++.
Argument
pltNo [Set] Set the pallet number.
faceNo [Set] Specify the face number for the specified pallet.
workOffset [Set] Specify the array variable where the workpiece offset value for
each axis is stored.
almPtn [Set] Specify the variable where the alarm tool number is stored.
almNo [Set] Specify the variable where the MC alarm number is stored.
startMonth [Set] Specify the variable where the machining start month is stored.
startDay [Set] Specify the variable where the machining start day is stored.
startHour [Set] Specify the variable where the machining start hour is stored.
startMinute [Set] Specify the variable where the machining start minute is stored.
endMonth [Set] Specify the variable where the machining end month is stored.
endDay [Set] Specify the variable where the machining end day is stored.
endHour [Set] Specify the variable where the machining end hour is stored.
endMinute [Set] Specify the variable where the machining end minute is stored.
runTime [Set] Specify the variable where the machining time [min] is stored.
autoTime [Set] Specify the variable where the spindle rotation time [min] is
stored.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 127/153


Makino Milling Machine Libraries (MML) DLL Reference Manual
cmt [Set] Specify the variable where the comment is stored.
alarm_o [Set] Specify the variable where the O number for which the alarm
occurred is stored.
programNo [Set] Specify the variable where the main program number is stored.
alarmFlg [Set] Specify the variable where the alarm status data is stored.
Refer to mdwkdt_make_alarm().
readyFlg [Set] Specify the variable where the ready flag is stored.
blockSkip [Set] Specify the variable where the block skip status is stored.
Refer to mdwkdt_make_bkskip().
endFlg [Set] Specify the variable where the machining end status data is
stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 A number of bytes equal to or more than WKDT_CMT_S is required for the cmt
argument.
 An array that provides 3 elements (X, Y, Z) is required in the workOffset argument:
workOffset[0] = (X axis offset value)
workOffset[1] = (Y axis offset value)
workOffset[2] = (Z axis offset value)
 The work offset value is expressed in the minimum setting unit. For example, when
the X axis offset value is 999.999, the value for workOffset[0] is 999999.
 The machnining time (WD_RUNTIME) and spindle rotating time (WD_AUTOTIME)
are displayed in minutes [min] on the work data screen, but the unit for this function
is seconds [sec].

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 128/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdwkdt_split_bkskip(
WORD blockSkip,
LPBOOL bkskip2,
LPBOOL bkskip3,
LPBOOL bkskip4,
LPBOOL bkskip5,
LPBOOL bkskip6,
LPBOOL bkskip7,
LPBOOL bkskip8,
LPBOOL bkskip9)
Explanation
Separates the block skip data expressed in bits into the respective block skip numbers.
Argument
blockSkip [Set] Specify the block skip data to be separated.
bkskip2 [Get] True : Block skip 2 is On.
bkskip3 [Get] True : Block skip 3 is On.
bkskip4 [Get] True : Block skip 4 is On.
bkskip5 [Get] True : Block skip 5 is On.
bkskip6 [Get] True : Block skip 6 is On.
bkskip7 [Get] True : Block skip 7 is On.
bkskip8 [Get] True : Block skip 8 is On.
bkskip9 [Get] True : Block skip 9 is On.
Return Value
True : Separate operation succeeded.
False : Separate operation failed.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 129/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdwkdt_make_bkskip(
BOOL bkskip2,
BOOL bkskip3,
BOOL bkskip4,
BOOL bkskip5,
BOOL bkskip6,
BOOL bkskip7,
BOOL bkskip8,
BOOL bkskip9,
short *blockSkip)
Explanation
Converts the respective block skip number data into block skip data expressed in bits.
Argument
bkskip2 [Set] Specify On/Off status of block skip 2.
bkskip3 [Set] Specify On/Off status of block skip 3.
bkskip4 [Set] Specify On/Off status of block skip 4.
bkskip5 [Set] Specify On/Off status of block skip 5.
bkskip6 [Set] Specify On/Off status of block skip 6.
bkskip7 [Set] Specify On/Off status of block skip 7.
bkskip8 [Set] Specify On/Off status of block skip 8.
bkskip9 [Set] Specify On/Off status of block skip 9.
blockSkip [Get] Specify the variable where the acquired block skip data expressed
in bits is stored.
Return Value
True : Convert operation succeeded.
False : Convert operation failed.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 130/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdwkdt_split_alarm(
DWORD alarmFlg,
LPBOOL tool_chk,
LPBOOL bts,
LPBOOL bts2,
LPBOOL ac,
LPBOOL sl,
LPBOOL tl,
LPBOOL spare_tool,
LPBOOL wk_measure)
Explanation
Separates alarm status data into respective alarm items.
Argument
alarmFlg [Set] Specify alarm status data to be separated.
tool_chk [Get] True : Tool precheck alarm
bts [Get] True : BTS alarm.
bts2 [Get] True : BTS2 alarm.
ac [Get] True : AC alarm.
sl [Get] True : SL alarm.
tl [Get] True : TL alarm.
spare_tool [Get] True : Spare tool alarm.
wk_measure [Get] True : Workpiece auto measure alarm.
Return Value
True : Separate operation succeeded.
False : Separate operation failed.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 131/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdwkdt_make_alarm(
BOOL tool_chk,
BOOL bts,
BOOL bts2,
BOOL ac,
BOOL sl,
BOOL tl,
BOOL spare_tool,
BOOL wk_measure,
LPDWORD alarmFld)
Explanation
Converts respective alarm items into alarm status data expressed in bits.
Argument
tool_chk [Set] True : Tool precheck alarm
bts [Set] True : BTS alarm.
bts2 [Set] True : BTS2 alarm.
ac [Set] True : AC alarm.
sl [Set] True : SL alarm.
tl [Set] True : TL alarm.
spare_tool [Set] True : Spare tool alarm.
wk_measure [Set] True : Workpiece auto measure alarm.
alarmFld [Get] Specify variable where alarm status data to be acquired is
stored.
Return Value
True : Convert operation succeeded.
False : Convert operation failed.

BOOL mdwkdt_get_table_pltno(
LPWORD pltNo)
Explanation
Acquires (gets) table pallet number.
Argument
pltNo [Get] Specify variable where pallet number to be acquired is stored.
“0” is set when there is no pallet, and “–1” is set when the number
cannot be confirmed.
Return Value
True : Get operation succeeded.
False : Get operation failed.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 132/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdwkdt_get_front_pltno(
LPWORD pltNo)
Explanation
Acquires (gets) pallet number on front stocker.
Argument
pltNo [Get] Specify variable where pallet number to be acquired is stored.
“0” is set when there is no pallet, and “–1” is set when the number
cannot be confirmed.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 Do not use this function when the machine does not have a front stocker

BOOL mdwkdt_get_back_pltno(
LPWORD pltNo)
Explanation
Acquires (gets) pallet number on back stocker.
Argument
pltNo [Get] Specify variable where pallet number to be acquired is stored.
“0” is set when there is no pallet, and “–1” is set when the number
cannot be confirmed.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
 Do not use this function when the machine does not have a back stocker

BOOL mdwkdt_max_pallet(
LPWORD numPlt)
Explanation
Acquires (gets) number of pallets set on Professional 3.
Argument
numPlt [Get] Specify variable where acquired number of pallets is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 133/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdwkdt_max_face(
LPWORD numFace)
Explanation
Acquires (gets) number of faces set to 1 pallet on Professional 3.
Argument
numFace [Get] Specify variable where acquired number of faces is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.

BOOL mdwkdt_set_table_pltno(
WORD pltNo)
Explanation
Sets table pallet number.
Argument
pltNo [Set] Specify variable where pallet number to be set is stored.
“0” is set when there is no pallet, and “–1” is set when the number
cannot be confirmed.
Return Value
True : Set operation succeeded.
False : Set operation failed.

BOOL mdwkdt_set_front_pltno(
WORD pltNo)
Explanation
Sets pallet number on front stocker.
Argument
pltNo [Set] Specify variable where pallet number to be set is stored.
“0” is set when there is no pallet, and “–1” is set when the number
cannot be confirmed.
Return Value
True : Set operation succeeded.
False : Set operation failed.
Note
 Do not use this function when the machine does not have a front stocker

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 134/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdwkdt_set_back_pltno(
WORD pltNo)
Explanation
Sets pallet number on back stocker.
Argument
pltNo [Set] Specify variable where pallet number to be set is stored.
“0” is set when there is no pallet, and “–1” is set when the number
cannot be confirmed.
Return Value
True : Set operation succeeded.
False : Set operation failed.
Note
 Do not use this function when the machine does not have a back stocker

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 135/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

10 List of Functions

long mdmcinf_GetLastMError() ................................................................................................. 9


The last error that occurred in the mdmcinf.dll function is returned. ................................ 9

long mdmcinf_GetLastFError() .................................................................................................. 9


The number of the last Fanuc library error that occurred in the mdmcinf.dll function is
returned. ................................................................................................................................... 9

BOOL mdmcinf_set_node( long node) ........................................................................................ 9


Acquires (gets) the FOCAS1 Library Handle in order to use the FOCAS1 function within
mdmcinf.dll. The acquired library handle is stored/used within mdmcinf.dll. ................... 9
Therefore, execute this function once after communication is established between the
CNC and PC. ............................................................................................................................ 9

BOOL mdmcinf_pro_version( LPSTR verString) .................................................................... 10


Acquires (gets) the Professional 3 version character string. This can only be called from
Visual C++. ............................................................................................................................. 10

BOOL mdmcinf_pro_version_vb( BSTR *verString) .............................................................. 10


Acquires (gets) the Professional 3 version character string. This can only be called from
Visual Basic. ........................................................................................................................... 10

BOOL mdmcinf_atc_type( LPWORD atcMag, LPWORD dtcMag) ..................................... 10


Acquires (gets) the ATC magazine type and DTC magazine type. .................................... 10

BOOL mdmcinf_apc_type( LPWORD apcArm, LPWORD pltMag) .....................................11


Acquires (gets) the APC arm type and pallet magazine type. .............................................11

BOOL mdmcinf_machineif2_request( LPBOOL success)........................................................11


Request from PC to Professional 3 for processing of Machine Items Table Interface 2 data.
..................................................................................................................................................11

BOOL mdmcinf_machineif2_request_cancel( LPBOOL success) ...........................................11


Cancels request from PC to Professional 3 for processing of Machine Items Table
Interface 2 data. ......................................................................................................................11

BOOL mdmcinf_machineif2_response( LPBOOL finish) ....................................................... 12


Checks status of Professional 3 Machine Items Table Interface 2 data processing request.
................................................................................................................................................. 12

BOOL mdmcinf_get_mcpara( WORD paraNo, long *value, long defValue) .................... 12


Acquires (gets) specified machine parameter value. ........................................................... 12

BOOL mdmcinf_set_mcpara( WORD paraNo, long value) .................................................. 12


Sets the specified machine parameter value. ...................................................................... 12

BOOL mdmcinf_spindle_status( LPWORD position, LPWORD direction)........................ 13


Acquires (gets) the spindle status. ....................................................................................... 13

BOOL mdmcinf_apc_status( LPWORD armStdby, LPWORD stckStatus) ........................ 13


Acquires (gets) the pallet changer status. ........................................................................... 13

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 136/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdmcinf_atc_status( LPWORD armStdby, LPWORD magStatus) ........................ 14


Acquires (gets) the ATC magazine status. ........................................................................... 14

BOOL mdmcinf_spindle_speed( LPWORD spdlSpeed) .......................................................... 14


Acquires (gets) spindle rotation speed [min-1]. .................................................................... 14

BOOL mdmcinf_toolmoni_setting( LPWORD slUppLmt, LPWORD acUppLmt, LPWORD


acLowLmt) ................................................................................................................................. 15
Acquires (gets) tool monitor setting values. ........................................................................ 15

BOOL mdmcinf_spindle_load( LPWORD loadVal, LPWORD noLoadVal, LPWORD


actualVal) ................................................................................................................................... 15
Acquires (gets) the tool monitor current values. ................................................................. 15

BOOL mdmcinf_chk_mc_alarm( LPBOOL alarm) ................................................................. 15


Acquires (gets) Professional 3 MC alarm status. ................................................................ 15

BOOL mdmcinf_mc_alarm( LPWORD taskID, LPDWORD almNum, LPWORD


almWarn, LPWORD rtyOk, LPWORD numAlm)................................................................. 16
Acquires (gets) messages for alarms that have occurred on Professional 3. ..................... 16

BOOL mdmcinf_max_alarm_history( LPWORD numHis) .................................................... 16


Acquires (gets) maximum number of alarm history records .............................................. 16

BOOL mdmcinf_mc_alarm_history( LPWORD taskID, LPDWORD almNum, LPWORD


almWarn, LPWORD rtyOk, LPWORD year, LPWORD month, LPWORD day,
LPWORD hour, LPWORD min, LPWORD sec, LPWORD numHis) ............................. 17
Acquires (gets) Professional 3 alarm history data. ............................................................. 17

BOOL mdmcinf_can_auto_poweroff( LPBOOL yes) ............................................................... 18


Acquires (gets) status indicating whether or not machine power can be automatically
turned off. ............................................................................................................................... 18

BOOL mdmcinf_set_auto_poweroff( BOOL flg) ...................................................................... 18


Sets/releases Professional 3 auto power off request data. .................................................. 18

BOOL mdmcinf_get_auto_poweroff( LPBOOL apo) ............................................................... 18


Acquires (gets) the Professional 3 auto power off request data. ........................................ 18

BOOL mdmcinf_tldt_edit_start( LPBOOL success) ............................................................... 19


Turns On Professional 3 PC tool data edit mode, enabling Professional 3 tool data to be
edited from the PC. ................................................................................................................ 19

BOOL mdmcinf_tldt_edit_finish() ............................................................................................ 19


Turns Off Professional 3 PC tool data edit mode, ending editing of Professional 3 tool data
from PC................................................................................................................................... 19

BOOL mdmcinf_chk_tldt_edit( LPBOOL editPC, LPBOOL editPro3) ............................... 19


Checks status of Not-If-Then flag for editing of tool data between Professional 3 and PC.
................................................................................................................................................. 19

BOOL mdmcinf_set_maint_mode( BOOL flg) ......................................................................... 20


Sets/Releases Professional 3 maintenance mode. ............................................................... 20

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 137/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdmcinf_get_maint_mode( LPBOOL mntMode) ........................................................ 20


Acquires (gets) On/Off status of Professional 3 maintenance mode. ................................. 20

BOOL mdmcinf_chk_system_mode( LPBOOL sysMode) ....................................................... 20


Acquires (gets) On/Off status of Professional 3 system mode. ........................................... 20

BOOL mdmcinf_chk_auto_unloading_mode( LPBOOL aumMode)....................................... 20


Acquires (gets) On/Off status of Professional 3 auto unload mode. ................................... 20

BOOL mdmcinf_chk_no_more_pallet_mode( LPBOOL nmpMode) ....................................... 21


Acquires (gets) On/Off status of Professional 3 load prohibit (no more pallets) mode. .... 21

BOOL mdmcinf_set_trans_error( BOOL flg)........................................................................... 21


Sets/Releases Professional 3 external device alarm bit. ..................................................... 21

BOOL mdmcinf_get_trans_error( LPBOOL alarm)................................................................ 21


Acquires (gets) On/Off status of Professional 3 external device alarm bit. ....................... 21

BOOL mdmcinf_set_start_disable( BOOL flg) ........................................................................ 21


Sets/Releases Professional 3 cycle start disable bit during DNC mode. ........................... 21

BOOL mdmcinf_get_tls_disable( LPBOOL disable) ............................................................... 22


Acquires (gets) On/Off status of Professional 3 tool loading station control panel disable
mode........................................................................................................................................ 22

BOOL mdmcinf_set_tls_disable( BOOL disableFlag)............................................................. 22


Sets/Releases Professional 3 tool loading station control panel disable mode.................. 22

BOOL mdmcinf_chk_operator_call( LPBOOL opeCall).......................................................... 22


Acquires (gets) Professional 3 operator call status. ............................................................ 22

BOOL mdmcinf_system_cycle_start( BOOL opeCall, LPBOOL success) ........................... 23


Requests execution of cycle start for Professional 3 (Reversal of STX) ............................. 23

BOOL mdmcinf_chk_system_mach_finish( LPBOOL finish, long *condition) .................. 24


Use mdmcinf_system_cycle_start() to acquire (get) the status indicating whether or not
cycle start via Professional 3 has been completed. ............................................................. 24

BOOL mdmcinf_get_milling_time( long *value) ..................................................................... 24


Acquires (gets) cumulative time spindle has been rotating during automatic operation
since machining was started (STx was reversed). .............................................................. 24

BOOL mdmcinf_chk_maintenance_mode( LPBOOL maintMode) ........................................ 25


Acquires (gets) Professional 3 maintenance mode status. ................................................. 25

BOOL mdmcinf_chk_system_mach_status( LPBOOL stx, LPBOOL eopx, long


*condition) .................................................................................................................................. 25
Acquires (gets) machining start request signal (STX), program end signal (EOPX) and
machining end status (condition) data between PC and Professional 3. .......................... 25

BOOL mdmcinf_pm_type( LPWORD pmType) ....................................................................... 26


Acquires (gets) type of pallet magazine. .............................................................................. 26

BOOL mdmcinf_pm_plt( LPWORD pmPlt)............................................................................. 26


Acquires (gets) total number of pallets on pallet magazine. .............................................. 26

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 138/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdmcinf_pm_pst( LPWORD pmPst)............................................................................ 26


Acquires (gets) total number of pallet stockers in pallet magazine. .................................. 26

BOOL mdmcinf_pm_wss( LPWORD pmWss) ......................................................................... 26


Acquires (gets) total number of WSS units on pallet magazine......................................... 26

BOOL mdmcinf_pm_get_vhc_command_data( pmVhcCmnd_r *cmndData) ....................... 27


Acquires (gets) vehicle transport command data in pallet magazine data area specified
from PC. This can only be called from Visual C++.............................................................. 27

BOOL mdmcinf_pm_get_vhc_command_state( pmVhcCmndStat_r *cmndStat)................. 27


Acquires (gets) vehicle transport command status data from PC. This can only be called
from Visual C++. .................................................................................................................... 27

BOOL mdmcinf_pm_get_vhc_signal( WORD sigType, long *stat)...................................... 27


Acquires (gets) On/Off status of vehicle transport command start signal, cancel signal
and finish signal from PC. .................................................................................................... 27

BOOL mdmcinf_pm_set_vhc_signal( WORD sigType, long stat) .......................................... 28


Sets/Releases vehicle transport command start and cancel signals from PC. .................. 28

BOOL mdmcinf_pm_set_vhc_command_data( long fromTo, long cmdType, long palletNo,


unit_t srcUnit, unit_t dstUnit) .............................................................................................. 28
Sets the value for the vehicle transport command data in pallet magazine data area
specified from PC. This can only be called from Visual C++. ............................................. 28

BOOL mdmcinf_mc_alarm_reset( long execTime) .................................................................. 29


Turns On the Professional 3 machine alarm reset request signal for the specified time,
enabling alarms to be reset from the PC. ............................................................................ 29

BOOL mdmcinf_get_table_pltno( LPWORD pltNo) ............................................................... 29


Acquires (gets) the pallet number on the machine table. ................................................... 29

BOOL mdmcinf_get_front_pltno( LPWORD pltNo)................................................................ 29


Acquires (gets) the pallet number on the machine front buffer. ........................................ 29

BOOL mdmcinf_get_back_pltno( LPWORD pltNo) ................................................................ 30


Acquires (gets) the pallet number on the machine discharge side stocker of the shuttle
type P/C. ................................................................................................................................. 30

BOOL mdmcinf_set_table_pltno( WORD pltNo) .................................................................... 30


Sets the pallet number on the machine table. ..................................................................... 30

BOOL mdmcinf_set_front_pltno( WORD pltNo)..................................................................... 30


Sets the pallet number on the machine front buffer. .......................................................... 30

BOOL mdmcinf_set_back_pltno( WORD pltNo) ..................................................................... 30


Sets the pallet number on the machine discharge side buffer of the shuttle type P/C. ... 30

BOOL mdmcinf_system_cycle_abort( LPBOOL success) ....................................................... 31


Uses mdmcinf_system_cycle_start() to arbitrarily complete cycle start request (cycle
abort) to Professional 3 (reverses EOPX)............................................................................. 31

BOOL mdmcinf_get_machineIF5( LPDWORD data) ............................................................. 31

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 139/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

Acquires (gets) the data in the Machine Items Table Interface 5. ..................................... 31

BOOL mdmcinf_get_machineIF4( LPDWORD data) ............................................................. 31


Acquires (gets) the data in the Machine Items Table Interface 4. ..................................... 31

BOOL mdmcinf_refresh_custom_screen() ............................................................................... 32


Requests refreshing of custom screen from PC to Professional 3. ..................................... 32

BOOL mdmcinf_macro_read_finish() ...................................................................................... 32


Notifies finishing of macro data reading from PC to Professional 3.................................. 32

BOOL mdmcinf_chk_shutdown_request( LPBOOL reqBit)................................................... 32


Acquires (gets) the Professional 3 power shutdown signal. ............................................... 32

BOOL mdmcinf_set_machineIF4_bit( DWORD bitMask, BOOL value) ............................ 33


Sets On/Off status for Machine Items Table Interface 4 specify bit. ................................. 33

BOOL mdmcinf_spindle_monitor_parameter( LPWORD dataType, LPWORD warnLevel,


LPWORD alarmLevel, WORD numAry, LPWORD numLegalData) ............................... 34
Acquires (gets) setting values for spindle temperature and vibration management
functions. ................................................................................................................................ 34

BOOL mdmcinf_spindle_monitor( LPWORD dataType, LPWORD measuredData, WORD


numAry, LPWORD numLegalData, LPWORD waitTime) ............................................... 35
Acquires (gets) measured values for spindle temperature and vibration management
functions. ................................................................................................................................ 35

long mdmcinf_check_eachmcelm_type() .................................................................................. 35


Acquires (gets) type of EACH MACHINE ELEMENT data in Machine ItemsTable. ...... 35

BOOL mdmcinf_get_mag_data(LPWORD ldrType, LPWORD mcPln, LPWORD wssPln,


LPWORD stbyPln, LPWORD idxStt, LPDWORD idxPos, LPDWORD ldrPos) .............. 36
Acquires (gets) the unique MAG data specified in the EACH MACHINE ELEMENT area
in the Machine Items Table. ................................................................................................. 36

BOOL mdmcinf_get_magapc_power_status( LPBOOL powerStt) ........................................ 36


Acquires (gets) the power source status for the pallet changer when the machine is an
independent MAG.................................................................................................................. 36

BOOL mdmcinf_chk_magapc_poweron_request( ) ................................................................. 37


Checks whether or not power On request has been set for the pallet changer when the
machine is an independent MAG. ........................................................................................ 37

BOOL mdmcinf_set_magapc_poweron( ) ................................................................................. 37


Issues power On request has been set for the pallet changer when the machine is an
independent MAG.................................................................................................................. 37

BOOL mdmcinf_chg_magapc_manual_intervention( )........................................................... 37


Issues request to change the pallet changer manual intervention mode when the machine
is an independent MAG......................................................................................................... 37

BOOL mdminf_spindle_monitor_all( LPWORD dataType, LPWORD measuredData,


LPWORD warnLevel, LPWORD alarmLevel, WORD numAry, LPWORD numLegalData,
LPWORD waitTime) ................................................................................................................. 38

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 140/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

Acquires (gets) all setting values/measured values for spindle temperature management
and vibration management functions. ................................................................................. 38

BOOL mdmcinf_get_on_duty(LPBOOL flag) .......................................................................... 39


Acquires (gets) the On duty/Off duty mode. ........................................................................ 39

BOOL mdmcinf_set_on_duty(BOOL flag) ............................................................................... 39


Sets the On duty/Off duty mode. .......................................................................................... 39

long mdncinf_GetLastMError() ................................................................................................ 40


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

long mdncinf_GetLastFError() ................................................................................................. 40


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

BOOL mdncinf_set_node( long node) ....................................................................................... 40


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. ................... 40

BOOL mdncinf_chk_axis_no( WORD axisNo)......................................................................... 41


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

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


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

BOOL mdncinf_set_cncpara( WORD paraNo, WORD dataType, long *value) ............... 42


Sets specified NC parameter value. ..................................................................................... 42

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


BITINF *onoff)........................................................................................................................... 43
Acquires (gets) the specified bit type NC parameter. ......................................................... 43

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


BITINF *onoff)........................................................................................................................... 43
Sets the specified bit type NC parameter value. ................................................................. 43

short mdncinf_asciitoadrtype( short adrType) ........................................................................ 44


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

short mdncinf_adrtypetoascii( short adrType) ........................................................................ 44


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

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


*value) ........................................................................................................................................ 45
Acquires (gets) specified PMC address data. ....................................................................... 45

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


value) .......................................................................................................................................... 45
Sets data to specified PMC address. .................................................................................... 45

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


*onoff) ......................................................................................................................................... 46
Acquires (gets) specified PMC address bit data. ................................................................. 46

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

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 141/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

onoff) ........................................................................................................................................... 46
Sets specified PMC address bit data. ................................................................................... 46

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


*value) ........................................................................................................................................ 47
Continuously acquires (gets) specified PMC address data in BYTE units. ...................... 47

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


*value) ........................................................................................................................................ 47
Continuously sets data to specified PMC type and address in BYTE units. .................... 47

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


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

BOOL mdncinf_set_pmccntlgrp( short grpNo)........................................................................ 48


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

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


short *dataType, short *dataSize, short *dataAddr) ......................................................... 49
Reads data table control data used to manage PMC data table (address D). ................... 49

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


short *dataType, short *dataSize, short *dataAddr) ......................................................... 50
Writes data table control data used to manage PMC data table (address D). .................. 50

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


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

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


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

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


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

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


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

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


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

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


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

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


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

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


LPWORD mstCodeFin, LPWORD ncEmg, LPWORD editOpe) ....................................... 54
Acquires (gets) CNC status data (machining, emergency stop, aixs moving, CNC mode,
etc.).......................................................................................................................................... 54

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 142/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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


ladver, LPSTR cexelibser, LPSTR cexelibver, LPSTR cexeaplser, LPSTR cexeaplver) 56
Reads CNC system software series/version. This function is only valid in Visual C++. .. 56

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


*ladver, BSTR *cexelibser, BSTR *cexelibver, BSTR *cexeaplser, BSTR *cexeaplver) 57
Reads CNC system software series/version. This function is only valid in Visual Basic. 57

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


LPWORD request, short gCodeGrp) ........................................................................................ 58
Acquires (gets) modal G codes. This function is only valid in Visual C++. ....................... 58

BOOL mdncinf_modal_gcode_vb( LPWORD upperVal, LPWORD underVal, BSTR


*gCodeStr, LPWORD request, short gCodeGrp) .................................................................. 59
Acquires (gets) modal G codes. This function is only valid in Visual Basic. ..................... 59

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


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

BOOL mdncinf_modal_hcode_vb( LPDWORD codeVal, BSTR *codeStr, LPWORD


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

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


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

BOOL mdncinf_modal_dcode_vb( LPDWORD codeVal, BSTR *codeStr, LPWORD


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

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


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

BOOL mdncinf_modal_mcode_vb( LPDWORD codeVal, BSTR *codeStr, LPWORD


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

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


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

BOOL mdncinf_modal_scode_vb( LPDWORD codeVal, BSTR *codeStr, LPWORD

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 143/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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

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


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

BOOL mdncinf_modal_tcode_vb( LPDWORD codeVal, BSTR *codeStr, LPWORD


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

BOOL mdncinf_modal_fcode( LPDWORD upperVal, LPDWORD underVal, LPSTR


fCodeStr, LPWORD request) ................................................................................................. 65
Acquires (gets) modal F code character string and value. This function is only valid in
Visual C++. ............................................................................................................................. 65

BOOL mdncinf_modal_fcode_vb( LPDWORD upperVal, LPDWORD underVal, BSTR


*fCodeStr, LPWORD request)................................................................................................ 65
Acquires (gets) modal F code character string and value. This function is only valid in
Visual Basic. ........................................................................................................................... 65

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


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

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


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

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


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

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


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

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


dNo) ............................................................................................................................................ 68
Sets the tool offset (shape compensation) values. ............................................................... 68

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


WORD dNo) ............................................................................................................................... 68
Acquires (gets) the tool offset (shape compensation) values. ............................................. 68

BOOL mdncinf_modal_tooloffset( LPDWORD hValue, LPDWORD dValue, LPWORD


hNo, LPWORD dNo) ............................................................................................................... 69
Acquires (gets) the current tool offset values and H/D numbers. ...................................... 69

BOOL mdncinf_exec_ncp( LPDWORD oNum, LPDWORD execOnum, LPDWORD


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

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

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 144/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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

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


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

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


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

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


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

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


LPDWORD size) ........................................................................................................................ 72

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


LPDWORD size, LPWORD numProg) .................................................................................. 72
Acquires (gets) a list of all machining program numbers registered on the CNC side. This
function can only be used in Visual C++. ............................................................................. 72

BOOL mdncinf_mem_dirall_vb( short dataLen, LPDWORD oNumber, VARIANT


*comment, LPDWORD size, LPWORD numProg) ............................................................... 73
Acquires (gets) list of all machining program numbers registered on the CNC side. This
function can only be used in Visual Basic. ........................................................................... 73

BOOL mdncinf_chk_macrono( WORD macroNo, short *macroType) ................................. 73


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

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


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

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


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

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


Sets macro variable character string. .................................................................................. 74

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


LPWORD almType, LPWORD numAlm).............................................................................. 75
Acquires (gets) current NC alarm. This function can only be used in Visual C++. .......... 75

BOOL mdncinf_cnc_alarm_vb( LPWORD almNum, LPWORD axisNo, VARIANT


*almMsg, LPWORD almType, LPWORD numAlm) .......................................................... 76
Acquires (gets) current NC alarm. This function can only be used in Visual Basic. ........ 76

BOOL mdncinf_chk_cnc_alarm( LPWORD numAlarm) ........................................................ 76

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 145/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

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

BOOL mdncinf_total_cnc_alarm_history( LPWORD numHistory) ....................................... 76


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

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) ....................................................... 77
Acquires (gets) CNC alarm history data. This function can only be used in Visual C++. 77

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) ....................................................... 78
Acquires (gets) CNC alarm history data. This function can only be used in Visual Basic.
................................................................................................................................................. 78

BOOL mdncinf_machine( LPLONG data) ............................................................................... 78


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

BOOL mdncinf_absolute( LPLONG data) ............................................................................... 79


Acquires absolute coordinate values. ................................................................................... 79

BOOL mdncinf_relative( LPLONG data) ................................................................................ 79


Acquires relative coordinate values. .................................................................................... 79

BOOL mdncinf_distance( LPLONG data) ............................................................................... 79


Acquires remaining movement distance. ............................................................................. 79

BOOL mdncinf_chk_cnc_reset( LPBOOL reset) ..................................................................... 79


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

BOOL mdncinf_cnc_reset() ....................................................................................................... 80


Executes NC reset from PC. ................................................................................................. 80

BOOL mdncinf_chk_eop( LPBOOL eop) .................................................................................. 80


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

BOOL mdncinf_chk_start_bit( LPBOOL start) ...................................................................... 80


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

BOOL mdncinf_cnc_start() ....................................................................................................... 80


Executes CNC cycle start. ..................................................................................................... 80

BOOL mdncinf_feed_hold()....................................................................................................... 81
Executes feed hold (G8#5 OFF and ON). ............................................................................. 81

BOOL mdncinf_chk_mem_protect( LPBOOL protect) ........................................................... 81


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

BOOL mdncinf_chk_backedit( LPBOOL edit) ........................................................................ 81


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

BOOL mdncinf_delete_onumber( DWORD minNumber, DWORD maxNumber, LPWORD


numDel)...................................................................................................................................... 82
Deletes specified O number range from CNC O number memory. .................................... 82

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 146/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdncinf_onumber_search( DWORD oNumber) .......................................................... 82


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

BOOL mdncinf_spindle_feed( LPDWORD feed) ..................................................................... 83


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

BOOL mdncinf_prepare_zero( BOOL OnOff).......................................................................... 83


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............................................................................. 83

BOOL mdncinf_chk_single_block( LPBOOL sbk) ................................................................... 83


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

BOOL mdncinf_set_cnc_timer() ............................................................................................... 83


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

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


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

BOOL mdncinf_get_node_info( long nodeNo, long *ioBase, long *status, long *cncType,
char *nodeName) ....................................................................................................................... 84
Acquires (gets) the specified HSSB node data. This function is only valid in Visual C++.
................................................................................................................................................. 84

BOOL mdncinf_get_node_info_vb( long nodeNo, long *ioBase, long *status, long *cncType,
BSTR *nodeName) .................................................................................................................... 85
Acquires (gets) the specified HSSB node data. This function is only valid in Visual Basic.
................................................................................................................................................. 85

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


short *adrAttr, short *topOfs, short *lastOfs) ................................................................... 86
Acquires (gets) PMC type attributes, valid address range and other data. ...................... 86

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


dNo) ............................................................................................................................................ 86
Sets tool offset (wear compensation) values. ....................................................................... 86

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


WORD dNo) ............................................................................................................................... 87
Acquires (gets) tool offset (wear compensation) values. ..................................................... 87

BOOL mdncinf_rapid_override( LPWORD rate) .................................................................... 87


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

BOOL mdncinf_feed_override( LPWORD rate) ...................................................................... 87


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

BOOL mdncinf_foreground_search( DWORD oNumber) ....................................................... 88


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

BOOL mdncinf_get_tool_compensation( WORD compenType, WORD fromNo, WORD


toNo, LPDWORD value)......................................................................................................... 88
Acquires (gets) the tool offset values for the specified type and numbers. ....................... 88

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 147/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdncinf_set_tool_compensation( WORD compenType, WORD fromNo, WORD


toNo, LPDWORD value)......................................................................................................... 89
Sets the tool offset values for the specified type and numbers. ......................................... 89

BOOL mdncinf_spindle_load_meter( LPDWARD load) *5 added .......................................... 89


Acquires (gets) the spindle motor load [%]. The unit is 0.1%. ............................................ 89

BOOL mdncinf_spindle_motor_speed( LPDWARD speed) *5 added ...................................... 89


Acquires (gets) the spindle motor speed [rpm]. ................................................................... 89

BOOL mdncinf_spindle_motor( LPDWARD load, LPWORD speed) *5 added ...................... 90


Acquires (gets) the spindle motor load [%] and rotation speed [rpm]. The load unit is 0.1%.
................................................................................................................................................. 90

long mdtldt_GetLastMError () ................................................................................................. 91


Returns the last error number that occurred with a mdtldt.dll function.......................... 91

long mdtldt_GetLastFError () .................................................................................................. 91


Returns the last Fanuc Library error number that occurred with a mdtldt.dll function. 91

BOOL mdncinf_set_node(long node) ........................................................................................ 91


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

BOOL mdtldt_toollife_info( short *lifeType, short *countType, BOOL *alarmReset) .... 92


Acquires (gets) the Professional 3 tool life management type. .......................................... 92

BOOL mdtldt_tool_info( short *unit, short *ftn, short *itn, short *ptn) ....................... 92
Acquires (gets) Professional 3 tool management function parameters. ............................ 92

BOOL mdtldt_max_pot( LPWORD numPot) .......................................................................... 93


Acquires (gets) ATC magazine pot size. ............................................................................... 93

BOOL mdtldt_chk_value( short item, long value, BOOL *suitable) ................................ 93


Checks whether or not entered value is valid for specified tool data item........................ 93

BOOL mdtldt_get_common_item( WORD pot, short item, long *value) ......................... 94


Acquires (gets) the values for the specified pot number and tool data item. .................... 94

BOOL mdtldt_set_common_item( WORD pot, short item, long data) ............................. 95


Sets the value for the specified pot number and tool data item. ........................................ 95

BOOL mdtldt_get_common( WORD fromPot, WORD toPot, LPDWORD ptn, LPDWORD


ftn, LPDWORD itn, LPDWORD tl, LPDWORD remain, LPLONG len, LPLONG
dia, LPWORD type, LPWORD alm, LPWORD ac, LPWORD sl) ................................... 96
Acquires (gets) all data for the specified pot numbers........................................................ 96

BOOL mdtldt_set_common( WORD fromPot, WORD toPot, LPDWORD ptn,


LPDWORD ftn, LPDWORD itn, LPDWORD tl, LPDWORD remain, LPDWORD len,
LPDWORD dia, LPWORD type, LPWORD alm, LPWORD ac, LPWORD sl) ........... 97
Sets all data for the specified pot numbers. ........................................................................ 97

BOOL mdtldt_split_common_alarm( WORD almData, BOOL *bts2, BOOL *bts, BOOL


*ac, BOOL *sl, BOOL *tl) .................................................................................................... 98

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 148/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

Splits tool alarm data acquired with mdtldt_get_common_item(), mdtldt_get_common()


into respective types of tool alarms. ..................................................................................... 98

BOOL mdtldt_make_common_alarm( BOOL bts2, BOOL bts, BOOL ac, BOOL sl, BOOL
tl, LPWORD almData) .............................................................................................................. 98
Converts tool alarm data got with mdtldt_set_common_item(), mdtldt_set_common() into
respective types of tool alarms.............................................................................................. 98

BOOL mdtldt_get_mmc( WORD fromPot, WORD toPot, LPSTR *toolType, LPWORD


status, LPWORD size) ............................................................................................................ 99
Acquires (gets) module MMC tool data items. This function is only valid with Visual C++.
................................................................................................................................................. 99

BOOL mdtldt_get_mmc_vb( WORD fromPot, WORD toPot, LPSTR *toolType, LPWORD


status, LPWORD size) .......................................................................................................... 100
Acquires (gets) module MMC tool data items. This function is only valid with Visual Basic.
............................................................................................................................................... 100

BOOL mdtldt_set_mmc( WORD fromPot, WORD toPot, LPSTR *toolType, LPWORD


status, LPWORD size) .......................................................................................................... 101
Sets module MMC tool data items. This function is only valid with Visual C++. .......... 101

BOOL mdtldt_set_mmc_vb( WORD fromPot, WORD toPot, VARIANT *toolType,


LPWORD status, LPWORD size) ........................................................................................ 102
Sets module MMC tool data items. This function is only valid with Visual Basic. ........ 102

BOOL mdtldt_split_mmctype( WORD bitField, BOOL *firstUse, BOOL *opeCall, BOOL


*alarm, BOOL *notUse, BOOL *almDisable, BOOL *Weight, BOOL *thruCoolant)
.................................................................................................................................................. 103
Separates tool data acquired with mdtldt_get_mmc()、mdtldt_get_mmc_vb() into
respective MMC Tool Type items........................................................................................ 103

BOOL mdtldt_make_mmctype( BOOL firstUse, BOOL opeCall, BOOL alarm, BOOL


notUse, BOOL almDisable, BOOL Weight, BOOL thruCoolant, LPWORD bitField) .. 104
Converts respective MMC tool type bit data into tool type data that can be used with
mdtldt_set_mmc(). ............................................................................................................... 104

BOOL mdtldt_get_bts( WORD fromPot, WORD toPot, BOOL *btsOn, LPWORD


firstTime, LPWORD secondTime) .......................................................................................... 105
Acquires (gets) ATC side BTS tool data. ............................................................................ 105

BOOL mdtldt_set_bts( WORD fromPot, WORD toPot, LPBOOL btsOn, LPWORD


firstTime, LPWORD secondTime) .......................................................................................... 106
Sets ATC side BTS tool data. .............................................................................................. 106

BOOL mdtldt_get_air( WORD fromPot, WORD toPot, LPWORD time) .......................... 106
Acquires (gets) the through-spindle coolant air purge time setting (tool data). ............. 106

BOOL mdtldt_set_air( WORD fromPot, WORD toPot, LPWORD time) .......................... 107
Sets the through-spindle coolant air purge time (tool data). ........................................... 107

BOOL mdtldt_get_slow( WORD fromPot, WORD toPot, LPDWORD slowTool) ........... 107

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 149/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

Acquires (gets) the slow ATC valid/invalid tool data. ....................................................... 107

BOOL mdtldt_set_slow( WORD fromPot, WORD toPot, LPDWORD slowTool) .............. 108
Sets the slow ATC valid/invalid tool data. ......................................................................... 108

BOOL mdtldt_optional_tldt_define( LPBOOL cmn2Data, LPBOOL btsData, LPBOOL


airData, LPDWORD slowData, LPBOOL btsLenData) .................................................. 108
Tool data items are added depending on the machine specifications and options. This
function acquires (gets) whether or not these items (optional tool data) exist. .............. 108

BOOL mdtldt_ spindle _tool( LPWORD pot, LPDWORD ftn, LPDWORD itn, LPDWORD
ptn) ........................................................................................................................................... 109
Acquires (gets) spindle tool pot number, FTN, ITN and PTN. ......................................... 109

BOOL mdtldt_next_tool( LPWORD pot, LPDWORD ftn, LPDWORD itn, LPDWORD


ptn) ........................................................................................................................................... 109
Acquires (gets) next tool pot number, FTN, ITN and PTN............................................... 109

BOOL mdtldt_get_bts_length( WORD fromPot, WORD toPot, LPLONG length) ...........110


Acquires (gets) broken tool sensor actual measured length (tool data). ...........................110

BOOL mdtldt_set_bts_length( WORD fromPot, WORD toPot, LPLONG length) ............110


Sets broken tool sensor actual measured length (tool data)..............................................110

BOOL mdtldt_tls_potno( LPWORD pot) ................................................................................ 111


Acquires (gets) tool pot number indexed to tool loading station (TLS). ........................... 111

BOOL mdtldt_set_toolin_accept( BOOL onOff, BYTE status, WORD potNo) ............... 111
Sets On/Off status for Professional 3 side tool in request response data (TIA). .............. 111

BOOL mdtldt_set_toolout_accept( BOOL onOff, BYTE status, WORD potNo) ............. 111
Sets On/Off status for Professional 3 side tool out request response data (TOA). .......... 111

BOOL mdtldt_get_toolin_accept( LPBOOL onOff, LPBYTE status, LPWORD potNo) 112


Acquires (gets) Professional 3 side tool in request response data (TIA). .........................112

BOOL mdtldt_get_toolout_accept( LPBOOL onOff, LPBYTE status, LPWORD potNo)


...................................................................................................................................................112
Acquires (gets) Professional 3 side tool out request response data (TOA). ......................112

BOOL mdtldt_chk_toolin( LPBOOL request, LPBOOL finish, LPBYTE status) ..........113


Acquires (gets) Professional 3 side setting data for interface between PC and Pro 3
related to tool in operation. ..................................................................................................113

BOOL mdtldt_chk_toolout( LPBOOL request, LPBOOL finish, LPBYTE status) ...........113


Acquires (gets) Professional 3 side setting data for interface between PC and Pro 3
related to tool out operation.................................................................................................113

BOOL mdtldt_get_toolid_data( toolIdData_r *data) .............................................................113


Acquires (gets) data ready by Professional 3 when tool input is performed. This function
can only be used with Visual C++. ......................................................................................113

BOOL mdtldt_get_toolid_data_vb( toolIdDataVB_r *data) ..................................................114


Acquires (gets) data read by Professional 3 from ID chip during tool input/output. This

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 150/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

function is only valid in Visual Basic. .................................................................................114

long mdwkdt_GetLastMError ()..............................................................................................115


Returns last error number that occurred for function within mdwkdt.dll.......................115

long mdwkdt_GetLastFError ()...............................................................................................115


Returns last Fanuc Library error number that occurred for function within mdwkdt.dll.
................................................................................................................................................115

BOOL mdwkdt_set_node( long node)......................................................................................115


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

BOOL mdwkdt_chk_value( WORD item, long value, LPBOOL suitable) ......................116


Checks whether or not input value is within allowable range for each data item. .........116

BOOL mdwkdt_get_item( WORD pltNo, WORD faceNo, WORD item, LPLONG value)
...................................................................................................................................................117
Acquires (gets) specified work data item (other than comment) values for specified pallet
face. ........................................................................................................................................117

BOOL mdwkdt_get_offset( WORD pltNo, WORD faceNo, LPLONG x_axis, LPLONG


y_axis, LPLONG z_axis) .......................................................................................................118
Acquires (gets) workpiece offset value from specified pallet face. ....................................118

BOOL mdwkdt_get_start_date( WORD pltNo, WORD faceNo, LPWORD startMonth,


LPWORD startDay, LPWORD startHour, LPWORD startMinute) ................................119
Acquires (gets) the date/time machining started for the specified pallet face. ................119

BOOL mdwkdt_get_finish_date( WORD pltNo, WORD faceNo, LPWORD endMonth,


LPWORD endDay, LPWORD endHour, LPWORD endMinute) ......................................119
Acquires (gets) the date/time machining ended (M30 executed) for the specified pallet
face. ........................................................................................................................................119

BOOL mdwkdt_get_comment( WORD pltNo, WORD faceNo, LPSTR cmt).................. 120


Acquires the comment for the specified pallet face. This function is only valid in Visual
C++........................................................................................................................................ 120

BOOL mdwkdt_get_comment_vb( WORD pltNo, WORD faceNo, BSTR *cmt) ............ 120
Acquires the comment for the specified pallet face. This function is only valid in Visual
Basic. .................................................................................................................................... 120

BOOL mdwkdt_get_all( WORD pltNo, WORD faceNo, LPLONG workOffset, LPDWORD


almPtn, LPDWORD almNo, LPWORD startMonth, LPWORD startDay, LPWORD
startHour, LPWORD startMinute, LPWORD endMonth, LPWORD endDay, LPWORD
endHour, LPWORD endMinute, LPDWORD runTime, LPDWORD autoTime, LPSTR
cmt, LPDWORD alarm_o, LPDWORD programNo, LPDWORD alarmFlg, LPWORD
readyFlg, LPWORD blockSkip, LPWORD endFlg) ......................................................... 121
Acquires (gets) all work data items for the specified pallet face. This function is only valid
in Visual C++. ...................................................................................................................... 121

BOOL mdwkdt_get_all_vb( WORD pltNo, WORD faceNo, LPLONG workOffset,

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 151/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

LPDWORD almPtn, LPDWORD almNo, LPWORD startMonth, LPWORD startDay,


LPWORD startHour, LPWORD startMinute, LPWORD endMonth, LPWORD endDay,
LPWORD endHour, LPWORD endMinute, LPDWORD runTime, LPDWORD
autoTime, BSTR *cmt, LPDWORD alarm_o, LPDWORD programNo, LPDWORD
alarmFlg, LPWORD readyFlg, LPWORD blockSkip, LPWORD endFlg) ...................... 123
Acquires (gets) all work data items for the specified pallet face. This function is only valid
in Visual Basic. .................................................................................................................... 123

BOOL mdwkdt_set_item( WORD pltNo, WORD faceNo, WORD item, long data) .... 125
Sets specified work data item (other than comment) values for specified pallet face. ... 125

BOOL mdwkdt_set_offset( WORD pltNo, WORD faceNo, long x_axis, long y_axis,
long z_axis)............................................................................................................................... 126
Sets the workpiece offset value for the specified pallet face. ........................................... 126

BOOL mdwkdt_set_comment( WORD pltNo, WORD faceNo, LPSTR cmt) .................. 126
Sets a comment for the specified pallet face. ..................................................................... 126

BOOL mdwkdt_set_all( WORD pltNo, WORD faceNo, LPLONG workOffset, DWORD


almPtn, DWORD almNo, WORD startMonth, WORD startDay, WORD startHour,
WORD startMinute, WORD endMonth, WORD endDay, WORD endHour, WORD
endMinute, DWORD runTime, DWORD autoTime, LPSTR cmt, DWORD alarm_o,
DWORD programNo, DWORD alarmFlg, WORD readyFlg, WORD blockSkip, WORD
endFlg) ..................................................................................................................................... 127
Sets all work data items for the specified pallet face. This function is only valid in Visual
C++........................................................................................................................................ 127

BOOL mdwkdt_split_bkskip( WORD blockSkip, LPBOOL bkskip2, LPBOOL bkskip3,


LPBOOL bkskip4, LPBOOL bkskip5, LPBOOL bkskip6, LPBOOL bkskip7, LPBOOL
bkskip8, LPBOOL bkskip9) ................................................................................................. 129
Separates the block skip data expressed in bits into the respective block skip numbers.
............................................................................................................................................... 129

BOOL mdwkdt_make_bkskip( BOOL bkskip2, BOOL bkskip3, BOOL bkskip4, BOOL


bkskip5, BOOL bkskip6, BOOL bkskip7, BOOL bkskip8, BOOL bkskip9, short
*blockSkip) ............................................................................................................................... 130
Converts the respective block skip number data into block skip data expressed in bits.
............................................................................................................................................... 130

BOOL mdwkdt_split_alarm( DWORD alarmFlg, LPBOOL tool_chk, LPBOOL bts,


LPBOOL bts2, LPBOOL ac, LPBOOL sl, LPBOOL tl, LPBOOL spare_tool, LPBOOL
wk_measure) ............................................................................................................................ 131
Separates alarm status data into respective alarm items. ............................................... 131

BOOL mdwkdt_make_alarm( BOOL tool_chk, BOOL bts, BOOL bts2, BOOL ac,
BOOL sl, BOOL tl, BOOL spare_tool, BOOL wk_measure, LPDWORD alarmFld) .. 132
Converts respective alarm items into alarm status data expressed in bits. ................... 132

BOOL mdwkdt_get_table_pltno( LPWORD pltNo) .............................................................. 132


Acquires (gets) table pallet number. .................................................................................. 132

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 152/153


Makino Milling Machine Libraries (MML) DLL Reference Manual

BOOL mdwkdt_get_front_pltno( LPWORD pltNo) .............................................................. 133


Acquires (gets) pallet number on front stocker. ................................................................ 133

BOOL mdwkdt_get_back_pltno( LPWORD pltNo) ............................................................... 133


Acquires (gets) pallet number on back stocker. ................................................................. 133

BOOL mdwkdt_max_pallet( LPWORD numPlt) .................................................................. 133


Acquires (gets) number of pallets set on Professional 3. .................................................. 133

BOOL mdwkdt_max_face( LPWORD numFace) .................................................................. 134


Acquires (gets) number of faces set to 1 pallet on Professional 3. ................................... 134

BOOL mdwkdt_set_table_pltno( WORD pltNo) ................................................................... 134


Sets table pallet number. .................................................................................................... 134

BOOL mdwkdt_set_front_pltno( WORD pltNo).................................................................... 134


Sets pallet number on front stocker. .................................................................................. 134

BOOL mdwkdt_set_back_pltno( WORD pltNo) .................................................................... 135


Sets pallet number on back stocker. ................................................................................... 135

¥¥Mttrs0020¥mos¥PC¥Doc¥MML¥MML_Reference_Pro3_Eng.doc Page 153/153

You might also like