MML Reference Pro3 Eng
MML Reference Pro3 Eng
MML Reference Pro3 Eng
for Professional A / 3
Contents
2 Node Numbers................................................................................................................. 5
5 Function Return Values and Error Data Acquisition Function Specifications .................. 8
1 File Configuration
ProDef.h
Constant definition file used by MdMcinf, Mdtldt and Mdwkdt
MdFum.dll
Library containing general-purpose functions for which communication is not performed
with CNC.
MdFum.lib
Mdfum.dll import library.
MdFum.vch
Prototype declaration header file for Mdfum.dll C/C++ functions.
MdMcinf.dll
Library to access data that is dependent on machine software.
MdMcinf.lib
MdMcinf.dll import library.
MdMcinf.vch
Prototype declaration header file for MdMcinf.dll C/C++ functions.
MdNcinf.dll
Library to access CNC data.
MdNcinf.lib
MdNcinf.dll import library.
MdNcinf.vch
Prototype declaration header file for MdNcinf.dll C/C++ functions.
MdTldt.dll
Library to access Professional 3 tool data.
MdTldt.lib
MdTldt.dll import library.
MdTldt.vch
Prototype declaration header file for MdTldt.dll C/C++ functions.
MdWkdt.dll
Library to access Professional 3 work data.
MdWkdt.lib
MdWkdt.dll import library.
MdWkdt.vch
Prototype declaration header file for MdWkdt.dll C/C++ functions.
2 Node Numbers
When making an HSSB connection, the node numbers (0 to 7) are used to identify the HSSB
port in order to differentiate between the respective CNC units. When making an Ethernet
connection, the IP address is used with Fwlib32.DL to differentiate between the CNC units
instead of node numbers.
However, the Makino DLL has been designed to use node numbers (8 to 99) in order to
differentiate between the CNC units. The reason for this is to alleviate the differences
between HSSB and Ethernet connections.
Furthermore, in order to realize this function, it is necessary to set the node number and IP
address correspondence in the initialization files (.ini file). Refer to 3. MOS Parameters for
the parameters.
Make sure to specify the node number for the DLL being used when the primary thread
start procedure is performed. Node setting is performed with the xxxxx_set_node()
function for each DLL.
Since the node number set when the primary thread is started is transferred to the
sub-thread node number, you do not need to worry about node number setting within
sub-threads.
Conversely, it is not possible to perform coding where different node numbers are
accessed for each thread.
An error is triggered when the xxxxx_set_node() function is executed multiple times for
each DLL within the same process.
3 MOS Parameters
The parameters that are referred to for operation of Makino software on the PC are called
MOS parameters. The MOS parameter file name is “Mos_Param.ini”.
The node number-related MOS parameter setting procedure that is required to use the
Makino DLL system is described in this section.
Example:
This example shows the parameter settings for an Ethernet connection to the CNC with
an IP address of “192.1.1.1”, TCP port of “5001” and virtual node number of “10”. The
node number and IP address parameters are set in “C:¥Makino¥Data¥Mos_param.ini”.
SET MAKINO=C:¥MAKINO
[MACHINE001]
NODE_NO=10/192.1.1.1/5001
Cycle start of the CNC from the PC is performed via the machine PMC software (hereinafter
called Professional 3). Specifically, the PC inverts the start request signal (STX) from the
Professional 3, and issues a machining start request.
Likewise, the PC detects ending of NC programs by inverting the NC program end signal
(EOPX) from the Professional 3. At this time, the Professional 3 writes the NC program end
status (FINCND) to a fixed address.
A timing chart, from the start to the end of NC programs, is shown below:
PC Pro 3 (STX)
Pro 3 PC (EOPX)
Pro 3 PC
(FINCND: Data)
①② ③ ④⑤ ⑥
① Program start request (PC inverts STX after completing NC program search,
then executes mdmcinf_system_cycle_start() function)
② NC program start (Pro 3 checks start conditions and starts NC program)
③ NC program finish (Pro 3 sets FINCND (data) and inverts EOPX)
④ NC program restart request (PC inverts STX after completion of NC program search)
⑤ NC program start (Pro 3 checks start conditions and starts NC program)
⑥ NC program finish (Pro 3 sets FINCND (data) and inverts EOPX)
Inverting of the Professional 3 EOPX signal is limited to the following three cases:
In other words, when the NC program is ended with the [NC RESET] button, the system will
not be able to detect ending of the NC program since EOPX is not inverted, and the next cycle
start request cannot be executed.
Excluding special functions, the return values for Makino DLL functions are BOOL type.
Normally, when an error occurs during the execution of a FOCAS1 function, a FALSE value is
returned.
When the FALSE status is returned, the error content can be obtained with the following two
functions: (*_GetLastFError(), *_GetLastMError())
long mdncinf_GetLastFError()
long mdmcinf_GetLastFError()
long mdtldt_GetLastFError()
long mdwkdt_GetLastFError()
Explanation
When the return value for the last DLL (MdMcinf.dll, MdNcinif.dll) function executed is
FALSE, the return value for the FOCAS1 function that was the direct cause is acquired:
Argument
None
Return Value
FOCAS1 function return value
long mdncinf_GetLastMError()
long mdmcinf_GetLastMError()
long mdtldt_GetLastMError()
long mdwkdt_GetLastMError()
Explanation
When the return value for the last DLL (MdMcinf.dll, MdNcinif.dll) function executed is
FALSE, the number (specified by Makino) which enables the cause to be determined that
is not duplicated in the DLL is acquired:
Argument
None
Return Value
This differs depending upon the last function executed.
Functions for which this function may be beneficial are described in the respective
Function Specifications.
long mdmcinf_GetLastMError()
Explanation
The last error that occurred in the mdmcinf.dll function is returned.
Return Value
0: The last mdmcinf.dll function that was called ended normally.
Other than 0 : Error number.
Note
When the function that was executed after the error occurred ended normally, “0” is
returned by this function.
long mdmcinf_GetLastFError()
Explanation
The number of the last Fanuc library error that occurred in the mdmcinf.dll function is
returned.
Return Value
0: The last Fanuc library function that was called ended normally.
Other than 0 : Error number.
Note
When the function that was executed after the error occurred ended normally, “0” is
returned by this function.
BOOL mdmcinf_set_node(
long node)
Explanation
Acquires (gets) the FOCAS1 Library Handle in order to use the FOCAS1 function within
mdmcinf.dll. The acquired library handle is stored/used within mdmcinf.dll.
Therefore, execute this function once after communication is established between the
CNC and PC.
Argument
node [Set] Specifies node number set for MOS parameter.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
The node number data must be set in the MOS parameters in order to execute this
function. Refer to 3. MOS Parameters for details.
BOOL mdmcinf_pro_version(
LPSTR verString)
Explanation
Acquires (gets) the Professional 3 version character string. This can only be called from
Visual C++.
Argument
verString [Get] Specify the character string where the version string is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
This function cannot be called from Visual Basic.
BOOL mdmcinf_pro_version_vb(
BSTR *verString)
Explanation
Acquires (gets) the Professional 3 version character string. This can only be called from
Visual Basic.
Argument
verString [Get] Specify the character string where the version string is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
This function cannot be called from Visual C++.
BOOL mdmcinf_atc_type(
LPWORD atcMag,
LPWORD dtcMag)
Explanation
Acquires (gets) the ATC magazine type and DTC magazine type.
Argument
atcMag [Get] Specify the data in which the ATC magazine type is stored.
dtcMag [Get] Specify the data in which the DTC magazine type is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
When NULL is set for the Argument, the value is not acquired.
Refer to ProDef.h for details of the atcMag, dtcMag values.
BOOL mdmcinf_apc_type(
LPWORD apcArm,
LPWORD pltMag)
Explanation
Acquires (gets) the APC arm type and pallet magazine type.
Argument
apcArm [Get] Specify the data in which the APC arm type is stored.
pltMag [Get] Specify the data in which the pallet magazine type is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
When NULL is set for the Argument, the value is not acquired.
Refer to ProDef.h for details of the apcArm, pltMag values.
BOOL mdmcinf_machineif2_request(
LPBOOL success)
Explanation
Request from PC to Professional 3 for processing of Machine Items Table Interface 2
data.
Argument
success [Get] When True : Request succeeded.
When False : Waiting for response for previous process.
Return Value
True : Succeeded. Refer to success argument value for results of the actual
process requested.
False : Processing failed.
BOOL mdmcinf_machineif2_request_cancel(
LPBOOL success)
Explanation
Cancels request from PC to Professional 3 for processing of Machine Items Table
Interface 2 data.
Argument
success [Get] When True : Cancel request succeeded.
When False : No request for processing has been sent.
Return Value
True : Succeeded. Refer to success argument value for results of the actual
cancel operation.
False : Cancel operation failed.
BOOL mdmcinf_machineif2_response(
LPBOOL finish)
Explanation
Checks status of Professional 3 Machine Items Table Interface 2 data processing
request.
Argument
finish [Get] When True : Data processing has been completed.
When False : Data processing is being performed.
Return Value
True : Succeeded.
False : Failed.
BOOL mdmcinf_get_mcpara(
WORD paraNo,
long *value,
long defValue)
Explanation
Acquires (gets) specified machine parameter value.
Argument
paraNo [Set] Specify the machine parameter number.
value [Get] Specify the variable where the acquired value is stored.
defValue [Set] Specify the default value when the machine parameter number
does not exist on the machine.
Return Value
True : Get operation succeeded.
False : Get operation failed.
BOOL mdmcinf_set_mcpara(
WORD paraNo,
long value)
Explanation
Sets the specified machine parameter value.
Argument
paraNo [Set] Specify the machine parameter number.
value [Set] Specify the variable where the set value is stored.
Return Value
True : Set operation succeeded.
False : Set operation failed.
BOOL mdmcinf_spindle_status(
LPWORD position,
LPWORD direction)
Explanation
Acquires (gets) the spindle status.
Argument
position [Get] Set the variable where the gear position is stored.
SPDL_NO_GEAR(0) No gear.
SPDL_LOW_GEAR(1) Low speed gear.
SPDL_HI_GEAR(2) High speed gear.
SPDL_MID_GEAR(3) Medium speed gear.
direction [Get] Set the variable where the spindle rotation direction is stored.
SPDL_STOP(0) Spindle is stopped.
SPDL_FORWARD(1) Spindle is rotating clockwise.
SPDL_REVERSE(2) Spindle is rotating counterclockwise.
SPDL_ORIENT(3) Orientation being performed.
SPDL_CONTOUR(4) Contouring being performed.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
When NULL is set for the argument, the value is not acquired.
Refer to ProDef.h for details of the position, direction values.
BOOL mdmcinf_apc_status(
LPWORD armStdby,
LPWORD stckStatus)
Explanation
Acquires (gets) the pallet changer status.
Argument
armStdby [Get] Set the variable where the APC arm status is stored.
PC_ARM_NOTRDY(0) Not in standby (ready) status.
PC_ARM_STANDBY(1) Standby status.
stckStatus [Get] Set the variable where the stocker status is stored.
PC_STCK_AUTO (0) In auto mode.
PC_STCK_MANUAL (1) In manual mode.
PC_MANUAL_IDX (2) Performing manual indexing.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
When NULL is set for the argument, the value is not acquired.
Refer to ProDef.h for details of the armStdby, stckStatus values.
BOOL mdmcinf_atc_status(
LPWORD armStdby,
LPWORD magStatus)
Explanation
Acquires (gets) the ATC magazine status.
Argument
armStdby [Get] Set the variable where the ATC arm status is stored.
ATC_ARM_NOTRDY(0) Not in standby (ready) status.
ATC_ARM_STANDBY(1) Standby status.
magStatus [Get] Set the variable where the magazine status is stored.
ATC_MAG_AUTO (0) In auto mode.
ATC_MAG_MANUAL (1) In manual mode.
ATC_MAG_INDEX (2) Manual indexing being performed.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
When NULL is set for the argument, the value is not acquired.
Refer to ProDef.h for details of the armStdby, magStatus values.
BOOL mdmcinf_spindle_speed(
LPWORD spdlSpeed)
Explanation
Acquires (gets) spindle rotation speed [min-1].
Argument
spdlSpeed [Get] Set the variable where the spindle rotation speed [min-1] is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
The acquired value is the command value.
BOOL mdmcinf_toolmoni_setting(
LPWORD slUppLmt,
LPWORD acUppLmt,
LPWORD acLowLmt)
Explanation
Acquires (gets) tool monitor setting values.
Argument
slUppLmt [Get] Specify the variable where the SL upper limit [0.1%] is stored.
acUppLmt [Get] Specify the variable where the AC upper limit [0.1%] is stored.
acLowLmt [Get] Specify the variable where the AC lower limit [0.1%] is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
When NULL is set for the argument, the value is not acquired.
BOOL mdmcinf_spindle_load(
LPWORD loadVal,
LPWORD noLoadVal,
LPWORD actualVal)
Explanation
Acquires (gets) the tool monitor current values.
Argument
loadVal [Get] Specify the variable where the spindle load value [0.1%] is
stored.
noLoadVal [Get] Specify the variable where the no load value [0.1%] is stored.
actualVal [Get] Specify the variable where the actual spindle load current value
[0.1%] is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
When NULL is set for the argument, the value is not acquired.
BOOL mdmcinf_chk_mc_alarm(
LPBOOL alarm)
Explanation
Acquires (gets) Professional 3 MC alarm status.
Argument
alarm [Get] When True : MC alarm has occurred.
Return Value
True : Get operation succeeded.
False : Get operation failed.
BOOL mdmcinf_mc_alarm(
LPWORD taskID,
LPDWORD almNum,
LPWORD almWarn,
LPWORD rtyOk,
LPWORD numAlm)
Explanation
Acquires (gets) messages for alarms that have occurred on Professional 3.
Argument
taskID [Get] Array variable where task ID is stored.
almNum [Get] Array variable where alarm number is stored.
almWarn [Get] Array variable where alarm (1) / warning (2) is stored.
rtyOk [Get] Array variable where retry OK (1) / retry not possible (2) is
stored.
numAlm [Get] Variable where total number of alarms acquired is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
The array number for the type of index specified for PRO3_TASK_L(=64) is required
for arguments other than numAlm. The acquired alarm data is stored starting at the
beginning of the array (0 number index).
BOOL mdmcinf_max_alarm_history(
LPWORD numHis)
Explanation
Acquires (gets) maximum number of alarm history records
Argument
numHis [Get] Specify the variable where the history record number is stored.
(PRO3_HIS_L(20)/PRO3_HIS2_L(100) )
Return Value
True : Get operation succeeded.
False : Get operation failed.
BOOL mdmcinf_mc_alarm_history(
LPWORD taskID,
LPDWORD almNum,
LPWORD almWarn,
LPWORD rtyOk,
LPWORD year,
LPWORD month,
LPWORD day,
LPWORD hour,
LPWORD min,
LPWORD sec,
LPWORD numHis)
Explanation
Acquires (gets) Professional 3 alarm history data.
Argument
taskID [Get] Array variable where task ID is stored.
almNum [Get] Array variable where alarm number is stored.
almWarn [Get] Array variable where alarm (1) / warning (2) is stored.
rtyOk [Get] Array variable where retry OK (1) / retry not possible (2) is
stored.
year [Get] Array variable where year alarm occurred is stored.
month [Get] Array variable where month alarm occurred is stored.
day [Get] Array variable where day alarm occurred is stored.
hour [Get] Array variable where hour alarm occurred is stored.
min [Get] Array variable where minute alarm occurred is stored.
sec [Get] Array variable where second alarm occurred is stored.
numHis [Get] Variable where total number of alarms acquired is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
The array number (quantity) for the type of index specified for PRO3_HIS_L(=20) or
PRO3_HIS2_L(=100) is required for arguments other than numHis. The acquired
alarm data is stored starting at the beginning of the array (0 number index).
BOOL mdmcinf_can_auto_poweroff(
LPBOOL yes)
Explanation
Acquires (gets) status indicating whether or not machine power can be automatically
turned off.
Argument
yes [Get] Specify variable where True/False value is stored.
When True : Auto power off operation can be performed.
Return Value
True : Get operation succeeded.
False : Get operation failed.
BOOL mdmcinf_set_auto_poweroff(
BOOL flg)
Explanation
Sets/releases Professional 3 auto power off request data.
Argument
flg [Set] When True : Sets auto power off request data.
When False : Releases auto power off request data.
Return Value
True : Succeeded.
False : Failed.
Note
Even when TRUE is set for this function, if both conditions (1) and (2) below are not
satisfied, the auto power off operation will not be executed. (If one of the conditions
is satisfied, the auto power off operation will be executed). Confirm before executing
this function.
(1) System mode(mdmcinf_chk_system_mode() argument sysMode=TRUE
(2) DNC operation mode(mdncinf_cnc_status() argument ncMode=100
The machine looks at the leading edge where the auto power off bit goes from Off to
On. When this function is set to TRUE in the status where the bit is already On, the
bit will be automatically turned Off and then back On again after 1000[msec].
Therefore, you do not need to worry about the On/Off status of the auto power off bit
before executing this function.
BOOL mdmcinf_get_auto_poweroff(
LPBOOL apo)
Explanation
Acquires (gets) the Professional 3 auto power off request data.
Argument
apo [Get] Specify variable where True/False value is stored.
When True : Auto power off request has been set.
Return Value
True : Get operation succeeded.
False : Get operation failed.
BOOL mdmcinf_tldt_edit_start(
LPBOOL success)
Explanation
Turns On Professional 3 PC tool data edit mode, enabling Professional 3 tool data to be
edited from the PC.
Argument
success [Get] Specify variable where True/False value is stored.
When True : Setting of mode succeeded.
When False : Mode cannot be set since edit mode on machine
side is On.
Return Value
True : Succeeded. Refer to success argument for results of actual mode setting.
False : Failed.
BOOL mdmcinf_tldt_edit_finish()
Explanation
Turns Off Professional 3 PC tool data edit mode, ending editing of Professional 3 tool
data from PC.
Return Value
True : Set operation succeeded.
False : Set operation failed.
BOOL mdmcinf_chk_tldt_edit(
LPBOOL editPC,
LPBOOL editPro3)
Explanation
Checks status of Not-If-Then flag for editing of tool data between Professional 3 and PC.
Argument
editPC [Get] Specify variable where True/False value is stored.
When True : PC Not-If-Then flag is On.
editPro3 [Get] Specify variable where True/False value is stored.
When True : Professional 3 Not-If-Then flag is On.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
When NULL is set for the argument, the value is not acquired.
BOOL mdmcinf_set_maint_mode(
BOOL flg)
Explanation
Sets/Releases Professional 3 maintenance mode.
Argument
flg [Set] When True : Sets maintenance mode.
Return Value
True : Setting/releasing of mode succeeded.
False : Failed.
BOOL mdmcinf_get_maint_mode(
LPBOOL mntMode)
Explanation
Acquires (gets) On/Off status of Professional 3 maintenance mode.
Argument
mntMode [Get] Specify variable where True/False value is stored.
When True : Maintenance mode is active (On).
Return Value
True : Get operation succeeded.
False : Get operation failed.
BOOL mdmcinf_chk_system_mode(
LPBOOL sysMode)
Explanation
Acquires (gets) On/Off status of Professional 3 system mode.
Argument
sysMode [Get] Specify variable where True/False value is stored.
When True : System mode is active (On).
Return Value
True : Get operation succeeded.
False : Get operation failed.
BOOL mdmcinf_chk_auto_unloading_mode(
LPBOOL aumMode)
Explanation
Acquires (gets) On/Off status of Professional 3 auto unload mode.
Argument
aumMode [Get] Specify variable where True/False value is stored.
When True : Auto unload mode is On.
Return Value
True : Get operation succeeded.
False : Get operation failed.
BOOL mdmcinf_chk_no_more_pallet_mode(
LPBOOL nmpMode)
Explanation
Acquires (gets) On/Off status of Professional 3 load prohibit (no more pallets) mode.
Argument
sysMode [Get] Specify variable where True/False value is stored.
When True : Load prohibit (no more pallets) mode is On.
Return Value
True : Get operation succeeded.
False : Get operation failed.
BOOL mdmcinf_set_trans_error(
BOOL flg)
Explanation
Sets/Releases Professional 3 external device alarm bit.
Argument
flg [Set] When True : External device alarm is set.
Return Value
True : Setting/releasing of mode succeeded.
False : Failed.
BOOL mdmcinf_get_trans_error(
LPBOOL alarm)
Explanation
Acquires (gets) On/Off status of Professional 3 external device alarm bit.
Argument
alarm [Get] Specify variable where True/False value is stored.
When True : External device alarm bit mode is On.
Return Value
True : Get operation succeeded.
False : Get operation failed.
BOOL mdmcinf_set_start_disable(
BOOL flg)
Explanation
Sets/Releases Professional 3 cycle start disable bit during DNC mode.
Argument
flg [Set] When True : Cycle start disable bit during DNC mode is set.
Return Value
True : Setting/releasing of mode succeeded.
False : Failed.
BOOL mdmcinf_get_tls_disable(
LPBOOL disable)
Explanation
Acquires (gets) On/Off status of Professional 3 tool loading station control panel disable
mode.
Argument
disable [Get] Specify variable where True/False value is stored.
When True : Tool loading station control panel disable mode is
On.
Return Value
True : Get operation succeeded.
False : Get operation failed.
BOOL mdmcinf_set_tls_disable(
BOOL disableFlag)
Explanation
Sets/Releases Professional 3 tool loading station control panel disable mode.
Argument
disableFlag [Set] When True : Sets tool loading station control panel disable
mode.
Return Value
True : Setting/releasing of mode succeeded.
False : Failed.
BOOL mdmcinf_chk_operator_call(
LPBOOL opeCall)
Explanation
Acquires (gets) Professional 3 operator call status.
Argument
opeCall [Get] Specify variable where True/False value is stored.
When True : Operator call status is On.
Return Value
True : Get operation succeeded.
False : Get operation failed.
BOOL mdmcinf_system_cycle_start(
BOOL opeCall,
LPBOOL success)
Explanation
Requests execution of cycle start for Professional 3 (Reversal of STX)
Argument
opeCall [Set] Sets whether or not operator must press cycle start button on
machine.
When True : Machining is started after cycle start button is
pressed.
When False : Machining is immediately started.
success [Get] Specify variable where True/False value is stored.
When True : Cycle start request was received by Professional 3.
When False : Cycle start request was rejected since previous
machining process has not been completed (STX xor EOPX = 1).
Return Value
True : Succeeded. Refer to success argument for actual request.
False : Failed.
Note
Use the functions listed below to confirm whether or not the machine is ready before
executing this function:
(1) Machine in system mode (Refer to mdmcinf_chk_system_mode()).
(2) Maintenance mode is Off (Refer to mdmcinf_chk_maintenance_mode()).
(3) No machine alarm has occurred (Refer to mdmcinf_chk_mc_alarm()).
(4) Automatic operation mode has been reset, emergency stop status has been
reset, and operation mode is appropriate (Refer to mdncinf_cnc_status()).
BOOL mdmcinf_chk_system_mach_finish(
LPBOOL finish,
long *condition)
Explanation
Use mdmcinf_system_cycle_start() to acquire (get) the status indicating whether or not
cycle start via Professional 3 has been completed.
Argument
finish [Get] Specify variable where True/False value is stored.
When True : Machining has been completed (STX xor EOPX = 0)
When False : Machining being performed (STX xor EOPX = 1)
condition [Get] Specify variable where machining completion status is stored.
Gets last machining completion status. Set NULL when status
does not need to be acquired.
0: Normal completion.
0x00000001: Auto workpiece measurement alarm (triggered by
M940).
0x00010000: BTS alarm occurred during machining.
0x00020000: BTS2 alarm occurred during machining.
0x00040000: AC alarm occurred during machining.
0x00080000: SL alarm occurred during machining.
0x00100000: Normal completion (TL occurred).
0x00400000: Normal completion (STS occurred).
0x01000000: Abnormal completion (This includes [System Abort]
operation from CUSTOM screen and NC reset
during DNC operation).
0x04000000: Abnormal pallet seating.
Note
The machining is not abnormal when TL alarm or STS alarm occur,
BOOL mdmcinf_get_milling_time(
long *value)
Explanation
Acquires (gets) cumulative time spindle has been rotating during automatic operation
since machining was started (STx was reversed).
Argument
value [Get] Cumulative time spindle has rotated during automatic operation
[sec]
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
Since the Professional 3 is reset by the machining start (reversal of STx) operation,
only the cumulative time for one machining process can be acquired by the get
operation.
BOOL mdmcinf_chk_maintenance_mode(
LPBOOL maintMode)
Explanation
Acquires (gets) Professional 3 maintenance mode status.
Argument
maintMode [Set] Specify variable where True/False value is stored.
When True : Maintenance mode is active.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
xxx.
BOOL mdmcinf_chk_system_mach_status(
LPBOOL stx,
LPBOOL eopx,
long *condition)
Explanation
Acquires (gets) machining start request signal (STX), program end signal (EOPX) and
machining end status (condition) data between PC and Professional 3.
Argument
stx [Get] Specify variable where On/Off status of machining start request
signal (STX) is stored.
eopx [Get] Specify variable where On/Off status of program end signal
(EOPX) is stored.
condition [Get] Specify variable where machining end status (condition) is stored.
Refer to mdmcinf_chk_system_mach_finish() for data values.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
When NULL is set for the argument, the value is not acquired.
BOOL mdmcinf_pm_type(
LPWORD pmType)
Explanation
Acquires (gets) type of pallet magazine.
Argument
pmType [Get] Specify variable where pallet magazine type is stored.
PMTYPE_NO_PM(0): No pallet magazine
PMTYPE_TYPE1(1): Traverser type
PMTYPE_TYPE2(2): Type without traverser
PMTYPE_TYPE3(3): Direct type
Return Value
True : Get operation succeeded.
False : Get operation failed.
BOOL mdmcinf_pm_plt(
LPWORD pmPlt)
Explanation
Acquires (gets) total number of pallets on pallet magazine.
Argument
pmPlt [Get] Specify variable where total number of pallets is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
BOOL mdmcinf_pm_pst(
LPWORD pmPst)
Explanation
Acquires (gets) total number of pallet stockers in pallet magazine.
Argument
pmPst [Get] Specify variable where total number of pallet stockers is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
BOOL mdmcinf_pm_wss(
LPWORD pmWss)
Explanation
Acquires (gets) total number of WSS units on pallet magazine.
Argument
pmWss [Get] Specify variable where total number of WSS units is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
BOOL mdmcinf_pm_get_vhc_command_data(
pmVhcCmnd_r *cmndData)
Explanation
Acquires (gets) vehicle transport command data in pallet magazine data area specified
from PC. This can only be called from Visual C++.
Argument
cmndData [Get] Specify variable where vehicle transport command data is stored.
Refer to promem.h for the data type.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
This function cannot be called from Visual Basic.
BOOL mdmcinf_pm_get_vhc_command_state(
pmVhcCmndStat_r *cmndStat)
Explanation
Acquires (gets) vehicle transport command status data from PC. This can only be called
from Visual C++.
Argument
cmndStat [Get] Specify variable where status data is stored.
Refer to promem.h for the data type.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
This function cannot be called from Visual Basic.
BOOL mdmcinf_pm_get_vhc_signal(
WORD sigType,
long *stat)
Explanation
Acquires (gets) On/Off status of vehicle transport command start signal, cancel signal
and finish signal from PC.
Argument
sigType [Set] Set type of data to be acquired.
SIGTYP_START(1): Start signal.
SIGTYP_CANCEL(2): Cancel signal.
SIGTYP_FINISH(3): Finish signal.
stat [Get] Specify variable where On/Off status is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
BOOL mdmcinf_pm_set_vhc_signal(
WORD sigType, long stat)
Explanation
Sets/Releases vehicle transport command start and cancel signals from PC.
Argument
sigType [Set] Set type of data to be acquired.
SIGTYP_START(1): Start signal.
SIGTYP_CANCEL(3): Cancel signal.
stat [Set] Specify True/False.
Return Value
True : Setting/releasing of mode succeeded.
False : Failed.
Note
When SIGTYP_FINISH is specified as the sigType, “False” comes back as the
Return Value.
BOOL mdmcinf_pm_set_vhc_command_data(
long fromTo,
long cmdType,
long palletNo,
unit_t srcUnit,
unit_t dstUnit)
Explanation
Sets the value for the vehicle transport command data in pallet magazine data area
specified from PC. This can only be called from Visual C++.
Argument
fromTo [Set] Set the From-To mode or the System mode.
0: System mode, 1: From-To mode.
cmdType [Set] Set command type.
1: Loading/unloading continuous operation.
2: Load operation.
4: Unload operation.
8: Positioning (indexing) operation.
palletNo [Set] Set pallet number.
scrUnit [Set] Set load address.
Refer to PcDef.h for the unit_t data format.
dstUnit [Set] Set unload address.
Refer to PcDef.h for the unit_t data format.
Return Value
True : Set operation succeeded.
False : Set operation failed.
Note
This function cannot be called from Visual Basic.
BOOL mdmcinf_mc_alarm_reset(
long execTime)
Explanation
Turns On the Professional 3 machine alarm reset request signal for the specified time,
enabling alarms to be reset from the PC.
Argument
execTime [Set] Set the time the alarm reset request signal is turned On [msec].
Normally, 1000msec is specified.
Return Value
True : Succeeded.
False : Failed.
BOOL mdmcinf_get_table_pltno(
LPWORD pltNo)
Explanation
Acquires (gets) the pallet number on the machine table.
Argument
pltNo [Get] Specify the variable where the pallet number is stored.
“-1” is set when the number has not been determined.
Return Value
True : Get operation succeeded.
False : Get operation failed.
BOOL mdmcinf_get_front_pltno(
LPWORD pltNo)
Explanation
Acquires (gets) the pallet number on the machine front buffer.
Argument
pltNo [Get] Specify the variable where the pallet number is stored.
“-1” is set when the number has not been determined.
Return Value
True : Get operation succeeded.
False : Get operation failed.
BOOL mdmcinf_get_back_pltno(
LPWORD pltNo)
Explanation
Acquires (gets) the pallet number on the machine discharge side stocker of the shuttle
type P/C.
Argument
pltNo [Get] Specify the variable where the pallet number is stored.
“-1” is set when the number has not been determined.
Return Value
True : Get operation succeeded.
False : Get operation failed.
BOOL mdmcinf_set_table_pltno(
WORD pltNo)
Explanation
Sets the pallet number on the machine table.
Argument
pltNo [Set] Specify the pallet number.
“-1” is set when the number has not been determined.
Return Value
True : Set operation succeeded.
False : Set operation failed.
BOOL mdmcinf_set_front_pltno(
WORD pltNo)
Explanation
Sets the pallet number on the machine front buffer.
Argument
pltNo [Set] Specify the pallet number.
“-1” is set when the number has not been determined.
Return Value
True : Set operation succeeded.
False : Set operation failed.
BOOL mdmcinf_set_back_pltno(
WORD pltNo)
Explanation
Sets the pallet number on the machine discharge side buffer of the shuttle type P/C.
Argument
pltNo [Set] Specify the pallet number.
“-1” is set when the number has not been determined.
Return Value
True : Set operation succeeded.
False : Set operation failed.
BOOL mdmcinf_system_cycle_abort(
LPBOOL success)
Explanation
Uses mdmcinf_system_cycle_start() to arbitrarily complete cycle start request (cycle
abort) to Professional 3 (reverses EOPX).
Argument
success [Get] Specify variable where True/False is stored.
When True : Cycle abort succeeded.
When False : Machining already completed (STX xor EOPX = 0).
Return Value
True : Succeeded. Refer to success argument for actual system cycle abort
operation.
False : Failed.
Note
Confirm that the CNC automatic operation status is reset before executing this
function.
BOOL mdmcinf_get_machineIF5(
LPDWORD data)
Explanation
Acquires (gets) the data in the Machine Items Table Interface 5.
Argument
date [Get] Specify the variable where the acquired data is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
“Machine Items Table Interface 5” is shared 32-bit data between the PC and
Professional 3, and is a data area that is written by the Professional 3.
BOOL mdmcinf_get_machineIF4(
LPDWORD data)
Explanation
Acquires (gets) the data in the Machine Items Table Interface 4.
Argument
date [Get] Specify the variable where the acquired data is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
“Machine Items Table Interface 4” is shared 32-bit data between the PC and
Professional 3, and is a data area that is written by the PC.
BOOL mdmcinf_refresh_custom_screen()
Explanation
Requests refreshing of custom screen from PC to Professional 3.
Argument
Return Value
True : Request succeeded.
False : Request failed.
BOOL mdmcinf_macro_read_finish()
Explanation
Notifies finishing of macro data reading from PC to Professional 3.
Argument
Return Value
True : Succeeded.
False : Failed.
Note
Reading of macro variables is normally performed by M480 in NC programs. When
M480 is executed, the macro variable read request signal from the Professional 3 to
the PC is reversed. The PC side performs reading of the macro variable according to
this signal, and this function is called upon completion.
The macro variable area that is read is set in the MOS parameter file (Mos_Param.
ini).
BOOL mdmcinf_chk_shutdown_request(
LPBOOL reqBit)
Explanation
Acquires (gets) the Professional 3 power shutdown signal.
Argument
regBit [Get] Specify variable where True/False is stored.
When True : Machine power is being shut down.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
When the PC shares the same power source as the machine, it is necessary to shut
down Windows on the PC when the power shutdown signal is On (True).
BOOL mdmcinf_set_machineIF4_bit(
DWORD bitMask,
BOOL value)
Explanation
Sets On/Off status for Machine Items Table Interface 4 specify bit.
Argument
bitMask [Set] Specify master data to set bit.
valuet [Set] Specify On/Off status.
When On (True) : Turns On all bits specified by bitMask.
When Off (False) : Turns Off all bits specified by bitMask.
Return Value
True : Set operation succeeded.
False : Set operation failed.
Note
“Machine Items Table Interface 4” is shared 32-bit data between the PC and
Professional 3, and is a data area that is written by the PC.
BOOL mdmcinf_spindle_monitor_parameter(
LPWORD dataType,
LPWORD warnLevel,
LPWORD alarmLevel,
WORD numAry,
LPWORD numLegalData)
Explanation
Acquires (gets) setting values for spindle temperature and vibration management
functions.
Argument
dataType [Get] Specify array variable where type of spindle measurement
data is stored.
SPDLMONI_NO_DATA(0): No data
SPDLMONI_CORE_BEARING1(1): Spindle core bearing temp. 1
SPDLMONI_CORE_BEARING2(2): Spindle core bearing temp. 2
SPDLMONI_HOUSING_BEARING1(3): Spindle housing bearing
temperature 1
SPDLMONI_HOUSING_BEARING2(3): Spindle housing bearing
temperature 2
SPDLMONI_MOTOR_COIL(5): Motor coil temperature
SPDLMONI_VIBRATION(6): Spindle vibration monitor
warnLevel [Get] Specify array variable where spindle measurement data
warning value [12bit measure data] is stored.
alarmLevel [Get] Specify array variable where spindle measurement data alarm
value [12bit measure data] is stored.
numAry [Set] Set array variable for array dataType, warnLevel, alarmLevel.
numLegalData [Get] Specify variable where legal (valid) spindle measurement data
values are stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
NULL can be set for arguments where the data does not need to be acquired.
When the return value is True and numAry < numLegalData, it indicates there is data
such as array dataType that could not be stored.
Even when the data type is for temperature, the value obtained with this function is
12-bit data rather than a C value. This value needs to be converted.
BOOL mdmcinf_spindle_monitor(
LPWORD dataType,
LPWORD measuredData,
WORD numAry,
LPWORD numLegalData,
LPWORD waitTime)
Explanation
Acquires (gets) measured values for spindle temperature and vibration management
functions.
Argument
dataType [Get] Specify array variable where type of spindle measurement
data is stored.
SPDLMONI_NO_DATA(0): No data
SPDLMONI_CORE_BEARING1(1): Spindle core bearing temp. 1
SPDLMONI_CORE_BEARING2(2): Spindle core bearing temp. 2
SPDLMONI_HOUSING_BEARING1(3): Spindle housing bearing
temperature 1
SPDLMONI_HOUSING_BEARING2(3): Spindle housing bearing
temperature 2
SPDLMONI_MOTOR_COIL(5): Motor coil temperature
SPDLMONI_VIBRATION(6): Spindle vibration monitor
measuredData [Get] Specify array variable where spindle measurement data [12bit
measure data] is stored.
numAry [Set] Specify variable where array variable for array dataType,
warnLevel, alarmLevel is stored.
numLegalData [Get] Specify variable where legal (valid) spindle measurement data
values are stored.
waitTime [Get] Specify variable where the time [sec] to wait until the spindle
can be rotated is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
NULL can be set for arguments where the data does not need to be acquired.
When the return value is True and numAry < numLegalData, it indicates there is data
such as array dataType that could not be stored.
Even when the data type is for temperature, the value obtained with this function is
12-bit data rather than a C value. This value needs to be converted.
long mdmcinf_check_eachmcelm_type()
Explanation
Acquires (gets) type of EACH MACHINE ELEMENT data in Machine ItemsTable.
Argument
None
Return Value
The type of EACH MACHINE ELEMENT data is returned. For details, refer to
“EACH_MCELM_?????” in ProDef.h.
BOOL mdmcinf_get_magapc_power_status(
LPBOOL powerStt)
Explanation
Acquires (gets) the power source status for the pallet changer when the machine is an
independent MAG.
Argument
powerStt [Get] Stores the power source status.
True : Power is ON.
False : Power is OFF.
Return Value
True : Get operation succeeded.
False : Get operation failed.
BOOL mdmcinf_chk_magapc_poweron_request( )
Explanation
Checks whether or not power On request has been set for the pallet changer when the
machine is an independent MAG.
Argument
flg [Get] Power On request status is stored.
True : Request has been issued.
False : No request has been issued.
Return Value
True : Get operation succeeded.
False : Get operation failed.
BOOL mdmcinf_set_magapc_poweron( )
Explanation
Issues power On request has been set for the pallet changer when the machine is an
independent MAG.
Argument
None
Return Value
True : Get operation succeeded.
False : Get operation failed.
BOOL mdmcinf_chg_magapc_manual_intervention( )
Explanation
Issues request to change the pallet changer manual intervention mode when the
machine is an independent MAG.
Argument
None
Return Value
True : Get operation succeeded.
False : Get operation failed.
BOOL mdminf_spindle_monitor_all(
LPWORD dataType,
LPWORD measuredData,
LPWORD warnLevel,
LPWORD alarmLevel,
WORD numAry,
LPWORD numLegalData,
LPWORD waitTime)
Explanation
Acquires (gets) all setting values/measured values for spindle temperature management
and vibration management functions.
Argument
dataType [Get] Specify array variable where type of spindle measurement
data is stored.
SPDLMONI_NO_DATA(0): No data
SPDLMONI_CORE_BEARING1(1): Spindle core bearing temp. 1
SPDLMONI_CORE_BEARING2(2): Spindle core bearing temp. 2
SPDLMONI_HOUSING_BEARING1(3): Spindle housing bearing
temperature 1
SPDLMONI_HOUSING_BEARING2(3): Spindle housing bearing
temperature 2
SPDLMONI_MOTOR_COIL(5): Motor coil temperature
SPDLMONI_VIBRATION(6): Spindle vibration monitor
measuredData [Get] Specify array variable where spindle measurement data [12bit
measure data] is stored.
warnLevel [Get] Specify array variable where spindle measurement data
warning value [12bit measure data] is stored.
alarmLevel [Get] Specify array variable where spindle measurement data alarm
value [12bit measure data] is stored.
numAry [Set] Set array variable for array dataType, warnLevel, alarmLevel.
numLegalData [Get] Specify variable where legal (valid) spindle measurement data
values are stored.
waitTime [Get] Specify variable where the time [sec] to wait until the spindle
can be rotated is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
NULL can be set for arguments where the data does not need to be acquired.
When the return value is True and numAry < numLegalData, it indicates there is data
such as array dataType that could not be stored.
Even when the data type is for temperature, the value obtained with this function is
12-bit data rather than a C value. This value needs to be converted.
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%.
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%.
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.
long mdtldt_GetLastMError ()
Explanation
Returns the last error number that occurred with a mdtldt.dll function.
Return Value
0: Last mdtldt.dll function called finished normally.
Other than 0: Error number.
Note
When the function executed after the error occurred finished normally, this function
returns “0”.
long mdtldt_GetLastFError ()
Explanation
Returns the last Fanuc Library error number that occurred with a mdtldt.dll function.
Return Value
0: Last mdtldt.dll Fanuc Library function called finished normally.
Other than 0: Error number.
Note
When the function executed after the error occurred finished normally, this function
returns “0”.
BOOL mdtldt_toollife_info(
short *lifeType,
short *countType,
BOOL *alarmReset)
Explanation
Acquires (gets) the Professional 3 tool life management type.
Argument
lifeType [Get] Specify the variable where the tool life management type is
stored.
TLTYPE_SEC(0): Cutting time [sec]
TLTYPE_DISTANCE(1): Cutting distance [m] or [inch]
TLTYPE_COUNT(2): Machining quantity
TLTYPE_01SEC(3): Cutting time in 0.1 sec. units
countType [Get] Specify the variable where the tool life counting method is stored.
TLCNT_TYPE_ACCUMULATE(0): Cumulative life method
TLCNT_TYPE_REMAIN(1): Remaining life method
alarmReset [Get] Specify the variable where the setting method is stored for the
remaining life when a tool life (TL) alarm is reset.
True: Resets remaining life to life value.
False: Does not change remaining life.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
When NULL is set for the argument, the value is not acquired.
BOOL mdtldt_tool_info(
short *unit,
short *ftn,
short *itn,
short *ptn)
Explanation
Acquires (gets) Professional 3 tool management function parameters.
Argument
unit [Get] Specify variable where tool length/diameter unit (inches/mm) is
stored.
MM_UNIT (0): Millimeters
INCH_UNIT (1): Inches
ftn [Get] Specify variable where FTN (Functional tool No.) digits are stored.
itn [Get] Specify variable where ITN (Individual tool No.) digits are stored.
ptn [Get] Specify variable where PTN (Tool No.=T No.) digits are stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
When NULL is set for the argument, the value is not acquired.
BOOL mdtldt_max_pot(
LPWORD numPot)
Explanation
Acquires (gets) ATC magazine pot size.
Argument
numPot [Get] Specify variable where ATC magazine size (No. of pots) is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
BOOL mdtldt_chk_value(
short item,
long value,
BOOL *suitable)
Explanation
Checks whether or not entered value is valid for specified tool data item.
Argument
item [Set] Specify the constant indicating the tool data item to be checked.
Refer to mdtldt_get_common_item() for the constants.
value [Set] Specify the value to be checked.
suitable [Get] Specify the variable where the legal/illegal status is stored.
True: Legal (valid) value / False: Illegal (invalid) value
Return Value
True : Get operation succeeded.
False : Get operation failed.
BOOL mdtldt_get_common_item(
WORD pot,
short item,
long *value)
Explanation
Acquires (gets) the values for the specified pot number and tool data item.
Argument
pot [Set] Specify the pot number to be acquired.
item [Set] Specify the tool data item to be acquired.
TD_PTN(1): Tool number (T number)
TD_ITN(2): ITN (Individual tool number)
TD_TL(3): Tool life [sec], [mm], [count]
TD_REMAIN(4): Remaining or cumulative life value [sec], [mm],
[count]
TD_LEN(5): Tool length compensation value [1/1000mm] or
[1/10000inch]
TD_DIA(6): Tool diameter compensation value [1/1000mm] or
[1/10000inch]
TD_FTN(7): FTN (Functional tool number)
TD_TYPE(8): Tool type
TD_ALM(9): Tool alarm
TD_AC(10): AC monitor spindle load value [0.1A]
TD_SL(11): SL monitor spindle load value [0.1A]
value [Get] Specify the variable where the acquired data is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
The units acquired with this function for tool life (TD_TL) and remaining tool life
(TD_REMAIN) differ from the display units on the tool data screen as indicated below.
The tool life type can be acquired with mdtldt_toollife_info().
Tool Life Type Acquired Unit Display Unit
Cutting time (TLTYPE_SEC) [sec] [min]
Cutting distance (TLTYPE_DISTANCE) [mm] [m] or [inch]
Cutting time (0.1 sec. units) [0.1sec] [min]
(TLTYPE_01SEC)
The total number of tool alarms is stored under (TD_ALM). The acquired value can
be separated with mdtldt_split_common_alarm().
BOOL mdtldt_set_common_item(
WORD pot,
short item,
long data)
Explanation
Sets the value for the specified pot number and tool data item.
Argument
pot [Set] Specify the pot number to be set.
item [Set] Specify the tool data item to be set. For the constant, refer to
mdtldt_get_common_item().
value [Set] Specify the value to be set.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
The units acquired with this function for tool life (TD_TL) and remaining tool life
(TD_REMAIN) differ from the display units on the tool data screen as indicated below.
The tool life type can be acquired with mdtldt_toollife_info().
Tool Life Type Acquired Unit Display Unit
Cutting time (TLTYPE_SEC) [sec] [min]
Cutting distance (TLTYPE_DISTANCE) [mm] [m] or [inch]
Cutting time (0.1 sec. units) [0.1sec] [min]
(TLTYPE_01SEC)
The total number of tool alarms is stored under (TD_ALM). The acquired value can
be separated with mdtldt_split_common_alarm().
BOOL mdtldt_get_common(
WORD fromPot,
WORD toPot,
LPDWORD ptn,
LPDWORD ftn,
LPDWORD itn,
LPDWORD tl,
LPDWORD remain,
LPLONG len,
LPLONG dia,
LPWORD type,
LPWORD alm,
LPWORD ac,
LPWORD sl)
Explanation
Acquires (gets) all data for the specified pot numbers.
Argument
fromPot [Set] Specify the pot number of the lower (from) tool to be acquired.
toPot [Set] Specify the pot number of the upper (to) tool to be acquired.
ptn [Get] Specify the array variable where the T number (PTN) is stored.
ftn [Get] Specify the array variable where the FTN is stored.
itn [Get] Specify the array variable where the ITN is stored.
tl [Get] Specify the array variable where the tool life value [sec], [mm],
[count] is stored.
remain [Get] Specify the array variable where the remaining or cumulative tool life
value [sec], [mm], [count] is stored.
len [Get] Specify the array variable where the tool length compensation value
[1/1000mm], [1/10000inch] is stored.
dia [Get] Specify the array variable where the tool diameter compensation
value [1/1000mm], [1/10000inch] is stored.
type [Get] Specify the array variable where the tool type number is stored.
alarm [Get] Specify the array variable where the tool alarm status is stored.
ac [Get] Specify the array variable where the AC monitor spindle load value
[0.1A] is stored.
sl [Get] Specify the array variable where the SL monitor spindle load value
[0.1A] is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
Set NULL for any argument where the data is not required.
The total number of alarms is stored under tool alarm status. The acquired value can
be separated with mdtldt_split_common_alarm().
BOOL mdtldt_set_common(
WORD fromPot,
WORD toPot,
LPDWORD ptn,
LPDWORD ftn,
LPDWORD itn,
LPDWORD tl,
LPDWORD remain,
LPDWORD len,
LPDWORD dia,
LPWORD type,
LPWORD alm,
LPWORD ac,
LPWORD sl)
Explanation
Sets all data for the specified pot numbers.
Argument
fromPot [Set] Specify the pot number of the lower (from) tool to be set.
toPot [Set] Specify the pot number of the upper (to) tool to be set.
ptn [Set] Specify the array variable where the T number (PTN) is stored.
ftn [Set] Specify the array variable where the FTN is stored.
itn [Set] Specify the array variable where the ITN is stored.
tl [Set] Specify the array variable where the tool life value [sec], [mm],
[count] is stored.
remain [Set] Specify the array variable where the remaining or cumulative tool life
value [sec], [mm], [count] is stored.
len [Set] Specify the array variable where the tool length compensation value
[1/1000mm], [1/10000inch] is stored.
dia [Set] Specify the array variable where the tool diameter compensation
value [1/1000mm], [1/10000inch] is stored.
type [Set] Specify the array variable where the tool type number is stored.
alarm [Set] Specify the array variable where the tool alarm status is stored.
ac [Set] Specify the array variable where the AC monitor spindle load value
[0.1A] is stored.
sl [Set] Specify the array variable where the SL monitor spindle load value
[0.1A] is stored.
Return Value
True : Set operation succeeded.
False : Set operation failed.
Note
The total number of tool alarms obtained with mdtldt_make_common_alarm() is
displayed under the tool alarm status.
BOOL mdtldt_split_common_alarm(
WORD almData,
BOOL *bts2,
BOOL *bts,
BOOL *ac,
BOOL *sl,
BOOL *tl)
Explanation
Splits tool alarm data acquired with mdtldt_get_common_item(), mdtldt_get_common()
into respective types of tool alarms.
Argument
almData [Set] Specify the bit field data (total of respective types of tool alarms) for
the tool alarm data.
bts2 [Get] True : BTS2 (tool broken long detection) alarm occurred.
bts [Get] True : BTS (tool broken) alarm occurred.
ac [Get] True : AC monitor alarm occurred.
sl [Get] True : SL monitor alarm occurred.
tl [Get] True : TL (tool life) alarm occurred.
Return Value
True : Succeeded.
False : Failed.
BOOL mdtldt_make_common_alarm(
BOOL bts2,
BOOL bts,
BOOL ac,
BOOL sl,
BOOL tl,
LPWORD almData)
Explanation
Converts tool alarm data got with mdtldt_set_common_item(), mdtldt_set_common() into
respective types of tool alarms.
Argument
bts2 [Set] True : BTS2 (tool broken long detection) alarm occurred.
bts [Set] True : BTS (tool broken) alarm occurred.
ac [Set] True : AC monitor alarm occurred.
sl [Set] True : SL monitor alarm occurred.
tl [Set] True : TL (tool life) alarm occurred.
almData [Get] Specify variable where the bit field data (total of respective types of
tool alarms) for the tool alarm data is stored.
Return Value
True : Convert operation succeeded.
False : Convert operation failed.
BOOL mdtldt_get_mmc(
WORD fromPot,
WORD toPot,
LPSTR *toolType,
LPWORD status,
LPWORD size)
Explanation
Acquires (gets) module MMC tool data items. This function is only valid with Visual C++.
Argument
fromPot [Set] Specify the pot number of the lower (from) tool to be acquired.
toPot [Set] Specify the pot number of the upper (to) tool to be acquired.
toolType [Get] Specify the array variable where the Tool Type is stored.
status [Get] Specify the array variable where the Tool Status is stored.
size [Get] Specify the array variable where the Tool size (Class) is stored.
(TOOLCLS_STD(1) / TOOLCLS_MID(2) / TOOLCLS_LARGE(3) /
TOOLCLS_EXTRA(4) / TOOLCLS_FIXED(5) / TOOLCLS_EMP(8))
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
When NULL is set for the argument, the value is not acquired.
This function cannot be called from Visual Basic.
BOOL mdtldt_get_mmc_vb(
WORD fromPot,
WORD toPot,
LPSTR *toolType,
LPWORD status,
LPWORD size)
Explanation
Acquires (gets) module MMC tool data items. This function is only valid with Visual Basic.
Argument
fromPot [Set] Specify the pot number of the lower (from) tool to be acquired.
toPot [Set] Specify the pot number of the upper (to) tool to be acquired.
toolType [Get] Specify the array variable where the Tool Type is stored.
status [Get] Specify the array variable where the Tool Status is stored.
size [Get] Specify the array variable where the Tool size (Class) is stored.
(TOOLCLS_STD(1) / TOOLCLS_MID(2) / TOOLCLS_LARGE(3) /
TOOLCLS_EXTRA(4) / TOOLCLS_FIXED(5) / TOOLCLS_EMP(8))
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
When NULL is set for the argument, the value is not acquired.
This function cannot be called from Visual C++.
BOOL mdtldt_set_mmc(
WORD fromPot,
WORD toPot,
LPSTR *toolType,
LPWORD status,
LPWORD size)
Explanation
Sets module MMC tool data items. This function is only valid with Visual C++.
Argument
fromPot [Set] Specify the pot number of the lower (from) tool to be set.
toPot [Set] Specify the pot number of the upper (to) tool to be set.
toolType [Set] Specify the array variable where the Tool Type is stored.
status [Set] Specify the array variable where the Tool Status is stored.
size [Set] Specify the array variable where the Tool size (Class) is stored.
(TOOLCLS_STD(1) / TOOLCLS_MID(2) / TOOLCLS_LARGE(3) /
TOOLCLS_EXTRA(4) / TOOLCLS_FIXED(5) / TOOLCLS_EMP(8))
Return Value
True : Set operation succeeded.
False : Set operation failed.
Note
This function cannot be called from Visual Basic.
BOOL mdtldt_set_mmc_vb(
WORD fromPot,
WORD toPot,
VARIANT *toolType,
LPWORD status,
LPWORD size)
Explanation
Sets module MMC tool data items. This function is only valid with Visual Basic.
Argument
fromPot [Set] Specify the pot number of the lower (from) tool to be set.
toPot [Set] Specify the pot number of the upper (to) tool to be set.
toolType [Set] Specify the array variable where the Tool Type is stored.
status [Set] Specify the array variable where the Tool Status is stored.
size [Set] Specify the array variable where the Tool size (Class) is stored.
(TOOLCLS_STD(1) / TOOLCLS_MID(2) / TOOLCLS_LARGE(3) /
TOOLCLS_EXTRA(4) / TOOLCLS_FIXED(5) / TOOLCLS_EMP(8))
Return Value
True : Set operation succeeded.
False : Set operation failed.
Note
This function cannot be called from Visual C++.
BOOL mdtldt_split_mmctype(
WORD bitField,
BOOL *firstUse,
BOOL *opeCall,
BOOL *alarm,
BOOL *notUse,
BOOL *almDisable,
BOOL *Weight,
BOOL *thruCoolant)
Explanation
Separates tool data acquired with mdtldt_get_mmc() 、 mdtldt_get_mmc_vb() into
respective MMC Tool Type items.
Argument
bitField [Set] Specify the Tool Type.
firstUse [Get] True : First use flag is On.
opeCall [Get] True : Operator tool flag is On.
alarm [Get] True : Alarm tool flag is On.
notUse [Get] True : Use prohibit flag is On.
almDisable [Get] True : Use enable flag during TL alarm is On.
Weight [Get] True : Lightweight tool flag is On.
thruCoolant [Get] True : Through-spindle coolant tool flag is On.
Return Value
True : Succeeded.
False : Failed.
BOOL mdtldt_make_mmctype(
BOOL firstUse,
BOOL opeCall,
BOOL alarm,
BOOL notUse,
BOOL almDisable,
BOOL Weight,
BOOL thruCoolant,
LPWORD bitField)
Explanation
Converts respective MMC tool type bit data into tool type data that can be used with
mdtldt_set_mmc().
Argument
firstUse [Set] True : First use flag is On.
opeCall [Set] True : Operator tool flag is On.
alarm [Set] True : Alarm tool flag is On.
notUse [Set] True : Use prohibit flag is On.
almDisable [Set] True : Use enable flag during TL alarm is On.
Weight [Set] True : Lightweight tool flag is On.
thruCoolant [Set] True : Through-spindle coolant tool flag is On.
bitField [Get] Specify the variable where the Tool Type is stored.
Return Value
True : Convert operation succeeded.
False : Convert operation failed.
BOOL mdtldt_get_bts(
WORD fromPot,
WORD toPot,
BOOL *btsOn,
LPWORD firstTime,
LPWORD secondTime)
Explanation
Acquires (gets) ATC side BTS tool data.
Argument
fromPot [Set] Specify the pot number of the lower (from) tool to be acquired.
toPot [Set] Specify the pot number of the upper (to) tool to be acquired.
btsOn [Get] Specify the array variable where the valid/invalid (On/Off) setting
for the broken tool sensor is stored.
firstTime [Get] Specify the array variable where the measuring time [msec]
before machining for the broken tool sensor is stored.
secondTime [Get] Specify the array variable where the measuring time [msec] after
machining for the broken tool sensor is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
When a get operation argument is not needed, set NULL for the argument.
The array variable elements for the get operation should be equal to or more than
(toPot-fromPot+1).
This function can only be used when the mdtldt_optional_tldt_define() bts Data
argument is True.
BOOL mdtldt_set_bts(
WORD fromPot,
WORD toPot,
LPBOOL btsOn,
LPWORD firstTime,
LPWORD secondTime)
Explanation
Sets ATC side BTS tool data.
Argument
fromPot [Set] Specify the pot number of the lower (from) tool to be set.
toPot [Set] Specify the pot number of the upper (to) tool to be set.
btsOn [Set] Specify the array variable where the valid/invalid (On/Off) setting
for the broken tool sensor is stored.
firstTime [Set] Specify the array variable where the measuring time [msec]
before machining for the broken tool sensor is stored.
secondTime [Set] Specify the array variable where the measuring time [msec] after
machining for the broken tool sensor is stored.
Return Value
True : Set operation succeeded.
False : Set operation failed.
Note
The array variable elements for the set operation should be equal to or more than
(toPot-fromPot+1).
This function can only be used when the mdtldt_optional_tldt_define() bts Data
argument is True.
BOOL mdtldt_get_air(
WORD fromPot,
WORD toPot,
LPWORD time)
Explanation
Acquires (gets) the through-spindle coolant air purge time setting (tool data).
Argument
fromPot [Set] Specify the pot number of the lower (from) tool to be acquired.
toPot [Set] Specify the pot number of the upper (to) tool to be acquired.
time [Get] Array variable where the through-spindle coolant air purge time
[msec] is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
The array variable elements for the time argument should be equal to or more than
(toPot-fromPot+1).
This function can only be used when the mdtldt_optional_tldt_define() bts Data
argument is True.
BOOL mdtldt_set_air(
WORD fromPot,
WORD toPot,
LPWORD time)
Explanation
Sets the through-spindle coolant air purge time (tool data).
Argument
fromPot [Set] Specify the pot number of the lower (from) tool to be set.
toPot [Set] Specify the pot number of the upper (to) tool to be set.
time [Set] Array variable where the through-spindle coolant air purge time
[msec] is stored.
Return Value
True : Set operation succeeded.
False : Set operation failed.
Note
The array variable elements for the time argument should be equal to or more than
(toPot-fromPot+1).
This function can only be used when the mdtldt_optional_tldt_define() air Data
argument is True.
BOOL mdtldt_get_slow(
WORD fromPot,
WORD toPot,
LPDWORD slowTool)
Explanation
Acquires (gets) the slow ATC valid/invalid tool data.
Argument
fromPot [Set] Specify the pot number of the lower (from) tool to be acquired.
toPot [Set] Specify the pot number of the upper (to) tool to be acquired.
slowTool [Get] Array variable where the slow ATC valid/invalid status is stored.
True : Valid / False : Invalid
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
The array variable elements for the slowTool argument should be equal to or more
than (toPot-fromPot+1).
This function can only be used when the mdtldt_optional_tldt_define() air Data
argument is True.
BOOL mdtldt_set_slow(
WORD fromPot,
WORD toPot,
LPDWORD slowTool)
Explanation
Sets the slow ATC valid/invalid tool data.
Argument
fromPot [Set] Specify the pot number of the lower (from) tool to be set.
toPot [Set] Specify the pot number of the upper (to) tool to be set.
slowTool [Set] Array variable where the slow ATC valid/invalid status is stored.
True : Valid / False : Invalid
Return Value
True : Set operation succeeded.
False : Set operation failed.
Note
The array variable elements for the slowTool argument should be equal to or more
than (toPot-fromPot+1).
This function can only be used when the mdtldt_optional_tldt_define() air Data
argument is True.
BOOL mdtldt_optional_tldt_define(
LPBOOL cmn2Data,
LPBOOL btsData,
LPBOOL airData,
LPDWORD slowData,
LPBOOL btsLenData)
Explanation
Tool data items are added depending on the machine specifications and options. This
function acquires (gets) whether or not these items (optional tool data) exist.
Argument
cmn2Data [Get] TRUE : Tool data items used with MMC can be used.
btsData [Get] TRUE : Tool data items used with ATC side BTS can be used.
airData [Get] TRUE : Through-spindle coolant air purge time data can be used.
slowData [Get] Slow ATC data can be used.
btsLenData [Get] Broken tool sensor actual measured value data can be used.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
When NULL is set for the argument, the value is not acquired.
BOOL mdtldt_next_tool(
LPWORD pot,
LPDWORD ftn,
LPDWORD itn,
LPDWORD ptn)
Explanation
Acquires (gets) next tool pot number, FTN, ITN and PTN.
Argument
pot [Get] Variable where next tool pot number is stored. This is “0” when there
is no tool.
ftn [Get] Variable where next tool FTN is stored. This is “0” when there is no
tool.
bitn [Get] Variable where next tool ITN stored. This is “0” when there is no tool.
ptn [Get] Variable where next tool PTN is stored. This is “0” when there is no
tool.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
When NULL is set for the argument, the value is not acquired.
BOOL mdtldt_get_bts_length(
WORD fromPot,
WORD toPot,
LPLONG length)
Explanation
Acquires (gets) broken tool sensor actual measured length (tool data).
Argument
fromPot [Set] Specify the pot number of the lower (from) tool to be acquired.
toPot [Set] Specify the pot number of the upper (to) tool to be acquired.
length [Get] Array variable where the broken tool sensor actual measured length
[mm] is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
The array variable elements for the length argument should be equal to or more than
(toPot-fromPot+1).
This function can only be used when the mdtldt_optional_tldt_define() btsLenData
argument is True.
BOOL mdtldt_set_bts_length(
WORD fromPot,
WORD toPot,
LPLONG length)
Explanation
Sets broken tool sensor actual measured length (tool data).
Argument
fromPot [Set] Specify the pot number of the lower (from) tool to be set.
toPot [Set] Specify the pot number of the upper (to) tool to be set.
length [Set] Array variable where the broken tool sensor actual measured length
[mm] is stored.
Return Value
True : Set operation succeeded.
False : Set operation failed.
Note
The array variable elements for the length argument should be equal to or more than
(toPot-fromPot+1).
This function can only be used when the mdtldt_optional_tldt_define() btsLenData
argument is True.
BOOL mdtldt_tls_potno(
LPWORD pot)
Explanation
Acquires (gets) tool pot number indexed to tool loading station (TLS).
Argument
pot [Get] Specify variable where tool pot number indexed to TLS is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
BOOL mdtldt_set_toolin_accept(
BOOL onOff,
BYTE status,
WORD potNo)
Explanation
Sets On/Off status for Professional 3 side tool in request response data (TIA).
Argument
onOff [Set] Set On/Off status for tool in request response data (TIA).
status [Set] Set status data for tool in request response data (TIA).
potNo [Set] Set pot number of tool to be input.
Return Value
True : Set operation succeeded.
False : Set operation failed.
BOOL mdtldt_set_toolout_accept(
BOOL onOff,
BYTE status,
WORD potNo)
Explanation
Sets On/Off status for Professional 3 side tool out request response data (TOA).
Argument
onOff [Set] Set On/Off status for tool out request response data (TOA).
status [Set] Set status data for tool out request response data (TOA).
potNo [Set] Set pot number of tool to be output.
Return Value
True : Set operation succeeded.
False : Set operation failed.
BOOL mdtldt_get_toolin_accept(
LPBOOL onOff,
LPBYTE status,
LPWORD potNo)
Explanation
Acquires (gets) Professional 3 side tool in request response data (TIA).
Argument
onOff [Get] Variable where On/Off status for tool in request response data (TIA)
is stored.
status [Get] Variable where status data for tool in request response data (TIA) is
stored.
potNo [Get] Variable where pot number of tool to be input is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
BOOL mdtldt_get_toolout_accept(
LPBOOL onOff,
LPBYTE status,
LPWORD potNo)
Explanation
Acquires (gets) Professional 3 side tool out request response data (TOA).
Argument
onOff [Get] Variable where On/Off status for tool out request response data
(TOA) is stored.
status [Get] Variable where status data for tool out request response data (TOA)
is stored.
potNo [Get] Variable where pot number of tool to be output is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
BOOL mdtldt_chk_toolin(
LPBOOL request,
LPBOOL finish,
LPBYTE status)
Explanation
Acquires (gets) Professional 3 side setting data for interface between PC and Pro 3
related to tool in operation.
Argument
request [Get] Variable where tool in request signal (TIR) is stored.
finish [Get] Variable where tool in finish signal (TIF) is stored.
status [Get] Variable where tool in finish status data is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
BOOL mdtldt_chk_toolout(
LPBOOL request,
LPBOOL finish,
LPBYTE status)
Explanation
Acquires (gets) Professional 3 side setting data for interface between PC and Pro 3
related to tool out operation.
Argument
request [Get] Variable where tool out request signal (TOR) is stored.
finish [Get] Variable where tool out finish signal (TOF) is stored.
status [Get] Variable where tool out finish status data is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
BOOL mdtldt_get_toolid_data(
toolIdData_r *data)
Explanation
Acquires (gets) data ready by Professional 3 when tool input is performed. This function
can only be used with Visual C++.
Argument
data [Set] Specify variable where data read from ID chip is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
Refer to ProMem.h for toolIdData_r type data argument.
This function cannot be called from Visual Basic.
BOOL mdtldt_get_toolid_data_vb(
toolIdDataVB_r *data)
Explanation
Acquires (gets) data read by Professional 3 from ID chip during tool input/output. This
function is only valid in Visual Basic.
Argument
data [Set] Specify variable where data read from ID chip is stored. ID
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
Refer to ProMem.h for toolIdData_r type data argument.
This function cannot be called from Visual C++.
long mdwkdt_GetLastMError ()
Explanation
Returns last error number that occurred for function within mdwkdt.dll.
Return Value
0: Last mdwkdt.dll function called finished normally.
Other than 0: Error number.
Note
When the function executed after the error occurred finished normally, this function
returns “0”.
long mdwkdt_GetLastFError ()
Explanation
Returns last Fanuc Library error number that occurred for function within mdwkdt.dll.
Return Value
0: Last Fanuc Library function called finished normally.
Other than 0: Error number.
Note
When the function executed after the error occurred finished normally, this function
returns “0”.
BOOL mdwkdt_set_node(
long node)
Explanation
Acquires (gets) the FOCAS1 Library Handle in order to use the FOCAS1 function within
mdwkdt.dll. The acquired library handle is stored/used within mdwkdt.dll.
Therefore, execute this function once after communication is established between the
CNC and PC.
Argument
node [Set] Specify the node number set in the MOS parameters.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
The node number data must be set in the MOS parameters in order to execute this
function. Refer to 3. MOS Parameters for the setting procedure.
BOOL mdwkdt_chk_value(
WORD item,
long value,
LPBOOL suitable)
Explanation
Checks whether or not input value is within allowable range for each data item.
Argument
item [Set] Specify the constant indicating the work data item to be checked.
Refer to ProDef.h for (WD_OFFSET(1) – WD_AUX3(25))
value [Set] Input value (Cast in LONG)
suitable [Get] True (within value range)
False (value for specified item cannot be used)
Return Value
True : Check operation succeeded.
False : Check operation failed.
Note
Some work data items are expressed in WORD, but make sure to cast in LONG with
this function.
The WD_RUNTIME and WD_AUTOTIME are displayed in minutes on the custom
screen of the Professional 3, but with this DLL, data is accessed in second units.
BOOL mdwkdt_get_item(
WORD pltNo,
WORD faceNo,
WORD item,
LPLONG value)
Explanation
Acquires (gets) specified work data item (other than comment) values for specified pallet
face.
Argument
pltNo [Set] Set the pallet number.
faceNo [Set] Specify the face number for the specified pallet.
item [Set] Specify the constant that indicates the work data item.
WD_OFFSET_X (2) X axis offset value
WD_OFFSET_Y (3) Y axis offset value
WD_OFFSET_Z (4) Z axis offset value
WD_ALMPTN (5) Tool No. when alarm occurred
WD_ALMNO (6) Alarm number
WD_STAMON (7) Month machining started
WD_STADAY (8) Day machining started
WD_STAHOUR (9) Hour machining started
WD_STAMIN (10) Minute machining started
WD_ENDMON (11) Month machining ended
WD_ENDDAY (12) Day machining ended
WD_ENDHOUR (13) Hour machining ended
WD_ENDMIN (14) Minute machining ended
WD_RUNTIME (15) Machining time [sec]
WD_AUTOTIME (16) Spindle rotation time [sec]
WD_ALM_O (18) O number when alarm occurred
WD_PROGNO (19) NC program number
WD_ALMFLG (20) Alarm status
WD_RDYFLG (21) Ready status
WD_BKSKIP (22) Optional block skip
WD_ENDFLG (23) Machining end flag
(Only for pallet magazine)
value [Get] Specify variable where acquired data is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
The work offset value is expressed in the minimum setting unit. For example, when
the X axis offset value is 999.999, the value for the x_axis is 999999.
The machining time (WD_RUNTIME) and spindle rotating time (WD_AUTOTIME)
are displayed in minutes [min] on the work data screen, but the unit for this function
is seconds [sec].
BOOL mdwkdt_get_offset(
WORD pltNo,
WORD faceNo,
LPLONG x_axis,
LPLONG y_axis,
LPLONG z_axis)
Explanation
Acquires (gets) workpiece offset value from specified pallet face.
Argument
pltNo [Set] Set the pallet number.
faceNo [Set] Specify the face number for the specified pallet.
x_axis [Get] Specify the variable where the X axis offset value is stored.
y_axis [Get] Specify the variable where the Y axis offset value is stored.
z_axis [Get] Specify the variable where the Z axis offset value is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
The acquired work offset value is expressed in the minimum setting unit. For
example, when the X axis offset value is 999.999, the value for the x_axis is 999999.
Set NULL for the argument for any data items that are not needed.
BOOL mdwkdt_get_start_date(
WORD pltNo,
WORD faceNo,
LPWORD startMonth,
LPWORD startDay,
LPWORD startHour,
LPWORD startMinute)
Explanation
Acquires (gets) the date/time machining started for the specified pallet face.
Argument
pltNo [Set] Set the pallet number.
faceNo [Set] Specify the face number for the specified pallet.
startMonth [Get] Specify the variable where the machining start month is stored.
startDay [Get] Specify the variable where the machining start day is stored.
startHour [Get] Specify the variable where the machining start hour is stored.
startMinute [Get] Specify the variable where the machining start minute is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
Set NULL for the argument for any data items that are not needed.
BOOL mdwkdt_get_finish_date(
WORD pltNo,
WORD faceNo,
LPWORD endMonth,
LPWORD endDay,
LPWORD endHour,
LPWORD endMinute)
Explanation
Acquires (gets) the date/time machining ended (M30 executed) for the specified pallet
face.
Argument
pltNo [Set] Set the pallet number.
faceNo [Set] Specify the face number for the specified pallet.
endMonth [Get] Specify the variable where the machining end month is stored.
endDay [Get] Specify the variable where the machining end day is stored.
endHour [Get] Specify the variable where the machining end hour is stored.
endMinute [Get] Specify the variable where the machining end minute is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
Set NULL for the argument for any data items that are not needed.
BOOL mdwkdt_get_comment(
WORD pltNo,
WORD faceNo,
LPSTR cmt)
Explanation
Acquires the comment for the specified pallet face. This function is only valid in Visual
C++.
Argument
pltNo [Set] Set the pallet number.
faceNo [Set] Specify the face number for the specified pallet.
cmt [Get] Specify the variable where the comment character string is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
A number of bytes equal to or more than WKDT_CMT_S is required for the cmt
argument.
This function cannot be called from Visual Basic.
BOOL mdwkdt_get_comment_vb(
WORD pltNo,
WORD faceNo,
BSTR *cmt)
Explanation
Acquires the comment for the specified pallet face. This function is only valid in Visual
Basic.
Argument
pltNo [Set] Set the pallet number.
faceNo [Set] Specify the face number for the specified pallet.
cmt [Get] Specify the variable where the comment character string is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
A number of bytes equal to or more than WKDT_CMT_S is required for the cmt
argument.
This function cannot be called from Visual C++.
BOOL mdwkdt_get_all(
WORD pltNo,
WORD faceNo,
LPLONG workOffset,
LPDWORD almPtn,
LPDWORD almNo,
LPWORD startMonth,
LPWORD startDay,
LPWORD startHour,
LPWORD startMinute,
LPWORD endMonth,
LPWORD endDay,
LPWORD endHour,
LPWORD endMinute,
LPDWORD runTime,
LPDWORD autoTime,
LPSTR cmt,
LPDWORD alarm_o,
LPDWORD programNo,
LPDWORD alarmFlg,
LPWORD readyFlg,
LPWORD blockSkip,
LPWORD endFlg)
Explanation
Acquires (gets) all work data items for the specified pallet face. This function is only valid
in Visual C++.
Argument
pltNo [Set] Set the pallet number.
faceNo [Set] Specify the face number for the specified pallet.
workOffset [Get] Specify the array variable where the workpiece offset value for
each axis is stored.
almPtn [Get] Specify the variable where the alarm tool number is stored.
almNo [Get] Specify the variable where the MC alarm number is stored.
startMonth [Get] Specify the variable where the machining start month is stored.
startDay [Get] Specify the variable where the machining start day is stored.
startHour [Get] Specify the variable where the machining start hour is stored.
startMinute [Get] Specify the variable where the machining start minute is stored.
endMonth [Get] Specify the variable where the machining end month is stored.
endDay [Get] Specify the variable where the machining end day is stored.
endHour [Get] Specify the variable where the machining end hour is stored.
endMinute [Get] Specify the variable where the machining end minute is stored.
runTime [Get] Specify the variable where the machining time [min] is stored.
autoTime [Get] Specify the variable where the spindle rotation time [min] is
stored.
BOOL mdwkdt_get_all_vb(
WORD pltNo,
WORD faceNo,
LPLONG workOffset,
LPDWORD almPtn,
LPDWORD almNo,
LPWORD startMonth,
LPWORD startDay,
LPWORD startHour,
LPWORD startMinute,
LPWORD endMonth,
LPWORD endDay,
LPWORD endHour,
LPWORD endMinute,
LPDWORD runTime,
LPDWORD autoTime,
BSTR *cmt,
LPDWORD alarm_o,
LPDWORD programNo,
LPDWORD alarmFlg,
LPWORD readyFlg,
LPWORD blockSkip,
LPWORD endFlg)
Explanation
Acquires (gets) all work data items for the specified pallet face. This function is only valid
in Visual Basic.
Argument
pltNo [Set] Set the pallet number.
faceNo [Set] Specify the face number for the specified pallet.
workOffset [Get] Specify the array variable where the workpiece offset value for
each axis is stored.
almPtn [Get] Specify the variable where the alarm tool number is stored.
almNo [Get] Specify the variable where the MC alarm number is stored.
startMonth [Get] Specify the variable where the machining start month is stored.
startDay [Get] Specify the variable where the machining start day is stored.
startHour [Get] Specify the variable where the machining start hour is stored.
startMinute [Get] Specify the variable where the machining start minute is stored.
endMonth [Get] Specify the variable where the machining end month is stored.
endDay [Get] Specify the variable where the machining end day is stored.
endHour [Get] Specify the variable where the machining end hour is stored.
endMinute [Get] Specify the variable where the machining end minute is stored.
runTime [Get] Specify the variable where the machining time [min] is stored.
autoTime [Get] Specify the variable where the spindle rotation time [min] is
stored.
BOOL mdwkdt_set_item(
WORD pltNo,
WORD faceNo,
WORD item,
long data)
Explanation
Sets specified work data item (other than comment) values for specified pallet face.
Argument
pltNo [Set] Set the pallet number.
faceNo [Set] Specify the face number for the specified pallet.
item [Set] Specify the constant that indicates the work data item.
WD_OFFSET_X (2) X axis offset value
WD_OFFSET_Y (3) Y axis offset value
WD_OFFSET_Z (4) Z axis offset value
WD_ALMPTN (5) Tool No. when alarm occurred
WD_ALMNO (6) Alarm number
WD_STAMON (7) Month machining started
WD_STADAY (8) Day machining started
WD_STAHOUR (9) Hour machining started
WD_STAMIN (10) Minute machining started
WD_ENDMON (11) Month machining ended
WD_ENDDAY (12) Day machining ended
WD_ENDHOUR (13) Hour machining ended
WD_ENDMIN (14) Minute machining ended
WD_RUNTIME (15) Machining time [sec]
WD_AUTOTIME (16) Spindle rotation time [sec]
WD_ALM_O (18) O number when alarm occurred
WD_PROGNO (19) NC program number
WD_ALMFLG (20) Alarm status
WD_RDYFLG (21) Ready status
WD_BKSKIP (22) Optional block skip
WD_ENDFLG (23) Machining end flag
(Only for pallet magazine)
date [Set] Specify setting value.
Return Value
True : Set operation succeeded.
False : Set operation failed.
Note
Some work data items are expressed in WORD, but make sure to cast all items in
LONG for setting with this function.
Use mdwkdt_get_comment(), mdwkdt_get_comment_vb() when setting the
comment from the work data.
WD_RUNTIME and WD_AUTOTIME are displayed in minutes on the custom screen,
but access is performed in second units with this DLL.
BOOL mdwkdt_set_offset(
WORD pltNo,
WORD faceNo,
long x_axis,
long y_axis,
long z_axis)
Explanation
Sets the workpiece offset value for the specified pallet face.
Argument
pltNo [Set] Set the pallet number.
faceNo [Set] Specify the face number for the specified pallet.
x_axis [Set] Specify the variable where the X axis workpiece offset value to be
set is stored.
y_axis [Set] Specify the variable where the Y axis workpiece offset value to be
set is stored.
z_axis [Set] Specify the variable where the Z axis workpiece offset value to be
set is stored.
Return Value
True : Set operation succeeded.
False : Set operation failed.
BOOL mdwkdt_set_comment(
WORD pltNo,
WORD faceNo,
LPSTR cmt)
Explanation
Sets a comment for the specified pallet face.
Argument
pltNo [Set] Set the pallet number.
faceNo [Set] Specify the face number for the specified pallet.
cmt [Set] Specify the variable where the comment character string to be set is
stored.
Return Value
True : Set operation succeeded.
False : Set operation failed.
Note
The maximum length of the comment character string is WKDT_CMT_L characters.
BOOL mdwkdt_set_all(
WORD pltNo,
WORD faceNo,
LPLONG workOffset,
DWORD almPtn,
DWORD almNo,
WORD startMonth,
WORD startDay,
WORD startHour,
WORD startMinute,
WORD endMonth,
WORD endDay,
WORD endHour,
WORD endMinute,
DWORD runTime,
DWORD autoTime,
LPSTR cmt,
DWORD alarm_o,
DWORD programNo,
DWORD alarmFlg,
WORD readyFlg,
WORD blockSkip,
WORD endFlg)
Explanation
Sets all work data items for the specified pallet face. This function is only valid in Visual
C++.
Argument
pltNo [Set] Set the pallet number.
faceNo [Set] Specify the face number for the specified pallet.
workOffset [Set] Specify the array variable where the workpiece offset value for
each axis is stored.
almPtn [Set] Specify the variable where the alarm tool number is stored.
almNo [Set] Specify the variable where the MC alarm number is stored.
startMonth [Set] Specify the variable where the machining start month is stored.
startDay [Set] Specify the variable where the machining start day is stored.
startHour [Set] Specify the variable where the machining start hour is stored.
startMinute [Set] Specify the variable where the machining start minute is stored.
endMonth [Set] Specify the variable where the machining end month is stored.
endDay [Set] Specify the variable where the machining end day is stored.
endHour [Set] Specify the variable where the machining end hour is stored.
endMinute [Set] Specify the variable where the machining end minute is stored.
runTime [Set] Specify the variable where the machining time [min] is stored.
autoTime [Set] Specify the variable where the spindle rotation time [min] is
stored.
BOOL mdwkdt_split_bkskip(
WORD blockSkip,
LPBOOL bkskip2,
LPBOOL bkskip3,
LPBOOL bkskip4,
LPBOOL bkskip5,
LPBOOL bkskip6,
LPBOOL bkskip7,
LPBOOL bkskip8,
LPBOOL bkskip9)
Explanation
Separates the block skip data expressed in bits into the respective block skip numbers.
Argument
blockSkip [Set] Specify the block skip data to be separated.
bkskip2 [Get] True : Block skip 2 is On.
bkskip3 [Get] True : Block skip 3 is On.
bkskip4 [Get] True : Block skip 4 is On.
bkskip5 [Get] True : Block skip 5 is On.
bkskip6 [Get] True : Block skip 6 is On.
bkskip7 [Get] True : Block skip 7 is On.
bkskip8 [Get] True : Block skip 8 is On.
bkskip9 [Get] True : Block skip 9 is On.
Return Value
True : Separate operation succeeded.
False : Separate operation failed.
BOOL mdwkdt_make_bkskip(
BOOL bkskip2,
BOOL bkskip3,
BOOL bkskip4,
BOOL bkskip5,
BOOL bkskip6,
BOOL bkskip7,
BOOL bkskip8,
BOOL bkskip9,
short *blockSkip)
Explanation
Converts the respective block skip number data into block skip data expressed in bits.
Argument
bkskip2 [Set] Specify On/Off status of block skip 2.
bkskip3 [Set] Specify On/Off status of block skip 3.
bkskip4 [Set] Specify On/Off status of block skip 4.
bkskip5 [Set] Specify On/Off status of block skip 5.
bkskip6 [Set] Specify On/Off status of block skip 6.
bkskip7 [Set] Specify On/Off status of block skip 7.
bkskip8 [Set] Specify On/Off status of block skip 8.
bkskip9 [Set] Specify On/Off status of block skip 9.
blockSkip [Get] Specify the variable where the acquired block skip data expressed
in bits is stored.
Return Value
True : Convert operation succeeded.
False : Convert operation failed.
BOOL mdwkdt_split_alarm(
DWORD alarmFlg,
LPBOOL tool_chk,
LPBOOL bts,
LPBOOL bts2,
LPBOOL ac,
LPBOOL sl,
LPBOOL tl,
LPBOOL spare_tool,
LPBOOL wk_measure)
Explanation
Separates alarm status data into respective alarm items.
Argument
alarmFlg [Set] Specify alarm status data to be separated.
tool_chk [Get] True : Tool precheck alarm
bts [Get] True : BTS alarm.
bts2 [Get] True : BTS2 alarm.
ac [Get] True : AC alarm.
sl [Get] True : SL alarm.
tl [Get] True : TL alarm.
spare_tool [Get] True : Spare tool alarm.
wk_measure [Get] True : Workpiece auto measure alarm.
Return Value
True : Separate operation succeeded.
False : Separate operation failed.
BOOL mdwkdt_make_alarm(
BOOL tool_chk,
BOOL bts,
BOOL bts2,
BOOL ac,
BOOL sl,
BOOL tl,
BOOL spare_tool,
BOOL wk_measure,
LPDWORD alarmFld)
Explanation
Converts respective alarm items into alarm status data expressed in bits.
Argument
tool_chk [Set] True : Tool precheck alarm
bts [Set] True : BTS alarm.
bts2 [Set] True : BTS2 alarm.
ac [Set] True : AC alarm.
sl [Set] True : SL alarm.
tl [Set] True : TL alarm.
spare_tool [Set] True : Spare tool alarm.
wk_measure [Set] True : Workpiece auto measure alarm.
alarmFld [Get] Specify variable where alarm status data to be acquired is
stored.
Return Value
True : Convert operation succeeded.
False : Convert operation failed.
BOOL mdwkdt_get_table_pltno(
LPWORD pltNo)
Explanation
Acquires (gets) table pallet number.
Argument
pltNo [Get] Specify variable where pallet number to be acquired is stored.
“0” is set when there is no pallet, and “–1” is set when the number
cannot be confirmed.
Return Value
True : Get operation succeeded.
False : Get operation failed.
BOOL mdwkdt_get_front_pltno(
LPWORD pltNo)
Explanation
Acquires (gets) pallet number on front stocker.
Argument
pltNo [Get] Specify variable where pallet number to be acquired is stored.
“0” is set when there is no pallet, and “–1” is set when the number
cannot be confirmed.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
Do not use this function when the machine does not have a front stocker
BOOL mdwkdt_get_back_pltno(
LPWORD pltNo)
Explanation
Acquires (gets) pallet number on back stocker.
Argument
pltNo [Get] Specify variable where pallet number to be acquired is stored.
“0” is set when there is no pallet, and “–1” is set when the number
cannot be confirmed.
Return Value
True : Get operation succeeded.
False : Get operation failed.
Note
Do not use this function when the machine does not have a back stocker
BOOL mdwkdt_max_pallet(
LPWORD numPlt)
Explanation
Acquires (gets) number of pallets set on Professional 3.
Argument
numPlt [Get] Specify variable where acquired number of pallets is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
BOOL mdwkdt_max_face(
LPWORD numFace)
Explanation
Acquires (gets) number of faces set to 1 pallet on Professional 3.
Argument
numFace [Get] Specify variable where acquired number of faces is stored.
Return Value
True : Get operation succeeded.
False : Get operation failed.
BOOL mdwkdt_set_table_pltno(
WORD pltNo)
Explanation
Sets table pallet number.
Argument
pltNo [Set] Specify variable where pallet number to be set is stored.
“0” is set when there is no pallet, and “–1” is set when the number
cannot be confirmed.
Return Value
True : Set operation succeeded.
False : Set operation failed.
BOOL mdwkdt_set_front_pltno(
WORD pltNo)
Explanation
Sets pallet number on front stocker.
Argument
pltNo [Set] Specify variable where pallet number to be set is stored.
“0” is set when there is no pallet, and “–1” is set when the number
cannot be confirmed.
Return Value
True : Set operation succeeded.
False : Set operation failed.
Note
Do not use this function when the machine does not have a front stocker
BOOL mdwkdt_set_back_pltno(
WORD pltNo)
Explanation
Sets pallet number on back stocker.
Argument
pltNo [Set] Specify variable where pallet number to be set is stored.
“0” is set when there is no pallet, and “–1” is set when the number
cannot be confirmed.
Return Value
True : Set operation succeeded.
False : Set operation failed.
Note
Do not use this function when the machine does not have a back stocker
10 List of Functions
Acquires (gets) the data in the Machine Items Table Interface 5. ..................................... 31
Acquires (gets) all setting values/measured values for spindle temperature management
and vibration management functions. ................................................................................. 38
onoff) ........................................................................................................................................... 46
Sets specified PMC address bit data. ................................................................................... 46
request) ...................................................................................................................................... 63
Acquires (gets) modal S code character string and value. This function is only valid in
Visual Basic. ........................................................................................................................... 63
Acquires (gets) the specified number of characters in the program being executed. This
function can only be used in Visual C++. ............................................................................. 70
Acquires (gets) current number of CNC alarms that have occurred. ................................ 76
BOOL mdncinf_feed_hold()....................................................................................................... 81
Executes feed hold (G8#5 OFF and ON). ............................................................................. 81
BOOL mdncinf_get_node_info( long nodeNo, long *ioBase, long *status, long *cncType,
char *nodeName) ....................................................................................................................... 84
Acquires (gets) the specified HSSB node data. This function is only valid in Visual C++.
................................................................................................................................................. 84
BOOL mdncinf_get_node_info_vb( long nodeNo, long *ioBase, long *status, long *cncType,
BSTR *nodeName) .................................................................................................................... 85
Acquires (gets) the specified HSSB node data. This function is only valid in Visual Basic.
................................................................................................................................................. 85
BOOL mdtldt_tool_info( short *unit, short *ftn, short *itn, short *ptn) ....................... 92
Acquires (gets) Professional 3 tool management function parameters. ............................ 92
BOOL mdtldt_make_common_alarm( BOOL bts2, BOOL bts, BOOL ac, BOOL sl, BOOL
tl, LPWORD almData) .............................................................................................................. 98
Converts tool alarm data got with mdtldt_set_common_item(), mdtldt_set_common() into
respective types of tool alarms.............................................................................................. 98
BOOL mdtldt_get_air( WORD fromPot, WORD toPot, LPWORD time) .......................... 106
Acquires (gets) the through-spindle coolant air purge time setting (tool data). ............. 106
BOOL mdtldt_set_air( WORD fromPot, WORD toPot, LPWORD time) .......................... 107
Sets the through-spindle coolant air purge time (tool data). ........................................... 107
BOOL mdtldt_get_slow( WORD fromPot, WORD toPot, LPDWORD slowTool) ........... 107
Acquires (gets) the slow ATC valid/invalid tool data. ....................................................... 107
BOOL mdtldt_set_slow( WORD fromPot, WORD toPot, LPDWORD slowTool) .............. 108
Sets the slow ATC valid/invalid tool data. ......................................................................... 108
BOOL mdtldt_ spindle _tool( LPWORD pot, LPDWORD ftn, LPDWORD itn, LPDWORD
ptn) ........................................................................................................................................... 109
Acquires (gets) spindle tool pot number, FTN, ITN and PTN. ......................................... 109
BOOL mdtldt_set_toolin_accept( BOOL onOff, BYTE status, WORD potNo) ............... 111
Sets On/Off status for Professional 3 side tool in request response data (TIA). .............. 111
BOOL mdtldt_set_toolout_accept( BOOL onOff, BYTE status, WORD potNo) ............. 111
Sets On/Off status for Professional 3 side tool out request response data (TOA). .......... 111
BOOL mdwkdt_get_item( WORD pltNo, WORD faceNo, WORD item, LPLONG value)
...................................................................................................................................................117
Acquires (gets) specified work data item (other than comment) values for specified pallet
face. ........................................................................................................................................117
BOOL mdwkdt_get_comment_vb( WORD pltNo, WORD faceNo, BSTR *cmt) ............ 120
Acquires the comment for the specified pallet face. This function is only valid in Visual
Basic. .................................................................................................................................... 120
BOOL mdwkdt_set_item( WORD pltNo, WORD faceNo, WORD item, long data) .... 125
Sets specified work data item (other than comment) values for specified pallet face. ... 125
BOOL mdwkdt_set_offset( WORD pltNo, WORD faceNo, long x_axis, long y_axis,
long z_axis)............................................................................................................................... 126
Sets the workpiece offset value for the specified pallet face. ........................................... 126
BOOL mdwkdt_set_comment( WORD pltNo, WORD faceNo, LPSTR cmt) .................. 126
Sets a comment for the specified pallet face. ..................................................................... 126
BOOL mdwkdt_make_alarm( BOOL tool_chk, BOOL bts, BOOL bts2, BOOL ac,
BOOL sl, BOOL tl, BOOL spare_tool, BOOL wk_measure, LPDWORD alarmFld) .. 132
Converts respective alarm items into alarm status data expressed in bits. ................... 132