MML Reference Pro5 Eng
MML Reference Pro5 Eng
Index
1 Introduction ............................................................................................................................. 4
2 Requirement ............................................................................................................................ 4
1 Introduction
Professional 5 is the software to control MAKINO Machining Center, and is running in Windows CE
embedded as display unit.
This document describes how to access Machining Center with Professional 5 from external Windows
PC.
2 Requirement
Either Microsoft Message Queue (MSMQ) or Windows Socket (WinSock) is used to send/receive data
between MOS PC and Professional 5.
WinSock connection requires the following softwares.
3 Library Files
PcDef.h
Header file in that MML constants and structures are defined.
MdFum.dll
Library containing general-purpose functions for which communication is not performed with
CNC.
MdFum.lib
Mdfum.dll import library.
MdFum.vch
Prototype declaration header file for Mdfum.dll C/C++ functions.
MdNcinf.dll
Library to access CNC data.
MdNcinf.lib
MdNcinf.dll import library.
MdNcinf.vch
Prototype declaration header file for MdNcinf.dll C/C++ functions.
Pro5MosDef.h
Header file in that data values to retrieve/set are defined as MACRO (#define).
Pro5MosMsg.h
Header file in that data structures to be sent/received between MOS and Professional 5 are
defined.
MdPro5.dll
DLL file itself to access Professional 5.
MdPro5.lib
Import library file.
MdPro5.vch
Prototype declaration file of export functions for Visual C++.
NOTE:
Every function of MML uses __stdcall naming conversion. Therefore, It is necessary
for C++ programming to use extern “C” explicitly, as follows:
extern “C”
{
#include <MdPro5.vch>
}
4 MOS Parameters
Refer to the following document for Setting procedure and Node Number:
“Makino Milling Machine Libraries (MML) Dynamic Link Library (DLL) Reference Manual”
Chap.2 Node Numbers
Chap.3 MOS Parameters
5 Professional 5 Parameters
The most of MML functions return BOOL. If the function returns FALSE (i.e. fails), call the following
functions to get error information:
LONG mdpro5_GetLastSubError();
Abstract
Retrieves the error number indicating immediate cause by which last DLL function failed.
Arguments
None.
Return Values
Value #define in Pro5MosMsg.h Contents
0 PMS_SUCCESS Succeeded without error.
1 to 99: Errors detected by Professional 5.
1 PMS_PRO5_MSG_LABEL MSMQ message label (function name) is invalid. *
2 PMS_PRO5_NO_QUEUE (Reserved)
3 PMS_PRO5_VERSION MSMQ message label (function version) is invalid. *
4 PMS_PRO5_BODY_SIZE MSMQ data size is invalid. *
5 PMS_PRO5_BUSY Cannot execute because NC is processing.
6 PMS_PRO5_DATA Specified value is invalid
7 PMS_PRO5_MODE Cannot execute because MC-side operation mode (NC
operation, system, etc) is not appropriate.
8 PMS_PRO5_DUPLICATION Previous machining procedure commanded by MOS is
not finished yet. (i.e. duplicate commanded).
9 PMS_PRO5_TIMEOUT (Reserved)
10 PMS_PRO5_STATUS Cannot execute because Machine status (except mode)
is not appropriate.
11 PMS_PRO5_NO_OPTION Cannot execute because of the lack of NC options or
of MC options.
100 to 199: Errors detected by MOS.
100 PMS_MOS_NODE_NO mdpro5_set_node() is not called/succeeded yet.
101 PMS_MOS_MSG_LABEL MSMQ message label (function name) is invalid. *
102 PMS_MOS_NO_QUEUE (Reserved)
103 PMS_MOS_VERSION MSMQ message label (function version) is invalid. *
104 PMS_MOS_BODY_SIZE MSMQ data size is invalid. *
105 PMS_MOS_BUSY Previous message sending/receiving in the same thread
is not finished yet. This error rarely occurs. Contact to
MAKINO Service Senter.
106 PMS_MOS_DATA Invalid argument/parameters.
107 PMS_MOS_SND Failed in sending message to Professional 5.
LONG mdpro5_GetLastMainError();
Abstract
Retrieves the unique error number to detect the point where the last error occurred.
Arguments
None.
Return Values
Depends on the last-executed function.
Refer to the following specifications of each function.
BOOL mdpro5_set_node(
LONG lNodeNo,
LONG lDevSymbol);
Abstract
Your application must call this function at first after Professional 5 started, to retrieve static data
of connected MC, to retrieve MOS parameters, and to create MSMQ on MOS PC.
Arguments
lNodeNo [Set] Specify node number registered in MOS parameter.
LDevSymbol [Set] If more than one node numbers are equal to lNodeNo in device
sections of MOS parameters, specify one of the following device
types.
VHC (=1): Vehicle.
MCW (=3): Machining Center.
WSS (=5): Work Setting Station.
If lNodeNo is unique in MOS parameters, you can specify 0.
Return Values
TRUE Succeeded
FALSE Failed
Remarks
It is necessary to set the following MOS parameters to appropriate values:
“PC_NAME”
“CONTROLLER_TYPE”
“NODE_NO”
“PRO5_PC_NAME”
“PRO5_MSMQ_SEND_TIMEOUT”
BOOL mdpro5_software_info(
LPSTR szPlatform,
LPSTR szSeries,
LPSTR szVersion,
LPSTR szServicePack,
LPSTR szMcName);
Abstract
Retrieves the series and version of Professional 5.
Arguments
szPlatform [Get] Pointer to a string with maximum 5 characters (including the
terminating null character), indicating the series of NC and
Windows CE.
SzSeries [Get] Pointer to a string with maximum 9 characters (including the
terminating null character), indicating the series of MC.
SzVersion [Get] Pointer to a string with maximum 9 characters (including the
terminating null character), indicating the version.
SzServicePack [Get] Pointer to a string with maximum 37 characters (including the
terminating null character), indicating the special release (such as
“SP1”).
SzMcName [Get] Pointer to a string with maximum 37 characters (including the
terminating null character), indicating the MC model (such as
“V33”, “V56”).
Return Values
TRUE Succeeded
FALSE Failed
Remarks
Set to NULL for the arguments of unnecessary information.
Generally, a set of szPlatform and szSeries is the series of Professional 5.
Genarally, a set of szVersion and szServicePack is the version of Professional 5.
BOOL mdpro5_get_mcpara(
LPDWORD lpdwParaNo,
LPLONG lplValue,
DWORD dwSumArray);
Abstract
Retrieves the settings of specified MC parameter(s).
Arguments
lpdwParaNo [Set] Pointer to the array, filled with the numbers of MC parameters to
retrieve.
LplValue [Get] Pointer to the array, filled with the settings of MC parameters.
DwSumArray [Set] Specify the number of elements of lpdwParaNo and lplValue.
Return Values
TRUE Succeeded
FALSE Failed
Remarks
If specified MC parameter doesn’t exist, this function returns TRUE, and lplValue is filled
with 0.
BOOL mdpro5_max_atc_magazine(
LPDWORD lpdwSumActualMgzn,
LPBOOL lpfOutMcMgzn);
Abstract
Retrieves the count of ATC magazines.
Arguments
lpdwSumActualMgzn [Get] Filled with the count of ATC magazines。
LpfOutMcMgzn [Get] Filled with the flag indicating whether “Outside Tools” exist.
Return Values
TRUE Succeeded
FALSE Failed
Remarks
Set to NULL for the arguments of unnecessary information.
“Outside Tools” is the storage area of tools data outside of ATC magazine. If MC parameter
No.12012 “No. of the Outside Tools” is set, lpfOutMcMgzn filled with TRUE.
BOOL mdpro5_atc_magazine_info(
DWORD dwMgznNo,
LPDWORD lpdwMaxPotNo,
LPLONG lplMgznType,
LPDWORD lpdwEmptyPotNo);
Abstract
Retrieves the information of ATC magazine (count of tools, type, etc).
Arguments
dwMgznNo [Set] Specify the ATC magazine number.
Specify PMC_MAGAZINE_OUTMC (=0) defined in
<Pro5MosDef.h> to retrieve outer tools.
LpdwMaxPotNo [Get] Filled with the count of tools.
LplMgznType [Get] Filled with the type of ATC magazine.
PMC_ATC_MGZN_TYPE_CHAIN (=1)
Chain type
PMC_ATC_MGZN_TYPE_MATRIX (=2)
Matrix type
PMC_ATC_MGZN_TYPE_DISC (=3)
Disc type.
If dwMgznNo is PMC_MAGAZINE_OUTMC, filled with 0.
LpdwEmptyPotNo [Get] In the case of V-series, filled with 0.
Return Values
TRUE Succeeded
FALSE Failed
Remarks
Set to NULL for the arguments of unnecessary information.
BOOL mdpro5_tool_info(
LPBOOL lpfInchUnit,
LPDWORD lpdwFtnFig,
LPDWORD lpdwItnFig,
LPDWORD lpdwPtnFig,
LPDWORD lpdwFtnPtnManageType);
Abstract
Retrieves the tool information (unit, effective digits, etc).
Arguments
lpfInchUnit [Get] Filled with the flag indicating whether length/diameter of
tools are measured in inches:
TRUE: inch
FALSE: mm
lpdwFtnFig [Get] Filled with effective digits of FTN (Functional Tool
lpdwItnFig Numer), ITN (Individual Tool Number), PTN (Program
lpdwPtnFig Tool Number).
LpdwFtnPtnManageType [Get] Filled with the method how to decide next tool.
=0: FTN is tool type number.
=1: PTN is tool type number.
=2: tool type numbers are not used. (Spare tool change
function is disabled).
Return Values
TRUE Succeeded
FALSE Failed
Remarks
Set to NULL for the arguments of unnecessary information.
BOOL mdpro5_apc_info(
LPLONG lplApcArmType,
LPDWORD lpdwMgznPalletCount,
LPDWORD lpdwOutPalletCount,
LPDWORD lpdwFacePerPallet);
Abstract
Retrieve the information of Pallet Changer.
Arguments
lplApcArmType [Get] Filled with the type of Pallet Changer Arm.
PMC_APC_TYPE_NO_APC (=0)
Without Pallet Changer.
PMC_APC_TYPE_TURN (=1)
Turn type.
PMC_APC_TYPE_SHUTTLE (=2)
Shuttle type.
LpdwMgznPalletCount [Get] Filled with the count of pallets in the magazine.
LpdwOutPalletCount [Get] Filled with the count of pallets out of magazine.
LpdwFacePerPallet [Get] Filled with the count of faces per Pallet.
Return Values
TRUE Succeeded
FALSE Failed
Remarks
Set to NULL for the arguments of unnecessary information.
BOOL mdpro5_chk_system_mode(
LPBOOL lpfSysMode);
Abstract
Retrieves the system mode.
Arguments
lpfSysMode [Get] Filled with system mode (ON/OFF).
TRUE: ON
FALSE: OFF
Return Values
TRUE Succeeded
FALSE Failed
BOOL mdpro5_chk_maintenance_mode(
LPBOOL lpfMaintMode);
Abstract
Retrieves the maintenance mode.
Arguments
lpfMaintMode [Get] Filled with maintenance mode (ON/OFF).
TRUE: ON
FALSE: OFF
Return Values
TRUE Succeeded
FALSE Failed
BOOL mdpro5_chk_auto_unloading_mode(
LPBOOL lpfUnloadMode);
Abstract
Retrieves the auto-unloading mode.
Arguments
lpfUnloadMode [Get] Filled with auto-unloading mode (ON/OFF)
TRUE: ON
FALSE: OFF
Return Values
TRUE Succeeded
FALSE Failed
BOOL mdpro5_chk_operator_call(
LPLONG lplOpeCall);
Abstract
Retrieves the operator-call status.
Arguments
lplOpeCall [Get] Filled with operator-call status.
TRUE: On operator-call.
FALSE: NOT operator-call
Return Values
TRUE Succeeded
FALSE Failed
BOOL mdpro5_spindle_status(
DWORD dwSpindleNo,
LPLONG lplGear,
LPLONG lplDirection);
Abstract
Retrieve the gear-position and status of spindle.
Arguments
dwSpindleNo [Set] Specify spindle number. Normaly, set to “1”.
LplGear [Get] Filled with spindle gear-position.
PMC_SPDL_GEAR_NON (=0)
Undecided.
PMC_SPDL_GEAR_LOW (=1)
Low speed gear.
PMC_SPDL_GEAR_HIGH (=2)
High-speed gear.
PMC_SPDL_GEAR_MID (=3)
Middle-speed gear.
LplDirection [Get] Filled with spindle status.
PMC_SPDL_STOP (=0)
Stopped.
PMC_SPDL_CW (=1)
Rotated with CW.
PMC_SPDL_CCW (=2)
Rotated with CCW.
PMC_SPDL_ORIENTATION_STOP (=3)
Stopped at orientation position.
PMC_SPDL_CS_CONTROL (=4)
Under Cs-axis control.
PMC_SPDL_RIGID_TAP (=5)
Under rigid tapping.
Return Values
TRUE Succeeded
FALSE Failed
Remarks
Set to NULL for the arguments of unnecessary information.
BOOL mdpro5_spindle_speed(
DWORD dwSpindleNo,
LPDWORD lpdwSCode,
LPDWORD lpdwInstruct,
LPDWORD lpdwActual);
Abstract
Retrieves the spindle speed.
Arguments
dwSpindleNo [Set] Specify spindle number. Normaly, set to “1”.
LpdwSCode [Get] Filled with S-code value.
LpdwInstruct [Get] Filled with commanded value including override.
LpdwActual [Get] Filled with actual speed,
Return Values
TRUE Succeeded
FALSE Failed
Remarks
Set to NULL for the arguments of unnecessary information.
BOOL mdpro5_atc_status(
LPBOOL lpfArmStandby,
LPLONG lplMgznStatus);
Abstract
Retrieve the status of ATC magazine.
Arguments
lpfArmStandby [Get] Filled with the status of ATC arm.
TRUE: Standby.
FALSE: Moving.
LplMgznStatus [Get] Filled with the manual intervention mode of ATC magazine.
PMC_MAS_MODE_OFF (=0)
Manual intervention OFF.
PMC_MAS_MODE_TURNING_ON (=1)
Waiting for manual intervention to turn ON (ATC magazine pot
indexing).
PMC_MAS_MODE_ON (=2)
Manual intervention ON.
PMC_MAS_MODE_ TURNING_OFF (=3)
Waiting for manual intervention to turn OFF (ATC magazine
pot going back to the original position).
Return Values
TRUE Succeeded
FALSE Failed
Remarks
Set to NULL for the arguments of unnecessary information.
BOOL mdpro5_apc_status(
LPBOOL lpfArmStandby,
LPLONG lplStckStatus);
Abstract
Retrieves the status of pallet changer.
Arguments
lpfArmStandby [Get] Filled with the status of pallet changer arm.
TRUE: Standby.
FALSE: Moving.
LplStckStatus [Get] Filled with the manual intervention mode of pallet buffer.
PMC_MAS_MODE_OFF (=0)
Manual intervention OFF.
PMC_MAS_MODE_TURNING_ON (=1)
Waiting for manual intervention to turn ON (pallet changer
moving).
PMC_MAS_MODE_ON (=2)
Manual intervention ON.
Return Values
TRUE Succeeded
FALSE Failed
Remarks
Set to NULL for the arguments of unnecessary information.
BOOL mdpro5_mc_alarm(
LPDWORD lpdwAlarmNo,
LPBYTE lpbAlarmType,
LPBYTE lpbSeriousLevel,
LPBYTE lpbPoutDisable,
LPBYTE lpbCycleStartDisable,
LPBYTE lpbRetryEnable,
LPBOOL lpfFailedNcReset,
LPSYSTEMTIME lptOccuredTime,
LPDWORD lpdwSumArray,
LPSTR szNcMessage);
Abstract
Retrieves the data of current MC alarms.
Arguments
lpdwAlarmNo [Get] Pointer to the array, filled with MC alarms numbers.
LpbAlarmType [Get] Pointer to the array, filled with MC alarms types.
PMC_ALM_ALARM (=1)
Alarm
PMC_ALM_WARNING (=2)
Warning
lpbSeriousLevel [Get] Pointer to the array, filled with serious levels.
PMC_ALM_LEVEL_NORMAL (=0)
Normal MC alarm.
PMC_ALM_LEVEL_DAMAGE (=1)
Serious MC alarm that can damage MC.
LpbPoutDisable [Get] Pointer to the array, filled with flags of auto power off.
PMC_ALM_POUT_ENABLE (=0)
requires auto power off.
PMC_ALM_POUT_DISABLE (=1)
need not power off. Ex. Mistake operation.
LpbCycleStartDisable [Get] Pointer to the array, filled with flags indicating whether
it is possible to execute cycle-start.
PMC_ALM_CYCLE_ENABLE (=0)
Possible to execute cycle-start.
PMC_ALM_CYCLE_DISABLE (=1)
Impossible to execute cycle-start.
LpbRetryEnable [Get] Pointer to the array, filled with flags indicating whether
it is possible to retry.
PMC_ALM_RETRY_DISABLE (=0)
Impossible to retry.
PMC_ALM_RETRY_ENABLE (=1)
Possible to retry.
LpfFailedNcReset [Get] Pointer to the array, filled with flags indicating whether
reset operation for MC alarm make NC reset execute.
BOOL mdpro5_chk_mc_alarm(
LPDWORD lpdwTotalAlarm,
LPDWORD lpdwTotalWarn);
Abstract
Retrieve the numbers of current MC alarms and warnings.
Arguments
lpdwTotalAlarm [Get] Filled with the number of current MC alarms.
LpdwTotalWarn [Get] Filled with the number of current MC warnings
Return Values
TRUE Succeeded
FALSE Failed
Remarks
Set to NULL for the arguments of unnecessary information.
BOOL mdpro5_max_alarm_history(
LPDWORD lpdwMaxHistory);
Abstract
Retrieve the maxinum number of MC alarms history.
Arguments
lpdwMaxHistory [Get] Filled with the maximum number of MC alarms history.
Return Values
TRUE Succeeded
FALSE Failed
BOOL mdpro5_mc_alarm_history(
LPDWORD lpdwAlarmNo,
LPBYTE lpbAlarmType,
LPBYTE lpbSeriousLevel,
LPBYTE lpbResetType,
LPSYSTEMTIME lptOccuredTime,
LPSYSTEMTIME lptResetTime,
LPDWORD lpdwSumArray,
LPSTR szNcMessage);
Abstract
Retrieve the history of MC alarms data.
Arguments
lpdwAlarmNo [Get] Pointer to the array, filled with MC alarms numbers.
LpbAlarmType [Get] Pointer to the array, filled with MC alarms types.
PMC_ALM_ALARM (=1)
Alarm
PMC_ALM_WARNING (=2)
Warning
PMC_ALM_NOTICE (=3)
Notification
lpbSeriousLevel [Get] Pointer to the array, filled with serious levels.
PMC_ALM_LEVEL_NORMAL (=0)
Normal MC alarm.
PMC_ALM_LEVEL_DAMAGE (=1)
Serious MC alarm that can damage MC.
LpbResetType [Get] Pointer to the array, filled with causes why MC alarms was
released.
PMC_ALM_RESET_NONE (=0)
Alarm occurs (NOT released yet).
PMC_ALM_RESET_SWITCH (=1)
with the alarm reset switch.
PMC_ALM_RESET_RETRY (=2)
with the retry operation.
PMC_ALM_RESET_EMERGENCY (=3)
with the emergency stop
PMC_ALM_RESET_NC_RESET (=4)
with the NC reset.
PMC_ALM_RESET_AUTOMATIC (=5)
automatically released.
PMC_ALM_RESET_POWER_OUT (=6)
with the power OFF.
PMC_ALM_RESET_MAINT_MODE (=7)
with the maintenance mode.
LptOccuredTime [Get] Pointer to the array, filled with structure SYSTEMTIME of date
BOOL mdpro5_change_nc_mode(
DWORD dwNcMode,
BOOL fModeLockEffective);
Abstract
Change NC operation mode.
Arguments
dwNcMode [Set] Specify new NC operation mode.
PMC_NC_MDI_MODE (=1)
MDI
PMC_NC_REF_MODE (=2)
Reference
PMC_NC_EDIT_MODE (=3)
Edit
PMC_NC_MEM_MODE (=4)
Memory
PMC_NC_TAPE_MODE (=6)
Tape(Remote)
PMC_NC_HANDLE_MODE (=7)
Handle
PMC_NC_JOG_MODE (=8)
Jog Feed
PMC_NC_RAPID_MODE (=9)
Rapid Traverse
PMC_NC_DNC_MODE (=17)
DNC operation
fModeLockEffective [Set] Specify whether mode-lock status of MC is effective.
TRUE: NOT change NC mode under mode-lock.
FALSE: Change NC mode regardless of mode-lock.
This argument is ignored in the case of MC without
mode-lock function.
Return Values
TRUE Succeeded
FALSE Failed
BOOL mdpro5_optional_block_skip_is_enable(
LPBOOL lpfEnable);
Abstract
Retrieves whether optional block skip option is enabled.
Arguments
lpfEnable [Get] Optional block skip is:
TRUE: Enabled.
FALSE: Disabled.
Return Values
TRUE Succeeded
FALSE Failed
BOOL mdpro5_set_optional_block_skip(
BYTE bBDT2,
BYTE bBDT3,
BYTE bBDT4,
BYTE bBDT5,
BYTE bBDT6,
BYTE bBDT7,
BYTE bBDT8,
BYTE bBDT9);
Abstract
Changes the status of optional block skip.
Arguments
bBDT2 [Set] Specify ON/OFF of block skip /2 to /9.
… PMC_BDT_OFF (=0)
bBDT9 ON
PMC_BDT_ON (=1)
OFF
PMC_BDT_XX (=0xFF)
Not change.
Return Values
TRUE Succeeded
FALSE Failed
BOOL mdpro5_chk_backedit(
LPBOOL lpfMode,
LPDWORD lpdwONumber);
Abstract
Retrieve the background-edit status of Professional 5.
Arguments
lpfMode [Get] Filled with the background-edit mode (ON/OFF).
=0: OFF
=1: ON
lpdwONumber [Get] Filled with O-number of background-editing NC program in NC
memory.
Return Values
TRUE Succeeded
FALSE Failed
Remarks
Background-edit function of Professional 5 is differs from the background-edit of NC.
In the following case, the background-edit mode is ON and O-number is 0:
Operator turns the background-edit mode ON, and does’nt search back-editing
O-number.
NC program file stored in other than NC memory (i.e. internal card, external card, host
computer) is open.
BOOL mdpro5_system_cycle_start(
BOOL fOpeCall);
Abstract
Request the execution of cycle-start to Professinoal 5.
Arguments
fOpeCall [Set] Specify whether it is necessary to push cycle-start button on MC.
TRUE: Machining does’nt start until the cycle-start button is pushed.
FALSE: Machining starts immediately.
Return Values
TRUE Succeeded
FALSE Failed
BOOL mdpro5_chk_system_mach_finish(
LPBOOL lpfFinish,
LPDWORD lpdwFinCondition);
Abstract
Retrieves whether the cycle-start with mdpro5_system_cycle_start() is already finished.
Arguments
lpfFinish [Get] Filled with the machining status.
TRUE: Machining is already finished.
FALSE: Still machining.
LpdwFinCondition [Get] Filled with one or more of the following values indicating
maching finish status.
0: Normal Finish
0x00000001: Auto work measurement alarm (i.e. alarm with
M940).
0x00010000: BTS alarm.
0x00020000: BTS2 alarm.
0x00040000: AC alarm.
0x00080000: SL over-load/no-load alarm.
0x00100000: Normal Finish (TL occurred).
0x00400000: Normal Finish (STS occurred)
0x01000000: Abnormally finished (“System Machining
Abort”, NC reset while DNC)
0x04000000:Abnormally pallet seated.
Return Values
TRUE Succeeded
FALSE Failed
Remarks
Set to NULL for the arguments of unnecessary information.
The machining is not abnormal when TL alarm or STS alarm occur,
BOOL mdpro5_system_cycle_abort(
BOOL fAbnormalFinish);
Abstract
Execute the same procedure as when flexible switch “System Machining Abort” or “System
Machining Finish” on the Professional 5 is pushed.
Arguments
fAbnormalFinish [Set] TRUE: execute “System Machining Abort”.
FALSE: execute “System Machining Finish”.
Return Values
TRUE Succeeded
FALSE Failed
Remarks
If this function returns FALSE, call mdpro5_GetLastSubError() to detect the cause.
Value #define in <Pro5MosMsg.h> Contents
5 PMS_PRO5_BUSY STL(F0000#5) is ON, or
on operator call with mdpro5_system_cycle_start().
7 PMS_PRO5_MODE System mode is OFF, or
NC operation mode is not Memory/Remote.
10 PMS_PRO5_STATUS mdpro5_system_cycle_start() is not called yet, or
already finished.
BOOL mdpro5_can_auto_poweroff(
LPBOOL lpfYes);
Abstract
Retrieves whether it is possible to execute auto power-off when MC alarms occur.
Arguments
lpfYes [Get] Filled with the flag indicating whether it is possible to execute auto
power-off.
TRUE: Possible
FALSE: Current alarms prevent from executing auto power-off.
Return Values
TRUE Succeeded
FALSE Failed
BOOL mdpro5_auto_poweroff();
Abstract
Request MC to power off.
Arguments
None
Return Values
TRUE Succeeded
FALSE Failed
Remarks
Auto power-off is not executed until the following conditions are all met.
(1) System mode is ON.
(2) If MC parameter No.12035 is “1”, power-off switch on MC is ON.
(3) mdpro5_can_auto_poweroff() indicates it is possible to execute auto power-off.
(4) No battery alarms in NC.
BOOL mdpro5_get_milling_time(
LPDWORD lpdwTime);
Abstract
Retrieves the total time of spindle rotation commanded by MOS.
Arguments
lpdwTime [Get] Filled with the total time of spindle rotation, in milliseconds.
Return Values
TRUE Succeeded
FALSE Failed
Remarks
Spindle rotation time is counted-up while the following conditions are all met.
(1) On machining commanded from MOS.
(2) Auto-machining (STL<F000#5>=ON).
(3) Not stopped of M00/M01.
(4) Spindle is neither stopped nor stopped with orientation.
BOOL mdpro5_toollife_info(
LPBOOL lpfCountTypeRemain,
LPBOOL lpfAlarmResetMaxLife);
Abstract
Retrieves the information of tool life.
Arguments
lpfCountTypeRemain [Get] Filled with the flag indicating whether tool life count type is
“remaining”.
Refer to MC parameter No. 1019.
TRUE: Remaining. (No.1019 = 1)
FALSE: Accumulation. (No.1019 = 0)
lpfAlarmResetMaxLife [Get] Filled with the flag indicating whether remaining life is
changed to full when TL alarm is reset.
Refer to MC parameter No. 1030.
TRUE: Change to full. (No.1030 = 1)
FALSE: NOT change. (No.1030 = 0)
Return Values
TRUE Succeeded
FALSE Failed
Remarks
Set to NULL for the arguments of unnecessary information.
BOOL mdpro5_tool_data_item_is_enable(
LPDWORD lpdwItem,
LPDWORD lpdwEnable,
DWORD dwSumArray);
Abstract
Retrieves whether specified tool data items are valid.
Arguments
lpdwItem [Get] Pointer to the array, filled with the numbers indicating tool data
items.
LpdwEnable [Get] Filled with the flags indicating whether specified items are valid.
DwSumArray [Set] Specify the number of elements of lpdwItem and lpfEnable.
Tool Data Items
Value Contents
1 Magazine Number
2 Pot Number
3 Kind of Pot (=0: BT, =1: HSK, =2: Adapter)
4 PTN (Program Tool Number)
5 FTN (Functional Tool Number)
6 ITN (Individual Tool Number)
7 Priority for STS
8 Comment
9 Through Spindle Coolant Enabled (=0: Disabled, =1: Enabled)
10 Through Spindle Coolant Suction/Purge Time, in milliseconds.
11 ATC Arm Turn Speed (=0; Normal, =1: Slow, =2: Middle)
12 M60 Prohibition Flag (=0: Possible, =1: Prohibit)
13 Use Prohibition Tool (=0: Possible, =1: Prohibit)
14 STS is done / not done at TL alarm is generated for the MMC (system).
(=0: Disabled, =1: Enabled)
15 Count of Cutters
16 Pot Size (=0: Standard, =1: Middle, =2: Large, =3: Extra-large, =4: Small, =5:
Extra-Large2)
17 Prohibit Rotation
18 Empty Pot
19 Irregular Shape
20 Specified T Code
21 TLS Continuous Search
22 B Axis Rotation Prohibit (=0: Possible, =1: Prohibit)
23 One Touch Prohibit (=0: Possible, =1: Prohibit)
25 Tool Size (=0: Standard, =1: Middle, =2: Large, =3: Extra-large, =4: Small, =5:
Extra-Large2)
26 TSC Removal (=0:Default, =1:Air Discharge, =2:Draw Back)
28 Tool Length(Check)
29 Tool Radius(Check)
31 O Number 1
32 O Number 2
33 O Number 3
34 TSC Frequency
35 TSC Flow Check
38 TSC Frequency Setting (=0: Incomplete, =1: Complete, =2: Max)
39 Controlled Point (X)
40 Controlled Point (Y)
41 Controlled Point (Z)
42 Tool Vector (X)
43 Tool Vector (Y)
44 Tool Vector (Z)
45 Ret. Prohibit at PWR Failure (=0: Possible, =1: Prohibit)
46 STS (=0:New, =1:Wait, =2:OK, =3:NOK, =4:Test, =5:Measure)
47 Tool MGZ Vibration Control
49 Multi Purpose Flag
52 Fixed Pot (=0(Random Pot), =1:Fixed Pot, =2:Dummy Pot)
53 Group No
56 Shank Count
57 Seat Check (=0:Possible, =1:Prohibit)
58 Vibration Warning (Rapid)
59 Vibration Alarm (Rapid)
60 Vibration Warning (Cutting)
61 Vibration Alarm (Cutting)
102 Kind of Cutter
103 Tool Length (Geometry) [0.0001mm] or [0.00001inch]
104 Tool Length (Wear) [0.0001mm] or [0.00001inch]
105 Tool Diameter (Geometry) [0.0001mm] or [0.00001inch]
106 Tool Diameter (Wear) [0.0001mm] or [0.00001inch]
107 Tool Life (Time) Management =0: Disabled, =1: Enabled
108 Tool Life (Time) Alarm [0.1s]
109 Tool Life (Time) Warning [0.1s]
110 Tool Life (Time) Measured [0.1s]
111 Tool Life (Distance) Management =0: Disabled, =1: Enabled
112 Tool Life (Distance) Alarm [mm] or [0.1inch]
113 Tool Life (Distance) Warning [mm] or [0.1inch]
114 Tool Life (Distance) Measured [mm] or [0.1inch]
115 Tool Life (Count) Management =0: Disabled, =1: Enabled
116 Tool Life (Count) Alarm [mm] or [0.1inch]
117 Tool Life (Count) Warning [mm] or [0.1inch]
118 Tool Life (Count) Measured [mm] or [0.1inch]
119 SL upper limit [0.01%]
120 SL lower limit [0.01%]
BOOL mdpro5_get_tool_data_item(
DWORD dwItem,
LPDWORD lpdwMgznNo,
LPLONG lplPotNo,
LPLONG lplValue,
DWORD dwSumArray);
Abstract
Retrieves the values of specified tool data item.
Arguments
dwItem [Set] Specify the following tool data item to retrieve.
LpdwMgznNo [Set] Pointer to the array, filled with magazine numbers of tools.
LplPotNo [Set] Pointer to the array, filled with pot numbers of tools.
LplValue [Get] Filled with retrieved values.
DwSumArray [Set] Specify the number of elements of lpdwMgznNo, lplPotNo,
lplValue.
Tool Data Items
Value Contents
3 Kind of Pot (=0: BT, =1: HSK, =2: Adapter)
4 PTN
5 FTN
6 ITN
7 Priority for STS
9 Through Spindle Coolant Enabled (=0: Disabled, =1: Enabled)
10 Through Spindle Coolant Suction/Purge Time, in milliseconds.
11 ATC Arm Turn Speed (=0; Normal, =1: Slow, =2: Middle)
12 M60 Prohibition Flag (=0: Possible, =1: Prohibit)
13 Use Prohibition Tool (=0: Possible, =1: Prohibit)
14 STS is done / not done at TL alarm is generated for the MMC (system).
(=0: Disabled, =1: Enabled)
15 Count of Cutters
16 Pot Size (=0: Standard, =1: Middle, =2: Large, =3: Extra-large, =4: Small, =5:
Extra-Large2)
17 Prohibit Rotation
18 Empty Pot
19 Irregular Shape
20 Specified T Code
21 TLS Continuous Search
22 B Axis Rotation Prohibit (=0: Possible, =1: Prohibit)
23 One Touch Prohibit (=0: Possible, =1: Prohibit)
25 Tool Size (=0: Standard, =1: Middle, =2: Large, =3: Extra-large, =4: Small, =5:
Extra-Large2)
26 TSC Removal (=0:Default, =1:Air Discharge, =2:Draw Back)
28 Tool Length(Check)
29 Tool Radius(Check)
31 O Number 1
32 O Number 2
33 O Number 3
34 TSC Frequency
35 TSC Flow Check
38 TSC Frequency Setting (=0: Incomplete, =1: Complete, =2: Max)
39 Controlled Point (X)
40 Controlled Point (Y)
41 Controlled Point (Z)
42 Tool Vector (X)
43 Tool Vector (Y)
44 Tool Vector (Z)
45 Ret. Prohibit at PWR Failure (=0: Possible, =1: Prohibit)
46 STS (=0:New, =1:Wait, =2:OK, =3:NOK, =4:Test, =5:Measure)
47 Tool MGZ Vibration Control
49 Multi Purpose Flag
52 Fixed Pot (=0(Random Pot), =1:Fixed Pot, =2:Dummy Pot)
53 Group No
56 Shank Count
57 Seat Check (=0:Possible, =1:Prohibit)
58 Vibration Warning (Rapid)
59 Vibration Alarm (Rapid)
60 Vibration Warning (Cutting)
61 Vibration Alarm (Cutting)
Return Values
TRUE Succeeded
FALSE Failed
Remarks
Some data items are disable in some MC models or with some options. Refer to
mdpro5_tool_data_item_is_enable()
BOOL mdpro5_get_cutter_data_item(
DWORD dwItem,
LPDWORD lpdwMgznNo,
LPLONG lplPotNo,
LPDWORD lpdwCutterNo,
LPLONG lplValue,
DWORD dwSumArray);
Abstract
Retrieves the values of specified cutter data item.
Arguments
dwItem [Set] Specify the following cutter data item to retrieve.
LpdwMgznNo [Set] Pointer to the array, filled with magazine numbers of tools.
LplPotNo [Set] Pointer to the array, filled with pot numbers of tools.
LpdwCutterNo [Set] Pointer to the array, filled with cutter numbers.
LplValue [Get] Filled with retrieved values.
DwSumArray [Set] Specify the number of elements of lpdwMgznNo, lplPotNo,
lpdwCutterNo, lplValue.
Cutter Data Items
Value Contents
102 Kind of Cutter
103 Tool Length (Geometry) [0.0001mm] or [0.00001inch]
104 Tool Length (Wear) [0.0001mm] or [0.00001inch]
105 Tool Diameter (Geometry) [0.0001mm] or [0.00001inch]
106 Tool Diameter (Wear) [0.0001mm] or [0.00001inch]
107 Tool Life (Time) Management =0: Disabled, =1: Enabled
108 Tool Life (Time) Alarm [0.1s]
109 Tool Life (Time) Warning [0.1s]
110 Tool Life (Time) Measured [0.1s]
111 Tool Life (Distance) Management =0: Disabled, =1: Enabled
112 Tool Life (Distance) Alarm [mm] or [0.1inch]
113 Tool Life (Distance) Warning [mm] or [0.1inch]
114 Tool Life (Distance) Measured [mm] or [0.1inch]
115 Tool Life (Count) Management =0: Disabled, =1: Enabled
116 Tool Life (Count) Alarm [mm] or [0.1inch]
117 Tool Life (Count) Warning [mm] or [0.1inch]
118 Tool Life (Count) Measured [mm] or [0.1inch]
119 SL upper limit [0.01%]
120 SL lower limit [0.01%]
121 AC limit [0.01%]
122 Tool Alarm Flag
Bit0: Tool Broken (Detect Long), Bit1: Tool Broken, Bit2: AC Monitor,
Bit3: SL Monitor, Bit4: SL Monitor (No Load), Bit5: ToolLife, Bit6: Tool ID,
Bit8: NOK
BOOL mdpro5_set_tool_data_item(
DWORD dwItem,
LPDWORD lpdwMgznNo,
LPLONG lplPotNo,
LPLONG lplValue,
DWORD dwSumArray);
Abstract
Changes the values of specified tool data item.
Arguments
dwItem [Set] Specify the following tool data item to change.
lpdwMgznNo [Set] Pointer to the array, filled with magazine numbers of tools.
lplPotNo [Set] Pointer to the array, filled with pot numbers of tools.
lplValue [Set] Pointer to the array, filled with new values to change.
dwSumArray [Set] Specify the number of elements of lpdwMgznNo, lplPotNo, lplValue.
Tool Data Items
Value Contents
4 PTN
5 FTN
6 ITN
7 Priority for STS
9 Through Spindle Coolant Enabled (=0: Disabled, =1: Enabled)
10 Through Spindle Coolant Suction/Purge Time, in milliseconds.
11 ATC Arm Turn Speed (=0; Normal, =1: Slow, =2: Middle)
12 M60 Prohibition Flag (=0: Possible, =1: Prohibit)
13 Use Prohibition Tool (=0: Possible, =1: Prohibit)
14 STS is done / not done at TL alarm is generated for the MMC (system).
(=0: Disabled, =1: Enabled)
15 Count of Cutters
17 Prohibit Rotation
18 Empty Pot
19 Irregular Shape
20 Specified T Code
21 TLS Continuous Search
22 B Axis Rotation Prohibit (=0: Possible, =1: Prohibit)
23 One Touch Prohibit (=0: Possible, =1: Prohibit)
25 Tool Size (=0: Standard, =1: Middle, =2: Large, =3: Extra-large, =4: Small, =5:
Extra-Large2)
26 TSC Removal (=0:Default, =1:Air Discharge, =2:Draw Back)
28 Tool Length(Check)
29 Tool Radius(Check)
31 O Number 1
32 O Number 2
33 O Number 3
34 TSC Frequency
35 TSC Flow Check
38 TSC Frequency Setting (=0: Incomplete, =1: Complete, =2: Max)
39 Controlled Point (X)
40 Controlled Point (Y)
41 Controlled Point (Z)
42 Tool Vector (X)
43 Tool Vector (Y)
44 Tool Vector (Z)
46 STS (=0:New, =1:Wait, =2:OK, =3:NOK, =4:Test, =5:Measure)
45 Ret. Prohibit at PWR Failure (=0: Possible, =1: Prohibit)
47 Tool MGZ Vibration Control
49 Multi Purpose Flag
56 Shank Count
57 Seat Check (=0:Possible, =1:Prohibit)
58 Vibration Warning (Rapid)
59 Vibration Alarm (Rapid)
60 Vibration Warning (Cutting)
61 Vibration Alarm (Cutting)
Return Values
TRUE Succeeded
FALSE Failed
Remarks
Some data items are disable in some MC models or with some options. Refer to
mdpro5_tool_data_item_is_enable()
BOOL mdpro5_set_cutter_data_item(
DWORD dwItem,
LPDWORD lpdwMgznNo,
LPLONG lplPotNo,
LPDWORD lpdwCutterNo,
LPLONG lplValue,
DWORD dwSumArray);
Abstract
Changes the values of specified cutter data item.
Arguments
dwItem [Set] Specify the following cutter data item to change.
lpdwMgznNo [Set] Pointer to the array, filled with magazine numbers of tools.
lplPotNo [Set] Pointer to the array, filled with pot numbers of tools.
lpdwCutterNo [Set] Pointer to the array, filled with cutter numbers.
lplValue [Set] Filled with new values to change.
dwSumArray [Set] Specify the number of elements of lpdwMgznNo, lplPotNo,
lpdwCutterNo, lplValue.
Cutter Data Items
Value Contents
102 Kind of Cutter
103 Tool Length (Geometry) [0.0001mm] or [0.00001inch]
104 Tool Length (Wear) [0.0001mm] or [0.00001inch]
105 Tool Diameter (Geometry) [0.0001mm] or [0.00001inch]
106 Tool Diameter (Wear) [0.0001mm] or [0.00001inch]
107 Tool Life (Time) Management =0: Disabled, =1: Enabled
108 Tool Life (Time) Alarm [0.1s]
109 Tool Life (Time) Warning [0.1s]
110 Tool Life (Time) Measured [0.1s]
111 Tool Life (Distance) Management =0: Disabled, =1: Enabled
112 Tool Life (Distance) Alarm [mm] or [0.1inch]
113 Tool Life (Distance) Warning [mm] or [0.1inch]
114 Tool Life (Distance) Measured [mm] or [0.1inch]
115 Tool Life (Count) Management =0: Disabled, =1: Enabled
116 Tool Life (Count) Alarm [mm] or [0.1inch]
117 Tool Life (Count) Warning [mm] or [0.1inch]
118 Tool Life (Count) Measured [mm] or [0.1inch]
119 SL upper limit [0.01%]
120 SL lower limit [0.01%]
121 AC limit [0.01%]
122 Tool Alarm Flag
Bit0: Tool Broken (Detect Long), Bit1: Tool Broken, Bit2: AC Monitor,
Bit3: SL Monitor, Bit4: SL Monitor (No Load), Bit5: ToolLife, Bit6: Tool ID,
Bit8: NOK
BOOL mdpro5_spindle_tool(
LPDWORD lpdwMgznNo,
LPLONG lplPotNo,
LPDWORD lpdwCutterNo,
LPDWORD lpdwFtn,
LPDWORD lpdwItn,
LPDWORD lpdwPtn);
Abstract
Retrieve the information of spindle tool.
Arguments
lpdwMgznNo [Get] Filled with magazine number of spindle tool.
lplPotNo [Get] Filled with pot number of spindle tool.
lpdwCutterNo [Get] Filled with cutter number of spindle tool.
lpdwFtn [Get] Filled with FTN of spindle tool.
lpdwItn [Get] Filled with ITN of spindle tool.
lpdwPtn [Get] Filled with PTN of spindle tool.
Return Values
TRUE Succeeded
FALSE Failed
Remarks
Set to NULL for the arguments of unnecessary information.
This function cannot be used for a random pot number management (Refer to
mdpro5_atc_random_magazine). (A correct value is not filled though does not become
an error.)
The pot number in the spindle is sure to become "magazine number =1, pot number = 0" for
a random pot number management.
BOOL mdpro5_next_tool(
LPDWORD lpdwMgznNo,
LPLONG lplPotNo,
LPDWORD lpdwCutterNo,
LPDWORD lpdwFtn,
LPDWORD lpdwItn,
LPDWORD lpdwPtn);
Abstract
Retrieve the information of next tool.
Arguments
lpdwMgznNo [Get] Filled with magazine number of next tool.
lplPotNo [Get] Filled with pot number of next tool.
lpdwCutterNo [Get] Filled with cutter number of next tool.
lpdwFtn [Get] Filled with FTN of next tool.
lpdwItn [Get] Filled with ITN of next tool.
lpdwPtn [Get] Filled with PTN of next tool.
Return Values
TRUE Succeeded
FALSE Failed
Remarks
Set to NULL for the arguments of unnecessary information.
Only the magazine number and the pot number can be used for a random pot number
management (Refer to mdpro5_atc_random_magazine). (A correct value is not filled
in the value of cutter number, FTN, ITN, and PTN)
BOOL mdpro5_clear_tool_data(
LPDWORD lpdwMgznNo,
LPLONG lplPotNo,
DWORD dwSumArray);
Abstract
Clear specified tools data. More than one tools can be cleared at a time.
Arguments
lpdwMgznNo [Get] Pointer to the array, filled with magazine numbers of tools to clear.
lplPotNo [Get] Pointer to the array, filled with pot numbers of tools to clear.
dwSumArray [Set] Specify the number of elements of lpdwMgznNo and lplPotNo.
Return Values
TRUE Succeeded
FALSE Failed
BOOL mdpro5_get_pallet_no(
DWORD dwDevice,
DWORD dwDevNo,
DWORD dwPosition,
LPDWORD lpdwPalletNo);
Abstract
Retrieves the pallet number at the specified position in the specified devive.
Arguments
dwDevice [Set] Specify the number indicating device type.
VHC (=1) Vehicle
PST (=2) Pallet Storage
MCW (=3) Machining Center
WSS (=5) Work Setting Station
CLS (=6) Cleaning Station
dwDevNo [Set] Specify the device number.
dwPosition [Set] Specify the number indicating position in devices.
DEV_TABLE (=1) Table
DEV_FRONT (=2) Front
DEV_BACK (=3) Back
lpdwPalletNo [Get] Filled with pallet number.
Return Values
TRUE Succeeded
FALSE Failed
BOOL mdpro5_set_pallet_no(
DWORD dwDevice,
DWORD dwDevNo,
DWORD dwPosition,
DWORD dwPalletNo);
Abstract
Changes the pallet number at the specified position in the specified devive.
Arguments
dwDevice [Set] Specify the number indicating device type.
VHC (=1) Vehicle
PST (=2) Pallet Storage
MCW (=3) Machining Center
WSS (=5) Work Setting Station
CLS (=6) Cleaning Station
dwDevNo [Set] Specify the device number.
dwPosition [Set] Specify the number indicating position in devices.
DEV_TABLE (=1) Table
DEV_FRONT (=2) Front
DEV_BACK (=3) Back
dwPalletNo [Get] Specify the pallet number.
Return Values
TRUE Succeeded
FALSE Failed
BOOL mdpro5_get_pallet_data_item(
DWORD dwItem,
LPDWORD lpdwPalletNo,
LPLONG lplValue,
DWORD dwSumArray);
Abstract
Retrieves the values of specified pallet data item.
Arguments
dwItem [Set] Specify the following pallet data item to retrieve.
lpdwPalletNo [Set] Pointer to the array, filled with pallet numbers.
lplValue [Get] Filled with retrieved values.
dwSumArray [Set] Specify the number of elements of lpdwPalletNo, lplValue.
Pallet Data Items
Value Contents
3 Priority (0...999)
5 Express Flag
20 Pallet Alarm
Bit0: Prior Tool Check, Bit1: Tool Broken (Detect Long), Bit2: Tool Broken,
Bit3: AC Monitor, Bit4: SL Monitor, Bit5: SL Monitor(No Load) ,
Bit6: Tool Life, Bit7: Spare Tool Selected, Bit8: NC Program Unregistered,
Bit9: Pallet Seating Checked, Bit10: Measuring System Alarm,
Bit11: Vacuum Checked
22 Ignore Seating
23 RWH Axis
24 B Axis Rot Limit
25 WHP Trans. Limit
35 Empty Pot
36 Work Size
Return Values
TRUE Succeeded
FALSE Failed
BOOL mdpro5_get_face_data_item(
DWORD dwItem,
LPDWORD lpdwPalletNo,
LPDWORD lpdwFaceNo,
LPLONG lplValue,
DWORD dwSumArray);
Abstract
Retrieves the values of specified face data item.
Arguments
dwItem [Set] Specify the following face data item to retrieve.
lpdwPalletNo [Set] Pointer to the array, filled with pallet numbers.
lpdwFaceNo [Set] Pointer to the array, filled with face numbers.
lplValue [Get] Filled with retrieved values.
dwSumArray [Set] Specify the number of elements of lpdwPalletNo, lpdwFaceNo,
lplValue.
Face Data Items
Value Contents
103 Ready Flag
104 Suspend Flag
105 Machining Status (=0; Not Machining, =1: Machining, =2: Normal Termination,
=3: Abnormal Termination)
106 Program No.
107 Offset X
108 Offset Y
109 Offset Z
110 Index Position
111 Block Skip
Bit0: Block Skop 2, Bit1: Block Skop 3, Bit2: Block Skop 4, Bit3: Block Skop 5,
Bit4: Block Skop 6, Bit5: Block Skop 7, Bit6: Block Skop 8, Bit7: Block Skop 9,
115 Face Alarm
Bit0: Prior Tool Check, Bit1: Tool Broken (Detect Long), Bit2: Tool Broken,
Bit3: AC Monitor, Bit4: SL Monitor, Bit5: SL Monitor(No Load) ,
Bit6: Tool Life, Bit7: Spare Tool Selected, Bit8: NC Program Unregistered,
Bit9: Pallet Seating Checked, Bit10: Measuring System Alarm,
Bit11: Vacuum Checked
116 Face Alarm Program No.
117 Face Alarm Sequenct No.
118 Face Alarm PTN
Return Values
TRUE Succeeded
FALSE Failed
BOOL mdpro5_set_pallet_data_item(
DWORD dwItem,
LPDWORD lpdwPalletNo,
LPLONG lplValue,
DWORD dwSumArray);
Abstract
Changes the values of specified pallet data item.
Arguments
dwItem [Set] Specify the following pallet data item to change.
lpdwPalletNo [Set] Pointer to the array, filled with pallet numbers.
lplValue [Set] Pointer to the array, filled with new values to change.
dwSumArray [Set] Specify the number of elements of lpdwPalletNo, lplValue.
Pallet Data Items
Value Contents
3 Priority (0...999)
5 Express Flag
20 Pallet Alarm
Bit0: Prior Tool Check, Bit1: Tool Broken (Detect Long), Bit2: Tool Broken,
Bit3: AC Monitor, Bit4: SL Monitor, Bit5: SL Monitor(No Load) ,
Bit6: Tool Life, Bit7: Spare Tool Selected, Bit8: NC Program Unregistered,
Bit9: Pallet Seating Checked, Bit10: Measuring System Alarm,
Bit11: Vacuum Checked
22 Ignore Seating
23 RWH Axis
24 B Axis Rot Limit
25 WHP Trans. Limit
35 Empty Pot
36 Work Size
Return Values
TRUE Succeeded
FALSE Failed
BOOL mdpro5_set_face_data_item(
DWORD dwItem,
LPDWORD lpdwPalletNo,
LPDWORD lpdwFaceNo,
LPLONG lplValue,
DWORD dwSumArray);
Abstract
Changes the values of specified face data item.
Arguments
dwItem [Set] Specify the following face data item to change.
lpdwPalletNo [Set] Pointer to the array, filled with pallet numbers.
lpdwFaceNo [Set] Pointer to the array, filled with face numbers.
lplValue [Set] Filled with new values to change.
dwSumArray [Set] Specify the number of elements of lpdwPalletNo, lpdwFaceNo,
lplValue.
Face Data Items
Value Contents
103 Ready Flag
104 Suspend Flag
105 Machining Status (=0; Not Machining, =1: Machining, =2: Normal Termination,
=3: Abnormal Termination)
106 Program No.
107 Offset X
108 Offset Y
109 Offset Z
110 Index Position
111 Block Skip
Bit0: Block Skop 2, Bit1: Block Skop 3, Bit2: Block Skop 4, Bit3: Block Skop 5,
Bit4: Block Skop 6, Bit5: Block Skop 7, Bit6: Block Skop 8, Bit7: Block Skop 9,
115 Face Alarm
Bit0: Prior Tool Check, Bit1: Tool Broken (Detect Long), Bit2: Tool Broken,
Bit3: AC Monitor, Bit4: SL Monitor, Bit5: SL Monitor(No Load) ,
Bit6: Tool Life, Bit7: Spare Tool Selected, Bit8: NC Program Unregistered,
Bit9: Pallet Seating Checked, Bit10: Measuring System Alarm,
Bit11: Vacuum Checked
116 Face Alarm Program No.
117 Face Alarm Sequenct No.
118 Face Alarm PTN
Return Values
TRUE Succeeded
FALSE Failed
BOOL mdpro5_clear_work_data(
LPDWORD lpdwPalletNo,
DWORD dwSumArray);
Abstract
Clear the pallet data and face data.
Arguments
lpdwPalletNo [Get] Pointer to the array, filled with pallet numbers to clear.
dwSumArray [Set] Specify the number of elements of lpdwPalletNo.
Return Values
TRUE Succeeded
FALSE Failed
BOOL mdpro5_get_on_duty(
LPBOOL lpfFlag);
Abstract
Retrieves the on-duty / off-duty mode
Arguments
lpfFlag [Get] Filled with on-duty / off-duty mode.
TRUE: On-duty mode
FALSE: Off-duty mode
Return Values
TRUE Succeeded
FALSE Failed
BOOL mdpro5_set_on_duty(
BOOL fFlag);
Abstract
Changes the on-duty / off-duty mode
Arguments
fFlag [Set] Specifies the on-duty / off-duty mode.
TRUE: On-duty mode
FALSE: Off-duty mode
Return Values
TRUE Succeeded
FALSE Failed
BOOL mdpro5_tls_potno(
LPDWORD lpdwMgznNo,
LPLONG lplPotNo);
Abstract
Retrieve the information of TLS pot.
Arguments
lpdwMgznNo [Get] Filled with magazine number of TLS pot.
lplPotNo [Get] Filled with pot number of TLS pot.
Return Values
TRUE Succeeded
FALSE Failed
Remarks
Set to NULL for the arguments of unnecessary information.
BOOL mdpro5_atc_random_magazine(
LPBOOL lpfRandomAtc);
Abstract
Retrieves the management type of tool number data of the ATC magazine.
Arguments
lpfFlag [Get] Filled the management type of tool number data of the ATC magazine.
TRUE: Random pot number
FALSE: Fixed pot number
Return Values
TRUE Succeeded
FALSE Failed
BOOL mdpro5_get_arbitrary_machine_status(
DWORD dwStatusKind1, DWORD dwStatusKind2,
DWORD dwStatusKind3, DWORD dwStatusKind4,
LPLONG lplOutputData1, LPLONG lplOutputData2,
LPLONG lplOutputData3, LPLONG lplOutputData4);
Abstract
Retrieve an arbitrary machine states.
Arguments
Refer to the argument setting table for a set value.
dwStatusKind1 [Set] Specifies the kind of machine status to get.
dwStatusKind2 [Set] Specifies the kind of machine status to get.
dwStatusKind3 [Set] Specifies the kind of machine status to get.
dwStatusKind4 [Set] Specifies the kind of machine status to get.
lplOutputData1 [Get] Filled with the machine status.
lplOutputData2 [Get] Filled with the machine status.
lplOutputData3 [Get] Filled with the machine status.
lplOutputData4 [Get] Filled with the machine status.
Argument setting table
dwStatusKind lplOutputData Note
1 2 3 4 1 2 3 4
1: APC 1: Arm Not Use Not Use 0: Undef Not Use Not Use Not Use Effect in
Return Values
TRUE Succeeded
FALSE Failed
Remarks
Set to “0” for the argument of unnecessary setting.
Set to NULL for the arguments of unnecessary information.
BOOL mdpro5_max_tls (
LPDWORD lpdwMaxTls);
Abstract
Retrieve the number of TLS.
Arguments
lpdwMaxTls [Get] Filled with number of TLS.
Return Values
TRUE Succeeded
FALSE Failed
Remarks
Set to NULL for the arguments of unnecessary information.
BOOL mdpro5_tls_potno2(
LPDWORD lpdwMgznNo,
LPLONG lplPotNo,
DWORD dwTlsNo);
Abstract
Retrieve the information of TLS pot of the specified TLS number.
Arguments
lpdwMgznNo [Get] Filled with magazine number of TLS pot.
lplPotNo [Get] Filled with pot number of TLS pot.
dwTlsNo [Set] Specifies the TLS number.
Return Values
TRUE Succeeded
FALSE Failed
Remarks
Set to NULL for the arguments of unnecessary information.
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.
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.
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.
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.
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
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
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.
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++.
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.
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++.
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++.
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++.
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++.
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++.
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++.
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++.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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++.
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.
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%.
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.
BOOL mdncinf_set_tool_compensation(
WORD compenType,
WORD fromNo,
WORD toNo,
LPDWORD value)
Explanation
Sets the tool offset values for the specified type and numbers.
Argument
compenType [Set] Set the type of tool offset.
COMPEN_TYPE_H_GEOMETRY(0): Tool length shape
compensation
COMPEN_TYPE_H_WEAR(1): Tool length wear
compensation
COMPEN_TYPE_D_GEOMETRY(2): Tool diameter shape
compensation
COMPEN_TYPE_D_WEAR(3): Tool diameter wear
compensation
fromNo [Set] Specify the tool offset starting (from) number.
toNo [Set] Specify the tool offset ending (to) number.
value [Set] Specify the array variable where tool offset values to be set are
stored.
An array number equal to (fromNo-toNo+1) is required.
Return Value
True : Set operation succeeded.
False : Set operation failed.
BOOL mdncinf_spindle_load_meter(
LPDWARD load) *5 added
Explanation
Acquires (gets) the spindle motor load [%]. The unit is 0.1%.
When the acquired value is 123, the acquired value means 12.3%.
Argument
load [Get] Specify the variable where the load is stored.
Return Value
True : Set operation succeeded.
False : Set operation failed.
BOOL mdncinf_spindle_motor_speed(
LPDWARD speed) *5 added
Explanation
Acquires (gets) the spindle motor speed [rpm].
Argument
Speed [Get] Specify the variable where the speed is stored.
Return Value
True : Set operation succeeded.
False : Set operation failed.
BOOL mdncinf_spindle_motor(
LPDWARD load,
LPWORD speed) *5 added
Explanation
Acquires (gets) the spindle motor load [%] and rotation speed [rpm]. The load unit is
0.1%.
When the acquired value is 123, the acquired value means 12.3%.
Argument
load [Get] Specify the variable where the load is stored.
speed [Get] Specify the variable where the speed is stored.
Return Value
True : Set operation succeeded.
False : Set operation failed.
BOOL mdncinf_spindle_load_meter2(
LPDWARD load) *17 added
Explanation
Acquires (gets) the spindle motor load [%]. The unit is 0.01%.
When the acquired value is 1234, the acquired value means 12.34% and dances.
Argument
load [Get] Specify the variable where the load is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
BOOL mdncinf_servo_meter(
short *data_num,
long *data)
Explanation
Acquires (gets) the load [%] of each controlled axises. The unit is 0.1%.
When the acquired value is 123, the acquired value means 12.3%.
Argument
load [Get] The number of controlled axises taken the load is set into the
variable.
speed [Get] Specify the array that each axises load is stored.
Specify the array size more than the number of maximum
axises of control unit.
Return Value
True : Get operation succeeded.
False : Get operation failed.
8 Functions List
Retrieves the error number indicating immediate cause by which last DLL function failed. ..................11
LONG mdpro5_GetLastMainError();........................................................................................... 12
Retrieves the unique error number to detect the point where the last error occurred. .......................... 12
Your application must call this function at first after Professional 5 started, to retrieve static data of
connected MC, to retrieve MOS parameters, and to create MSMQ on MOS PC.................................. 13
Retrieves the information of ATC magazine (count of tools, type, etc). ............................................... 17
Execute the same procedure as when flexible switch “System Machining Abort” or “System Machining
Finish” on the Professional 5 is pushed........................................................................................... 40
Retrieves whether it is possible to execute auto power-off when MC alarms occur. ............................. 41
Clear specified tools data. More than one tools can be cleared at a time. ........................................... 58
Retrieves the pallet number at the specified position in the specified devive. ...................................... 59
Changes the pallet number at the specified position in the specified devive. ....................................... 60
Retrieves the management type of tool number data of the ATC magazine. ......................................... 69
Retrieve the information of TLS pot of the specified TLS number. ...................................................... 72
Returns last Fanuc Library error number that occurred for mdncinf.dll function........................ 73
Acquires (gets) the FOCAS1 Library Handle in order to use the FOCAS1 function within
mdncinf.dll. The acquired library handle is stored/used within mdncinf.dll. ............................... 73
Checks whether or not an axis number was specified for axisNo. ............................................ 74
Converts the ASCII code PMC address name into PMC address type data. ............................ 77
Converts the PMC address data into ASCII code PMC address name. .................................... 77
BOOL mdncinf_set_pmcbit( WORD adrType, WORD adrNo, WORD bitNo, BITINF onoff)
........................................................................................................................................................ 79
Continuously acquires (gets) specified PMC address data in BYTE units. ............................... 80
Continuously sets data to specified PMC type and address in BYTE units. .............................. 80
Reads total number of data table control data groups used to manage PMC data table (address
Writes total number of data table control data groups used to manage PMC data table (address
D). ............................................................................................................................................... 81
Reads data table control data used to manage PMC data table (address D). .......................... 82
Writes data table control data used to manage PMC data table (address D). ........................... 83
Acquires (gets) each axis name (X, Y, Z...). This function is only valid in Visual C++. .............. 83
Acquires (gets) each axis name (X, Y, Z...). This function is only valid in Visual Basic. ............ 84
Acquires (gets) minimum setting unit for tool offset/macro variable. ......................................... 84
Acquires (gets) CNC type and version data. This function is only valid in Visual C++. ............. 86
Acquires (gets) CNC type and version data. This function is only valid in Visual Basic. ........... 87
Acquires (gets) CNC status data (machining, emergency stop, aixs moving, CNC mode, etc.) 87
Reads CNC system software series/version. This function is only valid in Visual Basic. .......... 90
Acquires (gets) modal G codes. This function is only valid in Visual C++. ................................ 91
Acquires (gets) modal G codes. This function is only valid in Visual Basic. .............................. 92
Acquires (gets) modal H code character string and value. This function is only valid in Visual
C++. ............................................................................................................................................ 93
Acquires (gets) modal H code character string and value. This function is only valid in Visual
Basic. .......................................................................................................................................... 93
Acquires (gets) modal D code character string and value. This function is only valid in Visual
C++. ............................................................................................................................................ 94
Acquires (gets) modal D code character string and value. This function is only valid in Visual
Basic. .......................................................................................................................................... 94
Acquires (gets) modal M code character string and value. This function is only valid in Visual
C++. ............................................................................................................................................ 95
Acquires (gets) modal M code character string and value. This function is only valid in Visual
Basic. .......................................................................................................................................... 95
Acquires (gets) modal S code character string and value. This function is only valid in Visual
C++, ............................................................................................................................................ 96
Acquires (gets) modal S code character string and value. This function is only valid in Visual
Basic. .......................................................................................................................................... 96
Acquires (gets) modal T code character string and value. This function is only valid in Visual
C++. ............................................................................................................................................ 97
Acquires (gets) modal T code character string and value. This function is only valid in Visual
Basic. .......................................................................................................................................... 97
Acquires (gets) modal F code character string and value. This function is only valid in Visual
C++. ............................................................................................................................................ 98
Acquires (gets) modal F code character string and value. This function is only valid in Visual
Basic. .......................................................................................................................................... 98
Acquires (gets) the current workpiece offset value and offset mode. ...................................... 100
Acquires (gets) the tool offset memory type and number of offsets that can be used............. 100
Acquires (gets) the tool offset (shape compensation) values. ................................................. 101
Acquires (gets) the current tool offset values and H/D numbers. ............................................ 102
Acquires (gets) the data for the CNC program being executed. .............................................. 102
Acquires (gets) the specified number of characters in the program being executed. This function
can only be used in Visual C++. ............................................................................................... 103
Acquires (gets) the specified number of characters in the program being executed. This function
can only be used in Visual Basic. ............................................................................................. 103
Acquires (gets) the machining program management data that is already registered on the CNC
side............................................................................................................................................ 104
Acquires (gets) the data for the specified program number. This function can only be used in
Visual C++. ............................................................................................................................... 104
Acquires (gets) a list of all machining program numbers registered on the CNC side. This
function can only be used in Visual C++. ................................................................................. 105
Acquires (gets) list of all machining program numbers registered on the CNC side. This function
can only be used in Visual Basic. ............................................................................................. 106
Checks whether or not specified macro variable number can be used. .................................. 106
Acquires (gets) macro variable as a character string. This function can only be used in Visual
C++. .......................................................................................................................................... 107
Acquires (gets) macro variable as a character string. This function can only be used in Visual
Basic. ........................................................................................................................................ 107
Acquires (gets) current NC alarm. This function can only be used in Visual C++. .................. 108
Acquires (gets) current NC alarm. This function can only be used in Visual Basic. ................ 109
Acquires (gets) current number of CNC alarms that have occurred. ....................................... 109
Acquires (gets) CNC alarm history data. This function can only be used in Visual C++. .........110
Acquires (gets) CNC alarm history data. This function can only be used in Visual Basic. ....... 111
BOOL mdncinf_feed_hold()........................................................................................................114
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
Sets the PC side date and time to the CNC calendar timer. .....................................................116
BOOL mdncinf_get_node_info( long nodeNo, long *ioBase, long *status, long *cncType,
char *nodeName) .........................................................................................................................117
Acquires (gets) the specified HSSB node data. This function is only valid in Visual C++. .......117
Acquires (gets) the specified HSSB node data. This function is only valid in Visual Basic. .....118
Acquires (gets) PMC type attributes, valid address range and other data. ..............................119
Acquires (gets) the tool offset values for the specified type and numbers. ............................. 121
Sets the tool offset values for the specified type and numbers. ............................................... 122
Acquires (gets) the spindle motor load [%]. The unit is 0.1%. ................................................. 122
Acquires (gets) the spindle motor load [%] and rotation speed [rpm]. The load unit is 0.1%. . 123
Acquires (gets) the spindle motor load [%]. The unit is 0.01%. ............................................... 123
Acquires (gets) the load [%] of each controlled axises. The unit is 0.1%. ............................... 123