MITSUBISHI Communication Software For CNC FCSB1224W000 Reference Manual
User Manual:
Open the PDF directly: View PDF .
Page Count: 264
Download | |
Open PDF In Browser | View PDF |
INTRODUCTION Thank you for purchasing the Mitsubishi CNC communication software FCSB1224W000. This user's reference manual describes how to use the OLE/COM interface of FCSB1224W000. Read this manual before use to get familiar with and correctly use the functions of FCSB1224W000. Precautions for Safety (Read carefully before use.) Before using the product, read the user's reference manual and other related manuals. Pay careful attention to safety when using the product. The safety instructions in this manual are intended for this product. Do not use this product until you have a full knowledge of general and safety information and precautions about the computerized numerical controller. In this manual, the safety instruction levels are classified into "WARNING" and "CAUTION". ! 危険 DANGER 注意 ! CAUTION When there is a great risk that the user could be subject to fatalities or serious injuries if handling is mistaken. When the user could be subject to medium or slight injuries or when physical damage could occur if handling is mistaken. Note that even items ranked as 注意 ! CAUTION , may lead to major results depending on the situation. In any case, important information that must always be observed is described. Keep this manual in a safe place for future reference. [Mechanical precautions] DANGER ! 危険 When connecting the product with the computerized numerical controller, consider the risk of external power supply failure and computer malfunction, and install the external safety circuit as fail-safe of the entire system. There is a risk of accident due to output error or malfunction. Writing to the computerized numerical controller will directly be reflected in machine control. Input error of setup or other parameter may cause accidental operation. Check all things before execution. CAUTION [Startup and maintenance precautions] ! 注意 Operation error may cause machine damage or accident. Some functions may be different or unavailable depending on the version of the computerized numerical controller. Trademarks MELDAS, MELSEC, EZSocket, EZMotion, iQ Platform, MELSOFT, GOT, CC-Link, CC-Link/LT and CC-Link IE are either trademarks or registered trademarks of Mitsubishi Electric Corporation in Japan and/or other countries. Ethernet is a registered trademark of Xerox Corporation in the United States and/or other countries. Microsoft®, Windows, Visual C++® and Visual Basic® are either trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. CompactFlash and CF are either trademarks or registered trademarks of SanDisk Corporation in the United States and/or other countries. SD Logos are trademarks or registered trademarks of SD-3C, LLC in the United States, other countries or both. Other company and product names that appear in this manual are trademarks or registered trademarks of the respective companies. CONTENTS 1. OUTLINE 1.1 Features ................................................................................................................................................... 1-1 1.2 Applicable Models .................................................................................................................................... 1-1 1.3 Connection Configuration ......................................................................................................................... 1-1 1.3.1 Connection with M700 series........................................................................................................... 1-2 1.3.2 Connection with M800 series........................................................................................................... 1-2 1.3.3 Connection with C70 ........................................................................................................................ 1-3 1.4 Development Environment ....................................................................................................................... 1-5 1.5 Installation ................................................................................................................................................ 1-6 1.6 Preparation for Use .................................................................................................................................. 1-6 1.7 Interface.................................................................................................................................................... 1-7 1.7.1 Custom interface .............................................................................................................................. 1-7 1.7.2 Automation interface ........................................................................................................................ 1-8 1.8 Program Flow ........................................................................................................................................... 1-9 1.8.1 VC++ program flow .......................................................................................................................... 1-9 1.8.2 VB program flow ............................................................................................................................ 1-10 2. I/F DETAILED SPECIFICATIONS 2.1 Common Items ......................................................................................................................................... 2-1 2.2 Method List ............................................................................................................................................... 2-3 2.3 IEZNcCommunication3 Interface ............................................................................................................. 2-6 2.4 IEZNcSystem Interface .......................................................................................................................... 2-20 2.5 IEZNcPosition Interface .......................................................................................................................... 2-25 2.6 IEZNcCommand2 Interface .................................................................................................................... 2-45 2.7 IEZNcProgram2 Interface....................................................................................................................... 2-51 2.8 IEZNcTime Interface............................................................................................................................... 2-58 2.9 IEZNcAxisMonitor Interface.................................................................................................................... 2-68 2.10 IEZNcRunStatus Interface .................................................................................................................... 2-91 2.11 IEZNcFile6 Interface ............................................................................................................................. 2-98 2.12 IEZNcCommonVariable2 Interface ..................................................................................................... 2-123 2.13 IEZNcLocalVariable2 Interface ........................................................................................................... 2-129 2.14 IEZNcTool3 Interface .......................................................................................................................... 2-132 2.15 IEZNcATC3 Interface.......................................................................................................................... 2-165 2.16 IEZNcParameter3 Interface................................................................................................................ 2-175 2.17 IEZNcOperation Interface................................................................................................................... 2-183 2.18 IEZNcDevice Interface ....................................................................................................................... 2-186 2.19 IEZNcSubFunction3 Interface ............................................................................................................ 2-196 3. ERROR CODE LIST 4. API OPERATING PROCEDURE 4. API OPERATING PROCEDURE .............................................................................................................. 4-1 4.1 API Operating Procedure ........................................................................................................................ 4-1 4.2 Initialization for Enabling OLE/COM Interface.......................................................................................... 4-2 4.3 Object Creation......................................................................................................................................... 4-3 4.4 Include Files ............................................................................................................................................. 4-3 4.5 Overview of VB Programming of Automation Interface ............................................................................ 4-4 4.5.1 Using OLE automation interface with VB ........................................................................................ 4-4 4.5.2 VB program flow (1) ......................................................................................................................... 4-6 4.5.3 VB program flow (2) ......................................................................................................................... 4-7 5. APPLICATION INSTALLATION PROCEDURE 5.1 Overview................................................................................................................................................... 5-1 5.2 Distribution Method with Redistribution Installer ...................................................................................... 5-2 5.2.1 Location where redistribution installer is stored ............................................................................... 5-2 5.2.2 Destination where redistribution installer is installed ....................................................................... 5-2 5.2.3 Specifications for redistribution installer INI file ............................................................................... 5-2 5.2.4 Processing flow and specifications of redistribution installer ........................................................... 5-3 5.2.5 Troubleshooting ............................................................................................................................... 5-6 5.2.6 Precautions ...................................................................................................................................... 5-7 5.3 Terms of Redistribution ............................................................................................................................. 5-8 5.3.1 Redistributable modules .................................................................................................................. 5-8 5.3.2 Redistributable files.......................................................................................................................... 5-8 5.4 Installation Procedure ............................................................................................................................... 5-9 5.4.1 Version upgrade of redistributable files............................................................................................ 5-9 5.4.2 x86 platform ..................................................................................................................................... 5-9 5.4.3 x64 platform ................................................................................................................................... 5-13 6.SAMPLE APPLICATION 6.1 Overview of the Sample Application ......................................................................................................... 6-1 6.2 Position Data Display Application ............................................................................................................. 6-1 6.2.1 Operating requirements ................................................................................................................... 6-1 6.2.2 Installation and uninstallation ........................................................................................................... 6-1 6.2.3 Executing the sample application .................................................................................................... 6-2 6.2.4 Function list ...................................................................................................................................... 6-2 6.2.5 Screen structure and functions ........................................................................................................ 6-3 6.2.6 Setting project workspaces .............................................................................................................. 6-6 6.2.7 IEZNcCommunication object ........................................................................................................... 6-6 6.2.8 IEZNcPosition object ....................................................................................................................... 6-6 6.3 Monitoring Application .............................................................................................................................. 6-7 6.3.1 Operating requirements ................................................................................................................... 6-7 6.3.2 Installation and uninstallation ........................................................................................................... 6-7 6.3.3 Executing the sample application .................................................................................................... 6-7 6.3.4 Function list ...................................................................................................................................... 6-8 6.3.5 Screen structure and functions ........................................................................................................ 6-9 6.3.6 Setting project workspaces ............................................................................................................ 6-10 7. CONSOLE PROGRAM SAMPLE 7.1 Console Program to Connect Mitsubishi CNC C70 (via Ethernet) ........................................................... 7-1 1. OUTLINE The Mitsubishi CNC communication software FCSB1224W000 is designed to help development of an application with Windows interface for Mitsubishi computerized numerical controller CNCM700/M800 series and CNC C70 series. (Hereinafter referred to as the product.) The product can accelerate development by eliminating necessity to know about internal processing of the computerized numerical controller and enabling use of the common OLE interface on the Mitsubishi computerized numerical controller. 1.1 Features Functions of Mitsubishi CNC M700/M800 series and CNC C70 series can be used on the Windows application with VC++, VB or VBA macro language. Communication and other complex processing with Mitsubishi CNC M700/M800 series and CNC C70 series will be conducted by the product so that the user can focus on development of the value-added Windows application. As the product will be upgraded in accordance with new models in the future, upgrading of the user-created application will also be easy. 1.2 Applicable Models The product is applicable to the following models. Check compatibility before use. Mitsubishi CNC M700 series (M700/M700V series, M70/M70V series and E70) (hereinafter referred to as M700) Mitsubishi CNC M800 series (M800/M80 series) (hereinafter referred to as M800) Mitsubishi CNC C70 (hereinafter referred to as C70) 1.3 Connection Configuration This section explains about connection configuration between the Mitsubishi computerized numerical controller and personal computer. Prepare the computerized numerical controller, personal computer, cable and other necessary equipment for communication using this product. For connection of equipment, see the instruction manual of the computerized numerical controller used. 1-1 1.3.1 Connection with M700 series Ethernet Windows personal computer M700 Figure 1-1 Connection with M700 series 1.3.2 Connection with M800 series Ethernet Windows personal computer M800 Figure 1-2 Connection with M800 series 1-2 1.3.3 Connection with C70 See the connection path between C70 and personal computer. Table 1-1 C70 Connection path Model Connection path C70 Ethernet connection Ethernet connection via QJ71E71 Ethernet connection via QnUDE USB connection via QnUD RS-232C connection via QnUD USB connection via QnUDE GOT (bus connection) transparent GOT (Ethernet) transparent Connection module C70 QJ71E71 QnUDE QnUD QnUD QnUDE Base unit C70 QJ71E71 QnUDE Figure Figure 1-3 Figure 1-3 Figure 1-3 Figure 1-4 Figure 1-4 Figure 1-4 Figure 1-5 Figure 1-6 Ethernet Connect the Ethernet cable with C70, QJ71E71 or QnUDE. Windows personal computer C70 Figure 1-3 Ethernet connection with C70 Connect the USB cable with QnUD or QnUDE, and the RS-232C cable with QnUD. USB or RS-232C C70 Windows personal computer Figure 1-4 QnUD connection with C70 1-3 GOT1000 GOT1575 USB or RS-232C Windows personal computer Bus C70 Figure 1-5 C70 and GOT (bus connection) transparent GOT1000 USB or RS-232C GOT1575 Windows personal computer Ethernet C70 Figure 1-6 C70 and GOT (Ethernet) transparent 1-4 Connect the Ethernet cable with C70, QJ71E71 or QnUDE. 1.4 Development Environment Environmental requirements for application development with this product are as below. Table 1-2 Development and operating environment Item Specifications Personal computer Personal Computer AT compatible machine (x86 processor) Personal Computer AT compatible machine (x64 processor) CPU (*2) OS Microsoft Windows 7 Home Basic SP1 or later, Japanese/English Microsoft Windows 7 Home Premium SP1 or later, Japanese/English Microsoft Windows 7 Professional SP1 or later, Japanese/English Microsoft Windows 7 Ultimate SP1 or later, Japanese/English Microsoft Windows 7 Enterprise SP1 or later, Japanese/English Microsoft Windows 7 Home Premium x64 SP1 or later, Japanese/English Microsoft Windows 7 Professional x64 SP1 or later, Japanese/English (*3) Microsoft Windows 7 Ultimate x64 SP1 or later, Japanese/English Microsoft Windows 7 Enterprise x64 SP1 or later, Japanese/English Required memory (*2) Disc space (*2) Peripheral equipment (*2) Development Microsoft Visual C++.NET 2003, 2005, 2008, 2010 (*1) language (*2) Microsoft Visual C++ Ver.5.0, Ver.6.0 Microsoft Visual Basic Ver.5.0, Ver.6.0 Microsoft Visual Basic for Applications Ver.5.0 (Excel 97 VBA equivalent), Ver.6.0 (Excel 2000 VBA equivalent) Note (*1) Development with native code (VC++) only. Development with managed code is not supported. (*2) See the Windows operating environment recommended by Microsoft Corporation. (*3) As the product is 32 bit module, it will run on the Windows 32-bit On Windows 64-bit (WOW64) subsystem if executed on x64 platform. It does not support 64 bit native operation. 1-5 1.5 Installation Dynamic link library (DLL) of the product is necessary to use its functions. See the "release note" for how to install the product. When installting the product on x64 platform, specify the destination folder as below. C:\Program Files (x86)\EZSocket 1.6 Preparation for Use To create an application using this product with VC++, VB or VBA, the following appropriate include files or modules are required. The table below shows the default folders of when the installation is made in the C drive from DVD-ROM. Table 1-4 Include files according to development language VC++ Installation destination %ProgramFiles%\EZSocket\EZSocket folder Nc\include\Vc File EZSocketNc.h EZSocketNcStr.h EZSocketNc_i.c EZSocketNcDef.h EZSocketNcErr.h EZSocketCommonErr.h VB or VBA %ProgramFiles%\EZSocket\EZSocket Nc\include\Vb EZNcDef.bas EZNcErr.bas EZComErr.bas To use the product with C70, the MELSEC programmable controller load module needs to be installed beforehand. See the release note for how to install it. 1-6 1.7 Interface The product provides two types of interface as DLL inprocess server: custom interface and automation interface. The two types of interface have similar data access functions. The custom interface works well with VC++ and the automation interface works well with VB and VBA. The interface can be selected according to the development language. As the interfaces of the product are based on Microsoft Component Object Model (COM), general knowledge about COM will be necessary to use the interfaces from the application. Note that general explanation about COM is not described in this manual. 1.7.1 Custom interface See the custom interface list in Table 1-5. Table 1-5 Custom interface list Component Interface EZNcCommunication IEZNcCommunication3 IEZNcSystem IEZNcPosition IEZNcCommand2 IEZNcProgram2 IEZNcTime IEZNcAxisMonitor IEZNcRunStatus IEZNcFile6 IEZNcCommonVariable2 IEZNcLocalVariable2 IEZNcTool3 IEZNcATC3 IEZNcParameter3 IEZNcOperation IEZNcDevice EZNcSubFunction IEZNcSubFunction3 Category Communication NC System Position Command Program Time Axis monitor Operation status File Common variable Local variable Tool ATC Parameter Operation Programmable controller device Subfunction (Note 1) Though the interface name may change due to version upgrade, the former interface can still be used since the new interface inherits its former version. Example) IEZNcFile5 → IEZNcFile6 Note that the former interface is for backward compatibility and the new interface is required to use the latest version of product. (Note 2) C70 does not support automation interface. 1-7 1.7.2 Automation interface See the automation interface list in Table 1-6. They are handy for use with VB since all functions are contained in a single automation interface. Table 1-6 Automation interface list Component Interface DispEZNcCommunication IDispEZNcCommunication DispEZNcSubFunction IDispEZNcSubFunction 1-8 Category Communication NC System Position Command Program Time Axis monitor Operation status File Common variable Local variable Tool ATC Parameter Programmable controller device Operation Subfunction 1.8 Program Flow 1.8.1 VC++ program flow This section explains the program flow outline to create an application for M700/M800 series or C70 using the custom interface with VC++. Initializes the COM library lret = CoInitialize(NULL); *1 IEZNcCommunication3* m_pezComm; IEZNcPosition* m_pezPos; CLSID clsid; CLSIDFromProgID(L”EZSocketNc.EZNcCommunication”,&clsid); Creates a target communication object lret =CoCreateInstance(clsid, NULL, CLSCTX_INPROC_SERVER, IID_IEZNcCommunication3, (void**)&m_pezComm); Creates a target operation object lret = m_pezCommQueryInterface(IID_IEZNcPosition, (void**)&m_pezPos); lret = m_pezComm SetTCPIPProtocol(...);*2 Opens the communication line lret = m_pezComm Open2(...); lret = m_pezCommSetHead(...); Processing lret = m_pezPosGetMachinePosition(...); lret = m_pezPosGetCurrentPosition(...); lret = m_pezPosGetWorkPosition(...); Closes the communication line m_pezComm Close(...); Releases the object m_pezComm Release( ); m_pezComm = NULL; m_pezPos Release( ); m_pezPos = NULL; Releases the COM library CoUninitialize( ); *1 *1 In the thread using this product, call the COM library function CoInitialize() before using this product and CoUninitialize( ) after using this product. When finishing the use of the objects of this product, call Release() to release the objects (decrement the reference count). *2 When creating an M700/M800 series application, call SetTCPIPProtocol before Open. When creating a C70 application, call SetMelsecProtocol instead of SetTCPIPProtocol. 1-9 1.8.2 VB program flow This section explains the program flow outline to create an application for M700/M800 series using the automation interface with VB. (1) Early binding call Early binding requires reference of type library of the automation interface to be set in advance. Creates an object Dim EZNcCom As New DispEZNcCommunication lret = EZNcCom.SetTCPIPProtcol(...) Opens the communication line lret = EZNcCom.Open2(..., "EZNC_LOCALHOST") Indicates the specified local host lret = EZNcCom.SetHead(...) Processing lret = EZNcCom.Position_GetMachinePosition(...) lret = EZNcCom.Position_GetCurrentPosition(...) lret = EZNcCom.Position_GetWorkPosition(...) Closes the communication line lret = EZNcCom.Close(...) Releases the object Set EZNcCom= Nothing (2) Late binding call Late binding does not require reference setting. Note that the object browser function with VB cannot be used. Declares the object Creates the object Dim EZNcCom As Object Set EZNcCom=CreateObject(“EZNcAut.DispEZNcCommunication.5”) Indicates the specified local host lret = EZNcCom.SetTCPIPProtcol(...) *1 Opens the communication line lret = EZNcCom.Open2(..., "EZNC_LOCALHOST") lret = EZNcCom.SetHead(...) Processing lret = EZNcCom.Position_GetMachinePosition(...) lret = EZNcCom.Position_GetCurrentPosition(...) lret = EZNcCom.Position_GetWorkPosition(...) Closes the communication line lret = EZNcCom.Close(...) Releases the object Set EZNcCom= Nothing 1-10 2. I/F DETAILED SPECIFICATIONS 2.1 Common Items (1) Character code All character string parameters in the interface of this product use UNICODE. (2) Character string handling With the method for handling character string data, if returning the character string data to the application, memory is allocated on the product side. Character string data memory that is no longer needed is freed up on the application side. If it is not freed up, a memory leak may occur. To develop applications with custom interfaces for use with VC++, use CoTaskMemFree() to explicitly free up character string area memory. To develop applications with automation interfaces for use with VC++, use SysFreeString() to explicitly free up character string area memory. (3) Handling of common error codes The method return value will be either for successful completion (S_OK) or failure (S_FALSE) of the method. A detailed method error is returned as an argument. Commonly used error messages include the following. EZ_ERR_NOT_OPEN: Communication lines are not open. EZ_ERR_DOUBLE_OPEN: Double open error EZ_ERR_DATA_TYPE: Invalid argument data type EZ_ERR_DATA_RANGE: Invalid argument data range EZ_ERR_NOT_SUPPORT: Not supported EZ_ERR_NULLPTR: Argument is NULL pointer (4) Error handling when calling an I/F incompatible with the model If the I/F of a function not supported by the model is called, EZ_ERR_NOT_SUPPORT is output as an unsupported error code. (5) Notations used in Chapter 2.3 and later in this document The meaning of notations used on pages describing individual method detailed specifications in Chapter 2.3 and later are as follows. "□ Argument" section: Describes the argument specifications of the method. "□ Return value" section: Describes the return values of the method. "□ Function" section: Describes the general function of the method. "□ Reference" section: Describes the methods related to the method. "□ Specification" section: Indicates that specification of the system number (including PLC axis systems) and axis numbers is necessary when executing the method. If used without specifying, note that operation will not be guaranteed. Required specification details are abbreviated with the following marks. System: Set the part system number. Use SetHead() for the part system number setting. PLC axis: Set the PLC axis system number. Use SetHead() for PLC axis system number setting. Axis number: Set the axis number. 2-1 In addition, even if the System mark is listed, sometimes system specification is not required according to the argument value, as with the method in Chapter 2.12.1. For more information, see the supplementary information described in the "□ Specification" section on an individual method's page. (6) Restrictions on methods that require part system setting For disabled systems, if a method that requires part system setting is executed, the method's execution result will be null. Check beforehand whether the set system is an enabled system. In addition, system 1 will be set after a line opens. (7) File name specification In this product, the Mitsubishi CNC (*1) is regarded as a single drive, and the various data on the NC control unit (machining program, tool offset, etc.) are treated as a file. To access an NC control unit file, set the file name according to the following form unless otherwise noted. Drive name + ":" + \directory name + \file name Make sure to set the file name with an absolute path.*2 Also, the drive name should correspond to an NC control unit number as follows. NC control unit Drive name (NC memory) number 01 M01 02 M02 03 M03 : : : : FF MFF *1: Described in the following sections of this manual as "NC control unit". *2: Set the file name with upper-case characters. In English-version operating systems, set by changing "¥" to a backslash. (8) Restrictions on calls from multiple threads of the C70 With the C70, if the number of threads the product uses exceeds 1000, error codes may no longer be output correctly. Keep in mind the number of threads the product uses when creating a C70 application. 2-2 2.2 Method List Table Interface list Chapter number Function class ○: Supported, , -: Not supported Interface (operation) Function Target IEZNcCommunication3 (Communication) 2.4.2 2.4.3 2.4.4 2.5.1 (NC System) IEZNcPosition GetSystemInformation GetAlarm GetAlarm2 GetWorkPosition 2.5.2 (Position) GetWorkPosition2 IEZNcSystem 2.5.3 2.5.4 2.5.5 2.5.6 GetMachinePosition GetMachinePosition2 GetCurrentPosition GetDistance 2.5.7 GetDistance2 2.5.8 2.5.9 2.5.10 2.5.11 2.5.12 2.5.13 2.5.14 2.5.15 2.5.16 2.5.17 2.5.18 2.5.19 GetNextDistance GetFeedSpeed GetTCPSpeed GetManualOverlap GetManualOverlap2 GetProgramPosition GetProgramPosition3 GetTCPMachinePosition GetTCPWorkPosition GetFeedbackPosition GetTableCoordinationPosition GetWorkInstallationPosition 2.5.20 2.6.1 2.6.2 2.6.3 2.6.4 2.6.5 2.7.1 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 2.8.1 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.8 2.8.9 2.8.10 IEZNcCommand2 (Command) IEZNcProgram2 (Program end) IEZNcTime (Time) GetInclinedSurfacePosition GetGCodeCommand GetToolCommand GetFeedCommand GetCommand2 SetCommand2 CurrentBlockRead GetProgramNumber2 GetSequenceNumber GetBlockNumber GetSubProLevel GetInformation GetCurrentBlockByByte GetClockData SetClockData GetAliveTime SetAliveTime GetRunTime SetRunTime GetStartTime SetStartTime GetEstimateTime SetEstimateTime 2-3 Open NC control unit system line Close NC control unit system line Set system number Get system number Set TCPIP communication settings Set MELSEC communication settings Get system number, name, and control S/W version Get NC system information Get alarm information Get alarm information Get workpiece coordinate position (skip ON-compliant) Get workpiece coordinate position (skip ON-compliant) Get machine position (skip ON-compliant) Get machine position (skip ON-compliant) Get current position Get command remaining distance (skip ON-compliant) Get command remaining distance (skip ON-compliant) Get next travel distance Get feed speed Get tip speed Get manual interrupt amount Get manual interrupt amount Get program position Get program position Get tip machine position Get tip workpiece position Get feedback position Get table coordinate system counter Get workpiece installation coordinate system counter Get inclined surface coordinate system counter Get G code modal command value Get tool compensation number Get feed speed command value Get M/S/T/B function command modal value Set manual numerical value command settings (M, S, T, B) Read current block Get program number (main, sub) Get sequence number (main, sub) Get block number (main, sub) Get subprogram call level Get user machining program information Get number of bytes from start of program Get date and time Set date and time settings Get power-on time Set power-on time settings Get automatic operation time Set automatic operation time settings Get automatic start time Set automatic start time settings Get external integration time (1, 2) Set external integration time settings (1, 2) C70*1 M800 series M700 series Open2 Close SetHead GetHead SetTCPIPProtocol SetMelsecProtocol GetVersion 2.3.1 2.3.2 2.3.3 2.3.4 2.3.5 2.3.6 2.4.1 ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ - ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ hapter number Function class Interface (operation) Function Target 2.11.9 2.11.10 2.11.11 2.11.12 2.11.13 2.11.14 2.11.15 2.11.16 2.11.17 2.11.18 2.11.19 2.12.1 2.12.2 2.12.3 IEZNcAxisMonitor (Axis monitor) IEZNcRunStatus (Operation status) IEZNcFile6 (File) IEZNcCommonVariabl e2 (Common variable) 2.13.3 Get servo monitor Get servo version information Get servo diagnostics information Get power supply version information Get power supply diagnostics information Monitor spindle Get spindle version information Get spindle diagnostics information Get absolute position monitor information Get auxiliary axis monitor information GetDriveSize2 OpenFile3 CloseFile2 AbortFile2 ReadFile2 WriteFile OpenNCFile2 CloseNCFile2 AbortNCFile2 ReadNCFile2 WriteNCFile CommonVRead Get free drive space CommonVWrite GetSize Write common variables (#100, #500) Get number of sets for common variables (#100, #500) Get names of common variables (#500 to 519) Set name settings for common variables (#500 to 519) Get value when no numerical value is set Read local variable Get macro subprogram execution level (level 0 to 4) Get value when no numerical value is set Get auxiliary axis diagnostics information Get auxiliary axis version information Get remaining dwell time Get current power consumption Get integral power Get disabled status Get operation command status Get cutting mode status Get axis status Get operation status Search directory Search next directory Terminate directory search Copy file Delete file Change file name Get drive information Get free drive space Open file Close file Force close file Read file Write file Open NC program file Close NC program file Force close NC program file Write NC program file Read NC program file Read common variables (#100, #500) GetName SetName 2.12.4 2.12.5 2.12.6 2.13.1 2.13.2 GetServoMonitor GetServoVersion GetServoDiagnosis GetPowerVersion GetPowerDiagnosis GetSpindleMonitor GetSpindleVersion GetSpindleDiagnosis GetAbsPositionMonitor GetAuxAxisMonitor GetAuxAxisDiagnosis GetAuxAxisVersion GetDowelTime GetPowerConsumption GetIntegralPower GetInvalidStatus GetCommandStatus GetCuttingMode GetAxisStatus GetRunStatus FindDir2 FindNextDir2 ResetDir Copy2 Delete2 Rename2 GetDriveInformation GetDriveSize IEZNcLocalVariable2 (Local variable) GetCVNullData LocalVRead GetMacroLevel GetLVNullData 2-4 C70*1 M800 series M700 series 2.9.1 2.9.2 2.9.3 2.9.4 2.9.5 2.9.6 2.9.7 2.9.8 2.9.9 2.9.10 2.9.11 2.9.12 2.9.13 2.9.14 2.9.15 2.10.1 2.10.2 2.10.3 2.10.4 2.10.5 2.11.1 2.11.2 2.11.3 2.11.4 2.11.5 2.11.6 2.11.7 2.11.8 ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ - ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ Chapter number Function class Interface (operation) Function Target IEZNcTool3 (Tool) GetToolSetSize GetType GetOffset GetOffset2 SetOffset GetToolWorkOffset 2.14.7 GetToolWorkOffset2 2.14.8 SetToolWorkOffset 2.14.9 2.14.10 2.14.11 2.14.12 2.14.13 2.14.14 2.14.15 2.14.16 2.14.17 2.14.18 2.14.19 2.14.20 2.14.21 2.14.22 2.14.23 2.14.24 2.15.1 2.15.2 SetToolWorkOffset2 GetSurface GetSurface2 SetSurface GetToolLifeType2 SetToolLifeType2 GetToolLifeGroupList ChangeToolLifeGroup DeleteToolLifeGroup GetToolLifeToolNoList AddToolLifeToolNo ChangeToolLifeToolNo DeleteToolLifeToolNo GetToolLifeValue SetToolLifeValue SetToolLifeValue2 GetMGNControl GetMGNSize IEZNcATC3 (ATC) 2.15.3 GetMGNSize2 2.15.4 2.15.5 GetMGNReady2 GetMGNPot 2.15.6 GetMGNPot3 2.15.7 SetMGNPot 2.15.8 SetMGNPot3 2.15.9 GetMGNAux 2.15.10 SetMGNAux 2.16.1 2.16.2 2.16.3 2.16.4 2.17.1 2.17.2 2.17.3 2.18.1 2.18.2 2.18.3 2.18.4 2.18.5 2.18.6 2.19.1 2.19.2 2.19.3 IEZNcParameter3 (Parameter) IEZNcOperation (Operation) IEZNcDevice (Device) IEZNcSubFunction3 (Subfunction) Get number of sets for tool offset Get tool offset type Get tool offset data Get tool offset data Set tool offset data settings Get workpiece coordinate system offset (#54 to 60) Get workpiece coordinate system offset (#54 to 60) Set workpiece coordinate system offset settings (#54 to 60) Set workpiece coordinate system offset settings Get reference surface height Get reference surface height Set reference surface height settings Get tool life control type 2 Set tool life control type settings 2 Get tool life control group number list Change tool life control group number Delete tool life control group number Get list of tools within tool life control group Add tool number to tool life control group Change tool life control tool number Delete tool life control tool number Get tool life control data Set individual tool life control data settings Set tool life control data settings Get ATC tool registration control parameter Get total number of sets of magazine pots for ATC tool registration Get number of sets of pots for each magazine for ATC tool registration Get tool number for ATC tool registration Get tool number for magazine pot for ATC tool registration Get tool number for each magazine pot for ATC tool registration Set tool number settings for magazine pots for ATC tool registration Set tool number settings for each magazine pot for ATC tool registration Get user programmable controller interface for ATC tool registration Set user programmable controller interface settings for ATC tool registration Get parameters Get parameters Set parameter settings Set parameter settings Operation search Start programmable controller program Stop programmable controller program Set device settings Delete all device settings Read device Write device Batch read devices Batch write devices Initialize subfunction Get workpiece coordinate system offset data from workpiece offset file Set workpiece coordinate system offset data settings for workpiece offset file GetParameterData2 GetParameterData3 SetParameterData2 SetParameterData3 Search Run Stop SetDevice DeleteDeviceAll ReadDevice WriteDevice ReadBlockDevice WriteBlockDevice ChangeInit2 GetToolWorkOffsetOfFile SetToolWorkOffsetOfFile *1) C70 does not support automation interface. 2-5 C70*1 M800 series M700 series 2.14.1 2.14.2 2.14.3 2.14.4 2.14.5 2.14.6 ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ 2.3 IEZNcCommunication3 Interface 2.3.1 IEZNcCommunication3::Open2 C70 2.3.1 IEZNcCommunication3::Open2 M700 M800 Open line □ Custom call procedure HRESULT Open2 ( LONG lSystemType, // (I) NC system type LONG lMachine, // (I) NC control unit LONG lTimeOut, // (I) Communication time-out value LONG* plRet // (O) Error code ) □ Automation call procedure Open2 ( lSystemType As LONG // (I) NC system type lMachine As LONG // (I) NC control unit lTimeOut As LONG // (I) Communication time-out value lpcwszHostName As STRING // (I) Host name ) As LONG // (O) Error code lSystemType: Sets the NC system type. □ Argument Value Meaning EZNC_SYS_MELDASC70 With the C70, performs a line connection. EZNC_SYS_MELDAS700M With M700 M systems, performs a line connection. EZNC_SYS_MELDAS700L With M700 L system, performs a line connection. EZNC_SYS_MELDAS800M With M800 M systems, performs a line connection. EZNC_SYS_MELDAS800L With M800 L system, performs a line connection. lMachine: Sets the NC control unit number. When connecting to multiple Mitsubishi CNCs, specify the different NC control unit numbers for each Mitsubishi CNC. Value: 1 to 255 lTimeOut: Sets the communication time-out value. However, with C70, this value is disabled. The C70 communication time-out is set by lTimeOut in SetMelsecProtocol(). Value Meaning 1 to 3000 Time-out value (unit: 100 ms) (M700/M800 series is 10 or more, and if a time-out error occurs, increase the value.) lpcwszHostName: Sets the NC system host name to connect. The IP address can also be specified. When connecting to a local host, set "EZNC_LOCALHOST" as the character string. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZ_ERR_DATA_TYPE: Invalid argument data type EZ_ERR_DATA_RANGE: Invalid argument data range EZNC_SYSFUNC_IOCTL_ADDR: Invalid NC control unit number EZNC_SYSFUNC_IOCTL_NOTOPEN: Device is not open EZNC_SYSFUNC_IOCTL_DATA: Invalid communication parameter data range EZNC_COMM_NOTSETUP_PROTOCOL: TCP/IP communication has not been set (M700/M800 series only) EZNC_COMM_NOTMODULE: No submodule EZNC_COMM_CREATEPC: EZSocketPc objects cannot be created (C70 only) EZNC_COMM_CANNOT_OPEN:When connecting to local host with automation call, host name EZNC_LOCALHOST has not been set. 2-6 Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Executes connection of the communication line for an IEZNcCommunication3 object. □ Function For the M700/M800 series, before open, make sure to execute SetTCPIPProtocol() to configure the communication settings. Also, for the C70, before open, make sure to execute SetMelsecProtocol() to configure the communication settings. If it is not executed, an error will occur when Open2() is executed. (Note 1) The existing interface IEZNcCommunication2::Open (() can be used as a backward compatible model. Use this method when newly starting use of EZSocket. □ Close(), SetTCPIPProtocol(), SetMelsecProtocol() Reference □ Specification 2-7 2.3.2 IEZNcCommunication3::Close C70 2.3.2 IEZNcCommunication3::Close Argument M800 Close line □ Custom call procedure HRESULT Close ( LONG* plRet ) □ Automation call procedure Close ( ) As LONG □ M700 // (O) Error code // (O) Error code plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_SYSFUNC_IOCTL_NOTOPEN: Device is not open Meaning □ Return Value value Normal termination S_OK Failure S_FALSE The communication lines of IEZNcCommunication3 objects connected by Open2( ) will be □ Function disconnected. For the M700/M800 series, even if the line is closed, the content set by SetTCPIPProtocol() is maintained, so Open2() can be performed again. For the C70, even if the line is closed, the content set by SetMelsecProtocol() is maintained, so Open2() can be performed again. □ Reference Open2(), SetTCPIPProtocol(), SetMelsecProtocol() □ Specification 2-8 2.3.3 IEZNcCommunication3::SetHead C70 2.3.3 IEZNcCommunication3::SetHead Argument M800 Set part system number □ Custom call procedure HRESULT SetHead( LONG lHead, LONG* plRet ) □ Automation call procedure SetHead( lHead As LONG ) As LONG □ M700 // (I) Part system number // (O) Error code // (I) Part system number. // (O) Error code lHead: Sets the part system number. or the PLC axis system. Value: The range is determined by Mitsubishi CNC specifications (optional) and the machine manufacturer setting values (parameter). A value of 0 means "Not setting". When setting the PLC axis system, sets EZNC_PLCAXIS. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination Meaning □ Return Value value Normal termination S_OK Failure S_FALSE Set the NC axis / PLC axis system number. □ Function Set the part system number before executing a method that requires system number. setting. The set part system remains enabled until it is changed. System 1 is set after a line opens. □ GetHead() Reference □ Specification 2-9 2.3.4 IEZNcCommunication3::GetHead C70 2.3.4 IEZNcCommunication3::GetHead Argument // (O) Part system number. // (O) Error code // (O) Part system number. // (O) Error code plHead: Returns the part system number. or the PLC axis system. Value: The range is determined by Mitsubishi CNC specifications (optional) and the machine manufacturer setting values (parameter). A value of 0 means "Not setting". The PLC axis system returns EZNC_PLCAXIS. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination Meaning □ Return Value value Normal termination S_OK Failure S_FALSE Gets the NC axis / PLC axis system number. The PLC axis system number gets □ Function EZNC_PLCAXIS. □ Reference M800 Get part system number □ Custom call procedure HRESULT GetHead( LONG* plHead, LONG* plRet ) □ Automation call procedure GetHead( plHead As LONG* ) As LONG □ M700 SetHead() □ Specification 2-10 2.3.5 IEZNcCommunication3::SetTCPIPProtocol M700 2.3.5 IEZNcCommunication3::SetTCP/IPProtocol □ Custom call procedure HRESULT SetTCPIPProtocol ( LPCOLESTR lpcwszIPAddress, LONG lPort, LONG* plRet ) □ Automation call procedure SetTCPIPProtocol ( lpcwszIPAddress As STRING lPort As LONG ) As LONG □ Argument M800 Set TCP/IP communication protocol // (I) IP address // (I) Port number // (O) Error code // (I) IP address // (I) Port number // (O) Error code lpcwszIPAddress: Sets the IP address of the M700/M800 series connection destination. (Example: "192.168.1.1") lPort: Sets the M700/M800 series connection destination port number. For the port number, check the settings on the Mitsubishi CNC side. For the M700/M800 series, the port number becomes 683. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_COMM_ALREADYOPENED: Cannot be set because communication is already in progress EZ_ERR_DATA_RANGE: Invalid IP address or port number EZ_ERR_NOT_SUPPORT: Not supported Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Sets TCP/IP communication protocol. □ Function For the M700/M800 series, call before performing Open2(). If it is not called, an error will occur when Open2() is executed. The setting details are retained until the object is released by Release(). Temporarily, until Close() is performed if Open2() is performed, re-setting with SetTCPIPProtocol() cannot be done. An error will occur. This function is not supported with C70. (EZ_ERR_NOT_SUPPORT is returned to plRet.) □ Reference Open2(), Close() □ Specification 2-11 2.3.6 IEZNcCommunication3::SetMelsecProtocol C70 2.3.6 IEZNcCommunication3::SetMelsecProtocol □ Custom call procedure HRESULT SetMelsecProtocol ( EZNCST_OPEN* pstOpen, LONG* plRet ) □ Argument C70 Set Melsec communication settings // (I) Line // (O) Error code pstOpen: A pointer referring to the EZNCST_OPEN structure which sets the parameters for the open. Refer to the following for members of the structure of EZNCST_OPEN. (Note) The structure is created with the assumption of connection types other than Ethernet communication and serial communication. According to the following structure member descriptions, set 0 for unneeded parameters. lNetworkNumber: Sets the network number with MELSECNET/10(H). Sets "0x00" when a host station is set. When a Qn multi-drop connection (serial communication, via CC-Link module) is set, the following applies. Meaning Value 0x00 Sets a host network 0x01 Sets another network for multi-drop destination lStationNumber: Sets the station number with MELSECNET and CC-Link. "0xFF" is set when a host station is set. If accessing the CPU of the CPU board and the AF board, sets a host station. When a Qn multi-drop connection (serial communication, via CC-Link module) is set, the following applies. Meaning Value 0x00 Set a host network 0x01 Set another network for multi-drop destination lUnitNumber: Sets sthe module number of the computer link (serial communication) module or the station number for a Qn communication system intelligent special module. However, sets "0x00" with the setting of a QnA series host station (module mounted to the host station CPU). This is disabled with computer link (serial communication) communication and a Qn intelligent special target. With a multi-drop link, the module number of the target destination computer link (serial communication) module station is set. lConnectUnitNumber: Sets the module number of the computer link (serial communication) module or the Ethernet module for QnA/Qn. With a multi-drop link, the module number of the request source computer link (serial communication) module station is set. However, with a multi-drop via a CPU direct connection, the module number of the request source station is not required. ("0x00".) Sets "0x00" when not a multi-drop link. Sets a relay destination station number when using a QnA or Qn Ethernet module. ("0x00" is fixed when accessing within a host network.) If accessing other networks via MNET/10, sets the station number set in the parameter of the connected Ethernet module. 2-12 lIONumber: Sets the module I/O number. This parameter sets the target actual input/output No. (start I/O number ÷ 16) of the serial communication module and intelligent special module with a multi-drop link or intelligent special module access. (With a multi-drop link, the station to pass through: request source station I/O number is set.) Sets 0x3E0 to 0x3FF if accessing other stations via the host station CPU or network. Value Target 0 to 1FFh Communication system intelligent special module (start I/O number ÷ 16) 200 to 3CFh Reserve 3D0h Control system CPU module 3D1h Standby system CPU module 3D2h System A CPU module 3D3h System B CPU module 3D4h CPU module in other system 3D5h to 3DBh Reserve 3DCh System A communication peripheral equipment 1 3DDh System B communication peripheral equipment 1 3DEh System A communication peripheral equipment 2 3DFh System B communication peripheral equipment 2 3E0 to 3E3h Individual CPU module with multiple CPUs (Module 1 to 4) 3F0h Global request with multiple CPUs 3FCh Card next to CPU 3FDh Peripheral equipment 2 3FEh Peripheral equipment 1 3FFh CPU module (including LM) lCpuType: Sets the target CPU (NC module) that performs communication. Value Target CPU_Q17NNCCPU Q173NCCPU (C70) 2-13 lUnitType: Sets the module connected to a physical port on the computer. Value Meaning UNIT_ACPU Direct to ACPU-RS422 port UNIT_QCPU Direct to QnACPU-RS422 port UNIT_QNCPU Direct to QnCPU (Q mode) RS232C port UNIT_QNCPU_A Direct to QnCPU (A mode) RS232C UNIT_QNUSB Direct to QnCPU (Q mode) USB port UNIT_QNUSB_A Direct to QnCPU (A mode) USB port UNIT_QNMOTION Direct to Q motion -RS232C port UNIT_QNMOTIONUSB Direct to Q motion USB port UNIT_FXCPU Direct to FXCPU-RS422 port UNIT_C24 Direct to C24 module for A UNIT_UC24 Direct to UC24 module for A UNIT_QC24 Direct to QC24 module for QnA UNIT_QJ71C24 Direct to C24 module for Q UNIT_FXENET_ADP Connection to Ethernet adapter for FX UNIT_FX232BD Connection to FXCPU computer link (RS232C) UNIT_FX485BD Connection to FXCPU computer link (RS485) UNIT_E71 Connection to Ethernet LAN for A UNIT_QE71 Connection to Ethernet LAN for QnA UNIT_QJ71E71 Connection to Ethernet LAN for Q UNIT_G4ACPU Direct to AJ65BT-G4 (-S3) module (ACPU access) UNIT_G4QCPU Direct to AJ65BT-G4 (-S3) module (QnA access) UNIT_G4QNCPU Direct to AJ65BT-G4-S3 module (Qn access) UNIT_MNET2BOARD Connection to MNET2 board UNIT_MNET10BOARD Connection to MNET/10 board UNIT_MNETHBOARD Connection to MNET/H board UNIT_MNETGBOARD Connection to CC-Link IE controller network board UNIT_CCLINKBOARD Connection to CC-Link board UNIT_MSPANUBOARD Connection to CPU board UNIT_AFBOARD Connection to AF board UNIT_EMEDBOARD Connection to EmEd board UNIT_SIMULATOR Connection to simulator (LLT) UNIT_QBF Connection to personal computer CPU for Q UNIT_SSCBOARD Connection to SSC net board UNIT_A900GOT Connection to GOT900 series / 1000 series UNIT_OTHER Generic connection UNIT_MNETGBOARD Connection to CC-Link IE controller network board UNIT_QNETHER Connection to QnCPU (Q mode) Ethernet port UNIT_QNETHER_DIRECT Direct connection to QnCPU (Q mode) Ethernet port UNIT_GOT_QJ71E71 Connection to QJ71E71 module through GOT1000 series UNIT_GOT_QNETHER Connection to QnCPU Ethernet port through GOT1000 series lPacketType: Sets the computer link or Ethernet packet transmission format. The following format is set for this parameter. Value Meaning PACKET_BINARY1 Dedicated protocol format (when AJ71E71/AJ71QE71 is set) PACKET_ASCII1 Dedicated protocol format (when AJ71(U)C24, AJ71E71/AJ71QE71 is set) PACKET_PLC1 CPU protocol format (when AJ71E7/AJ71QE71 or other than the above is set) 2-14 lProtocolType: Sets the communication protocol type of the module (board) to connect. Select connection through a serial port + modem with communication via AJAJ71QC24N/QJ71C24/LJ71C24 + modem. (If directly connecting to AJ71QC24N/QJ71C24/LJ71C24, select connection through a serial port.) Select connection through a shared memory server only with a simulator connection, and select connection through a Q bus only with a personal computer CPU connection. Value Meaning PROTOCOL_MNET2 Through MNET II board PROTOCOL_MNET10 Through MNET/10 board PROTOCOL_MNETH Through MNET/10H and MNET/25H board PROTOCOL_MNETG Through CC-Link IE controller network board PROTOCOL_CCIEF Through CC-Link IE field network board PROTOCOL_EMED Through EmEd board PROTOCOL_SERIAL Through serial port PROTOCOL_USB Through USB port PROTOCOL_TCPIP Through TCP/IP PROTOCOL_UDPIP Through UDP/IP PROTOCOL_SHAREDMEMORY Through shared memory server PROTOCOL_CCLINK Through CC-Link board PROTOCOL_MSPANU Through CPU board PROTOCOL_AF Through AF board PROTOCOL_SSC Through SSC board PROTOCOL_TEL Through Q6TEL, A6TEL PROTOCOL_SERIALMODEM Through serial port + modem PROTOCOL_QBF Through Q bus PROTOCOL_USBGOT Through GOT1000 USB port lPortNumber: Sets the port number for connection between the physical port on the computer and the module set by lUnitType. For the connectable ports for the connection module, refer to the connectable ports remarks. However, an arbitrary value is set as the request source (personal computer) port number with an Ethernet connection. If "=0" is set as the port number, the MNET/10 routing method will be an automatic response method. In addition, set a fixed value of "5001" when not selecting an automatic response method via QE71 or when not setting TCP/IP for E71/QE71. Meaning Value PORT_1 Communication port 1 PORT_2 Communication port 2 PORT_3 Communication port 3 PORT_4 Communication port 4 PORT_5 Communication port 5 PORT_6 Communication port 6 PORT_7 Communication port 7 PORT_8 Communication port 8 PORT_9 Communication port 9 PORT_10 Communication port 10 However, when an Ethernet connection is made, the following is applicable. Model Protocol Port number QJ71E71 UDP Method other than 5001 is fixed AJ71QE71 automatic response (UDP) Automatic 0: Automatically assigns open ports in the response method personal computer Other than 0: Create sockets using specified port TCP Fixed to 0: Automatically assigns open ports in the personal computer AJ71QE71 UDP Sets by matching the port number set in the sequence (TCP) TCP If sets by the sequence: Set by matching the set port number AJ71E71 If not set by the sequence: Arbitrarily set an open port in the personal computer 2-15 lBaudRate: Sets the baud rate with serial communication. This parameter can be one of the following values. Value Meaning CBR_2400 2400 bps CBR_4800 4800 bps CBR_9600 9600 bps CBR_14400 14400 bps CBR_19200 19200 bps CBR_38400 38400 bps CBR_56000 56000 bps CBR_57600 57600 bps CBR_115200 115200 bps CBR_128000 128000 bps CBR_256000 256000 bps lDataBits: Sets the number of sent and received byte data bits (6 to 8). lParity: Sets the parity bit. This parameter can be one of the following values. It becomes effective only during serial communication. Value Meaning EVENPARITY Even number ODDPARITY Odd number MARKPARITY Mark NOPARITY No parity lStopBits: Sets the number of stop bits used. This parameter can be one of the following values. It becomes effective only during serial communication. Meaning Value ONESTOPBIT 1 stop bit ONE5STOPBITS 1.5 stop bits TWOSTOPBITS 2 stop bits lControl: Sets the control signal. This parameter can be one of the following values. It becomes effective only during serial communication. Meaning Value TRC_NONE No flow control TRC_DTR DTR control TRC_RTS RTS control TRC_DTR_OR_RTS DTR or RTS control TRC_DTR_CD DTR control (with CD control) TRC_RTS_CD RTS control (with CD control) TRC_DTR_OR_RTS_CD DTR or RTS control (with CD control) lpcwszHostAddress:Sets the connected host name (IP address) as a UNICODE character string with Ethernet communication. Set NULL when Ethernet is not set. lCpuTimeOut: Sets the CPU monitoring timer with Ethernet communication. The unit is *250 ms. (The default is 4.) lTimeOut: Sets the communication time-out value. The unit is ms. (The default is 1000 ms.) * The time-out starts counting from when data communication ends. 2-16 lSumCheck: Sets whether a sum check is enabled or disabled. One of the following values is set for this parameter. It is enabled only when connecting through a computer link module or an A-series Ethernet module (TCP/IP). Value Meaning TRUE There is a sum check FALSE There is no sum check lSourceNetworkNumber: Sets the request source network number when Ethernet for QnA and Qn (via AJ71QE71 and QJ71E71) is set Sest the same network No. (network No. specified by the network parameter) as the Ethernet for a QnA or Qn connection. lSourceStationNumber: Sets the request source station number (station number on the personal computer side) when an Ethernet for QnA and Qn (via AJ71QE71 and QJ71E71) is set Sets the station number so as not to overlap with the QE71 station numbers set in the same Ethernet loop. lDestinationPortNumber: Sets the port number of the target destination module when Ethernet is set. Sets the relay destination port number when accessing other networks. The following applies when other than an automatic response method, E71, or QE71 (TCP/IP). QnA (AJ71QE71) (UDP/IP) : "5001" is fixed Qn (QJ71E71) (TCP/IP) : "5002" is fixed If the target is a Q redundant CPU, any port number can also be set. Qn (QJ71E71) (UDP/IP) : “5001"is fixed Qn (Ethernet port) (UDP/IP) : “5006" is fixed Qn (Ethernet port) (TCP/IP) : “5007" is fixed Qn (Ethernet port direct communication) : “5008" is fixed lDestinationIONumber: Sets the actual input/output No. (start I/O number ÷ 16) of the last access target station with a Qn multi-drop connection (via CC-Link, serial communication). (When the target is an intelligent special module.) If the target is a CPU module, set between 0x3F0 and 0x3FF. (Refer to "lIONumber".) lConnectChannelNumber: Sets the connected channel No. (Ch1/Ch2) when connection of the serial communication module for Qn is set. Because this is used for system reservation, do not set anything. (Specify 0x00.) lMultiDropChannelNumber: Sets the multi-drop connection channel No. (Ch1/Ch2) with a Qn multidrop connection. This will be invalid if any other connection is set. Meaning Value 0x01 Connection to channel 1 0x02 Connection to channel 2 lThroughNetworkType: Sets whether to include MNET/10 mode in the networks to pass through when accessing other stations via MELSECNET/10H. Meaning Value 0x00 Does not include MNET/10 mode 0x01 Includes MNET/10 mode lIntelligentPreferenceBit: Sets whether to connect through the multi-drop link destination network with a Qn multi-drop connection (via CC-Link, serial communication). (This is to distinguish the host network module.) Meaning Value 0x00 Multi-drop does not access other destination networks 0x01 Multi-drop accesses other destination networks 2-17 lDidPropertyBit: With Q series host station intelligent special access (intelligent special module mounted to the CPU of the host station), by disabling the following settings, it is not necessary to set "lUnitNumber". (Set only by the module I/O number of "lIONumber".) Value Meaning 0x00 Enables module number 0x01 Disables module number lDsidPropertyBit: With a Qn multi-drop connection, as the following are disabled, there is no need to set "lDestinationIONumber". However, if the following settings are disabled, make sure to enable "lDidPropertyBit". (Set by "lUnitNumber".) Meaning Value 0x00 Enables the I/O number of the last access target station 0x01 Disables the I/O number of the last access target station plRet: Returns an error code. S_OK: Normal termination EZNC_COMM_ALREADYOPENED: Cannot be set because communication is already in progress EZ_ERR_DATA_TYPE: Invalid argument data type EZ_ERR_DATA_RANGE: Invalid argument data range EZ_ERR_NOT_SUPPORT: Not supported Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Configures MELSEC communication settings. This is valid only for the C70. □ Function This function is not supported with the M700/M800 Series. (EZ_ERR_NOT_SUPPORT is returned to plRet.) Call before executing Open2(). If it is not called, an error will occur when Open2() is executed. The setting details are retained until the object is released by Release(). Temporarily, until Close() is performed if Open2() is performed, re-setting with SetMelsecProcotol() cannot be done. An error will occur. If an error occurs in SetMelsecProcotol(), the setting before the error occurred is maintained. The setting contents that resulted in the error are disabled. SetsNULL to the pointer setting argument such as "lpcwszHostAddress" when not used. (Note) This method does not support automation interfaces. Use is limited to a custom interface. 2-18 □ Structure typedef struct EZNcStOpen{ LONG lNetworkNumber; LONG lStationNumber; LONG lUnitNumber; LONG lConnectUnitNumber; LONG lIONumber; LONG lCpuType; LONG lUnitType; LONG lPacketType; LONG lProtocolType; LONG lPortNumber; LONG lBaudRate; LONG lDataBits; LONG lParity; LONG lStopBits; LONG lControl; WCHAR * lpcwszHostAddress; LONG lCpuTimeOut; LONG lTimeOut; LONG lSumCheck; LONG lSourceNetworkNumber; LONG lSourceStationNumber; LONG lDestinationPortNumber; LONG lDestinationIONumber; LONG lConnectChannelNumber; LONG lMultiDropChannelNumber; LONG lThroughNetworkType; LONG lIntelligentPreferenceBit; LONG lDidPropertyBit; LONG lDsidPropertyBit; } EZNCST_OPEN; □ Reference Open2(), Close() □ Specification 2-19 // Network number // Station number // Module number // Module number // Module I/O number // Target CPU // Connected module // Packet transmission type // Communication protocol type // Connection port number // Baud rate // Number of byte data bits // Parity bit // Stop bit // Control signal // Connection host name (IP address) // CPU monitoring timer // Time-out value // Sum check // Request source network number // Request source station number (personal computer side station number) // Port number // Actual input/output No. // Channel No. // Multi-drop connection channel No. // MNET/10 mode // Via multi-drop link destination // Intelligent special module setting // Multi-drop connection setting 2.4 IEZNcSystem Interface 2.4.1 IEZNcSystem::GetVersion C70 2.4.1 IEZNcSystem::GetVersion □ Custom call procedure HRESULT GetVersion( LONG lAxisNo, LONG lIndex, LPOLESTR* lppwszBuffer, LONG* plRet ) □ Automation call procedure System_GetVersion( lAxisNo As LONG lIndex As LONG lppwszBuffer As STRING* ) As LONG □ Argument M700 M800 Get NC system S/W number, name // (I) Axis number // (I) Parameter number // (O) NC system S/W number, name // (O) Error code // (I) Axis number // (I) Parameter number ber // (O) NC system S/W number, name // (O) Error code lAxisNo: Sets the axis number (From Axis 1 = from 1) lIndex: Sets the parameter number. Refer to the table below. lppwszBuffer: Returns the system S/W number, name, and control S/W version as a UNICODE character string. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZ_ERR_DATA_TYPE: Invalid argument data type EZNC_DATA_READ_DATASIZE: Application does not fit into prepared buffer EZNC_DATA_READ_READ: Data is not readable 0 Description NC system S/W number, name, and PLC version 1 Control unit, extension unit 2 RIO unit, terminal RIO unit Axis setting is necessary only for C70. lIndex □ Return Value value S_OK S_FALSE Meaning Normal termination Failure 2-20 Data range Depends on the system specifications. Depends on the system specifications. Depends on the system specifications. □ Function Gets the various NC system S/W version information as a UNICODE character string. 0: Gets the system S/W number, name, and PLC version of the NC system. The format of the character string data becomes as follows. NC system S/W number\tNC system name\tprogrammable controller system number\0 A TAB code is inserted between the NC system number and the NC system S/W name. The end of the data becomes a NULL code. Output example: "BND-2005W000-A0 MITSUBISHI CNC 830WM" If there is no item, a TAB code will follow. If a termination item does not exist, a NULL code will follow the TAB code. 1: Gets the control unit and extension unit versions. The format of the character string data becomes as follows. Control unit number\tExtension unit number\0 A TAB code is inserted between the control unit number and the extension unit number. The end of the data becomes a NULL code. 2: Gets the RIO unit and terminal RIO unit versions. The format of the character string data becomes as follows. RIO unit number\tTerminal RIO unit number\0 M700 has 24 items with RIO unit 1\t RIO unit 2\t…\0. M700/M800 series have up to 32 items (*) with RIO unit 1¥t RIO unit 2¥t5 … ¥0. * Confirm the number of RIO unit with MTB. A TAB code is inserted between the RIO unit number and the terminal RIO unit number. The end of the data becomes a NULL code. As the character string area memory is allocated in this product, clients using VC++ need to release the character string area memory explicitly with CoTaskMemFree(). □ Reference □ Specification 2-21 2.4.2 IEZNcSystem::GetSystemInformation C70 2.4.2 IEZNcSystem::GetSystemInformation □ Custom call procedure HRESULT GetSystemInformation( LONG lType, LONG* plSystem, LONG* plRet ) □ Automation call procedure System_GetSystemInformation( lType As LONG plSystem As LONG* ) As LONG □ Argument M700 M800 Get NC system information // (I) Information type // (O) System information // (O) Error code // (I) Information type // (O) System information // (O) Error code lType: Sets the NC system information type. Refer to the table below. plSystem: Returns the NC system information. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZ_ERR_DATA_TYPE: Invalid argument data type EZNC_DATA_READ_READ: Data is not readable lType 0 1 Description Data range Part system 0: Part system disabled enabled/disabled 1: Part system enabled Number of axes each part This will be different for NC systems with 1 [Axis] system or more. Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets information regarding the NC system. □ Function □ Reference □ Specification System 2-22 2.4.3 IEZNcSystem::GetAlarm C70 2.4.3 IEZNcSystem::GetAlarm □ Custom call procedure HRESULT GetAlarm( LONG lMessageNumber, LONG lAlarmType, LPOLESTR* lppwszBuffer, LONG* plRet ) □ Automation call procedure System_GetAlarm( lMessageNumber As LONG lAlarmType As LONG lppwszBuffer As STRING* ) As LONG □ Argument M700 M700 Get alarm information // (I) Number of messages to get // (I) Alarm type to get // (O) Message character string // (O) Error code // (I) Number of messages to get // (I) Alarm type to get // (O) Message character string // (O) Error code lMessageNumber: Sets the number of messages to get. Value: 1 to 10 (maximum) lAlarmType: Sets the alarm type to get. Meaning Value M_ALM_NC_ALARM NC alarm M_ALM_STOP_CODE Stop code M_ALM_PLC_ALARM PLC alarm message M_ALM_OPE_MSG Operator message M_ALM_ALL_ALARM No alarm type distinction lppwszBuffer: Gets the alarm message as a UNICODE character string. The message format includes CR, LF codes to distinguish between messages. In addition, NULL is inserted at the end of the message. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_OPE_CURRALM_ADDR: Invalid part systems, axes settings EZNC_OPE_CURRALM_ALMTYPE: Invalid alarm type EZNC_OPE_CURRALM_DATAERR: Error in communication data between NC and personal computer EZNC_OPE_CURRALM_DATASIZE: Application does not fit into prepared buffer EZNC_OPE_CURRALM_NOS: Invalid number of got messages EZ_ERR_NOT_SUPPORT:Not supported Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets the alarm message of the alarm currently generated in the setting NC control unit. The □ Function language of the alarm message adheres to an NC parameter (#1043 lang). Messages are retrieved in descending order of importance. As the character string area memory is allocated in this product, clients using VC++ need to release the character string area memory explicitly with CoTaskMemFree(). This function is not supported with the M800 Series. (EZ_ERR_NOT_SUPPORT is returned to plRet.) □ Reference □ Specification System (All systems when 0) 2-23 2.4.4 IEZNcSystem2::GetAlarm2 C70 2.4.4 IEZNcSystem2::GetAlarm2 □ Custom call procedure HRESULT GetAlarm2( LONG lMessageNumber, LONG lAlarmType, LPOLESTR* lppwszBuffer, LONG* plRet ) □ Automation call procedure System_GetAlarm2( lMessageNumber As LONG lAlarmType As LONG lppwszBuffer As STRING* ) As LONG □ Argument M700 M800 Get alarm information // (I) Number of messages to get // (I) Alarm type to get // (O) Message character string // (O) Error code // (I) Number of messages to get // (I) Alarm type to get // (O) Message character string // (O) Error code lMessageNumber: Sets the number of messages to get. Value: 1 to 10 (maximum) lAlarmType: Sets the alarm type to get. Meaning Value M_ALM_NC_ALARM NC alarm M_ALM_STOP_CODE Stop code M_ALM_PLC_ALARM PLC alarm message M_ALM_OPE_MSG Operator message M_ALM_ALL_ALARM No alarm type distinction lppwszBuffer: Gets the alarm message as a UNICODE character string. The message format includes CR, LF codes to distinguish between messages. In addition, NULL is inserted at the end of the message. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_OPE_CURRALM_ADDR: Invalid system, spindle specification EZNC_OPE_CURRALM_ALMTYPE: Invalid alarm type EZNC_OPE_CURRALM_DATAERR: Error in communication data between NC and personal computer EZNC_OPE_CURRALM_DATASIZE: Application does not fit into prepared buffer EZNC_OPE_CURRALM_NOS: Invalid number of got messages Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets the alarm message of the alarm currently generated in the setting NC control unit. The □ Function language of the alarm message adheres to an NC parameter (#1043 lang). Messages are retrieved in descending order of importance. As the character string area memory is allocated in this product, clients using VC++ need to release the character string area memory explicitly with CoTaskMemFree(). □ Reference □ Specification System (All systems when 0) 2-24 2.5 IEZNcPosition Interface 2.5.1 IEZNcPosition::GetWorkPosition C70 2.5.1 IEZNcPosition::GetWorkPosition □ Custom call procedure HRESULT GetWorkPosition( LONG lAxisNo, DOUBLE* pdPosition, LONG lSkipOn, LONG* plRet ) □ Automation call procedure Position_GetWorkPosition( lAxisNo As LONG pdPosition As DOUBLE* lSkipOn As LONG ) As LONG □ Argument M700 M800 Get workpiece coordinate position // (I) Axis number setting // (O) Workpiece coordinate position // (I) Skip on flag // (O) Error code // (I) Axis number setting // (O) Workpiece coordinate position // (I) Skip on flag // (O) Error code lAxisNo: Sets the axis number (From Axis 1 = from 1) pdPosition: Returns the workpiece coordinate position of the set axis number of the set part system. Data range: -99,999.999 to 99,999.999 [mm] lSkipOn : Sets the skip on flag. Value Meaning 1 Skip is on 0 Normal plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZ_ERR_DATA_TYPE: Invalid argument data type EZNC_DATA_READ_ADDR: Invalid part system, axis No. setting EZNC_DATA_READ_READ: Data is not readable Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets the workpiece coordinate position of the set system/axis number □ Function If 1 is set for the skip on flag, the workpiece coordinate position at the time the skip on signal is input will be got. □ Reference □ Specification System Axis number 2-25 2.5.2 IEZNcPosition::GetWorkPosition2 C70 2.5.2 IEZNcPosition::GetWorkPosition2 □ Custom call procedure HRESULT GetWorkPosition2( LONG lAxisNo, DOUBLE* pdPosition, LONG lSkipOn, LONG* plRet ) □ Automation call procedure Position_GetWorkPosition2( lAxisNo As LONG pdPosition As DOUBLE* lSkipOn As LONG ) As LONG □ Argument M700 M800 Get workpiece coordinate position // (I) Axis number // (O) Workpiece coordinate position // (I) Skip on flag // (O) Error code // (I) Axis number // (O) Workpiece coordinate position // (I) Skip on flag // (O) Error code lAxisNo: Sets the axis number (From Axis 1 = from 1) pdPosition: Returns the workpiece coordinate position of the set axis number of the set part system. Data range: -99,999.999 to 99,999.999 [mm] This will vary according to the NC system specifications and parameters. lSkipOn : Sets the skip on flag. Value Meaning 1 Skip is on 0 Normal plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZ_ERR_DATA_TYPE: Invalid argument data type EZNC_DATA_READ_ADDR: Invalid part system, axis No. setting EZNC_DATA_READ_READ: Data is not readable EZ_ERR_NOT_SUPPORT: Not supported Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets the workpiece coordinate position of the set system/axis number. □ Function If 1 is set for the skip on flag, the workpiece coordinate position at the time the skip on signal is input will be got. □ Reference □ Specification System Axis number 2-26 2.5.3 IEZNcPosition::GetMachinePosition C70 2.5.3 IEZNcPosition::GetMachinePosition □ Custom call procedure HRESULT GetMachinePosition( LONG lAxisNo, DOUBLE* pdPosition, LONG lSkipOn, LONG* plRet ) □ Automation call procedure Position_GetMachinePosition( lAxisNo As LONG pdPosition As DOUBLE* lSkipOn As LONG ) As LONG □ Argument M700 M800 Get machine position // (I) Axis number // (O) Machine position // (I) Skip on flag // (O) Error code // (I) Axis number // (O) Machine position // (I) Skip on flag // (O) Error code lAxisNo: Sets the axis. (From Axis 1 = from 1) pdPosition: Returns the machine position of the set axis number of the set part system. Data range: -99,999.999 to 99,999.999 [mm] This will vary according to the NC system specifications and parameters. lSkipOn : Sets the skip on flag. Value Meaning 1 Skip is on 0 Normal plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_ADDR: Invalid part system, axis number setting EZNC_DATA_READ_READ: Data is not readable Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets the machine coordinate position for the set system/axis number (coordinate position in a □ Function basic machine coordinate system). If 1 is set for the skip on flag, the machine coordinate position at the time the skip on signal is input will be got. □ Reference □ Specification System Axis number 2-27 2.5.4 IEZNcPosition::GetMachinePosition2 C70 2.5.4 IEZNcPosition::GetMachinePosition2 □ Custom call procedure HRESULT GetMachinePosition2( LONG lAxisNo, DOUBLE* pdPosition, LONG lSkipOn, LONG* plRet ) □ Automation call procedure Position_GetMachinePosition2( lAxisNo As LONG pdPosition As DOUBLE* lSkipOn As LONG ) As LONG □ Argument M700 M800 Get machine position // (I) Axis number // (O) Machine position // (I) Skip on flag // (O) Error code // (I) Axis number // (O) Machine position // (I) Skip on flag // (O) Error code lAxisNo: Sets the axis. (From Axis 1 = from 1) pdPosition: Returns the machine position of the set axis number of the set part system. Data range: -99,999.999 to 99,999.999 [mm] This will vary according to the NC system specifications and parameters. lSkipOn : Sets the skip on flag. Value Meaning 1 Skip is on 0 Normal plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_ADDR: Invalid part system, axis number setting EZNC_DATA_READ_READ: Data is not readable Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets the machine coordinate position for the set system/axis number (coordinate position in a □ Function basic machine coordinate system). If 1 is set for the skip on flag, the machine coordinate position at the time the skip on signal is input will be got. □ Reference □ Specification System Axis number 2-28 2.5.5 IEZNcPosition::GetCurrentPosition C70 2.5.5 IEZNcPosition::GetCurrentPosition □ Custom call procedure HRESULT GetCurrentPosition( LONG lAxisNo, DOUBLE* pdPosition, LONG* plRet ) □ Automation call procedure Position_GetCurrentPosition( lAxisNo As LONG pdPosition As DOUBLE* ) As LONG □ Argument M700 M800 Get relative position // (I) Axis number // (O) Relative position // (O) Error code // (I) Axis number // (O) Relative position // (O) Error code lAxisNo: Sets the axis No. (From Axis 1 = from 1) pdPosition: Returns the relative position from the position at a completion of the dog type zero point return or from the preset position configured by G92/origin set/counter set. Data range: -99,999.999 to 99,999.999 [mm] This will vary according to the NC system specifications and parameters. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_ADDR: Invalid part system, axis number setting EZNC_DATA_READ_READ: Data is not readable Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets the relative position to the position at a completion of the dog type zero point return or to the □ Function preset position configured by G92/origin set/counter set of the set system/axis number. □ Reference □ Specification System Axis number 2-29 2.5.6 IEZNcPosition::GetDistance C70 2.5.6 IEZNcPosition::GetDistance Argument M800 Get remaining command □ Custom call procedure HRESULT GetDistance( LONG lAxisNo, DOUBLE* pdDistance, LONG lSkipOn, LONG* plRet ) □ Automation call procedure Position_GetDistance( lAxisNo As LONG pdDistance As DOUBLE* lSkipOn As LONG ) As LONG □ M700 // (I) Axis number // (O) Remaining command // (I) Skip on flag // (O) Error code // (I) Axis number // (O) Rmaining command // (I) Skip on flag // (O) Error code lAxisNo: Sets the axis number (From Axis 1 = from 1) pdDistance: Returns the remaining command of the travel command being executed in the set axis No. of the set system. Data range: -99,999.999 to 99,999.999 [mm] This will vary according to the NC system specifications and parameters. lSkipOn : Sets the skip on flag. Value Meaning 1 Skip is on 0 Normal plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZ_ERR_DATA_TYPE: Invalid argument data type EZNC_DATA_READ_ADDR: Invalid part system, axis number setting EZNC_DATA_READ_READ: Data is not readable Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets the remaining command of the travel command being executed for the set part system/axis □ Function number. If 1 is set for the skip on flag, the remaining command of the travel command at the time the skip on signal is input will be got. □ Reference □ Specification System Axis number 2-30 2.5.7 IEZNcPosition::GetDistance C70 2.5.7 IEZNcPosition::GetDistance Argument M800 Get remaining command □ Custom call procedure HRESULT GetDistance2( LONG lAxisNo, DOUBLE* pdDistance, LONG lSkipOn, LONG* plRet ) □ Automation call procedure Position_GetDistance2( lAxisNo As LONG pdDistance As DOUBLE* lSkipOn As LONG ) As LONG □ M700 // (I) Axis number // (O) Remaining command // (I) Skip on flag // (O) Error code // (I) Axis number // (O) Remaining Command r // (I) Skip on flag // (O) Error code lAxisNo: Sets the axis number. (From Axis 1 = from 1) pdDistance: Returns the remaining command of the travel command being executed in the set axis number. of the set system. Data range: -99,999.999 to 99,999.999 [mm] This will vary according to the NC system specifications and parameters. lSkipOn : Sets the skip on flag. Value Meaning 1 Skip is on 0 Normal plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZ_ERR_DATA_TYPE: Invalid argument data type EZNC_DATA_READ_ADDR: Invalid part system, axis number setting EZNC_DATA_READ_READ: Data is not readable Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets the remaining command of the travel command being executed for the set system/axis □ Function number. If 1 is set for the skip on flag, the remaining command of the travel command at the time the skip on signal is input will be got. □ Reference □ Specification System Axis number 2-31 2.5.8 IEZNcPosition::GetNextDistance C70 2.5.8 IEZNcPosition::GetNextDistance □ Custom call procedure HRESULT GetNextDistance( LONG lAxisNo, DOUBLE* pdDistance, LONG* plRet ) □ Automation call procedure Position_GetNextDistance( lAxisNo As LONG pdDistance As DOUBLE* ) As LONG □ Argument // (I) Axis No. setting // (O) Next command // (O) Error code // (I) Axis No. setting // (O) Next command // (O) Error code lAxisNo: Sets the axis No. (From Axis 1 = from 1) pdDistance: Returns the travel command of the next block for the set axis No. of the set part system. Data range: -99,999.999 to 99,999.999 [mm] This will vary according to the NC system specifications and parameters. Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets the travel command of the next block for the set system/axis No. □ Function □ Reference Specification M800 Get next command plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_ADDR: Invalid part system, axis No. setting EZNC_DATA_READ_READ: Data is not readable □ M700 System Axis number 2-32 2.5.9 IEZNcPosition::GetFeedSpeed C70 2.5.9 IEZNcPosition::GetFeedSpeed Argument M800 Get feed speed □ Custom call procedure HRESULT GetFeedSpeed( LONG lFeedType, DOUBLE* pdSpeed, LONG* plRet ) □ Automation call procedure Position_GetFeedSpeed( lFeedType As LONG pdSpeed As DOUBLE* ) As LONG □ M700 // (I) Feed speed type // (O) Feed speed // (O) Error code // (I) Feed speed type // (O) Feed speed // (O) Error code lFeedType: Sets the type of feed speed to get. Value Meaning 0 F command feed speed (FA) 1 Manual effective feed speed (FM) 2 Synchronization feed speed (FS) 3 Automatic effective feed speed (Fc) 4 Screw lead (FE) pdSpeed: Returns the feed speed of the specified system. Data range: FA : 0.000 to 1000000.000 [mm/min] FM : 0.000 to 1000000.000 [mm/min] FS : 0.000 to 1000.0000000 [mm/rev] FC : 0.000 to 1000000.000 [mm/min] FE : 0.000 to 1000.0000000 [mm] Data range Feed speed type M700/M800 series C70 FA 0.000 to 1,000,000.000 [mm/min] 0.000 to 1,000,000.000 [mm/min] FM 0.000 to 1,000,000.000 [mm/min] 0.000 to 1,000,000.000 [mm/min] FS 0.000 to 1,000.0000000 [mm/rev] 0.000 to 1,000.0000000 [mm/rev] Fc 0.000 to 1,000,000.000 [mm/min] 0.000 to 1,000,000.000 [mm/min] FE 0.000 to 1,000.0000000 [mm] 0.000 to 1,000.0000000 [mm] (Unit will vary) The number of digits is determined by the NC type, options, and MTB setting values (parameters). plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZ_ERR_DATA_TYPE: Invalid argument data type EZNC_DATA_READ_ADDR: Invalid part system, axis No. setting EZNC_DATA_READ_READ: Data is not readable Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets the feed speed of the set system. □ Function □ Reference □ Specification System 2-33 2.5.10 IEZNcPosition::GetTCPSpeed C70 2.5.10 IEZNcPosition::GetTCPSpeed □ Custom call procedure HRESULT GetTCPSpeed ( DOUBLE* pdPosition, LONG* plRet ) □ Automation call procedure Position_ GetTCPSpeed ( pdPosition As DOUBLE* ) As LONG □ Argument M700 M800 Get tip speed // (O) Tip speed // (O) Error code // (O) Tip speed // (O) Error code pdPosition: Returns the tip speed of the set system. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_ADDR: Invalid system specification EZNC_DATA_READ_READ: Data is not readable EZ_ERR_NOT_SUPPORT: Not supported Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets the tip speed of the set part system. □ Function If 1 is set for the skip on flag, the workpiece coordinate position at the time the skip on signal is input will be got. This is valid only for the M700/M800 series. This function is not supported with C70. □ Reference □ Specification System 2-34 2.5.11 IEZNcPosition::GetManualOverlap C70 2.5.11 IEZNcPosition::GetManualOverlap □ Custom call procedure HRESULT GetManualOverlap( LONG lAxisNo, LONG lType, DOUBLE* pdLength, LONG* plRet ) □ Automation call procedure Position_GetManualOverlap( lAxisNo As LONG lType As LONG pdLength As DOUBLE* ) As LONG □ Argument M700 Get manual interrupt amount // (I) Axis No. setting // (I) Type // (O) Manual interrupt amount // (O) Error code // (I) Axis No. setting // (I) Type // (O) Manual interrupt amount // (O) Error code lAxisNo: Sets the axis No. (From Axis 1 = from 1) lType: Sets the manual interrupt amount type to get. Value Meaning 0 If getting the manual interrupt amount while the manual ABS switch is off 1 If getting the manual interrupt amount while the manual ABS switch is on pdLength: Returns the manual interrupt amount for the set axis No. of the set part system. Data range: -99,999.999 to 99,999.999 [mm] This will vary according to the NC system specifications and parameters. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZ_ERR_DATA_TYPE: Invalid argument data type EZNC_DATA_READ_ADDR: Invalid part system, axis No. setting EZNC_DATA_READ_READ: Data is not readable Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets the manual interrupt amount of the set part system/axis. □ Function □ Reference □ Specification System Axis number 2-35 M800 2.5.12 IEZNcPosition::GetManualOverlap2 C70 2.5.12 IEZNcPosition::GetManualOverlap2 □ Custom call procedure HRESULT GetManualOverlap2( LONG lAxisNo, LONG lType, DOUBLE* pdLength, LONG* plRet ) □ Automation call procedure Position_GetManualOverlap2( lAxisNo As LONG lType As LONG pdLength As DOUBLE* ) As LONG □ Argument M700 Get manual interrupt amount // (I) Axis No. // (I) Type // (O) Manual interrupt amount // (O) Error code // (I) Axis No. // (I) Type // (O) Manual interrupt amount // (O) Error code lAxisNo: Sets the axis No. (From Axis 1 = from 1) lType: Sets the manual interrupt amount type to get. Value Meaning 0 If geting the manual interrupt amount while the manual ABS switch is off 1 If getting the manual interrupt amount while the manual ABS switch is on pdLength: Returns the manual interrupt amount for the set axis No. of the set part system. Data range: -99,999.999 to 99,999.999 [mm] This will vary according to the NC system specifications and parameters. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZ_ERR_DATA_TYPE: Invalid argument data type EZNC_DATA_READ_ADDR: Invalid part system, axis specification EZNC_DATA_READ_READ: Data is not readable EZ_ERR_NOT_SUPPORT: Not supported Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets the manual interrupt amount of the set part axis of the set part system. □ Function □ Reference □ Specification System Axis number 2-36 M800 2.5.13 IEZNcPosition::GetProgramPosition C70 2.5.13 IEZNcPosition::GetProgramPosition □ Custom call procedure HRESULT GetProgramPosition( LONG lAxisNo, DOUBLE* pdPosition, LONG* plRet ) □ Automation call procedure Position_GetProgramPosition( lAxisNo As LONG pdPosition As DOUBLE* ) As LONG □ Argument // (I) Axis No. // (O) Program position // (O) Error code // (I) Axis No. // (O) Program position // (O) Error code pdPosition: Returns the program position. Data range: -99,999.999 to 99,999.999 [mm] This will vary according to the NC system specifications and parameters. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_ADDR: Invalid part system, axis No. setting EZNC_DATA_READ_READ: Data is not readable Meaning Normal termination Communication failure □ Reference □ Specification System Axis number 2-37 M800 Get program position lAxisNo: Sets the axis No. (From Axis 1 = from 1) □ Return Value value S_OK S_FALSE Gets program position. □ Function M700 2.5.14 IEZNcPosition::GetProgramPosition3 C70 2.5.14 IEZNcPosition::GetProgramPosition3 □ Custom call procedure HRESULT GetProgramPosition3( LONG lAxisNo, DOUBLE* pdPosition, LONG* plRet ) □ Automation call procedure Position_GetProgramPosition3( lAxisNo As LONG pdPosition As DOUBLE* ) As LONG □ Argument // (I) Axis No. // (O) Program position // (O) Error code // (I) Axis No. // (O) Program position // (O) Error code pdPosition: Returns the program position. Data range: -99,999.999 to 99,999.999 [mm] This will vary according to the NC system specifications and parameters. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_ADDR: Invalid part system, axis No.setting EZNC_DATA_READ_READ: Data is not readable Meaning Normal termination Communication failure □ Reference □ Specification System Axis number 2-38 M800 Get program position lAxisNo: Sets the axis No. (From Axis 1 = from 1) □ Return Value value S_OK S_FALSE Gets program position. □ Function M700 2.5.15 IEZNcPosition::GetTCPMachinePosition C70 2.5.15 IEZNcPosition::GetTCPMachinePosition □ Custom call procedure HRESULT GetTCPMachinePosition ( LONG lAxisNo, DOUBLE* pdPosition, LONG* plRet ) □ Automation call procedure Position_ GetTCPMachinePosition ( lAxisNo As LONG pdPosition As DOUBLE* ) As LONG □ Argument // (I) Axis No. // (O) Tip machine position // (O) Error code // (I) Axis No. // (O) Tip machine position // (O) Error code lAxisNo: Set the axis No. (From Axis 1 = from 1) pdPosition: Returns the tip machine position of the set axis No. of the set part system. Data range: -99,999.999 to 99,999.999 [mm] This will vary according to the NC system specifications and parameters. Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets the tip machine position. □ Function This is valid only for the M700/M800 series. This function is not supported with C70. □ Reference Specification System Axis number 2-39 M800 Get tip machine position plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_ADDR: Invalid part system, axis No. setting EZNC_DATA_READ_READ: Data is not readable EZ_ERR_NOT_SUPPORT: Not supported □ M700 2.5.16 IEZNcPosition::GetTCPWorkPosition C70 2.5.16 IEZNcPosition::GetTCPWorkPosition □ Custom call procedure HRESULT GetTCPWorkPosition ( LONG lAxisNo, DOUBLE* pdPosition, LONG* plRet ) □ Automation call procedure Position_ GetTCPWorkPosition ( lAxisNo As LONG pdPosition As DOUBLE* ) As LONG □ Argument // (I) Axis No. // (O) Tip workpiece position // (O) Error code // (I) Axis No. // (O) Tip workpiece position // (O) Error code lAxisNo: Sets the axis No. (From Axis 1 = from 1) pdPosition: Returns the tip workpiece position of the set axis No. of the set part system. Data range: -99,999.999 to 99,999.999 [mm] This will vary according to the NC system specifications and parameters. Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets the tip workpiece position. □ Function This is valid only for the M700/M800 series. This function is not supported with C70. □ Reference Specification System Axis number 2-40 M800 Get tip workpiece position plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_ADDR: Invalid part system, axis No. setting EZNC_DATA_READ_READ: Data is not readable EZ_ERR_NOT_SUPPORT: Not supported □ M700 2.5.17 IEZNcPosition::GetFeedbackPosition M700 2.5.17 IEZNcPosition::GetFeedbackPosition □ Custom call procedure HRESULT GetFeedbackPosition ( LONG lAxisNo, DOUBLE* pdPosition, LONG* plRet ) □ Automation call procedure Position_ GetFeedbackPosition ( lAxisNo As LONG pdPosition As DOUBLE* ) As LONG □ Argument Get feedback position // (I) Axis No. // (O) Feedback position // (O) Error code // (I) Axis No. // (O) Feedback position // (O) Error code lAxisNo: Sets the axis No. (From Axis 1 = from 1) pdPosition: Returns the feedback position of the set axis of the set part system. Data range: -99,999.999 to 99,999.999 [mm] This will vary according to the NC system specifications and parameters. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_ADDR: Invalid part system, axis No. setting EZNC_DATA_READ_READ: Data is not readable EZ_ERR_NOT_SUPPORT: Not supported Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets the feedback position. □ Function This is valid only for the M700/M800 series. This function is not supported with C70. □ Reference □ Specification System Axis number 2-41 M800 2.5.18 IEZNcPosition::GetTableCoordinationPosition M700 2.5.18 IEZNcPosition::GetTableCoordinationPosition M800 Get table coordinate system counter □ Custom call procedure HRESULT GetTableCoordinationPosition ( LONG lAxisNo, // (I) Axis No. DOUBLE* pdPosition, // (O) Table coordinate system counter LONG* plRet // (O) Error code ) □ Automation call procedure Position_ GetTableCoordinationPosition ( lAxisNo As LONG // (I) Axis No. pdPosition As DOUBLE* // (O) Table coordinate system counter ) As LONG // (O) Error code □ Argument lAxisNo: Sets the axis No. (From Axis 1 = from 1) pdPosition: Returns the table coordinate system counter of the set axis of the set part system. Data range: -99,999.999 to 99,999.999 [mm] This will vary according to the NC system specifications and parameters. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_ADDR: Invalid part system, axis No. setting EZNC_DATA_READ_READ: Data is not readable EZ_ERR_NOT_SUPPORT: Not supported Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets the table coordinate system counter. □ Function This is valid only for the M700/M800 series. This function is not supported with C70. □ Reference □ Specification System Axis number 2-42 2.5.19 IEZNcPosition::GetWorkInstallationPosition M700 2.5.19 IEZNcPosition::GetWorkInstallationPosition M800 Get workpiece installation coordinate system counter □ Custom call procedure HRESULT GetWorkInstallationPosition ( LONG lAxisNo, // (I) Axis No. DOUBLE* pdPosition, // (O) Workpiece installation coordinate system counter LONG* plRet // (O) Error code ) □ Automation call procedure Position_ GetWorkInstallationPosition ( lAxisNo As LONG // (I) Axis No. pdPosition As DOUBLE* // (O) Workpiece installation coordinate system counter ) As LONG // (O) Error code □ Argument lAxisNo: Sets the axis No. (From Axis 1 = from 1) pdPosition: Returns the workpiece installation coordinate system counter of the set axis of the set system. Data range: -99,999.999 to 99,999.999 [mm] This will vary according to the NC system specifications and parameters. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_ADDR: Invalid part system, axis No. setting EZNC_DATA_READ_READ: Data is not readable EZ_ERR_NOT_SUPPORT: Not supported Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets the workpiece installation coordinate system counter. □ Function This is valid only for the M700/M800 series. This function is not supported with C70. □ Reference □ Specification System Axis number 2-43 2.5.20 IEZNcPosition::GetInclinedSurfacePosition M700 2.5.20 IEZNcPosition::GetInclinedSurfacePosition M800 Get inclined surface coordinate system counter □ Custom call procedure HRESULT GetInclinedSurfacePosition ( LONG lAxisNo, // (I) Axis No. DOUBLE* pdPosition, // (O) Inclined surface coordinate system counter LONG* plRet // (O) Error code ) □ Automation call procedure Position_ GetInclinedSurfacePosition ( lAxisNo As LONG // (I) Axis No. pdPosition As DOUBLE* // (O) Inclined surface coordinate system counter ) As LONG // (O) Error code □ Argument lAxisNo: Sets the axis No. (From Axis 1 = from 1) pdPosition: Returns the inclined surface coordinate system counter of the set axis No. of the set part system. Data range: -99,999.999 to 99,999.999 [mm] This will vary according to the NC system specifications and parameters. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_ADDR: Invalid part system, axis No. setting EZNC_DATA_READ_READ: Data is not readable EZ_ERR_NOT_SUPPORT: Not supported Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets the inclined surface coordinate system counter. □ Function This is valid only for the M700/M800 series. This function is not supported with C70. □ Reference □ Specification System Axis number 2-44 2.6 IEZNcCommand2 Interface 2.6.1 IEZNcCommand2::GetGCodeCommand C70 2.6.1 IEZNcCommand2::GetGCodeCommand M700 M800 Get G code modal command value □ Custom call procedure HRESULT GetGCodeCommand( LONG lType, // (I) Type DOUBLE* pdValue, // (O) Command value LONG* plRet // (O) Error code ) □ Automation call procedure Command_GetGCodeCommand( lType As LONG // (I) Type pdValue As DOUBLE* // (O) Command value ) As LONG // (O) Error code □ lType: Sets the G code modal command value type to get. Argument The following describes examples for the M700/M800 series M system. The content will differ depending on the type and the settings. Value Meaning 1 Group 1 (Interpolation mode) G00, G01, G02, G03, G33, G02.1, G03.1, G02.3, G03.3, G02.4,G03.4, G062 command modal 2 Group 2 (Plane selection) G17, G18, G19 command modal 3 Group 3 (Absolute) G90, (incremental) G91 command modal 4 Group 4 (Chuck barrier) G22, G23 command modal 5 Group 5 (Feed mode) G93, G94, G95 command modal 6 Group 6 (Inch) G20, (millimeter) G21 command modal 7 Group 7 (Radial compensation mode) G40, G41, G42, G41.2, G42.2 command modal 8 Group 8 (Length compensation mode) G43, G44, G43.1, G43.4, G43.5, G49 command modal 9 Group 9 (Fixed cycle mode) G70, G71, G72, G73, G74, G75, G76, G77, G78, G79, G80, G81, G82, G83, G84, G85, G86, G87, G88, G89 command modal 10 Group 10 (Initial point return) G98, (R point return) G99 command modal 11 Group 11 G50, G51 command modal 12 Group 12 (Workpiece coordinate system modal) G54, G54.1, G55, G56, G57, G58, G59 command modal 13 Group 13 (Cutting mode) G61, G61.1, G61.2, G62, G63, G63.1, G63.2, G64 command modal 14 Group 14 (Modal call) G66, G66.1, G67 command modal 15 Group 15 (Normal control) G40.1, G41.1, G42.1 command modal (only for M700/M800 series M system) 16 Group 16 (Coordinate rotation) G68, G68.2, G68.3, G69 (only for M700/M800 series M system) 17 Group 17 (Constant surface speed control) G96, G97 command modal 18 Group 18 (Polar coordinate command) G15, G16 command modal 19 Group 19 (G command mirror image) G50.1, G51.1 command modal 20 Group 20 (Spindle selection) G43.1, G44.1, G47.1 command modal 21 Group 21 (Cylindrical interpolation / polar coordinate interpolation) G07.1, G107, G12.1, G112, G13.1, G113 (only for M700/M800 series M system) 2-45 pdValue : Returns the current G code modal command value of the set part system. Value (Example) Meaning 2 G02 17 G17 50.2 G50.2 plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZ_ERR_DATA_TYPE: Invalid argument data type EZNC_DATA_READ_ADDR: Invalid system EZNC_DATA_READ_READ: Data is not readable □ Return Value Meaning value Normal termination S_OK Communication failure S_FALSE □ Gets the G code command modal value of the set part system. Refer to the "Programming Manual" Function of each model for the individual model's G command and group list. Also, depending on the model, different operation than with the original G code command may be incorporated by using the G code macro call. Check after referring to the instructions issued by MTB □ Reference □ Specification System 2-46 2.6.2 IEZNcCommand2::GetToolCommand C70 2.6.2 IEZNcCommand2::GetToolCommand □ Custom call procedure HRESULT GetToolCommand( LONG lAxisNo, LONG lType, LONG* plValue, LONG* plRet ) □ Automation call procedure Command_GetToolCommand( lAxisNo As LONG lType As LONG plValue As LONG* ) As LONG □ Argument M700 M800 Get tool compensation number // (I) Axis No. // (I) Type // (O) Tool compensation number // (O) Error code // (I) Axis No. // (I) Type // (O) Tool compensation number // (O) Error code lAxisNo: Sets the axis when getting the length compensation number. (From Axis 1 = from 1) lType: Sets the tool compensation type to get. Value Meaning 0 D command value of the shape compensation number 1 D command value of the wear compensation number 2 H command value of the length compensation number (axis specification necessary) plValue : Returns the shape/wear compensation number of the tool for the set part system and the tool length compensation number of the set axis No. in the set part system. Data range: 1 to 200 (range depends on the number of tool offset sets) Value meaning: 1 = D1, 1 = H1 plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZ_ERR_DATA_TYPE: Invalid argument data type EZNC_DATA_READ_ADDR: Invalid part system, axis No. setting EZNC_DATA_READ_READ: Data is not readable EZ_ERR_NOT_SUPPORT: Not supported Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets the shape/wear compensation number of the tool for the set part system and the tool length □ Function compensation number of the set axis No. in the set part system. □ Reference □ Specification System Axis number 2-47 2.6.3 IEZNcCommand2::GetFeedCommand C70 2.6.3 IEZNcCommand2::GetFeedCommand □ Custom call procedure HRESULT GetFeedCommand( LONG lType, DOUBLE* pdValue, LONG* plRet ) □ Automation call procedure Command_GetFeedCommand( lType As LONG pdValue As DOUBLE* ) As LONG □ Argument M700 M800 Get feed speed command value // (I) Type // (O) Command value // (O) Error code // (I) Type // (O) Command value // (O) Error code lType: Sets the command value type to get. Value Meaning 0 F command feed speed (FA) 1 Manual effective feed speed (FM) 2 Synchronization feed speed (FS) 3 Automatic effective feed speed (FC) 4 Screw lead (FE) 5 Tip speed (TCP) (M700/M800 series only) pdValue : Returns the current feed speed command value of the set part system. Data range Feed speed type M700/M800 series C70 FA 0.000 to 10,000,000.000 [mm/min] 0.000 to 1,000,000.000 [mm/min] FM 0.000 to 1,000,000.000 [mm/min] 0.000 to 1,000,000.000 [mm/min] FS 0.000 to 1,000,000.000000 [mm/rev] 0.000 to 1,000,000.000 [mm/rev] FC 0.000 to 100,000.000 [mm/min] 0.000 to 1,000,000.000 [mm/min] FE 0.000 to 100,000.000 [mm/rev] 0.000 to 999.9999 [mm/rev] (Unit will vary) The total number of digits is determined by the NC model, options, and MTB setting values (parameters). plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZ_ERR_DATA_TYPE: Invalid argument data type EZNC_DATA_READ_ADDR: Invalid system EZNC_DATA_READ_READ: Data is not readable Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets the current feed speed command value of the set part system. □ Function □ Reference □ Specification System 2-48 2.6.4 IEZNcCommand2::GetCommand2 C70 2.6.4 IEZNcCommand2::GetCommand2 M700 M800 Get M/S/T/B function command modal value □ Custom call procedure HRESULT GetCommand2( LONG lType, // (I) Command type LONG lIndex // (I) Command number LONG* plValue, // (O) Command value LONG* plRet // (O) Error code ) □ Automation call procedure Command_GetCommand2( lType As LONG // (I) Command type lIndex As LONG // (I) Command number plValue As LONG* // (O) Command value ) As LONG // (O) Error code lType: Sets the command value type to get. □ Argument Value Meaning EZNC_M M command (sub function M command value) EZNC_S S command (spindle rotation speed S command value) EZNC_T T command (tool change T command value) EZNC_B B command (second sub function command value (specification of index table position, etc.)) lIndex: Set the command number. Example) When lType = EZNC_M and lIndex= 1, the M command will be 1. Model Command C70 M700 series M800 series 1 to 4 1 to 4 1 to maximum number 1 to maximum number of spindles* of spindles* 1 to 4 1 1 T 1 to 4 1 to 4 1 to 4 B *For the maximum number of spindles, refer to the product catalog for each Mitsubishi CNC. M S 1 to 4 1 to 7 plValue : Returns the current command value of the set part system. Data range: 0 to 99,999999 (maximum) plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZ_ERR_DATA_TYPE: Invalid argument data type EZNC_DATA_READ_READ: Data is not readable EZNC_DATA_READ_ADDR: Invalid part system setting EZNC_DATA_READ_SUBSECT: Invalid subsection number EZ_ERR_NOT_SUPPORT: Not supported Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets the current command modal value for the M/S/T/B function of the set part system. □ Function □ SetCommad2( ) Reference □ Specification System (PLC axis system cannot set) 2-49 2.6.5 IEZNcCommand2::SetCommand2 C70 2.6.5 IEZNcCommand2::SetCommand2 M700 M800 Set manual numerical value command value settings for M/S/T/B functions □ Custom call procedure HRESULT SetCommand2( LONG lType, // (I) Type LONG lIndex // (I) Command number LONG lValue, // (I) Command value LONG* plRet // (O) Error code ) □ Automation call procedure Command_SetCommand2( lType As LONG // (I) Type lIndex As LONG // (I) Command number lValue As LONG // (I) Command value ) As LONG // (O) Error code lType: Sets the command value type to get. □ Argument Value Meaning EZNC_M M command (sub function M command value) EZNC_S S command (spindle rotation speed S command value) EZNC_T T command (tool change T command value) EZNC_B B command (second sub function command value (specification of index table position, etc.)) lIndex: Sets the set number. Example) When lType = EZNC_M and lIndex= 1, the M command will be 1. Model Command C70 M700 series M800 series 1 to 4 1 to 4 1 to maximum number 1 to maximum number of spindles* of spindles* 1 to 4 1 1 T 1 to 4 1 to 4 1 to 4 B *For the maximum number of spindles, refer to the product catalog for each Mitsubishi CNC. M S 1 to 4 1 to 7 lValue: Sets the command value of the set part system or the axis No. Data range: 0 to 99999999 (maximum) plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZ_ERR_DATA_TYPE: Invalid argument data type EZNC_DATA_WRITE_WRITE: Data is not writable EZNC_DATA_WRITE_ADDR: Invalid part system setting EZNC_DATA_WRITE_SUBSECT: Invalid subsection number EZ_ERR_NOT_SUPPORT: Not supported Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Sets the manual numerical value command value of the M/S/T/B function of the axis No. or the □ Function set part system. □ Reference GetCommand2( ) 2-50 2.7 IEZNcProgram2 Interface 2.7.1 IEZNcProgram2::CurrentBlockRead C70 2.7.1 IEZNcProgram2::CurrentBlockRead □ Custom call procedure HRESULT CurrentBlockRead( LONG lBlockNumber, LPOLESTR* lppwszProgramData, LONG* plCurrentBlockNo, LONG* plRet ) □ Automation call procedure Program_CurrentBlockRead( lBlockNumber As LONG lppwszProgramData As STRING* plCurrentBlockNo As LONG* ) As LONG □ Argument M700 M800 Read current program block // (I) Number of blocks // (O) Program storage // (O) Block number being executed // (O) Error code // (I) Number of blocks // (O) Program storage // (O) Block number being executed // (O) Error code lBlockNumber: Sets the number of blocks to get. Value: 1 to 10 lppwszProgramData: Gets the program blocks as a UNICODE character string. To separate program blocks, CR, LF codes are inserted between them. In addition, NULL is inserted at the end. plCurrentBlockNo: Returns the block number being executed in the got blocks. Value Meaning 0 Not in operation 1 1st block 2 2nd block plRet: Returns an error code. (Upon automation, the return value is used.) S_OK : Normal termination EZNC_OPE_GETPRGBLK_ADDR: Invalid part system setting EZNC_OPE_GETPRGBLK_DATAERR: Error in communication data between NC and personal computer EZNC_OPE_GETPRGBLK_DATASIZE: Application does not fit into prepared buffer EZNC_OPE_GETPRGBLK_NOS: The number of blocks setting is invalid Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets the program for which the operation search has been completed or the program currently □ Function being executed. Reads the program for which the operation search has been completed for the set part system or the program block in operation. If no operation search has been competed, the following applies. lppwszProgramData = "\0" plCurrentBlockNo = 0 □ Reference □ Specification As the character string area memory is allocated in this product, clients using VC++ need to release the character string area memory explicitly with CoTaskMemFree(). Even if no operation search has been completed, the character string area memory must be released. IEZNcOperation::Search( ) System 2-51 2.7.2 IEZNcProgram2::GetProgramNumber2 C70 2.7.2 IEZNcProgram2::GetProgramNumber2 □ Custom call procedure HRESULT GetProgramNumber2( LONG lProgramType, LPOLESTR* lppwszProgramNo, LONG* plRet ) □ Automation call procedure Program_GetProgramNumber2( lProgramType As LONG lppwszProgramNo As STRING* ) As LONG □ Argument M700 M800 Get program number // (I) Program type // (O) Program No. // (O) Error code // (I) Program type // (O) Program No. // (O) Error code lProgramType: Sets the program type. Value Meaning EZNC_MAINPRG Main program EZNC_SUBPRG Subprogram lppwszProgramNo: Returns the number of the program for which search has been completed or currently in automatic operation as a UNICODE character string. The program number is got as the program file name with the M700/M800 series. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZ_ERR_DATA_TYPE: Invalid argument data type EZNC_DATA_READ_ADDR: Invalid part system setting EZNC_DATA_READ_READ: Data is not readable Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Returns the number of the program for which search has been completed or currently in □ Function automatic operation. As the character string area memory is allocated in this product, clients using VC++ need to release the character string area memory explicitly with CoTaskMemFree(). □ Reference □ Specification GetSequenceNumber(), GetBlockNumber(), GetSubProLevel() System 2-52 2.7.3 IEZNcProgram2::GetSequenceNumber C70 2.7.3 IEZNcProgram2::GetSequenceNumber □ Custom call procedure HRESULT GetSequenceNumber( LONG lProgramType, LONG* plSequenceNo, LONG* plRet ) □ Automation call procedure Program_GetSequenceNumber( lProgramType As LONG plSequenceNo As LONG* ) As LONG □ Argument M700 M800 Read sequence number // (I) Program type // (O) Sequence number // (O) Error code // (I) Program type // (O) Sequence number // (O) Error code lProgramType: Sets the program type. Value Meaning EZNC_MAINPRG Main program EZNC_SUBPRG Subprogram plSequenceNo: Returns the sequence number of the program for which search has been completed or currently in automatic operation. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK : Normal termination EZ_ERR_DATA_TYPE : Invalid argument data type EZNC_DATA_READ_ADDR : Invalid system specification EZNC_DATA_READ_READ : Data is not readable □ Return Value value S_OK S_FALSE Returns the sequence number of the □ Function in automatic operation. □ Reference □ Specification Meaning Normal termination Communication failure program for which search has been completed or currently GetProgramNumber2(), GetBlockNumber(), GetSubProLevel() System 2-53 2.7.4 IEZNcProgram2::GetBlockNumber C70 2.7.4 IEZNcProgram2::GetBlockNumber Argument M800 Read block number □ Custom call procedure HRESULT GetBlockNumber( LONG lProgramType, LONG* plBlockNo, LONG* plRet ) □ Automation call procedure Program_GetBlockNumber( lProgramType As LONG plBlockNo As LONG* ) As LONG □ M700 // (I) Program type // (O) Block number // (O) Error code // (I) Program type // (O) Block number // (O) Error code lProgramType: Sets the program type. Value Meaning EZNC_MAINPRG Main program EZNC_SUBPRG Subprogram plBlockNo: Returns the block number of the program for which search has been completed or currently in automatic operation. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZ_ERR_DATA_TYPE: Invalid argument data type EZNC_DATA_READ_ADDR: Invalid part system setting EZNC_DATA_READ_READ: Data is not readable □ Return Value value S_OK S_FALSE Meaning Normal termination Communication failure □ Function Returns the block number of the program for which search has been completed or currently in automatic operation. □ GetProgramNumber2(), GetSequenceNumber(), GetSubProLevel() Reference □ Specification System 2-54 2.7.5 IEZNcProgram2::GetSubProLevel C70 2.7.5 IEZNcProgram2::GetSubProLevel Argument // (O) Level // (O) Error code // (O) Level // (O) Error code plLevel : Returns the subprogram call level. Value: 0 to 8 plRet: Returns an error code. (Upon automation, the return value is used.) S_OK : Normal termination EZNC_DATA_READ_ADDR: Invalid part system setting EZNC_DATA_READ_READ: Data is not readable Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets the sub-program call level of the set system. □ Function □ Reference □ Specification M800 Get subprogram call level □ Custom call procedure HRESULT GetSubProLevel( LONG* plLevel, LONG* plRet ) □ Automation call procedure Program_GetSubProLevel( plLevel As LONG* ) As LONG □ M700 GetProgramNumber2(), GetSequenceNumber() System 2-55 2.7.6 IEZNcProgram2::GetInformation C70 2.7.6 IEZNcProgram2::GetInformation Argument M800 Get program information □ Custom call procedure HRESULT GetInformation( LONG lInfoType, LONG* plInfoData, LONG* plRet ) □ Automation call procedure Program_GetInformation( lInfoType As LONG plInfoData As LONG* ) As LONG □ M700 // (I) Information type // (O) User machining program information // (O) Error code // (I) Information type // (O) User machining program information // (O) Error code lInfoType: Sets the type of information to get. Value Meaning EZNC_PRG_MAXNUM Maximum number of registrable programs EZNC_PRG_CURNUM Number of programs currently registered EZNC_PRG_RESTNUM Remaining number of registrable programs EZNC_PRG_CHARNUM Number of registered characters EZNC_PRG_RESTCHARNUM Remaining number of registrable characters (250 character units) plInfoData: Returns the program information specified by IInfoType. If EZNC_PRG_MAXNUM set, lpInfoData means 1: 200 [programs]. The data range depends on the specifications of the NC control unit. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZ_ERR_DATA_TYPE: Invalid argument data type EZNC_DATA_READ_READ: Data is not readable □ Return Value value S_OK S_FALSE Gets program information. □ Function Meaning Normal termination Communication failure □ Reference □ Specification 2-56 2.7.7 IEZNcProgram2:: GetCurrentBlockByByte M700 2.7.7 IEZNcProgram2:: GetCurrentBlockByByte □ Custom call procedure HRESULT GetCurrentBlockByByte( LONG* plSize, LONG* plRet ) □ Automation call procedure Program_ GetCurrentBlockByByte( plSize As LONG* ) As LONG □ Argument M800 Get program information // (O) Number of bytes // (O) Error code // (O) Number of bytes // (O) Error code plSize : Returns the number of bytes from start of program of the set part system. Value: From 0 plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_ADDR: Invalid part system setting EZNC_DATA_READ_READ: Data is not readable EZ_ERR_NOT_SUPPORT: Not supported Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets the number of bytes from the start of the program in the searched block or the block □ Function currently stopped with single block stop. This is valid only for the M700/M800 series. This function is not supported with C70. □ Reference □ Specification 2-57 2.8 IEZNcTime Interface 2.8.1 IEZNcTime::GetClockData C70 2.8.1 IEZNcTime::GetClockData Argument // (O) Year, month, day // (O) Hour, minute, second // (O) Error code // (O) Year, month, day // (O) Hour, minute, second // (O) Error code plDate: Returns the date (year, month, day). Output example: 1998/12/05 = 19981205 plTime: Returns the time (hour, minute, second) of the clock in the NC. Value: 0 to 235959 Output example: 23:59:59 = 235959 plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_READ: Data is not readable Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets the date and time from the clock in the NC. □ Function □ Reference M800 Get date and time □ Custom call procedure HRESULT GetClockData( LONG* plDate, LONG* plTime, LONG* plRet ) □ Automation call procedure Time_GetClockData( plDate As LONG* plTime As LONG* ) As LONG □ M700 SetClockData() □ Specification 2-58 2.8.2 IEZNcTime::SetClockData C70 2.8.2 IEZNcTime::SetClockData Argument // (I) Year, month, day // (I) Hour, minute, second // (O) Error code // (I) Year, month, day // (I) Hour, minute, second // (O) Error code lDate: Sets the date (year, month, day). Setting example: 1998/12/05 = 19981205 lTime: Sets the time (hour, minute, second) for the clock in the NC. Value: 0 to 235959 Setting example: 23:59:59 = 235959 plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_WRITE_WRITE: Data is not writable Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Sets the date and time for the clock in the NC. □ Function □ Reference M800 Set date and time □ Custom call procedure HRESULT SetClockData( LONG lDate, LONG lTime, LONG* plRet ) □ Automation call procedure Time_SetClockData( lDate As LONG lTime As LONG ) As LONG □ M700 GetClockData() □ Specification 2-59 2.8.3 IEZNcTime::GetAliveTime C70 2.8.3 IEZNcTime::GetAliveTime Argument M800 Get power-on time □ Custom call procedure HRESULT GetAliveTime( LONG* plTime, LONG* plRet ) □ Automation call procedure Time_GetAliveTime( plTime As LONG* ) As LONG □ M700 // (O) Power-on time // (O) Error code // (O) Power-on time // (O) Error code plTime: Gets total power-on time (hour, minute, second) from the controller power ON to OFF. Value: 0 to 99995959 Output example: 9999:59:59 = 99995959 plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_READ: Data is not readable Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets total power-on time (hour, minute, second) from the controller power ON to OFF. □ Function Stops integration when the value reaches the maximum value, and retains the maximum value. □ Reference SetAliveTime() □ Specification 2-60 2.8.4 IEZNcTime::SetAliveTime C70 2.8.4 IEZNcTime::SetAliveTime Argument M800 Set power-on time □ Custom call procedure HRESULT SetAliveTime( LONG lTime, LONG* plRet ) □ Automation call procedure Time_SetAliveTime( lTime As LONG ) As LONG □ M700 // (I) Power-on time // (O) Error code // (I) Power-on time // (O) Error code lTime: Sets total power-on time (hour, minute, second) from the controller power ON to OFF. Value: 0 to 99995959 Setting example: 9999:59:59 = 99995959 plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_WRITE_WRITE: Data is not writable Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Forcibly sets total power-on time (hour, minute, second) from the controller power ON to OFF. □ Function □ Reference GetAliveTime() □ Specification 2-61 2.8.5 IEZNcTime::GetRunTime C70 2.8.5 IEZNcTime::GetRunTime Argument M800 Get automatic operation time □ Custom call procedure HRESULT GetRunTime( LONG* plTime, LONG* plRet ) □ Automation call procedure Time_GetRunTime( plTime As LONG* ) As LONG □ M700 // (O) Automatic operation time // (O) Error code // (O) Automatic operation time // (O) Error code plTime: Returns total processing time (hour, minute, second) from the automatic operation start using memory (tape) or in MDI mode to the termination by M02/M30 or the reset operation. Value: 0 to 99995959 Output example: 9999:59:59 = 99995959 plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_READ: Data is not readable Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets total processing time (hour, minute, second) from the automatic operation start using □ Function memory (tape) or in MDI mode to the termination by M02/M30 or the reset operation. Stops integration when the value reaches the maximum value, and retains the maximum value. □ Reference SetRunTime() □ Specification 2-62 2.8.6 IEZNcTime::SetRunTime C70 2.8.6 IEZNcTime::SetRunTime Argument M800 Set automatic operation time □ Custom call procedure HRESULT SetRunTime( LONG lTime, LONG* plRet ) □ Automation call procedure Time_SetRunTime( lTime As LONG ) As LONG □ M700 // (I) Automatic operation time // (O) Error code // (I) Automatic operation time // (O) Error code lTime: Sets total processing time (hour, minute, second) from the automatic operation start using memory (tape) or in MDI mode to the termination by M02/M30 or the reset operation. Value: 0 to 99995959 Setting example: 9999:59:59 = 99995959 plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_WRITE_WRITE: Data is not writable Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Forcibly sets total processing time (hour, minute, second) from the automatic operation start □ Function using memory (tape) or in MDI mode to the termination by M02/M30 or the reset operation. □ Reference GetRunTime() □ Specification 2-63 2.8.7 IEZNcTime::GetStartTime C70 2.8.7 IEZNcTime::GetStartTime Argument M800 Get automatic start time □ Custom call procedure HRESULT GetStartTime( LONG* plTime, LONG* plRet ) □ Automation call procedure Time_GetStartTime( plTime As LONG* ) As LONG □ M700 // (O) Automatic start time // (O) Error code // (O) Automatic start time // (O) Error code plTime: Returns total automatic operation time (hour, minute, second) from the automatic operation start using memory (tape) or in MDI mode to the termination by feed hold, block stop, or reset. Value: 0 to 99995959 Output example: 9999:59:59 = 99995959 plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_READ: Data is not readable Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets total automatic operation time (hour, minute, second) from the automatic operation start □ Function using memory (tape) or in MDI mode to the termination by feed hold, block stop, or reset. □ Reference SetStartTime() □ Specification 2-64 2.8.8 IEZNcTime::SetStartTime C70 2.8.8 IEZNcTime::SetStartTime Argument M800 Set automatic start time □ Custom call procedure HRESULT SetStartTime( LONG lTime, LONG* plRet ) □ Automation call procedure Time_SetStartTime( lTime As LONG ) As LONG □ M700 // (I) Automatic start time // (O) Error code // (I) Automatic start time // (O) Error code lTime: Setes total automatic operation time (hour, minute, second) from the automatic operation start using memory (tape) or in MDI mode to the termination by feed hold, block stop, or reset. Value: 0 to 99995959 Setting example: 9999:59:59 = 99995959 plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_WRITE_WRITE: Data is not writable Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Sets total automatic operation time (hour, minute, second) from the automatic operation start □ Function using memory (tape) or in MDI mode to the termination by feed hold, block stop, or reset. □ Reference GetStartTime() □ Specification 2-65 2.8.9 IEZNcTime::GetEstimateTime C70 2.8.9 IEZNcTime::GetEstimateTime Argument M800 Get external integration time □ Custom call procedure HRESULT GetEstimateTime( LONG lKind, LONG* plTime, LONG* plRet ) □ Automation call procedure Time_GetEstimateTime( lKind As LONG plTime As LONG* ) As LONG □ M700 // (I) External integration time type // (O) External integration time // (O) Error code // (I) External integration time type // (O) External integration time // (O) Error code lKind: Sets the external integration time type. Value Meaning 0 External integration time 1 (programmable controller device C70: Y314 M700/M800 series: Y704): When counting with the device turned ON 1 External integration time 2 (programmable controller device C70: Y315 M700/M800 series: Y705): When counting with the device turned ON plTime: Returns the time (hour, minute, second) controlled by the programmable controller. Stops integration when the integration time display reaches the maximum value, and retains the display with the maximum value. Value: 0 to 99995959 Output example: 9999:59:59 = 99995959 plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_READ: Data is not readable Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Returns the time (hour, minute, second) controlled by the programmable controller. Starts □ Function counting when the user programmable controller device is turned ON. Refer to the programmable controller interface manual for each model because the device number differs depending on models. □ Reference SetEstimateTime() □ Specification 2-66 2.8.10 IEZNcTime::SetEstimateTime C70 2.8.10 IEZNcTime::SetEstimateTime Argument M800 Set external integration time □ Custom call procedure HRESULT SetEstimateTime( LONG lKind, LONG lTime, LONG* plRet ) □ Automation call procedure Time_SetEstimateTime( lKind As LONG lTime As LONG ) As LONG □ M700 // (I) External integration time type // (I) External integration time // (O) Error code // (I) External integration time type // (I) External integration time // (O) Error code lKind: Sets the external integration time type. Value Meaning 0 External integration time 1 (programmable controller device C70: Y314 M700/M800 series: Y704): When counting with the device turned ON 1 External integration time 2 (programmable controller device C70: Y315 M700/M800 series: Y705): When counting with the device turned ON lTime: Sets the time (hour, minute, second) controlled by the PLC. Stops integration when the integration time display reaches the maximum value, and retains the display with the maximum value. Value: 0 to 99995959 Setting example: 9999:59:59 = 99995959 plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_WRITE_WRITE: Data is not writable Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Sets the time (hour, minute, second) controlled by the programmable controller. Starts counting □ Function when the user programmable controller device is turned ON. Refer to the programmable controller interface manual for each model because the device number differs depending on models. □ Reference GetEstimateTime() □ Specification 2-67 2.9 IEZNcAxisMonitor Interface 2.9.1 IEZNcAxisMonitor::GetServoMonitor C70 2.9.1 IEZNcAxisMonitor::GetServoMonitor □ Custom call procedure HRESULT GetServoMonitor( LONG lAxisNo, LONG lIndex, LONG* plData, LPOLESTR* lppwszBuffer, LONG* plRet ) □ Automation call procedure Monitor_GetServoMonitor( lAxisNo As LONG lIndex As LONG plData As LONG* lppwszBuffer As STRING* ) As LONG □ Argument M700 M800 Get servo monitor // (I) Axis No. // (I) Monitor data // (O) Monitor data // (O) Monitor data character string // (O) Error code // (I) Axis No. // (I) Monitor data // (O) Monitor data // (O) Monitor data character string // (O) Error code lAxisNo: Sets the axis No. (From Axis 1 = from 1) lIndex: Sets the parameter number for the set axis No. in the set system. plData: Returns the axis status. lppwszBuffer: Outputs data (return value) as a UNICODE character string when any of 100 to 104 is set for lIndex. For the M700/M800 series, outputs data (return value) as a UNICODE character string when any of 11 to 15, 18 to 20, or 100 to 104 is set for lIndex. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_READ: Data is not readable EZNC_DATA_READ_DATASIZE: Application does not fit into prepared buffer EZNC_DATA_READ_DATATYPE: Invalid data type (parameter number) EZNC_DATA_READ_ADDR: Invalid part system, axis No. setting EZNC_DATA_READ_AXIS: Invalid axis specification EZ_ERR_DATA_TYPE: Invalid argument data type lIndex 0 1 2 3 4 5 6 7 10 Description GAIN. Position loop gain status display. DROOP. (tracking delay) SPEED. Actual motor speed. CURRENT. Load current. Motor current (displayed by converting to continuous current when stalled). MAXCUR1. Maximum current I. MAXCUR2. Maximum current II. OVER LOAD. Overload. REGEN LOAD. Regenerative load. CYC CNT. Cycle counter. 2-68 Data range Unit: 1/s Unit: i From 0 [rpm] From 0 [%] Unit: % Unit: % Unit: % Unit: % Unit: Pulse Remarks □ Argument lIndex Description Data range 11 12 13 14 15 16 17 18 19 20 100 GRIDSP. Grid interval. GRID. Grid amount. MACPOS. Machine position. MOT POS. Motor end FB. SCA POS. Machine end FB. FB ERROR. FB error. DFB COMP. DFB compensation amount. Remain command Currnt posn. Manual interrupt amount. AMP DISP. Amplifier display. 7-segment LED display on a drive unite. Unit: Command unit* Unit: Command unit* Unit: Command unit* Unit: Command unit* Unit: Command unit* Unit: i Remarks Unit: Command unit* Unit: Command unit* Unit: Command unit* Outputs a 3-digit character string from "00\0" to "FF\0". 101 Alarm 1. Outputs a 3-digit character string. 102 Alarm 2. Same as above 103 Alarm 3. Same as above 104 Alarm 4. Same as above * The M700/M800 series allows acquisition of value (actual value) converted according to the command unit as a character string. Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE 2-69 □ Function Gets servo monitor information of the set axis No. in the set part system. When the data range in the Index table is [Unit: Command unit], the value got needs to be converted according to the command unit sets for the Mitsubishi CNC. For the setting unit, refer to the Mitsubishi CNC specifications. < For Linear axis> Metric system Conversion for 1 of LONG type For 10-µm specifications -999,999.99 to 999,999.99 1 = 1/200 (mm) For 1-µm specifications -99,999.999 to 99,999.999 1 = 1/2000 (mm) For 0.1-µm specifications -9,999.9999 to 9,999.9999 1 = 1/20000 (mm) For 10-nm specifications -999.99999 to 999.99999 1 = 1/200000 (mm) For 1-nm specifications -99.999999 to 99.999999 1 = 1/2000000 (mm) Inch system For 10-µm specifications -99,999.999 to 99,999.999 For 1-µm specifications -9,999.9999 to 9,999.9999 For 0.1-µm specifications -999.99999 to 999.99999 For 10-nm specifications -999.99999 to 999.99999 For 1-nm specifications -99.999999 to 99.999999 < For Rotary axis > Conversion for 1 of LONG type 1 = 1/200 (inch) 1 = 1/2000 (inch) 1 = 1/20000 (inch) 1 = 1/200000 (inch) 1 = 1/2000000 (inch) Metric system For 10-µm specifications -999999.99 to 999999.99 For 1-µm specifications -99,999.999 to 99,999.999 For 0.1-µm specifications -9999.9999 to 9999.9999 For 10-nm specifications -999.99999 to 999.99999 For 1-nm specifications -99.999999 to 99.999999 Conversion for 1 of LONG type 1 = 1/200 (mm) 1 = 1/2000 (mm) 1 = 1/20000 (mm) 1 = 1/200000 (mm) 1 = 1/2000000 (mm) Inch system For 10-µm specifications -999,999.99 to 999,999.99 For 1-µm specifications -99,999.999 to 99,999.999 For 0.1-µm specifications -9999.9999 to 9999.9999 For 10-nm specifications -999.99999 to 999.99999 For 1-nm specifications -99.999999 to 99.999999 Conversion for 1 of LONG type 1 = 1/200 (inch) 1 = 1/2000 (inch) 1 = 1/20000 (inch) 1 = 1/200000 (inch) 1 = 1/2000000 (inch) Conversion example) For the linear axis with the 1-µm specifications in the Metric system, when the LONG value got is 710001, 710001 ÷ 2000 = 355.0005. However, 355.0005 is rounded to minus infinity. Therefore the result is 355.000. Data in units of 0.5 µm (1/2000 mm) is rounded to minus infinity when displayed. This means that +0.5 µm is displayed as 0 and -0.5 µm is displayed as -1 µm. □ Reference □ Specification As the string area memory is allocated in this product, the client using VC++ needs to release the string area memory explicitly with CoTaskMemFree(). GetServoVersion(), GetServoDiagnosis() System , PLC axis , Axis number 2-70 2.9.2 IEZNcAxisMonitor::GetServoVersion C70 2.9.2 IEZNcAxisMonitor::GetServoVersion □ Custom call procedure HRESULT GetServoVersion( LONG lAxisNo, LONG lIndex, LPOLESTR* lppwszBuffer, LONG* plRet ) □ Automation call procedure Monitor_GetServoVersion( lAxisNo As LONG lIndex As LONG lppwszBuffer As STRING* ) As LONG □ Argument M700 M800 Get servo axis unit information // (I) Axis No. // (I) Servo information // (O) Servo information // (O) Error code // (I) Axis No. // (I) Servo information // (O) Servo information // (O) Error code lAxisNo: Sets the axis No. (From Axis 1 = from 1) lIndex: Set the servo information. Refer to the table below. lppwszBuffer: Sets servo information as a UNICODE character string. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_READ: Data is not readable EZNC_DATA_READ_ADDR: Invalid part system, axis No. setting EZNC_DATA_READ_AXIS: Invalid axis No. setting lIndex 0 1 2 3 4 5 6 Description Unit type Unit serial No. Software version Control method. Motor end detector Machine end detector Motor Data range Up to 17 alphanumeric characters. Up to 9 alphanumeric characters. Up to 17 alphanumeric characters. Up to 7 alphanumeric characters. Up to 9 alphanumeric characters. Up to 9 alphanumeric characters. Up to 9 alphanumeric characters. Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets servo version information. □ Function As the string area memory is allocated in this product, the client using VC++ needs to release the string area memory explicitly with CoTaskMemFree(). □ Reference □ Specification GetServoMonitor(), GetServoDiagnosis() System , PLC axis , Axis number 2-71 2.9.3 IEZNcAxisMonitor::GetServoDiagnosis C70 2.9.3 IEZNcAxisMonitor::GetServoDiagnosis M700 M800 Get servo diagnostics information □ Custom call procedure HRESULT GetServoDiagnosis( LONG lAxisNo, // (I) Axis No. LONG lIndex, // (I) Diagnostics information LONG* plData, // (O) Diagnostics information value LPOLESTR* lppwszBuffer, // (O) Diagnostics information character string LONG* plRet // (O) Error code ) □ Automation call procedure Monitor_GetServoDiagnosis( lAxisNo As LONG // (I) Axis No. lIndex As LONG // (I) Diagnostics information plData As LONG* // (O) Diagnostics information value lppwszBuffer As STRING* // (O) Diagnostics information character string ) As LONG // (O) Error code lAxisNo: Sets the axis No. (From Axis 1 = from 1) □ Argument lIndex: Sets servo diagnostics information. Refer to the table below. plData: Returns the servo diagnostics information value. lppwszBuffer: Gets diagnostics information as a UNICODE character string. Outputs a character string when lIndex is 21 to 30. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_READ: Data is not readable EZNC_DATA_READ_ADDR: Invalid system, spindle specification EZNC_DATA_READ_AXIS: Invalid axis specification □ Argument lIndex 0 1 2 3 4 5 6 7 8 11 12 13 14 15 16 17 18 lIndex Description Work time Alarm history 1 (Alarm No). ″ 2 (Alarm No). ″ 3 (Alarm No). ″ 4 (Alarm No). ″ 5 (Alarm No). ″ 6 (Alarm No). ″ 7 (Alarm No). ″ 8 (Alarm No). Alarm history 1 (time). ″ 2 (time). ″ 3 (time). ″ 4 (time). ″ 5 (time). ″ 6 (time). ″ 7 (time). ″ 8 (time). Description Data range 21 22 23 24 30 MNT (1). MNT (2). MNT (3). MNT (4). SYS. Up to 3 alphanumeric characters Same as above Same as above Same as above Up to 2 alphanumeric characters 2-72 Previous servo alarm number Same as above Same as above Same as above Same as above Same as above Same as above Same as above Previous servo alarm occurrence time Same as above Same as above Same as above Same as above Same as above Same as above Same as above Data range Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets servo diagnostics information. □ Function As the string area memory is allocated in this product, the client using VC++ needs to release the string area memory explicitly with CoTaskMemFree(). □ Reference □ Specification GetServoMonitor(), GetServoVersion() System , PLC axis , Axis number 2-73 2.9.4 IEZNcAxisMonitor::GetPowerVersion C70 2.9.4 IEZNcAxisMonitor::GetPowerVersion □ Custom call procedure HRESULT GetPowerVersion( LONG lAxisNo, LONG lIndex, LPOLESTR* lppwszBuffer, LONG* plRet ) □ Automation call procedure Monitor_GetPowerVersion( lAxisNo As LONG lIndex As LONG lppwszBuffer As STRING* ) As LONG □ Argument M700 M800 Get power supply version information // (I) Axis No. // (I) Version information //(O)Version information character string // (O) Error code // (I) Axis No. // (I) Version information // (O) Version information // (O) Error code lAxisNo: Sets the axis No. (From Axis 1 = from 1) lIndex: Sets version information. Refer to the table below. lppwszBuffer: Gets version information as a UNICODE character string. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_READ: Data is not readable EZNC_DATA_READ_ADDR: Invalid system, spindle specification lIndex 0 1 2 3 Description Unit type Unit serial No. Software version Connected drive. Data range Up to 17 alphanumeric characters. Up to 9 alphanumeric characters. Up to 17 alphanumeric characters. 1 alphanumeric character. Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets power supply version information. □ Function As the string area memory is allocated in this product, the client using VC++ needs to release the string area memory explicitly with CoTaskMemFree(). □ GetPowerDiagnosis() □ Axis number Reference Specification 2-74 2.9.5 IEZNcAxisMonitor::GetPowerDiagnosis C70 2.9.5 IEZNcAxisMonitor::GetPowerDiagnosis □ Custom call procedure HRESULT GetPowerDiagnosis( LONG lAxisNo, LONG lIndex, LONG* plData, LPOLESTR* lppwszBuffer, LONG* plRet ) □ Automation call procedure Monitor_GetPowerDiagnosis( lAxisNo As LONG lIndex As LONG plData As LONG* lppwszBuffer As STRING* ) As LONG □ Argument M700 M800 Get power supply diagnostics information // (I) Axis No. // (I) Diagnostics information // (O) Diagnostics information value // (O) Diagnostics information character string // (O) Error code // (I) Axis No. // (I) Diagnostics information // (O) Diagnostics information value // (O) Diagnostics information character string // (O) Error code lAxisNo: Sets the axis No. (From Axis 1 = from 1) lIndex: Sets diagnostics information. Refer to the table below. plData: Returns the diagnostics information value. lppwszBuffer: Gets diagnostics information as a UNICODE character string. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_READ: Data is not readable EZNC_DATA_READ_ADDR: Invalid part system, axis No. setting lIndex 0 1 2 3 4 5 6 7 8 11 12 13 14 15 16 17 18 21 22 23 24 30 Description Work time Alarm history 1 (Alarm No). ″ 2 (Alarm No). ″ 3 (Alarm No). ″ 4 (Alarm No). ″ 5 (Alarm No). ″ 6 (Alarm No). ″ 7 (Alarm No). ″ 8 (Alarm No). Alarm history 1 (time). ″ 2 (time). ″ 3 (time). ″ 4 (time). ″ 5 (time). ″ 6 (time). ″ 7 (time). ″ 8 (time). MNT (1). MNT (2). MNT (3). MNT (4). SYS 2-75 Data range Previous servo alarm number Same as above Same as above Same as above Same as above Same as above Same as above Same as above Previous servo alarm occurrence time Same as above Same as above Same as above Same as above Same as above Same as above Same as above Up to 3 alphanumeric characters Same as above Same as above Same as above Up to 2 alphanumeric characters Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets power supply diagnostics information. □ Function As the string area memory is allocated in this product, the client using VC++ needs to release the string area memory explicitly with CoTaskMemFree(). □ GetPowerVersion() □ Axis number Reference Specification 2-76 2.9.6 IEZNcAxisMonitor::GetSpindleMonitor C70 2.9.6 IEZNcAxisMonitor::GetSpindleMonitor □ Custom call procedure HRESULT GetSpindleMonitor( LONG lIndex, LONG lSpindle, LONG* plData, LPOLESTR* lppwszBuffer, LONG* plRet ) □ Automation call procedure Monitor_GetSpindleMonitor( lIndex As LONG lSpindle As LONG plData As LONG* lppwszBuffer As STRING* ) As LONG lIndex: Sets the parameter number for the set spindle. □ Argument M700 M800 Monitor spindle // (I) Monitor data // (I) Spindle number // (O) Monitor data value // (O) Monitor data character string // (O) Error code // (I) Monitor data // (I) Spindle number // (O) Monitor data value // (O) Monitor data character string // (O) Error code lSpindle: Set the spindle number. plData: Returns the spindle status. lppwszBuffer: Gets spindle information as a UNICODE character string. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_READ: Data is not readable EZNC_DATA_READ_ADDR: Invalid system, spindle specification EZ_ERR_DATA_TYPE: Invalid argument data type lIndex 0 1 2 3 4 Description Gain. Spindle position loop gain. Droop. Position deviation amount. Spindle (SR, SF) rotation speed. Actual spindle motor speed. Including override. Load. Spindle motor load. LED display. 7-segment LED display on a driver. 5 Alarm 1. 6 7 8 Alarm 2. Alarm 3. Alarm 4. 10 Cycle counter. 11 Control input 1. 12 ″ 2. 13 ″ 3. 14 ″ 4. 15 Control output 1. 16 ″ 2. 17 ″ 3. 18 ″ 4. □ Return Value value S_OK S_FALSE Data range Unit: 1/s Unit: I From 0 [rpm] Remarks From 0 [%] Outputs a 3-digit character string from "00\0" to "FF\0". Up to 3 alphanumeric characters. Same as above Same as above M700/M800 series Same as above only Meaning Normal termination Communication failure 2-77 □ Function □ Reference Gets the set spindle status. GetSpindleVersion(), GetSpindleDiagnosis() □ Specification 2-78 2.9.7 IEZNcAxisMonitor::GetSpindleVersion C70 2.9.7 IEZNcAxisMonitor::GetSpindleVersion □ Custom call procedure HRESULT GetSpindleVersion( LONG lAxisNo, LONG lIndex, LPOLESTR* lppwszBuffer, LONG* plRet ) □ Automation call procedure Monitor_GetSpindleVersion( lAxisNo As LONG lIndex As LONG lppwszBuffer As STRING* ) As LONG □ Argument M700 M800 Get spindle unit version information // (I) Axis No. // (I) Version information // (O) Version information character string // (O) Error code // (I) Axis No. // (I) Version information // (O) Version information // (O) Error code lAxisNo: Sets the axis No. (From Axis 1 = from 1) lIndex: Sets version information. Refer to the table below. lppwszBuffer: Gets version information as a UNICODE character string. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_READ: Data is not readable EZNC_DATA_READ_ADDR: Invalid part system, spindle setting EZNC_DATA_READ_AXIS: Invalid axis No. setting lIndex 0 1 2 Description Unit type Unit serial No. Software version Data range Up to 17 alphanumeric characters. Up to 9 alphanumeric characters. Up to 17 alphanumeric characters. Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets spindle version information. □ Function As the string area memory is allocated in this product, the client using VC++ needs to release the string area memory explicitly with CoTaskMemFree(). □ GetSpindleMonitor(), GetSpindleDiagnosis() □ Axis number Reference Specification 2-79 2.9.8 IEZNcAxisMonitor::GetSpindleDiagnosis C70 2.9.8 IEZNcAxisMonitor::GetSpindleDiagnosis M700 M800 Get spindle diagnostics information □ Custom call procedure HRESULT GetSpindleDiagnosis( LONG lAxisNo, // (I) Axis No. LONG lIndex, // (I) Diagnostics information LONG* plData, // (O) Diagnostics information value LPOLESTR* lppwszBuffer, // (O) Diagnostics information character string LONG* plRet // (O) Error code ) □ Automation call procedure Monitor_GetSpindleDiagnosis( lAxisNo As LONG // (I) Axis No. lIndex As LONG // (I) Diagnostics information plData As LONG* // (O) Diagnostics information value lppwszBuffer As STRING* // (O) Diagnostics information character string ) As LONG // (O) Error code lAxisNo: Sets the axis No. (From Axis 1 = from 1) □ Argument lIndex: Sets diagnostics information. plData: Returns the diagnostics information value. lppwszBuffer: Gets diagnostics information as a UNICODE character string. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_READ: Data is not readable EZNC_DATA_READ_ADDR: Invalid part system, axins No. setting EZNC_DATA_READ_AXIS: Invalid axis No. setting EZ_ERR_DATA_TYPE: Invalid argument data type lIndex 0 1 2 3 4 5 6 7 8 11 12 13 14 15 16 17 18 21 22 23 24 30 Description Work time Alarm history 1 (Alarm No). ″ 2 (Alarm No). ″ 3 (Alarm No). ″ 4 (Alarm No). ″ 5 (Alarm No). ″ 6 (Alarm No). ″ 7 (Alarm No). ″ 8 (Alarm No). Alarm history 1 (time). ″ 2 (time). ″ 3 (time). ″ 4 (time). ″ 5 (time). ″ 6 (time). ″ 7 (time). ″ 8 (time). MNT (1). MNT (2). MNT (3). MNT (4). SYS. 2-80 Data range Previous spindle alarm number Same as above Same as above Same as above Same as above Same as above Same as above Same as above Previous spindle alarm time Same as above Same as above Same as above Same as above Same as above Same as above Same as above Up to 3 alphanumeric characters. Same as above Same as above Same as above Up to 2 alphanumeric characters. Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets power supply diagnostics information. □ Function As the string area memory is allocated in this product, the client using VC++ needs to release the string area memory explicitly with CoTaskMemFree(). □ GetSpindleMonitor(), GetSpindleVersion() □ Axis number Reference Specification 2-81 2.9.9 IEZNcAxisMonitor::GetAbsPositionMonitor C70 2.9.9 IEZNcAxisMonitor::GetAbsPositionMonitor □ Custom call procedure HRESULT GetAbsPositionMonitor( LONG lAxisNo, LONG lIndex, LONG* plData, LPOLESTR* lppwszBuffer, Get absolute position monitor information // (I) Axis No. // (I) Monitor information // (O) Monitor information value // (O) Absolute position monitor information character string // (O) Error code ) As LONG Argument M700 // (I) Axis No. // (I)Axis monitor information // (O) Monitor information value // (O) Absolute position monitor information character string // (O) Error code LONG* plRet ) □ Automation call procedure Monitor_GetAbsPositionMonitor( lAxisNo As LONG lIndex As LONG plData As LONG* lppwszBuffer As STRING* □ M700 lAxisNo: Sets the axis No. (From Axis 1 = from 1) lIndex: Sets monitor information. plData: Returns monitor information value. lppwszBuffer: Gets information about the absolute position monitor as a UNICODE character string. Outputs a character string when lIndex is 0. For the M700/M800 series, outputs the result as a UNICODE character string when lIndex is 0 to 3. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_READ: Data is not readable EZNC_DATA_READ_ADDR: Invalid part system, axis No. setting EZNC_DATA_READ_AXIS: Invalid axis No. setting EZ_ERR_DATA_TYPE: Invalid argument data type lIndex Description Data range 0 ABS SYS. Detection system. 1 POF POS. Power off position. PON POS. Power on position. MAC POS. Current position. R0. P0. E0. Rn. Pn. En. ABSn. ABS0. 2 3 4 5 6 7 8 9 10 11 Axis PLC axis 0: Semi closed encoder (ES) 1: Semi closed high-speed serial encoder (ESS) 2. Incremental (INC) Unit: Command unit* ○ ○ ○ ○ ○ Unit: Command unit* ○ ○ ○ Unit: Command unit* ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ 2-82 Syst em ○ * The M700/M800 series allows acquisition of value (actual value) converted according to the command unit as a character string. For conversion according to the command unit, refer to □ Function in IEZNcAxisMonitor::GetServoMonitor(). Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets information about the absolute position monitor. □ Function ABS0 is valid only for the M700/M800 series. As the string area memory is allocated in this product, the client using VC++ needs to release the string area memory explicitly with CoTaskMemFree(). □ Reference □ Specification System , PLC axis , Axis number 2-83 2.9.10 IEZNcAxisMonitor::GetAuxAxisMonitor M700 2.9.10 IEZNcAxisMonitor::GetAuxAxisMonitor □ Custom call procedure HRESULT GetAuxAxisMonitor ( LONG lAxisNo, LONG lIndex, LONG* plData, LPOLESTR* lppwszBuffer, LONG* plRet ) □ Automation call procedure Monitor_GetAuxAxisMonitor ( lAxisNo As LONG lIndex As LONG plData As LONG* lppwszBuffer As STRING* ) As LONG □ Argument M800 Get auxiliary axis monitor information // (I) Axis No. // (I) Auxiliary axis information type // (O) Auxiliary axis information value // (O) Auxiliary axis monitor information character string // (O) Error code // (I) Axis No. // (I) Auxiliary axis information type // (O) Auxiliary axis information value // (O) Auxiliary axis monitor information string // (O) Error code lAxisNo: Sets the axis No. (From Axis 1 = from 1) lIndex: Sets the auxiliary axis information type. Refer to the table below. plData: Returns the auxiliary axis information. lppwszBuffer: Gets monitor information as a UNICODE string. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_READ: Data is not readable EZNC_DATA_READ_ADDR: Invalid part system, axis No. setting EZ_ERR_NOT_SUPPORT: Not supported lIndex 0 1 2 3 4 5 6 7 8 Description Droop. Rotation speed. Load current. Maximum current 1. Maximum current 2. Motor load Regen load. Current station No. Current position. 9 Inst station No. Data range -999 to 999 0 to 9999 [rpm] -999 to 999 [%] -999 to 999 [%] -999 to 999 [%] -999 to 999 [%] -999 to 999 [%] 1 to 360 Auxiliary axis information: Parameter value: Unit: Command unit Auxiliary axis monitor information character string: -99,999.999 to 99,999.999 1 to 360 2-84 □ Argument lIndex 10 Description Inst posn: Data range Auxiliary axis information: Parameter value: Unit: Command unit Auxiliary axis monitor information character string: -99,999.999 to 99,999.999 0 to 999 0 to 999 0 to 999 0 to 999 0 to 999 0 to 999.9 11 Position loop gain 1. 12 Speed loop gain 1. 13 Position loop gain 2. 14 Speed loop gain 2. 15 Speed integral compensation. 16 Load inertia. Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets information about the auxiliary axis monitor. □ Function When the data range in the Index table is [Unit: Command unit], the value got needs to be converted according to the command unit set for the Mitsubishi CNC. For the set unit, refer to the Mitsubishi CNC specifications.Metric system Conversion for 1 of LONG type For 10-µm specifications -999,999.99 to 999,999.99 1 = 1/200 (mm) For 1-µm specifications -99,999.999 to 99,999.999 1 = 1/2000 (mm) For 0.1-µm specifications -9,999.9999 to 9,999.9999 1 = 1/20000 (mm) For 10-nm specifications -999.99999 to 999.99999 1 = 1/200000 (mm) For 1-nm specifications -99.999999 to 99.999999 1 = 1/2000000 (mm) Inch system For 10-µm specifications -99,999.999 to 99,999.999 For 1-µm specifications -9,999.9999 to 9,999.9999 For 0.1-µm specifications -999.99999 to 999.99999 For 10-nm specifications -999.99999 to 999.99999 For 1-nm specifications -99.999999 to 99.999999 Metric system For 10-µm specifications -999999.99 to 999999.99 For 1-µm specifications -99,999.999 to 99,999.999 For 0.1-µm specifications -9999.9999 to 9999.9999 For 10-nm specifications -999.99999 to 999.99999 For 1-nm specifications -99.999999 to 99.999999 □ Specification Conversion for 1 of LONG type 1 = 1/200 (mm) 1 = 1/2000 (mm) 1 = 1/20000 (mm) 1 = 1/200000 (mm) 1 = 1/2000000 (mm) Inch system Conversion for 1 of LONG type For 10-µm specifications -999,999.99 to 999,999.99 1 = 1/200 (inch) For 1-µm specifications -99,999.999 to 99,999.999 1 = 1/2000 (inch) For 0.1-µm specifications -9999.9999 to 9999.9999 1 = 1/20000 (inch) For 10-nm specifications -999.99999 to 999.99999 1 = 1/200000 (inch) For 1-nm specifications -99.999999 to 99.999999 1 = 1/2000000 (inch) Conversion example) For the linear axis with the 1-µm specifications in the Metric system, when the LONG value got is 710001, 710001 ÷ 2000 = 355.0005. However, 355.0005 is rounded to minus infinity. Therefore the result is 355.000. Data in units of 0.5 µm (1/2000 mm) is rounded to minus infinity when displayed. This means that +0.5 µm is displayed as 0 and -0.5 µm is displayed as -1 µm. As the string area memory is allocated in this product, the client using VC++ needs to release the string area memory explicitly with CoTaskMemFree(). This function is not supported with C70. Reference □ Conversion for 1 of LONG type 1 = 1/200 (inch) 1 = 1/2000 (inch) 1 = 1/20000 (inch) 1 = 1/200000 (inch) 1 = 1/2000000 (inch) Axis number 2-85 2.9.11 IEZNcAxisMonitor::GetAuxAxisDiagnosis M700 2.9.11 IEZNcAxisMonitor::GetAuxAxisDiagnosis □ Custom call procedure HRESULT GetAuxAxisDiagnosis ( LONG lAxisNo, LONG lIndex, LPOLESTR* lppwszBuffer, LONG* plRet ) □ Automation call procedure Monitor_GetAuxAxisDiagnosis ( lAxisNo As LONG lIndex As LONG lppwszBuffer As STRING* □ Argument M800 Get auxiliary axis diagnostics information // (I) Axis No. // (I) Auxiliary axis diagnostics information type // (O) Auxiliary axis diagnostics information character string // (O) Error code // (I) Axis No. // (I) Auxiliary axis diagnostics information type // (O) Auxiliary axis diagnostics information character string ) As LONG // (O) Error code lAxisNo: Sets the axis No. (From Axis 1 = from 1) lIndex: Sets the auxiliary axis diagnostics information type. Refer to the table below. lppwszBuffer: Gets the auxiliary axis diagnostics information as a UNICODE character string. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_READ: Data is not readable EZNC_DATA_READ_ADDR: Invalid part system, axis No. setting EZ_ERR_NOT_SUPPORT: Not supported lIndex 0 Description Alarm history (1). 1 Alarm history (2). 2 Alarm history (3). 3 Alarm history (4). 4 Alarm history (5). 5 Alarm history (6). Data range "Alarm information by type" with 9 alphanumeric characters "Alarm information by type" with 9 alphanumeric characters "Alarm information by type" with 9 alphanumeric characters "Alarm information by type" with 9 alphanumeric characters "Alarm information by type" with 9 alphanumeric characters "Alarm information by type" with 9 alphanumeric characters Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets the auxiliary axis diagnostics information. □ Function As the string area memory is allocated in this product, the client using VC++ needs to release the string area memory explicitly with CoTaskMemFree(). This function is not supported with C70. □ Reference □ Specification Axis number 2-86 2.9.12 IEZNcAxisMonitor::GetAuxAxisVersion M700 2.9.12 IEZNcAxisMonitor::GetAuxAxisVersion □ Custom call procedure HRESULT GetAuxAxisVersion ( LONG lAxisNo, LONG lIndex, LPOLESTR* lppwszBuffer, LONG* plRet ) □ Automation call procedure Monitor_GetAuxAxisVersion ( lAxisNo As LONG lIndex As LONG lppwszBuffer As STRING* Argument Get auxiliary axis version information // (I) Axis No. // (I) Auxiliary axis version information type // (O) Auxiliary axis version information character string // (O) Error code // (I) Axis No. // (I) Auxiliary axis version information type // (O) Auxiliary axis version information character string // (O) Error code ) As LONG □ M800 lAxisNo: Sets the axis No. (From Axis 1 = from 1) lIndex: Sets the auxiliary axis version information type. lppwszBuffer: Sets the auxiliary axis version information as a UNICODE character string. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_READ: Data is not readable EZNC_DATA_READ_ADDR: Invalid system, spindle specification EZ_ERR_NOT_SUPPORT: Not supported Description Data range lIndex 0 Unit type 9 alphanumeric characters 1 Unit serial No. 16 alphanumeric characters 2 Motor 9 alphanumeric characters Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets auxiliary axis version information. □ Function As the string area memory is allocated in this product, the client using VC++ needs to release the string area memory explicitly with CoTaskMemFree(). This function is not supported with C70. □ Reference □ Specification Axis number 2-87 2.9.13 IEZNcAxisMonitor::GetDowelTime C70 2.9.13 IEZNcAxisMonitor::GetDowelTime Argument M800 Get remaining dwell time □ Custom call procedure HRESULT GetDowelTime( DOUBLE* pdTime, LONG* plRet ) □ Automation call procedure Monitor_GetDowelTime( pdTime As DOUBLE* ) As LONG □ M700 // (O) Remaining dwell time // (O) Error code // (O) Remaining dwell time // (O) Error code pdTime: Returns the remaining dwell (G04) time. Unit: Second Value: 0.000 to 99,999.999 (s) plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_READ: Data is not readable EZNC_DATA_READ_ADDR: Invalid part system, axis No. setting Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Returns the remaining dwell (G04) time. Unit: Second, output up to second, 1/1000 (second). □ Function □ Reference □ Specification System 2-88 2.9.14 IEZNcAxisMonitor:: GetPowerConsumption M800 2.9.14 IEZNcAxisMonitor:: GetPowerConsumption □ Custom call procedure HRESULT GetPowerConsumption ( LONG lAxisNo, DOUBLE** ppdPower, LONG* plRet ) □ Automation call procedure GetPowerConsumption ( lAxisNo As LONG pvPower As VARIANT* ) As LONG □ Argument Get current power consumption // (I) Axis No. // (O) Power consumption // (O) Error code // (I) Axis No. // (I) Power consumption // (O) Error code lAxisNo: Sets the axis No. (From Axis 1 = from 1) ppdPower:Returns the current total power consumption as an array. The data array is secured on the EZSocket side, so explicitly release it on the client side using CoTaskMemFree(). Refer to the index table for the got power consumption. Index table Array Index 0 1 2 Type of power consumption Present consumption of entire drive system Present power consumption of servo axis in drive system (fluctuating part) Present power consumption of spindle in drive system (fluctuating part) Automation argument: lAxisNo: See the explanation of lAxisNo. pvPower : Returns the power consumption array as a VARIANT. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_ADDR: Invalid part system, axis No. setting EZNC_DATA_READ_READ: Data is not readable EZ_ERR_NOT_SUPPORT: Not supported Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets the present consumption of entire drive system as an array. □ Function This function is not supported with the C70 or M700 series. □ Reference □ Specification 2-89 2.9.15 IEZNcAxisMonitor:: GetIntegralPower M800 2.9.15 IEZNcAxisMonitor:: GetIntegralPower □ Custom call procedure HRESULT GetPowerConsumption ( LONG lAxisNo, LONG lIndex, DOUBLE** ppdPower, LONG* plRet ) □ Automation call procedure GetPowerConsumption ( lAxisNo As LONG lIndex As LONG, pvPower As VARIANT* ) As LONG lAxisNo: Sets the axis No. (From Axis 1 = from 1) □ Argument Get integral power // (I) Axis No. // (I) Parameter number // (O) Power consumption // (O) Error code // (I) Axis NO. // (I) Parameter number // (I) Power consumption // (O) Error code lIndex:Sets the number of the integral power to be got. ppdPower:Returns the total power consumption as an array. The data array is secured on the EZSocket side, so explicitly release it on the client side using CoTaskMemFree(). Refer to the index table for the got power consumption. Index table Array Index Type of power consumption 0 Accumulated consumption of entire drive system 1 Drive system's fixed consumption correction 2 Accumulated consumption of servo axis in drive system (fluctuating part) 3 Accumulated regeneration of servo axis in drive system (fluctuating part) 4 Accumulated consumption of spindle in drive system (fluctuating part) 5 Accumulated regeneration of spindle in drive system (fluctuating part) Automation argument: lAxisNo: See the explanation of lAxisNo. lIndex:See the explanation of lIndex. pvPower:Returns the power consumption array as a VARIANT. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_ADDR: Invalid part system, axix No. setting EZ_ERR_DATA_RANGE: Invalid argument data range EZNC_DATA_READ_READ: Data is not readable EZ_ERR_NOT_SUPPORT: Not supported Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets the current total power consumption as an array. □ Function This function is not supported with the C70 or M700 series. □ Reference □ Specification 2-90 2.10 IEZNcRunStatus Interface 2.10.1 IEZNcRunStatus::GetInvalidStatus C70 2.10.1 IEZNcRunStatus::GetInvalidStatus Argument M800 Get disabled status □ Custom call procedure HRESULT GetInvalidStatus( LONG* plStatus, LONG* plRet ) □ Automation call procedure Status_GetInvalidStatus( plStatus As LONG* ) As LONG □ M700 // (O) Disabled status flag // (O) Error code // (O) Disabled status flag // (O) Error code plStatus : Returns the disabled bit flag. Value Meaning 0 OFF 31 4 3 2 1 0 (bit) 1 ON Disables single block stop Waits for the MST command completion signal Disables feed hold Disables cutting override Disables G09 block deceleration check plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_ADDR: Invalid system specification EZNC_DATA_READ_READ: Data is not readable Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Returns the disabled flag. □ Function Disabled status: Disables single block stop Waits for the MST command completion signal Disables feed hold Disables cutting override Disables G09 block deceleration check □ Reference □ Specification System 2-91 2.10.2 IEZNcRunStatus::GetCommandStatus C70 2.10.2 IEZNcRunStatus::GetCommandStatus □ Custom call procedure HRESULT GetCommandStatus( LONG* plStatus, LONG* plRet ) □ Automation call procedure Status_GetCommandStatus( plStatus As LONG ) As LONG □ Argument // (O) Operation command status // (O) Error code // (O) Operation command status // (O) Error code plStatus : Returns the operation command status with any of the following numbers. Value Meaning Value Meaning 0 Positioning (independent axis) 15 3rd reference position verification 1 Positioning (linear) 16 4th reference position verification 2 Linear interpolation 17 Automatic reference position return 3 Circular interpolation (CW) 18 Return from the automatic reference position 4 Circular interpolation (CCW) 19 2nd reference position return 5 Helical interpolation (CW) 20 3rd reference position return 6 Helical interpolation (CCW) 21 4th reference position return 7 Reserved 22 Skip function 8 Reserved 23 Multi-skip function 1 9 Reserved 24 Multi-skip function 2 10 Reserved 25 Multi-skip function 3 11 Time command dwell 26 Threading 12 Reserved 27 Reserved 13 1st reference position verification 28 Reserved 14 2nd reference position verification 29 Coordinate system setting □ Return Value value S_OK S_FALSE Gets the operation command status. □ Function Meaning Normal termination Communication failure □ Reference Specification M800 Get operation command status plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_ADDR: Invalid part system setting EZNC_DATA_READ_READ: Data is not readable □ M700 System 2-92 2.10.3 IEZNcRunStatus::GetCuttingMode C70 2.10.3 IEZNcRunStatus::GetCuttingMode Argument // (O) Cutting mode // (O) Error code // (O) Cutting mode // (O) Error code plMode: Returns the cutting mode. Value Meaning 1 In G01, G02, G03, G31, G33, G34, or G35 mode 0 In any of other modes plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_ADDR: Invalid part system setting EZNC_DATA_READ_READ: Data is not readable □ Return Value value S_OK S_FALSE Gets the cutting mode. □ Function Meaning Normal termination Communication failure □ Reference □ Specification M800 Get cutting mode status □ Custom call procedure HRESULT GetCuttingMode( LONG* plMode, LONG* plRet ) □ Automation call procedure Status_GetCuttingMode( plMode As LONG ) As LONG □ M700 System 2-93 2.10.4 IEZNcRunStatus::GetAxisStatus C70 2.10.4 IEZNcRunStatus::GetAxisStatus Argument M800 Get servo axis status □ Custom call procedure HRESULT GetAxisStatus( LONG lAxisNo, LONG lType, LONG* plStatus, LONG* plRet ) □ Automation call procedure Status_GetAxisStatus( lAxisNo As LONG lType As LONG plStatus As LONG* ) As LONG □ M700 // (I) Axis No. // (I) Status type // (O) Servo axis status // (O) Error code // (I) Axis No. // (I) Status type // (O) Servo axis status // (O) Error code lAxisNo: Sets the axis No. (From Axis 1 = from 1) Valid when lType = 4. All axes information in the set part system can get when Type = number other than 4. lType: Sets the status type. plStatus : Returns the servo axis status. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZ_ERR_DATA_TYPE: Invalid argument data type EZNC_DATA_READ_ADDR: Invalid system, spindle specification EZNC_DATA_READ_READ: Data is not readable lType 0 Description 1st reference position return completion. 1 2nd reference position return completion. 2 3rd reference position return completion. 3 Fourth reference position return completion. 4 Axis status (axis being removed). The axis specification is required. Axis status (servo off). 5 6 □ Return Value value S_OK S_FALSE Data range A bit corresponding to the returned axis becomes 1. Example) 00000101 = The 1st and 3rd axes returns have been completed. A bit corresponding to the returned axis becomes 1. Example) 00000010 = The 2nd axis return has been completed. A bit corresponding to the returned axis becomes 1. Example) 00001010 = The 2nd and 3th axes returns have been completed. A bit corresponding to the returned axis becomes 1. Example) 00001000 = The 4th axis return has been completed. 0: Axis not being removed 1: Axis being removed Axis with servo turned off A bit corresponding to the axis becomes 1. Axis status (mirror image). Mirror image axis. A bit corresponding to the axis set for mirror image becomes 1. Meaning Normal termination Communication failure 2-94 □ Function Gets the servo axis status. □ Reference □ Specification System (Part system setting is required when the M700/M800 series is used or lType is 4 or 6.), Axis number 2-95 2.10.5 IEZNcRunStatus::GetRunStatus C70 2.10.5 IEZNcRunStatus::GetRunStatus Argument M800 Get operation status □ Custom call procedure HRESULT GetRunStatus( LONG lIndex, LONG* plStatus, LONG* plRet ) □ Automation call procedure Status_GetRunStatus( lIndex As LONG plStatus As LONG* ) As LONG □ M700 // (I) Operation type // (O) Operation status // (O) Error code // (I) Operation type // (O) Operation status // (O) Error code lIndex: Sets the status number. plStatus: Returns the set operation status. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZ_ERR_DATA_TYPE: Invalid argument data type EZNC_DATA_READ_ADDR: Invalid part system setting EZNC_DATA_READ_READ: Data is not readable lIndex 0 Description Tool length measurement. 1 In automatic operation "run". Gets the status indicating that the system is operating automatically. Automatic operation “start”. Gets the status indicating that the system is operating automatically and that a movement command or M, S, T, B process is being executed. Automatic operation "pause" Gets the status indicating that automatic operation is paused while executing a movement command or miscellaneous command with automatic operation. 2 3 □ Return Value value S_OK S_FALSE Meaning Normal termination Communication failure 2-96 Data range 0: Tool length not being measured 1: Tool length being measured 0: Not operating in automatically 1: Operating automatically 0: Not starting automatic operation 1: Starting automatic operation 0: Automatic operation not paused 1: Automatic operation paused □ Function Gets the operation status. Automatic operation paused is enabled only for the M700/M800 series. Signals that indicate the status of automatic operation with the PLC interface include ‘in automatic operation', ‘automatic operation start’, and ‘automatic operation pause’. The ON/OFF statuses of these three signals in each state are shown below. In automatic In automatic In automatic operation operation operation "RUN" (OP) "START" (STL) "PAUSE" (SPL) In "reset" 0 0 0 Automatic operation 1 0 0 stop condition Automatic operation 1 0 1 pause condition Automatic operation 1 1 0 start condition Each status represents the following type of state. * Reset state Automatic operation is stopped because of the reset conditions. (All states in which the system is not operating automatically correspond to this.) * Automatic operation stopped state Automatic operation is stopped after executing one block. (Single block stop corresponds to this.) * Automatic operation pause state Automatic operation is stopped during the execution of one block. (The automatic operation pause (*SP) signal OFF state corresponds to this.) * Automatic operation started state Automatic operation is actually being executed. Refer to the PLC Interface Manual for details. □ Reference □ Specification System 2-97 2.11 IEZNcFile6 Interface 2.11.1 IEZNcFile6::FindDir2 C70 2.11.1 IEZNcFile6::FindDir2 M700 M800 Search directory □ Custom call procedure HRESULT FindDir2( LPCOLESTR lpcwszDirectryName, // (I) Directory name LONG lFileType, // (I) Read type and format LPOLESTR* lppwszFileInfo, // (O) File information character string LONG* plRet // (O) Error code ) □ Automation call procedure File_FindDir2( lpcwszDirectryName As STRING // (I) Directory name lFileType As LONG // (I) Read type and format lppwszFileInfo As STRING* // (O) File information character string ) As LONG // (O) Error code □ Argument lpcwszDirectryName: Sets the directory name as a UNICODE character string. Specify directory with an absolute path as follows: Drive name + ":" + \Directory name\File name …Gets the set file name information. (Note 1) Drive name + ":" + "\Directory name" …Gets the set directory name information. (Note 1) Drive name + ":" + \Directory name\ …Gets the set directory information. (Note 1) This setting is for the M700/M800 series. lFileType: Sets the type and format of data to be read. The following can also be set with pipe (|). When NULL is set, file information is read. Meaning Value EZNC_DISK_DIRTYPE Directory information read EZNC_DISK_COMMENT Comment information read (on the NC control unit side only) EZNC_DISK_DATE Date information read (on the personal computer side only) EZNC_DISK_SIZE Size information read lppwszFileInfo: Gets file information as a UNICODE character string. The format of file information becomes as follows: File name\tSize\tDate\tComment\0 A TAB code is inserted between file name, size, date, and comments. The end of the data becomes a NULL code. plRet: Returns whether or not there is file information read or returns an error code. (Upon automation, the return value is used.) 0: When there is no file information 1 or more: When there is file information EZNC_FILE_DIR_DATASIZE: Exceeded maximum data size EZNC_FILE_DIR_NOTOPEN: Not open EZNC_FILE_DIR_READ: File information read error EZNC_FILE_DIR_ALREADYOPENED: A different directory is already opened EZNC_FILE_DIR_NODRIVE: Drive does not exist EZNC_FILE_DIR_NODIR: Directory does not exist (Note 2) If an error occurs on the personal computer, the error code EZNC_FILE_… becomes EZNC_PCFILE_…. 2-98 Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Searches directory. □ Function In FindDir2(), information of one file can be read by reading once. To continuously get directory information, a list of file names in the set directory can be got by calling FindNextDir2() repeatedly. The format of file information to be stored in the area indicated by lpszFileInfo is as follows: File name\tSize\tDate\tComment\0 A TAB code is inserted between file name, size, date, and comments. The end of the data becomes a NULL code. Only information that follows file name set in the read type is stored. For example, if “EZNC_DISK_COMMENT|EZNC_DISK_DATE” is set, information is as follows: Filename\tDate\tComment\0 If “EZNC_DISK_SIZE|EZNC_DISK_COMMENT” is set for a file to which comments cannot be added, the comment information will not be output and the comment will be as follows: File name\tSize\t\0 For a file from which date cannot get, setting of "EZNC_DISK_SIZE|EZNC_DISK_DATE|EZ NC_DISK_COMMENT" becomes as follows with no date information output. File name\tSize\t\tComment\0 * The file from which a date cannot get refers to the file on the NC control unit side. As the character string area memory is allocated in this product, the client using VC++ needs to release the character string area memory explicitly with CoTaskMemFree(). □ Restrictions □ Reference (Note 1) Reading the directory size information on the NC-side compact flash (M700 series) or SD card (M800 series) is not supported. The directory size information read is invalid. (Note 2 ) For the C70, when the file on the personal computer is specified and 0 is specified for lFileType, \t is added to the end of file information got (filename\t\0). To use file information got, remove \t before using. When FindDir2() is used, FindDir2(), OpenFile3(),OpenNcFile2() cannot be executed until ResetDir() is executed. When executed, an error "EZNC_FILE_DIR_ALREADYOPENED (0x80030101) A different directory is already opened" occurs. When using it, immediately execute ResetDir() after executing FindDir2(). FindNextDir2(), ResetDir() □ Specification 2-99 2.11.2 IEZNcFile6::FindNextDir2 C70 2.11.2 IEZNcFile6::FindNextDir2 □ Custom call procedure HRESULT FindNextDir2( LPOLESTR* lppwszFileInfo, LONG* plRet ) □ Automation call procedure File_FindNextDir2( lppwszFileInfo As STRING* ) As LONG □ Argument M700 M800 Search next directory // (O) File information character string // (O) Error code // (O) File information character string // (O) Error code lppwszFileInfo: Gets file information as a UNICODE character string. The format of file information becomes as follows: File name\tSize\tDate\tComment\0 A TAB code is inserted between file name, size, date, and comments. The end of the data becomes a NULL code. plRet: Returns whether or not there is file information read or returns an error code. (Upon automation, the return value is used.) 0: When there is no file information 1 or more: When there is file information EZNC_FILE_DIR_DATASIZE: Exceeded maximum data size EZNC_FILE_DIR_NOTOPEN: Not open EZNC_FILE_DIR_READ: File information read error EZNC_FILE_DIR_NODRIVE: Drive does not exist (Note) If an error occurs on the personal computer, the error code EZNC_FILE_… becomes EZNC_PCFILE_…. Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Continuously searches for a directory. □ Function To continuously get directory information after executing FindDir2(), a list of file names in the set directory can get by calling FindNextDir2() repeatedly. The format of file informatio n that is stored in the area indicated by lpszFileInfo is the same as that for FindDir2(). As the character string area memory is allocated in this product, the client using VC++ ne eds to release the character string area memory explicitly with CoTaskMemFree(). □ Reference FindDir2(), ResetDir() □ Specification 2-100 2.11.3 IEZNcFile6::ResetDir C70 2.11.3 IEZNcFile6::ResetDir Argument // (O) Error code // (O) Error code plRet: Returns an error code. (Upon automation, the return value is used.) EZNC_FILE_DIR_DATASIZE: Exceeded maximum data size EZNC_FILE_DIR_NOTOPEN: Not open EZNC_FILE_DIR_READ: File information read error (Note) If an error occurs on the personal computer, the error code EZNC_FILE_… becomes EZNC_PCFILE_…. Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Terminates directory search. □ Function To search for a directory again, execute FindDir2(). □ Reference M800 Terminate directory search □ Custom call procedure HRESULT ResetDir( LONG* plRet ) □ Automation call procedure File_ResetDir( ) As LONG □ M700 FindDir2() □ Specification 2-101 2.11.4 IEZNcFile6::Copy2 C70 2.11.4 IEZNcFile6::Copy2 □ Custom call procedure HRESULT Copy2( LPCOLESTR lpcwszSrcFileName, LPCOLESTR lpcwszDstFileName, LONG* plRet ) □ Automation call procedure File_Copy2( lpcwszSrcFileName As STRING lpcwszDstFileName As STRING ) As LONG □ Argument M700 M800 Copy file // (I) Transfer source file name // (I) Transfer destination file name // (O) Error code // (I) Transfer source file name // (I) Transfer destination file name // (O) Error code lpcwszSrcFileName: Sets transfer source file name using UNICODE character strings. lpcwszDstFileName: Sets transfer destination file name as a UNICODE character strings. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_FILE_COPY_BUSY: Copy is disabled (during operation) EZNC_FILE_COPY_ENTRYOVER: Registration limit exceeded EZNC_FILE_COPY_FILEEXIST: Copy destination file already exists EZNC_FILE_COPY_FILESYSTEM: File system error EZNC_FILE_COPY_ILLEGALNAME: Invalid file name format EZNC_FILE_COPY_MEMORYOVER: Memory capacity exceeded EZNC_FILE_COPY_NODIR: Directory does not exist EZNC_FILE_COPY_NODRIVE: Drive does not exist EZNC_FILE_COPY_NOFILE: File does not exist EZNC_FILE_COPY_PLCRUN: Copy is disabled (programmable controller in operation) EZNC_FILE_COPY_READ: Transfer source file is not readable EZNC_FILE_COPY_WRITE: Transfer destination file is not writable EZNC_FILE_COPY_PROTECT: Copying is disabled (protected) EZNC_PCFILE_COPY_CREATE: File cannot be created (PC only) EZNC_PCFILE_COPY_OPEN: File cannot be opened (personal computer only) (Note) If an error occurs on the personal computer, the error code EZNC_FILE_… becomes EZNC_PCFILE_…. Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE 2-102 □ Function Copies the file set by lpcwszSrcFileName to lpcwszDstFileName. Set a file name with an absolute path as follows: Drive name + ":" + \Directory name\File name lpcwszDstFileName must not be a file name that already exists. The transfer destination directory must already exist. In the C70, multiple program files under \PRG\USER can be collectively copied to a file on a personal computer. In this case, specify "*.*" as a file name for lpcwszSrcFileName (example: M01:\PRG\USER\*.*). Set any file name on a personal computer for lpcwszDstFileName (example: C:\PLURAL.PRG). To expand files combined into one in the C70, set any file name on a personal computer for lpcwszSrcFileName (example: C:\PLURAL.PRG) and set "ALL.PRG" as a file name under \PRG\USER of lpcwszDstFileName (example: M01:\PRG\USER\ALL.PRG). This method does not check whether the set directory and file name are appropriate or not. It is recommended to check the appropriateness of file name and directory for irregular operations such as transfer between files with different types and applications (example: overwriting the user program (\PRG\USER\ to.PRG) with parameter file (PARAMET.BIN)) or copying a file to a directory with different purposes. (Note) Do not perform this operation during automatic operation of the NC control unit. (C70 only) □ Reference Delete2(), Rename2() □ Specification 2-103 2.11.5 IEZNcFile6::Delete2 C70 2.11.5 IEZNcFile6::Delete2 □ Custom call procedure HRESULT Delete2( LPCOLESTR lpcwszFileName, LONG* plRet ) □ Automation call procedure File_Delete2( lpcwszFileName As STRING ) As LONG □ Argument M700 M800 Delete file // (I) File name // (O) Error code // (I) File name // (O) Error code lpcwszFileName: Sets the file name as a UNICODE character string. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK : Normal termination EZNC_FILE_DEL_BUSY: Deletion is disabled (during operation) EZNC_FILE_DEL_FILESYSTEM: File system error EZNC_FILE_DEL_ILLEGALNAME: Invalid file name format EZNC_FILE_DEL_PROTECT: Deletion is disabled (protected) EZNC_FILE_DEL_NODIR: Directory does not exist EZNC_FILE_DEL_NODRIVE: Drive does not exist EZNC_FILE_DEL_NOFILE: File does not exist EZNC_PCFILE_DEL_NOTDELETE: File cannot be deleted (Note) If an error occurs on the personal computer, the error code EZNC_FILE_… becomes EZNC_PCFILE_…. Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Deletes the file set in lpcwszFileName. □ Function Set a file name with an absolute path as follows: Drive name + ":" + \Directory name\File name (Note) Do not perform this operation during automatic operation of the NC control unit. (C70 only) For the M700/M800 series, the operation can be performed unless automatic operation of the file intended for operation is being carried out. □ Reference Copy2(), Rename2() □ Specification 2-104 2.11.6 IEZNcFile6::Rename2 C70 2.11.6 IEZNcFile6::Rename2 □ Custom call procedure HRESULT Rename2( LPCOLESTR lpcwszSrcFileName, LPCOLESTR lpcwszDstFileName, LONG* plRet ) □ Automation call procedure File_Rename2( lpcwszSrcFileName As STRING lpcwszDstFileName As STRING ) As LONG □ Argument M700 M800 Change file name // (I) Old file name // (I) New file name // (O) Error code // (I) Old file name // (I) New file name // (O) Error code lpcwszSrcFileName: Sets an old file name. lpcwszDstFileName: Sets a new file name. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK : Normal termination EZNC_FILE_REN_BUSY: Rename is disabled (during operation) EZNC_FILE_REN_FILEEXIST: New file name already exists EZNC_FILE_REN_FILESYSTEM: File system error EZNC_FILE_REN_ILLEGALNAME: Invalid file name format EZNC_FILE_REN_PROTECT: Rename is disabled (protected) EZNC_FILE_REN_NODIR: Directory does not exist EZNC_FILE_REN_NODRIVE: Drive does not exist EZNC_FILE_REN_NOFILE: File does not exist EZNC_PCFILE_REN_NOTRENAME: Rename is disabled EZNC_PCFILE_REN_SAMENAME: New and old file names are identical (Note) If an error occurs on the personal computer, the error code EZNC_FILE_… becomes EZNC_PCFILE_…. Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Changes the file name set for lpcwszSrcFileName to that set for lpcwszDstFileName. □ Function For lpszSrcFileName, set with an absolute path. Drive name + ":" + \Directory name\File name For lpcwszDstFileName, set only file name without drive name and directory. For lpcwszDstFileName, a file name that already exists must not be set. (Note) Do not perform this operation during automatic operation of the NC control unit. (C70 only) For the M700/M800 series, the operation can be performed during automatic operation of the NC control unit, unless automatic operation of the file intended for operation is being carried out. □ Reference Copy2(), Delete2() □ Specification 2-105 2.11.7 IEZNcFile6::GetDriveInformation C70 2.11.7 IEZNcFile6::GetDriveInformation □ Custom call procedure HRESULT GetDriveInformation( LPOLESTR* lppwszDriveInfo, LONG* plRet ) □ Automation call procedure File_GetDriveInformation( lppwszDriveInfo As STRING* ) As LONG □ Argument M700 M800 Get drive information // (O) Drive information character string // (O) Error code // (O): Drive information character string // (O) Error code lppwszDriveInfo: Gets drive information as a UNICODE character string. The format of drive information is as follows: Drive name:CRLFDrive name:CRLF…Drive name:CRLF\0 To separate drive names, CR, LF codes are inserted between them. The end of the data becomes CR, LF codes and a NULL code. The end of the data becomes a NULL code. plRet: Returns the size of drive information got or an error code. (Upon automation, the return value is used.) 0: When a drive does not exist 1 or more: Number of bytes EZNC_FILE_DRVLIST_READ: Drive information read error EZNC_FILE_DIR_NODRIVE: Drive does not exist (Note) If an error occurs on the personal computer, the error code EZNC_FILE_… becomes EZNC_PCFILE_…. Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Reads drive information of the NC control unit that is currently connected. □ Function The format of drive information is as follows: Drive name:CRLFDrive name:CRLF…Drive name:CRLF\0 To separate drive names, CR, LF codes are inserted between them. The end of the data becomes CR, LF codes and a NULL code. The end of the data becomes a NULL code. Drive information on a personal computer cannot be read. As the character string area memory is allocated in this product, the client using VC++ needs to release the character string area memory explicitly with CoTaskMemFree(). □ Reference GetDriveSize() □ Specification 2-106 2.11.8 IEZNcFile6::GetDriveSize C70 2.11.8 IEZNcFile6::GetDriveSize □ Custom call procedure HRESULT GetDriveSize( LPCOLESTR lpcwszDirectryName, LONG* plDriveSize, LONG* plRet ) □ Automation call procedure File_GetDriveSize( lpcwszDirectryName As STRING plDriveSize As LONG* ) As LONG □ Argument M700 M800 Get free drive space // (I) Directory name // (O) Free space // (O) Error code // (I) Directory name // (O) Free space // (O) Error code lpcwszDirectryName: Sets the directory name as a UNICODE character string. Directory is set with an absolute path as follows: Drive name + ":" + \Directory name\ plDriveSize: Gets free space of the set directory. (unit: byte) plRet: Returns an error code. (Upon automation, the return value is used.) EZNC_FILE_REN_FILESYSTEM: File system error EZNC_FILE_DIR_NODRIVE: Drive does not exist EZNC_FILE_DISKFREE_NODIR: Directory does not exist EZNC_FILE_DISKFREE_NODRIVE: Drive does not exist (Note) If an error occurs on the personal computer, the error code EZNC_FILE_… becomes EZNC_PCFILE_…. Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Returns free space of the directory specified for lpcwszDirectryName. □ Function The unit of free space is a byte. Directory is specified with an absolute path as follows: Drive name + ":" + \Directory name\ When a drive on a personal computer is set for drive name, setting of directory is ignored, and free space of the drive is returned. When the NC control unit is set for a drive name, free space of the set directory is returned. When a subdirectory exists in the set directory, usage in the subdirectory is excluded from calculation of free space. (Note) When a directory name (M01:\IC1\) that corresponds to the compact flash (M700 series) or SD card (M800 series) on the NC side is set, up to 2GB can get. □ Reference GetDriveInformation() □ Specification 2-107 2.11.9 IEZNcFile6::GetDriveSize2 C70 2.11.9 IEZNcFile6::GetDriveSize2 M800 Get free drive space □ Custom call procedure HRESULT GetDriveSize2( LPCOLESTR lpcwszDirectryName, // (I) Directory name LONG* plDriveSize, // (O) Free space LONG* plRet // (O) Error code ) □ Automation call procedure File_GetDriveSize2( lpcwszDirectryName As STRING // (I) Directory name plDriveSize As LONG* // (O) Free space ) As LONG // (O) Error code □ Argument lpcwszDirectryName: Sets the directory name as a UNICODE character string. Directory is set with an absolute path as follows: Drive name + ":" + \Directory name\ plDriveSize: Gets free space of the set directory. (unit: byte) Automation argument: lpcwszDirectryName: See the explanation of lpcwszDirectryName. pvDriveSize: Gets the free space of the set directory as a character string. plRet: Returns an error code. (Upon automation, the return value is used.) EZNC_FILE_REN_FILESYSTEM: File system error EZNC_FILE_DIR_NODRIVE: Drive does not exist EZNC_FILE_DISKFREE_NODIR: Directory does not exist EZNC_FILE_DISKFREE_NODRIVE: Drive does not exist (Note) If an error occurs on the personal computer, the error code EZNC_FILE_… becomes EZNC_PCFILE_…. Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Returns free space of the directory set for lpcwszDirectryName. □ Function The unit of free space is a byte. Directory is set with an absolute path as follows: Drive name + ":" + \Directory name\ When a drive on a personal computer is set for drive name, setting of directory is ignored, and free space of the drive is returned. When the NC control unit is set for a drive name, free space of the set directory is returned. When a subdirectory exists in the set directory, usage in the subdirectory is excluded from calculation of free space. This is valid only for the M800 series. This function is not supported with C70. □ Reference GetDriveInformation() □ Specification 2-108 2.11.10 IEZNcFile6::OpenFile3 C70 2.11.10 IEZNcFile6::OpenFile3 □ Custom call procedure HRESULT OpenFile3( LPCOLESTR lpcwszFileName, LONG lMode, LONG* plRet ) □ Automation call procedure File_OpenFile3( bstrFileName As STRING lModeAs LONG ) As LONG □ Argument M700 M800 Open file // (I) File name containing a path // (I) Open mode // (O) Error code // (I) File name containing a path // (I) Open mode // (O) Error code lpcwszFileName: Sets the file name containing a path as a UNICODE character string. A file is set with an absolute path as follows: Drive name + ":" + \Directory name\File name For a list of files in the NC control unit that is accessible, refer to Table 2-1, Table 2-2 and Table 2-3. All files except for machining programs in the NC control unit can be backed up, but cannot be edited. bstrFileName: Refer to the explanation of lpcwszFileName. lMode: Sets open mode. Value EZNC_FILE_READ EZNC_FILE_WRITE EZNC_FILE_OVERWRITE Meaning Read mode Write mode Overwrite mode (writes even if the specified file exists.) plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_FILE_OPEN_OPEN: File cannot be opened EZNC_FILE_OPEN_ALREADYOPENED: File is already open EZNC_FILE_OPEN_FILEEXIST: File already exists (in write mode) EZNC_FILE_OPEN_FILENOEXIST: File does not exist (in read mode) EZNC_FILE_OPEN_MODE: Invalid open mode EZNC_FILE_OPEN_NOTOPEN: File cannot be opened EZNC_FILE_OPEN_CREATE: Temporary file cannot be created (in write mode) EZNC_FILE_READFILE_CREATE: Temporary file cannot be created (in read mode) EZNC_FILE_DIR_NODRIVE: Drive does not exist EZNC_FILE_DIR_ALREADYOPENED: A different directory is already opened EZNC_FILE_OPEN_ILLEGALPATH: Invalid file path □ Return Value value S_OK S_FALSE Meaning Normal termination Communication failure 2-109 □ Function Opens a file in the specified mode. The directory that creates a temporary file is created in the following order of priority: Directory set with environment variable TMP Directory to which the product is installed The temporary file name is MELDASn. A number is placed in n. (Note 1) Make sure to close the open file with CloseFile2() (or AbortFile2()). The temporary file will remain if CloseFile2() is not used. (Note 2) Do not perform write or overwrite operation during automatic operation of the NC control unit. (C70 only) For the M700/M800 series, write or overwrite operation can be performed during automatic operation of the NC control unit, unless automatic operation of the file intended for operation is being carried out. Read operation can be performed during automatic operation of the NC control unit. (Note 3) It takes C70 approximately 20 s to read SRAM.BIN (SRAM data (binary format)). Other methods cannot be used during that time. □ Reference CloseFile2(), AbortFile2(), ReadFile2(), WriteFile() □ Specification 2-110 Table 2-1 M700 series (version A0 or later) List of accessible files File description Machining program MTB macro Directory M01:\PRG\USER\ M01:\PRG\MMACRO\ File name Program No. Program No. Remarks Fixed cycle program MDI program Parameters [User, machine] Auxiliary axis parameter DeviceNet parameter file Rotary axis geometric deviation parameter file PLC program M01:\PRG\FIX\ M01:\PRG\MDI\ M01:\PRM\ M01:\PRM\ M01:\PRM\ M01:\PRM\ Program No. MDI.PRG ALL.PRM AUXAXIS.PRM DEVICENT.PRM GEOMETRY.PRM Program No. is 0100000010 to 100009999. M01:\LAD\ USERPLC.LAD Workpiece offset data Tool compensation amount data Common variable data Custom variable data M01:\DAT\ M01:\DAT\ M01:\DAT\ M01:\DAT\ WORK.OFS TOOL.OFS COMMON.VAR CUSTOM.VAR SRAM data (binary format) Sampling data file (binary format) Tool life management data file Tool management data file SRAM open data file Device open data file Machining surface data Extended SRAM data (binary format) All history M01:\DAT\ M01:\DAT\ M01:\DAT\ M01:\DAT\ M01:\DAT\ M01:\DAT\ M01:\DAT\ M01:\DAT\ M01:\LOG\ SRAM.BIN SAMPLE.BIN TLIFE.TLF TOOLMNG.DAT SRAMOPEN.DAT DEVOPEN.DAT RNAVI.DAT EXTSRAM.BIN ALLLOGLOG Key history Sampling data file NC-side compact flash M01:\LOG\ M01:\LOG\ M01:\IC1\ KEYLOGLOG NCSAMP.CSV Any 2-111 Program No. is O100001000 to O199999999. M700/M700VW only Key history, alarm history, programmable controller I/O signal history, AC input power supply faults history The NC-side compact flash (hereinafter referred to as the "NC-side CF card") is recognized as DS (data server) from the NC control unit. Used for data backup, storing large-capacity programs, etc. Table 2-2 M800 series List of accessible files File description Machining program MTB macro Fixed cycle program MDI program Parameters [User, machine] Directory M01:\PRG\USER\ M01:\PRG\MMACRO\ M01:\PRG\FIX\ M01:\PRG\MDI\ M01:\PRM\ File name Program No. Program No. Program No. MDI.PRG ALL.PRM Remarks Auxiliary axis parameter DeviceNet parameter file Rotary axis geometric deviation parameter file Safety parameter file System files for maintenance and service PLC program file M01:\PRM\ M01:\PRM\ M01:\PRM\ AUXAXIS.PRM DEVICENT.PRM GEOMETRY.PRM M01:\PRM\ M01:\PRM\ SAFEPARA.BIN SYSTEM.PRM This cannot be accessed by the user. M01:\LAD\ USERPLC.LAD Not compatible with M700 series. PLC program file for each project M01:\LAD\ PROJECTxx.LAD xx01 to usable project numbers Own station safety PLC program file M01:\LAD\ SAFEPLC1.LAD Other station safety PLC program file M01:\LAD\ SAFEPLC2.LAD Workpiece offset data file M01:\DAT\ WORK.OFS Tool compensation amount data M01:\DAT\ TOOL.OFS Tool life management data file M01:\DAT\ TLIFE.TLF Common variable data file M01:\DAT\ COMMON.VAR The format is different from M700 series SRAM data M01:\DAT\ SRAM.BIN Not compatible with M700 series. Tool management data file SRAM open data file Device open data file Machining surface data Tool safety data file Machine manufacturer macro variable data file All history Key history data file Touchscreen history Sampling data file Sampling data file PLC message data file (English) PLC message data file (Japanese) M01:\DAT\ M01:\DAT\ M01:\DAT\ M01:\DAT\ M01:\DAT\ M01:\DAT\ TOOLMNG.DAT SRAMOPEN.DAT DEVOPEN.DAT RNAVI.DAT TOOLALL.DAT MMACRO.VAR M01:\LOG\ M01:\LOG\ M01:\LOG\ M01:\LOG\ M01:\LOG\ M01:\PLCMSG\ M01:\PLCMSG\ NC-side SD card M01:\IC1\ ALLLOGLOG KEYLOGLOG TOUCHLOG.LOG NCSAMP.CSV NCSAMP.BIN PLCMSG_ENG.TXT PLCMSG_JPN.TXT, etc. Any Program No. is 100010000 to 199999999. Program No. is 100000010 to 100009999. The header (1st line) is different from the M700 series. An M700 file can be used with M800, but an M800 file cannot be used with the M800 series. The format is different from M700 series. The format is different from M700 series. The NC-side SD card is recognized as DS (data server) from the NC control unit. Used for data backup, storing large-capacity programs, etc. Table 2-3 C70 List of accessible files File description Directory File name Machining program Fixed cycle program MDI program Parameters [User, machine] PLC program file Workpiece offset Tool offset data Common variable data SRAM data (binary format) Sampling data Operation history data M01:\PRG\USER\ M01:\PRG\FIX\ M01:\PRG\MDI\ M01:\PRM\ M01:\LAD\ M01:\DAT\ M01:\DAT\ M01:\DAT\ M01:\DAT\ M01:\LOG\ M01:\LOG\ Program No. PRG Program No. PRG MDI.PRG ALL.PRM USERPLC.LAD WORK.OFS TOOL.OFS COMMON.VAR SRAM.BIN For maintenance NCSAMP.CSV For maintenance TRACE.TRC For maintenance DANGER ! 危険 Remarks Cautions for writing to a file Carefully check a file before writing to the file for the NC control unit. Writing to an incorrect file may cause unexpected operation, resulting in a serious accident. 2-112 2.11.11 IEZNcFile6::CloseFile2 C70 2.11.11 IEZNcFile6::CloseFile2 Argument M800 Close file □ Custom call procedure HRESULT CloseFile2( LONG* plRet ) □ Automation call procedure File_CloseFile2( ) As LONG □ M700 // (O) Error code // (O) Error code plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_FILE_WRITEFILE_WRITE: File is not writable Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Closes a file. When the file was opened with OpenFile3(), make sure to close it with □ Function CloseFile2() (or AbortFile2()). (Note) Do not perform this operation during automatic operation of the NC control unit. (C70 only) For the M700/M800 series, the operation can be performed during automatic operation of the NC control unit, unless automatic operation of the file intended for operation is being carried out. □ Reference OpenFile3(), AbortFile2(), ReadFile2(), WriteFile() □ Specification 2-113 2.11.12 IEZNcFile6::AbortFile2 C70 2.11.12 IEZNcFile6::AbortFile2 Argument M800 Force close file □ Custom call procedure HRESULT AbortFile2( LONG* plRet ) □ Automation call procedure File_AbortFile2( ) As LONG □ M700 // (O) Error code // (O) Error code plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Forcibly closes an open file. Use this to stop writing. After writing is stopped, the file which was □ Function being written to will be deleted. The difference from CloseFile2() is that an error is not output. □ Reference OpenFile3(), CloseFile2(), ReadFile2(), WriteFile() □ Specification 2-114 2.11.13 IEZNcFile6::ReadFile2 C70 M700 2.11.13 IEZNcFile6::ReadFile2 Read file □ Custom call procedure HRESULT ReadFile2( DWORD dwLength, BYTE** ppbData, DWORD* pdwNumRead, LONG* plRet ) □ Automation call procedure File_ReadFile2( lLength As LONG pvData As VARIANT* ) As LONG □ Argument M800 // (I) Size of data to be read // (O) Read data // (O) Read data size // (O) Error code // (I) Size of data to be read // (O) Read data // (O) Error code dwLength: Sets the size of data to be read at a time in the number of bytes. ppbData: Returns the pointer for the read byte data array. As the read data area is allocated in this product, the client needs to release it explicitly with CoTaskMemFree(). pdwNumRead: Returns the number of bytes that were actually read. In automation call, the VARIANT data includes the number of bytes. Automation argument: lLength: Refer to the explanation of dwLength. pvData: Returns the read byte data array in VARIANT. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_FILE_READFILE_NOTOPEN: No file is open in the read mode EZNC_FILE_READFILE_READ: File is not readable EZNC_FILE_READFILE_CREATE: Temporary file cannot be created Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Reads data from the file opened with OpenFile3(). Data to be read returns a byte data array and □ Function its number of bytes. Determines as the end of file when pdwNumRead is smaller than dwLength. Setting the size of data to be read at a time. When reading a large file, it can be read in multiple parts. The file can be read in sequence until CloseFile2() is executed. □ Reference OpenFile3(), CloseFile2(), AbortFile2(), WriteFile() □ Specification 2-115 2.11.14 IEZNcFile6::WriteFile C70 2.11.14 IEZNcFile6::WriteFile Argument M800 Write file □ Custom call procedure HRESULT WriteFile( DWORD dwLength, BYTE* pbData, LONG* plRet ) □ Automation call procedure File_WriteFile( vData As VARIANT ) As LONG □ M700 // (I) Size of data to be written // (I) Data to be written // (O) Error code // (I) Data to be written // (O) Error code dwLength: Sets the size of data that is written at a time in the number of bytes. pbData: Sets data to be written as byte array. Automation argument: vData: Creates data to be written as a byte array and sets it by substituting it in vData (VARIANT type) as shown in the example below. Example) Dim vWriteFile As Variant Dim byteWrite() As Byte vWriteFile = byteWrite plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_FILE_WRITEFILE_NOTOPEN: No file is open in write mode EZNC_FILE_WRITEFILE_WRITE: Cannot be written to a file EZNC_FILE_LENGTH: Invalid write data size Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Writes data to a file opened with OpenFile3(). Data to be written is data in a byte array. □ Function Sets the size of data to be written at a time. When writing a large amount of data, it can be written in multiple parts. Data can be written in sequence until CloseFile2() is executed. (Note 1) When a file in the NC control unit except for a machining program is changed, extra care should be taken because it may cause the NC control unit malfunction. Make sure to back up in advance to restore to its original state. □ Reference OpenFile3(), CloseFile2(), AbortFile2(), ReadFile2() □ Specification ! DANGER 危険 Cautions for writing to a file Carefully check a file before writing to the file for the NC control unit. Writing to an incorrect file may cause unexpected operation, resulting in a serious accident. 2-116 2.11.15 IEZNcFile6::OpenNCFile2 M700 2.11.15 IEZNcFile6::OpenNCFile2 □ Custom call procedure HRESULT OpenNCFile2 ( LPCOLESTR lpcwszFileName, LONG lMode, LONG* plRet ) □ Automation call procedure File_OpenNCFile2 ( bstrFileName As STRING lMode As LONG ) As LONG □ Argument M800 Open machining program dedicated file // (I) File name containing a path // (I) Open mode // (O) Error code // (I) File name containing a path // (I) Open mode // (O) Error code lpcwszFileName: Sets the file name containing a path as a UNICODE character string. A file is set with an absolute path as follows: Drive name + ":" + \Directory name\File name Paths other than those shown below cannot be used. Model M700 series M800 series Machining program M01:\PRG\USER\Machining Program No. M01:\PRG\UMACRO\Machining Program No. M01:\PRG\MMACRO\Machining Program No. M01:\PRG\FIX\Machining Program No. M01:\PRG\MDI\Machining Program No. M01:\PRG\USER\Machining Program Name (32 or less alphanumeric characters including extension) M01:\PRG\MMACRO\Machining Program No. (100010000 –199999999) M01:\PRG\FIX\Machining Program No. (100000010 –100009999) M01:\PRG\MDI\MDI.PRG bstrFileName: Refer to the explanation of lpcwszFileName. lMode:Sets open mode. Meaning Value EZNC_FILE_READ Read mode EZNC_FILE_WRITE Write mode EZNC_FILE_OVERWRITE Overwrite mode (writes even if the specified file exists.) plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_FILE_OPEN_ALREADYOPENED: File is already open EZNC_FILE_OPEN_FILEEXIST: File already exists (in write mode) EZNC_FILE_OPEN_MODE: Invalid open mode EZNC_FILE_OPEN_NOTOPEN: File cannot be opened EZNC_FILE_OPEN_CREATE: File cannot be created (in write mode) EZNC_FILE_OPEN_ILLEGALPATH: Invalid path EZNC_FILE_OPEN_FILENOTEXIST: File does not exist EZNC_FILE_OPEN_OPEN: File cannot be opened EZNC_FILE_DIR_ALREADYOPENED: A different directory is already opened EZ_ERR_NOT_SUPPORT: Not supported 2-117 Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Opens the machining program file in the set mode. The directory that creates a temporary file is □ Function created in the following order of priority: Directory specified with environment variable TMP Directory to which the product is installed The temporary file name is "MELDASn". A number is placed in n. OpenFile3() cannot be used concurrently. This function is not supported with C70. (EZ_ERR_NOT_SUPPORT is returned to plRet.) (Note 1) Make sure to close the open file with CloseNCFile2() (or AbortNCFile2()). If CloseNCFile2() is not used, a temporary file will remain. (Note 2)For the M700/M800 series, write or overwrite operation can be performed during automatic operation of the NC control unit, unless automatic operation of the file intended for operation is being carried out. Read operation can be performed during automatic operation of the NC control unit. □ Reference CloseNCFile2(), AbortNCFile2(), ReadNCFile2(), WriteNCFile() □ Specification 2-118 2.11.16 IEZNcFile6::CloseNCFile M700 2.11.16 IEZNcFile6::CloseNCFile2 Close machining program dedicated file □ Custom call procedure HRESULT CloseNCFile2( LONG* plRet ) □ Automation call procedure File_CloseNCFile2( ) As LONG □ Argument M800 // (O) Error code // (O) Error code plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_FILE_WRITEFILE_WRITE: File is not writable EZ_ERR_NOT_SUPPORT: Not supported Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Closes the machining program file. □ Function This function is not supported with C70. (EZ_ERR_NOT_SUPPORT is returned to plRet.) (Note 1) For the M700/M800 series, the operation can be performed during automatic operation of the NC control unit, unless automatic operation of the file intended for operation is being carried out. (Note 2) When the file was opened with OpenNCFile2(), make sure to close it with CloseNCFile2() (or AborNCtFile2()). □ Reference OpenNCFile2(), AbortNCFile2(), ReadNCFile2(), WriteNCFile() □ Specification 2-119 2.11.17 IEZNcFile6::AbortNCFile2 M700 2.11.17 IEZNcFile6::AbortNCFile2 Force close machining program dedicated file □ Custom call procedure HRESULT AbortNCFile2( LONG* plRet ) □ Automation call procedure File_AbortNCFile2( ) As LONG □ Argument M800 // (O) Error code // (O) Error code plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZ_ERR_NOT_SUPPORT: Not supported Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Force closes the open machining program file. Use this to stop writing. After writing is stopped, □ Function the file which was being written to will be deleted. The difference from CloseNCFile2() is that an error is not output. This function is not supported with C70. (EZ_ERR_NOT_SUPPORT is returned to plRet.) 2-120 2.11.18 IEZNcFile6::ReadNCFile2 M700 2.11.18 IEZNcFile6::ReadNCFile2 Read machining program dedicated file □ Custom call procedure HRESULT ReadNCFile2( DWORD dwLength, BYTE** ppbData, DWORD* pdwNumRead, LONG* plRet ) □ Automation call procedure File_ReadNCFile2( lLength As LONG pvData As VARIANT* ) As LONG □ Argument M800 // (I) Size of data to be read // (O) Read data // (O) Read data size // (O) Error code // (I) Size of data to be read // (O) Read data // (O) Error code dwLength: Setss the size of data to be read at a time in the number of bytes. ppbData: Returns the pointer for the read byte data array. As the read data area is allocated in this product, the client needs to release it explicitly with CoTaskMemFree(). pdwNumRead: Returns the number of bytes that were actually read. In automation call, the VARIANT data includes the number of bytes. Automation argument: lLength: Refer to the explanation of dwLength. pvData: Returns the read byte data array in VARIANT. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_FILE_READFILE_NOTOPEN: No file is open in the read mode EZNC_FILE_READFILE_READ: File is not readable EZNC_FILE_READFILE_CREATE: Temporary file cannot be created EZ_ERR_NOT_SUPPORT: Not supported Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Data is read from the machining program file opened with OpenNCFile2(). Data to be read □ Function returns a byte data array and its number of bytes. Determines as the end of file when pdwNumRead is smaller than dwLength. Sets the size of data to be read at a time. When reading a large file, it can be read in multiple parts. The file can be read in sequence until CloseNCFile2() is executed. This function is not supported with C70. (EZ_ERR_NOT_SUPPORT is returned to plRet.) □ Reference OpenNCFile2(), CloseNCFile2(), AbortNCFile2(), WriteNCFile() □ Specification 2-121 2.11.19 IEZNcFile6::WriteNCFile M700 2.11.19 IEZNcFile6::WriteNCFile Write machining program dedicated file □ Custom call procedure HRESULT WriteNCFile( DWORD dwLength, BYTE* pbData, LONG* plRet ) □ Automation call procedure File_WriteNCFile( vData As VARIANT ) As LONG □ Argument M800 // (I) Size of data to be written // (I) Data to be written // (O) Error code // (I) Data to be written // (O) Error code dwLength: Sets the size of data that is written at a time in the number of bytes. pbData: Sets data to be written as byte array. In automation call, vData includes the number of bytes. Automation argument: vData: Creates data to be written as a byte array and sets it by substituting it in vData (VARIANT type) as shown in the example below. Example) Dim vWriteFile As Variant Dim byteWrite() As Byte vWriteFile = byteWrite plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_FILE_WRITEFILE_NOTOPEN: No file is open in write mode EZNC_FILE_WRITEFILE_WRITE: Cannot be written to a file EZNC_FILE_LENGTH: Invalid write data size EZ_ERR_NOT_SUPPORT: Not supported Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Data is written to the machining program file opened with OpenNCFile2(). Data to be written is □ Function data in a byte array. Sets the size of data to be written at a time. When writing a large amount of data, it can be written in multiple parts. Data can be written in sequence until CloseNCFile2() is executed. This function is not supported with C70. (EZ_ERR_NOT_SUPPORT is returned to plRet.) (Note) For the M700/M800 series, when edit lock B (#8105) parameter is 1, programs 8000 to 9999 cannot be written. When edit lock C (#1121) parameter is 1, programs 9000 to 9999 cannot be written. □ Reference OpenNCFile2(), CloseNCFile2(), AbortNCFile2(), ReadNCFile2() □ Specification ! DANGER 危険 Cautions for writing to a file Carefully check a file before writing to the file for the NC control unit. Writing to an incorrect file may cause unexpected operation, resulting in a serious accident. 2-122 2.12 IEZNcCommonVariable2 Interface 2.12.1 IEZNcCommonVariable2::CommonVRead C70 2.12.1 IEZNcCommonVariable2::CommonVRead □ Custom call procedure HRESULT CommonVRead( LONG lIndex, DOUBLE* pdData, LONG* plType LONG* plRet ) □ Automation call procedure CommonVariable_Read2( lIndex As LONG pdData As DOUBLE* plType As LONG* ) As LONG □ Argument M700 M800 Read common variables // (I) Variable number // (O) Variable value // (O) Type // (O) Error code // (I) Variable number // (O) Variable value // (O) Type // (O) Error code lIndex: Sets the common variable number to be read. Value: (For C70) 100 to 199, 500 to 999 (For M700/M800 series) 100 to 199、400 to 999, 100100 to 100199, 200100 to 200199, 300100 to 300199 400100 to 400199, 500100 to 500199, 600100 to 600199 700100 to 700199, 800100 to 800199, 900000 to 907399 pdData: Returns the common variable value of the set common variable number. plType: Returns the variable value type. (For the M700/M800 series, enabled.) Value Meaning 1 Numerical value 0 Not set plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_ADDR: Invalid system specification EZNC_DATA_READ_READ: Data is not readable Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Reads common variables. There is limit to the common variable number that can be handled, □ Function depending on specifications for the number of sets for common variables. For common variables #100 to #199, system specification is necessary. □ CommonVWrite(), GetSize() □ ( System common variables #100 to #199 only) Reference Specification 2-123 2.12.2 IEZNcCommonVariable2::CommonVWrite C70 2.12.2 IEZNcCommonVariable2::CommonVWrite □ Custom call procedure HRESULT CommonVWrite( LONG lIndex, DOUBLE dData, LONG lType, LONG* plRet ) □ Automation call procedure CommonVariable_Write2( lIndex As LONG dData As DOUBLE lType As LONG ) As LONG □ Argument M700 M800 Write common variables // (I) Variable number // (I) Variable value // (I) Type // (O) Error code // (I) Variable number // (I) Variable value // (I) Type // (O) Error code lIndex: Set the common variable number to be written. Value: (For C70) 100 to 199, 500 to 999 (For M700/M800 series) 100 to 199, 400 to 999, 100100 to 100199, 200100 to 200199、300100 to 300199 400100 to 400199, 500100 to 500199, 600100 to 600199 700100 to 700199, 800100 to 800199, 900000 to 907399 dData: Sets the common variable value to be written to the set common variable number. lType: Specifies the type. (For the M700/M800, enabled.) Value Meaning 1 Numerical value 0 Not set plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_WRITE_ADDR: Invalid part system setting EZNC_DATA_WRITE_WRITE: Data is not writable Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Writes common variables. There is limit to the common variable number that can be handled, □ Function depending on specifications for the number of sets for common variables. For common variables #100 to #199, part system setting is necessary. □ CommonVRead(), GetSize() □ ( System common variables #100 to #199 only) Reference Specification 2-124 2.12.3 IEZNcCommonVariable2::GetSize C70 2.12.3 IEZNcCommonVariable2::GetSize Argument M800 Get number of sets for common variables □ Custom call procedure HRESULT GetSize( LONG lType, LONG* plData, LONG* plRet ) □ Automation call procedure CommonVariable_GetSize( lType As LONG plData As LONG* ) As LONG □ M700 // (I) Common variable type // (O) Number of sets // (O) Error code // (I) Common variable type // (O) Number of sets // (O) Error code lType: Specifies the common variable type to be read. Value Meaning 0 When the number of sets of common variables #100 and greater is got. 1 When the number of sets of common variables #500 and greater is got. plData: Returns the number of sets of common variable type. Value meaning: 40 = 40 [sets] plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_ADDR: Invalid part system setting EZNC_DATA_READ_READ: Data is not readable Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Reads the number of sets of common variables. For common variables #100 to #199, part □ Function system setting is necessary. □ CommonVRead(), CommonVWrite() □ ( System common variables #100 to #199 only) Reference Specification 2-125 2.12.4 IEZNcCommonVariable2::GetName C70 2.12.4 IEZNcCommonVariable2::GetName □ Custom call procedure HRESULT GetName( LONG lIndex, LPOLESTR* lppwszName, LONG* plRet ) □ Automation call procedure CommonVarialbe_GetName( lIndex As LONG lppwszName As STRING* ) As LONG □ Argument M700 M800 Get names of common variables // (I) Common variable number // (O) Common variable name character string // (O) Error code // (I) Common variable number // (O) Common variable name character string // (O) Error code lIndex: Sets the common variable number to be read. Value: (For M700 series and C70) 500 to 519 (For M800 series) 500 to 599 lppwszName: Returns the common variable name as a UNICODE character string. Names are seven alphanumeric characters starting with an alphabet letter. The character string ends with a NULL code. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_READ: Data is not readable EZNC_DATA_READ_DATASIZE: Exceeded maximum data size Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Reads common variable names. Names are seven alphanumeric characters starting with an □ Function alphabet letter. The character string ends with a NULL code. As the character string area memory is allocated in this product, the client using VC++ needs to release the character string area memory explicitly with CoTaskMemFree(). □ Reference CommonVRead(), CommonVWrite() □ Specification 2-126 2.12.5 IEZNcCommonVariable2::SetName C70 2.12.5 IEZNcCommonVariable2::SetName □ Custom call procedure HRESULT SetName( LONG lIndex, LPCOLESTR lpcwszName, LONG* plRet ) □ Automation call procedure CommonVariable_SetName( lIndex As LONG lpcwszName As STRING ) As LONG □ Argument M700 M800 Set name settings for common variables // (I) Common variable number // (I) Common variable name character string // (O) Error code // (I) Common variable number // (I) Common variable name character string // (O) Error code lIndex: Sets the common variable number to be written. Value: (For M700 series and C70) 500 to 519 (For M800 series) 500 to 599 lpcwszName: Set the common variable name as a UNICODE character string. Names are seven alphanumeric characters starting with an alphabet letter. The character string ends with a NULL code. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_WRITE_WRITE: Data is not writable Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Writes common variable names. Names are seven alphanumeric characters starting with an □ Function alphabet letter. The character string ends with a NULL code. □ Reference GetName() □ Specification 2-127 2.12.6 IEZNcCommonVariable2::GetCVNullData C70 2.12.6 IEZNcCommonVariable2::GetCVNullData □ Custom call procedure HRESULT GetCVNullData( DOUBLE* pdData, LONG* plRet ) □ Automation call procedure CommonVariable_GetNullData( pdData As DOUBLE* ) As LONG □ Argument M700 Get value when no numerical value is set // (O) Value when no numerical value is set // (O) Error code // (O) Value when no numerical value is set // (O) Error code pdData: Returns the value when no numerical value is set. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_READ: Data is not readable Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets the value when no numerical value of variable (#100 to 199, #500 to 519) is set. □ Function □ Reference □ Specification 2-128 M800 2.13 IEZNcLocalVariable2 Interface 2.13.1 IEZNcLocalVariable2::LocalVRead C70 2.13.1 IEZNcLocalVariable2::LocalVRead □ Custom call procedure HRESULT LocalVRead( LONG lIndex, LONG lLevel, DOUBLE* pdData, LONG* plType LONG* plRet ) □ Automation call procedure LocalVariable_Read2( lIndex As LONG lLevel As LONG pdData As DOUBLE* plType AS LONG* ) As LONG □ Argument M700 Read local variable // (I) Variable number // (I) Level // (O) Variable value // (O) Type // (O) Error code // (I) Variable number // (I) Level // (O) Variable value // (O) Type // (O) Error code lIndex: Sets the common variable number to be read. Value: 1 to 33 lLevel: Sets the macro subprogram execution level. Value: 0 to 4 pdData: Returns the local variable value of the set local variable number of the set system. plType: Returns the type. (Unused) Value Meaning 1 Numerical value 0 Not set plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_ADDR: Invalid part system setting EZNC_DATA_READ_READ: Data is not readable Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Reads the local variable value of the specified system. □ Function □ Reference □ Specification GetMacroLevel() System 2-129 M800 2.13.2 IEZNcLocalVariable2::GetMacroLevel C70 2.13.2 IEZNcLocalVariable2::GetMacroLevel □ Custom call procedure HRESULT GetMacroLevel( LONG* plData, LONG* plRet ) □ Automation call procedure LocalVariable_GetMacroLevel( plData As LONG ) As LONG □ Argument // (O) Level // (O) Error code plData: Returns the macro subprogram call level. Value: 0 to 8 plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_ADDR: Invalid part system setting EZNC_DATA_READ_READ: Data is not readable Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets the macro subprogram call level. □ Function Reference □ Specification System 2-130 M800 Get macro subprogram call level // (O) Level // (O) Error code □ M700 2.13.3 IEZNcLocalVariable2::GetLVNullData C70 2.13.3 IEZNcLocalVariable2::GetLVNullData □ Custom call procedure HRESULT GetLVNullData( DOUBLE* pdData, LONG* plRet ) □ Automation call procedure LocalVariable_GetNullData( pdData As DOUBLE* ) As LONG □ Argument M700 Get value when no numerical value is set // (O) Value when no numerical value is set // (O) Error code // (O) Value when no numerical value is set // (O) Error code pdData: Returns the value when no numerical value is set. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_READ: Data is not readable Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets the value when no numerical value of variable (#1 to 33) is set. □ Function □ Reference □ Specification 2-131 M800 2.14 IEZNcTool3 Interface 2.14.1 IEZNcTool3::GetToolSetSize C70 2.14.1 IEZNcTool3::GetToolSetSize □ Custom call procedure HRESULT GetToolSetSize( LONG* plSize, LONG* plRet ) □ Automation call procedure Tool_GetToolSetSize( plSize As LONG* ) As LONG □ Argument M700 M800 Get number of sets for tool offset // (O) Number of sets // (O) Error code // (O) Number of sets // (O) Error code plSize: Returns the number of sets for tool offset of the set part system. The number of sets is determined by NC specifications. Value meaning: 200 = 200 [sets] plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_READ: Data is not readable □ Return Value value S_OK S_FALSE Gets the number of sets for tool offset □ Function by NC specifications. □ GetType() □ System Reference Specification Meaning Normal termination Communication failure of the set part system. The number of sets is determined 2-132 2.14.2 IEZNcTool3::GetType C70 2.14.2 IEZNcTool3::GetType □ Custom call procedure HRESULT GetType( LONG* plType, LONG* plRet ) □ Automation call procedure Tool_GetType( plType As LONG* ) As LONG □ Argument // (O) Type // (O) Error code // (O) Type // (O) Error code plType: Returns the tool offset type of the set part system. Value Meaning 1 M system type I: 1 axis compensation amount 4 M system type II: 1 axis compensation amount with wear compensation amount 6 L system type: 2 axises compensation amount Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets the tool offset type of the set part system. □ Function Reference □ Specification M800 Get tool offset type plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_READ: Data is not readable □ M700 GetToolSetSize() System 2-133 2.14.3 IEZNcTool3::GetOffset C70 2.14.3 IEZNcTool3::GetOffset □ Custom call procedure HRESULT GetOffset( LONG lType, LONG lKind, LONG lToolSetNo, DOUBLE* pdOffset, LONG* plNo, LONG* plRet ) □ Automation call procedure Tool_GetOffset( lType As LONG lKind As LONG lToolSetNo As LONG pdOffset As DOUBLE* plNo As LONG* ) As LONG □ Argument M700 M800 Get tool offset amount // (I) Tool offset type // (I) Offset amount type // (I) Tool set number // (O) Offset amount // (O) Hypothetical tool nose pointnumber // (O) Error code // (I) Tool offset type // (I) Offset amount type // (I) Tool set number // (O) Offset amount // (O) Hypothetical tool nose point number // (O) Error code lType: Sets the tool offset type. Refer to the parameter table. lKind: Sets the type of tool offset amount. Refer to the parameter table. lToolSetNo: Set the tool offset set number. The number of sets can be got with GetToolSetSize(). pdOffset : Returns the tool offset amount. Refer to the parameter table. plNo: Returns the hypothetical tool nose point number. Refer to the parameter table. L system type only. Returns none except for the L system type. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_READ: Data is not readable EZNC_DATA_READ_DATATYPE: Invalid data type EZNC_DATA_READ_SUBSECT: Invalid subsection number EZ_ERR_NOT_SUPPORT: Not supported 2-134 Parameter table Value: Type Value: Type of tool offset amount 1: M system type I 0: Tool offset amount 4: M system type 0: Tool length compensation II amount (dimensions) 1: (Wear) 2: Tool radius compensation amount (dimensions) 3: (Wear) 6: L system type 0: Tool length compensation amount X 1: Z 2: C (Y*) 3: Tool length offset amount X 4: Z 5: C (Y*) 6: Tool radius (nose R) R Data range -99,999.999 to 99,999.999 [mm] -99,999.999 to 99,999.999 [mm] 2 6 1 7 0 5 X 3 8 to C70: -999.999 to 999.999 [mm] M700/M800 series : -99,999.999 99,999.999 [mm] to C70 : 0 to 99.999 [mm] M700/M800 series : 0 to 99,999.999 [mm] C70 : 0 to 99.999 [mm] M700/M800 series : 0 to 99,999.999 [mm] 0 to 8 (Refer to Figure 1) 7: Tool radius (nose R) wear amount r 8: Hypothetical tool nose point number P * For the M700/M800 series Z C70 : -99.999 to 99.999 [mm] M700/M800 series : -99,999.999 99,999.999 [mm] 4 Tool nose point 刃先点 3 図 1.仮想刃先点番号 Figure 1 Hypothetical tool nose point number Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets the tool offset amount of the set part system/axis No. The range shown in the parameter □ Function table varies depending on the command unit such as inch system and metric system of the Mitsubishi CNC. For details, refer to the installation manual of each Mitsubishi CNC. □ Reference □ Specification GetType(), SetOffset(), GetToolSetSize() System 2-135 2.14.4 IEZNcTool3::GetOffset2 C70 2.14.4 IEZNcTool3::GetOffset2 □ Custom call procedure HRESULT GetOffset2( LONG lType, LONG lKind, LONG lToolSetNo, DOUBLE* pdOffset, LONG* plNo, LONG* plRet ) □ Automation call procedure Tool_GetOffset2( lType As LONG lKind As LONG lToolSetNo As LONG pdOffset As DOUBLE* plNo As LONG* ) As LONG □ Argument M700 M800 Get tool offset amount // (I) Tool offset type // (I) Offset amount type // (I) Tool set number // (O) Offset amount // (O) Hypothetical tool nose point number // (O) Error code // (I) Tool offset type // (I) Offset amount type // (I) Tool set number // (O) Offset amount // (O) Hypothetical tool nose point number // (O) Error code lType: Sets the tool offset type. Refer to the parameter table. lKind: Sets the type of tool offset amount. Refer to the parameter table. lToolSetNo: Sets the tool offset set number. The number of sets can get with GetToolSetSize(). pdOffset : Returns the tool offset amount. Refer to the parameter table. plNo: Returns the Hypothetical tool nose point number. Refer to the parameter table. L system type only. Returns none except for the L system type. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_READ: Data is not readable EZNC_DATA_READ_DATATYPE: Invalid data type EZNC_DATA_READ_SUBSECT: Invalid subsection number 2-136 Parameter table Value: Type Value: Type of tool offset amount 1: M system type I 0: Tool offset amount 4: M system type 0: Tool length compensation II amount (dimensions) 1: (Wear) 2: Tool radius compensation amount (dimensions) 3: (Wear) 6: L system type 0: Tool length compensation amount 1: Z 2: C (Y*) 3: Tool length offset amount X 4: Z 5: C (Y*) 6: Tool radius (nose R) R Data range -99,999.999 to 99,999.999 [mm] -99,999.999 to 99,999.999 [mm] 2 6 1 7 0 5 X 3 8 to C70: -999.999 to 999.999 [mm] M700/M800 series : -99,999.999 99,999.999 [mm] to C70 : 0 to 99.999 [mm] M700/M800 series : 0 to 99,999.999 [mm] C70 : 0 to 99.999 [mm] M700/M800 series : 0 to 99,999.999 [mm] 0 to 8 (Refer to Figure 1) 7: Tool radius (nose R) wear amount r 8: Hypothetical tool nose point number P * For the M700/M800 series Z C70 : -99.999 to 99.999 [mm] M700/M800 series : -99,999.999 99,999.999 [mm] 4 Tool nose point 刃先点 3 図 1.仮想刃先点番号 Figure 1 Hypothetical tool nose point Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets the tool offset amount of the set part system/axis No. The range shown in the parameter □ Function table varies depending on the command unit such as inch system and metrik system of the Mitsubishi CNC. For details, refer to the installation manual of each Mitsubishi CNC. □ Reference □ Specification GetType(), SetOffset(), GetToolSetSize() System 2-137 2.14.5 IEZNcTool3::SetOffset C70 2.14.5 IEZNcTool3::SetOffset □ Custom call procedure HRESULT SetOffset( LONG lType, LONG lKind, LONG lToolSetNo, DOUBLE dOffset, LONG lNo, LONG* plRet ) □ Automation call procedure Tool_SetOffset( lType As LONG lKind As LONG lToolSetNo As LONG dOffset As DOUBLE lNo As LONG ) As LONG □ Argument M700 M800 Set tool offset amount settings // (I) Tool offset type // (I) Offset amount type // (I) Tool set number // (I) Offset amount // (I) Hypothetical tool nose point number // (O) Error code // (I) Tool offset type // (I) Offset amount type // (I) Tool set number // (I) Offset amount // (I) Hypothetical tool nose point point number // (O) Error code lType: Sets the tool offset type. Refer to the parameter table. lKind: Sets the type of tool offset amount. Refer to the parameter table. lToolSetNo: Sets the tool offset set number. The number of sets can get with GetToolSetSize(). dOffset: Sets the tool offset amount. Refer to the parameter table. lNo: Sets the hypothetical tool nose point number. Refer to the parameter table. L system type only. Disabled for the M system type. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_WRITE_WRITE: Data is not writable EZNC_DATA_WRITE_DATATYPE: Invalid data type EZNC_DATA_WRITE_SUBSECT: Invalid subsection number 2-138 Parameter table Value: Type 1: M system type I 4: M system type II 6: L system type Value: Type of tool offset amount 0: Tool offset amount 0: Tool length compensation amount (dimensions) 1: (Wear) 2: Tool radius compensation amount (dimensions) 3: (Wear) 0: Tool length compensation amount X 1: Z 2: C (Y*) 3: Tool length offset amount X 4: Z 5: C (Y*) 6: Tool radius (nose R) R Data range -99,999.999 to 99,999.999 [mm] -99,999.999 to 99,999.999 [mm] C70 : -99.999 to 99.999 [mm] M700/M800 series : -99,999.999 to 99,999.999 [mm] C70 : -999.999 to 999.999 [mm] M700/M800 series : -99,999.999 to 99,999.999 [mm] C70 : 0 to 99.999 [mm] M700/M800 series : 0 to 99,999.999 [mm] C70 : 0 to 99.999 [mm] M700/M800 series : 0 to 99,999.999 [mm] 0 to 8 (Refer to Figure 1) 7: Tool radius (nose R) wear amount r 8: Hypothetical tool nose point number P * For the M700/M800 series X 2 6 1 7 0 5 Tool nose point 刃先点 8 4 3 Z 3 Figure 1 Hypothetical tool nose point number 図 1.仮想刃先点番号 Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Configures the tool offset amount of the set part system/axis No. The range shown in the □ Function parameter table varies depending on the command unit such as inch system and metrik system of the Mitsubishi CNC. For details, refer to the installation manual of each Mitsubishi CNC. □ Reference □ Specification GetType(), GetOffset(), GetToolSetSize() System 2-139 2.14.6 IEZNcTool3::GetToolWorkOffset C70 2.14.6 IEZNcTool3::GetToolWorkOffset Argument M800 Get workpiece coordinate offset □ Custom call procedure HRESULT GetToolWorkOffset( LONG lAxisNo, LONG lIndex, DOUBLE* pdOffset, LONG* plRet ) □ Automation call procedure Tool_GetToolWorkOffset( lAxisNo As LONG lIndex As LONG pdOffset As DOUBLE* ) As LONG □ M700 // (I) Axis No. // (I) Workpiece coordinate system number // (O) Offset value // (O) Error code // (I) Axis No. // (I) Workpiece coordinate system number // (O) Offset value // (O) Error code lAxisNo: Sets the axis. (From Axis 1 = from 1) lIndex: Sets the workpiece coordinate system number to be read. Value Meaning 54 G54 offset 55 G55 offset 56 G56 offset 57 G57 offset 58 G58 offset 59 G59 offset 60 EXT offset pdOffset: Returns the offset value of the workpiece coordinate of the set part system/axis No. Value: -99,999.999~99,999.999 [mm] plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_ADDR: Invalid part system setting EZNC_DATA_READ_READ: Data is not readable EZNC_DATA_READ_AXIS: Invalid axis No. setting EZ_ERR_NOT_SUPPORT: Not supported Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets the offset value of the workpiece coordinate of the set part system/axis No. For details, refer □ Function to the installation guide. Refer to the instruction manual for each numerical controller for details. □ Reference □ Specification System , Axis number 2-140 2.14.7 IEZNcTool3::GetToolWorkOffset2 C70 2.14.7 IEZNcTool3::GetToolWorkOffset2 Argument M800 Get workpiece coordinate offset □ Custom call procedure HRESULT GetToolWorkOffset2( LONG lAxisNo, LONG lIndex, DOUBLE* pdOffset, LONG* plRet ) □ Automation call procedure Tool_GetToolWorkOffset2( lAxisNo As LONG lIndex As LONG pdOffset As DOUBLE* ) As LONG □ M700 // (I) Axis No. // (I) Workpiece coordinate system number // (O) Offset value // (O) Error code // (I) Axis No. // (I) Workpiece coordinate system number // (O) Offset value // (O) Error code lAxisNo: Sets the axis No. (From Axis 1 = from 1) lIndex: Sets the workpiece coordinate system number to be read. Value Meaning 54 G54 offset 55 G55 offset 56 G56 offset 57 G57 offset 58 G58 offset 59 G59 offset 60 EXT offset pdOffset: Returns the offset value of the workpiece coordinate of the set part system/axis No. Value: -99,999.999~99,999.999 [mm] plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_ADDR: Invalid parft system setting EZNC_DATA_READ_READ: Data is not readable EZNC_DATA_READ_AXIS: Invalid axis No. setting Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets the offset value of the workpiece coordinate of the set part system/axis No. For details, refer □ Function to the installation guide. Refer to the instruction manual for each numerical controller for details. □ Setting mode (1) For setting absolute value, Sets the set offset value as the current offset value. (2) For setting additional value, Sets the offset value got by adding the set offset value to the current offset value. Reference □ Specification System , Axis number 2-141 2.14.8 IEZNcTool3:: SetToolWorkOffset C70 2.14.8 IEZNcTool3:: SetToolWorkOffset Argument // (I) Axis No. // (I) Workpiece coordinate system number // (I) Offset value // (I) Mode // (O) Error code // (I) Axis No. // (I) Workpiece coordinate system number // (I) Offset value // (I) Mode // (O) Error code lAxisNo: Sets the axis No. (From Axis 1 = from 1) lIndex: Sets the workpiece coordinate system number to be read. Value Meaning 54 G54 offset 55 G55 offset 56 G56 offset 57 G57 offset 58 G58 offset 59 G59 offset 60 EXT offset dOffset: Sets the offset value of the workpiece coordinate of the set part system/axis No. Value: -99,999.999~99,999.999 [mm] lMode: Sets the setting mode (absolute value setting/additional value setting). Value Meaning 0 Sets absolute value 1 Sets additional value plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_WRITE_ADDR: Invalid part system setting EZNC_DATA_WRITE_WRITE: Data is not writable EZNC_DATA_WRITE_AXIS: Invalid axis No. setting □ Return Value value S_OK S_FALSE M800 Set workpiece coordinate offset settings □ Custom call procedure HRESULT SetToolWorkOffset( LONG lAxisNo, LONG lIndex, DOUBLE dOffset, LONG lMode, LONG* plRet ) □ Automation call procedure Tool_SetToolWorkOffset( lAxisNo As LONG lIndex As LONG dOffset As DOUBLE lMode As LONG ) As LONG □ M700 Meaning Normal termination Communication failure 2-142 □ Function □ Sets the offset value of the workpiece coordinate of the set part system/axis No. For details, refer to the instruction manual for each Mitsubishi CNC. Setting mode (1) For setting absolute value, Sets the set offset value as the current offset value. (2) For setting additional value, Sets the offset value got by adding the set offset value to the current offset value. Reference □ Specification System , Axis number 2-143 2.14.9 IEZNcTool3::SetToolWorkOffset2 C70 2.14.9 IEZNcTool3:: SetToolWorkOffset9 Argument // (I) Axis No. // (I) Workpiece coordinate system number // (I) Offset value // (I) Mode // (O) Error code // (I) Axis No. // (I) Workpiece coordinate system number // (I) Offset value // (I) Mode // (O) Error code lAxisNo: Sets the axis No. (From Axis 1 = from 1) lIndex: Sets the workpiece coordinate system number to be read. Value Meaning 54 G54 offset 55 G55 offset 56 G56 offset 57 G57 offset 58 G58 offset 59 G59 offset 60 EXT offset dOffset: Sets the offset value of the workpiece coordinate of the set part system/axis No. Value: -99,999.999~99,999.999 [mm] lMode: Sets the setting mode (absolute value setting/additional value setting). Value Meaning 0 Sets absolute value 1 Sets additional value plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_WRITE_ADDR: Invalid part system setting EZNC_DATA_WRITE_WRITE: Data is not writable EZNC_DATA_WRITE_AXIS: Invalid axisNo. setting □ Return Value value S_OK S_FALSE M800 Set workpiece coordinate offset settings □ Custom call procedure HRESULT SetToolWorkOffset2( LONG lAxisNo, LONG lIndex, DOUBLE dOffset, LONG lMode, LONG* plRet ) □ Automation call procedure Tool_SetToolWorkOffset2( lAxisNo As LONG lIndex As LONG dOffset As DOUBLE lMode As LONG ) As LONG □ M700 Meaning Normal termination Communication failure 2-144 □ Function □ Configures the offset value of the workpiece coordinate of the set part system/axis No. Refer to the instruction manual for each Mitsubishi CNC for details. Setting mode (1) For setting absolute value, Sets the set offset value as the current offset value. (2) For setting additional value, Sets the offset value got by adding the set offset value to the current offset value. Reference □ Specification System , Axis number 2-145 2.14.10 IEZNcTool3::GetSurface C70 2.14.10 IEZNcTool3::GetSurface □ Custom call procedure HRESULT GetSurface( LONG lAxisNo, DOUBLE* pdHight, LONG* plRet ) □ Automation call procedure Tool_GetSurface( lAxisNo As LONG pdHight As DOUBLE* ) As LONG □ Argument M700 M800 Get reference surface height // (I) Axis No. // (O) Reference surface height // (O) Error code // (I) Axis No. // (O) Reference surface height // (O) Error code lAxisNo: Sets the axis No. (From Axis 1 = from 1) pdHight: Returns the reference surface coordinate position of the tool length measurement II of the set part system/axis No. Value: -99999.999 to 99999.999 [mm] plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_READ: Data is not readable EZNC_DATA_READ_ADDR: Invalid part system, axis No. setting EZNC_DATA_READ_AXIS: Invalid axis No. setting □ Return Value value S_OK S_FALSE Gets the reference surface coordinate □ Function system/axis No. Meaning Normal termination Communication failure position of the tool length measurement II of the set part □ Reference □ Specification System , Axis number 2-146 2.14.11 IEZNcTool3::GetSurface2 C70 2.14.11 IEZNcTool3::GetSurface2 □ Custom call procedure HRESULT GetSurface2( LONG lAxisNo, DOUBLE* pdHight, LONG* plRet ) □ Automation call procedure Tool_GetSurface2( lAxisNo As LONG pdHight As DOUBLE* ) As LONG □ Argument M700 M800 Get reference surface height // (I) Axis No. // (O) Reference surface height // (O) Error code // (I) Axis No. // (O) Reference surface height // (O) Error code lAxisNo: Sets the axis No. (From Axis 1 = from 1) pdHight: Returns the reference surface coordinate position of the tool length measurement II of the set part system/axis No. Value: -99,999.999 to 99,999.999 [mm] plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_READ: Data is not readable EZNC_DATA_READ_ADDR: Invalid part system, axis No. setting EZNC_DATA_READ_AXIS: Invalid axis No. setting □ Return Value value S_OK S_FALSE Gets the reference surface coordinate □ Function No. of the set part system. Meaning Normal termination Communication failure position of the tool length measurement II of the set axis □ Reference □ Specification System , Axis number 2-147 2.14.12 IEZNcTool3::SetSurface C70 2.14.12 IEZNcTool3::SetSurface □ Custom call procedure HRESULT SetSurface( LONG lAxisNo, DOUBLE dHight, LONG* plRet ) □ Automation call procedure Tool_SetSurface( lAxisNo As LONG dHight As DOUBLE* ) As LONG □ Argument M700 M800 Set reference surface height settings // (I) Axis No. // (I) Reference surface height // (O) Error code // (I) Axis No. // (O) Reference surface height // (O) Error code lAxisNo: Sets the axis No. (From Axis 1 = from 1) dHight: Sets the reference surface coordinate position of the tool length measurement II of the set part system/axis No. Value: -99999.999 to 99999.999 [mm] plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_WRITE_WRITE: Data is not writable EZNC_DATA_WRITE_ADDR: Invalid part system, axis No. setting EZNC_DATA_WRITE_AXIS: Invalid axis No. setting □ Return Value value S_OK S_FALSE Sets the reference surface coordinate □ Function system/axis No. Meaning Normal termination Communication failure position of the tool length measurement II of the set part □ Reference □ Specification System , Axis number 2-148 2.14.13 IEZNcTool3::GetToolLifeType2 C70 2.14.13 IEZNcTool3::GetToolLifeType2 □ Custom call procedure HRESULT GetToolLifeType2( LONG* plType, LONG* plRet ) □ Automation call procedure Tool_GetToolLifeType2( plType As LONG* ) As LONG □ Argument // (O) Tool life management method // (O) Error code // (O) Tool life management method // (O) Error code plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_READ: Data is not readable EZ_ERR_DATA_RANGE: Invalid argument data range □ Reference M800 Get tool life management method plType: Returns the tool life control type. Value Meaning 0 Disabled 1 Type I 2 Type II □ Return Value value S_OK S_FALSE Gets tool life management method. □ Function M700 Meaning Normal termination Communication failure SetToolLifeType2() □ Specification 2-149 2.14.14 IEZNcTool3::SetToolLifeType2 C70 2.14.14 IEZNcTool3::SetToolLifeType2 Argument // (I) Tool life management method // (O) Error code // (O) Tool life management method // (O) Error code lType: Sets the tool life management method. Value Meaning 0 Disabled (For the C70, cannot be specified.) 1 Tool life management I 2 Tool life management II plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_WRITE_WRITE: Data is not writable EZ_ERR_DATA_RANGE: Invalid argument data range EZ_ERR_DATA_TYPE: Invalid argument data type EZ_ERR_NOT_SUPPORT: Not supported Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Selects tool life management I or II. Write is inhibited by password mode. □ Function (EZNC_DATA_WRITE_WRITE is returned.) □ Reference M800 Select Tool life management method □ Custom call procedure HRESULT SetToolLifeType2( LONG lType, LONG* plRet ) □ Automation call procedure Tool_SetToolLifeType2( lType As LONG ) As LONG □ M700 GetToolLifeType2() □ Specification 2-150 2.14.15 IEZNcTool3::GetToolLifeGroupList C70 2.14.15 IEZNcTool3::GetToolLifeGroupList □ Custom call procedure HRESULT GetToolLifeGroupList ( LPDWORD lpdwLength, LPDWORD* lppdwGroup, LONG* plRet ) □ Automation call procedure Tool_GetToolLifeGroupList( pvGroup As VARIANT* ) As LONG □ Argument M700 Get Tool Life management group No list // (O) Number of groups // (O) Array of group numbers // (O) Error code // (O) Group number // (O) Error code lpdwLength: Returns the number of sets of groups. lppdwGroup: Returns the list of group numbers as an array. As the group number array is allocated in this product, the client needs to release it explicitly with CoTaskMemFree(). Automation argument: pvGroup: Returns the group number array as VARIANT. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_READ: Data is not readable EZ_ERR_MEMORY_ALLOC: Memory cannot be allocated. EZ_ERR_DATA_RANGE: Invalid argument data range EZNC_DATA_READ_ADDR: Invalid part system setting EZNC_DATA_TLFGROUP_ADDR: Invalid address (system specification) EZNC_DATA_TLFGROUP_OUTOFSPEC: The set group number is out of specifications EZ_ERR_NOT_SUPPORT: Not supported □ Return Value value S_OK S_FALSE Gets tool life management group No. □ Function □ Reference □ Specification Meaning Normal termination Communication failure AddToolLifeGroup(), ChangeToolLifeGroup(), DeleteToolLifeGroup() System (M700/M800 series only) 2-151 M800 2.14.16 IEZNcTool3::ChangeToolLifeGroup C70 2.14.16 IEZNcTool3::ChangeToolLifeGroup □ Custom call procedure HRESULT ChangeToolLifeGroup ( DWORD dwSrcGroup, DWORD dwDstGroup, LONG* plRet ) □ Automation call procedure Tool_ChangeToolLifeGroup( lSrcGroup As LONG lDstGroup As LONG ) As LONG □ Argument M700 Change tool life management group No // (I) Old group number // (I) New group number // (O) Error code // (I) Old group number // (I) New group number // (O) Error code dwSrcGroup: Sets the old group number. dwDstGroup: Sets the new group number. Automation argument: lSrcGroup: Refer to the explanation of dwSrcGroup. lDstGroup: Refer to the explanation of dwDstGroup. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_WRITE_WRITE: Data is not writable. EZNC_DATA_NOT_EXIST: Data does not exist EZ_ERR_DATA_RANGE: Invalid argument data range EZNC_DATA_READ_ADDR: Invalid part system setting EZNC_DATA_READ_READ: Data is not readable EZNC_DATA_TLFGROUP_ADDR: Invalid address (system specification) EZNC_DATA_TLFGROUP_EXIST: Group number already exists EZNC_DATA_TLFGROUP_NONEXIST: Group number does not exist EZNC_DATA_TLFGROUP_OUTOFSPEC: The set group number is out of specifications EZ_ERR_NOT_SUPPORT: Not supported Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Changes the set group number to the new group number. □ Function The set old group tool is changed to the new group. □ Reference □ Specification GetToolLifeGroupList(), AddToolLifeGroup(), DeleteToolLifeGroup() System (M700/M800 series only) 2-152 M800 2.14.17 IEZNcTool3::DeleteToolLifeGroup C70 2.14.17 IEZNcTool3::DeleteToolLifeGroup □ Custom call procedure HRESULT DeleteToolLifeGroup ( DWORD dwGroup, LONG* plRet ) □ Automation call procedure Tool_DeleteToolLifeGroup( lGroup As LONG ) As LONG □ Argument M700 Delete tool life management group No // (I) Group number // (O) Error code // (I) Group number // (O) Error code dwGroup: Sets the group number to be deleted. Automation argument: lGroup: Refer to the explanation of dwGroup. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_WRITE_WRITE: Data is not writable. EZNC_DATA_NOT_EXIST: Data does not exist EZ_ERR_DATA_RANGE: Invalid argument data range EZNC_DATA_READ_ADDR: Invalid part system setting EZNC_DATA_TLFGROUP_ADDR: Invalid address (part system setting) EZNC_DATA_TLFGROUP_NONEXIST: Group number does not exist EZNC_DATA_TLFGROUP_OUTOFSPEC: The set group number is out of specifications EZ_ERR_NOT_SUPPORT: Not supported □ Return Value value S_OK S_FALSE Deletes the group number. □ Function □ Reference □ Specification Meaning Normal termination Communication failure GetToolLifeGroupList(), AddToolLifeGroup(), ChangeToolLifeGroup() System 2-153 M800 2.14.18 IEZNcTool3::GetToolLifeToolNoList C70 2.14.18 IEZNcTool3::GetToolLifeToolNoList □ Custom call procedure HRESULT GetToolLifeToolNoList ( DWORD dwGroup, LPDWORD lpdwLength, LPDWORD *lppdwToolNo, LONG* plRet ) □ Automation call procedure Tool_ GetToolLifeToolNoList ( lGroup As LONG pvToolNo As VARIANT ) As LONG □ Argument M700 M800 Get list of tool numbers within Life management group // (I) Group number // (O) Number of registered tools // (O) Array of tool numbers // (O) Error code // (I) Group number // (O) Array of tool numbers // (O) Error code dwGroup: Sets the group number for which the list of tool numbers is got. lpdwLength: Returns the number of registered tools included in the group (array length of the list of tool numbers). lppdwToolNo: Returns the list of tool numbers included in the group as an array. As the tool number list array is allocated in this product, the client needs to release it explicitly with CoTaskMemFree(). Automation argument: lGroup: Refer to the explanation of dwGroup. pvToolNo: Returns the list of tool numbers included in the group as VARIANT. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_READ: Data is not readable EZ_ERR_MEMORY_ALLOC: Memory cannot be allocated EZ_ERR_DATA_RANGE: Invalid argument data range EZNC_DATA_TLFGROUP_ADDR: Invalid address (system specification) EZNC_DATA_TLFGROUP_NONEXIST: Group number does not exist EZNC_DATA_TLFGROUP_OUTOFSPEC: The set group number is out of specifications EZ_ERR_NOT_SUPPORT: Not supported Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets the list of tool numbers of the set group. □ Function □ Reference □ Specification AddToolLifeToolNo(), ChangeToolLifeToolNo(), DeleteToolLifeToolNo() System 2-154 2.14.19 IEZNcTool3::AddToolLifeToolNo C70 2.14.19 IEZNcTool3::AddToolLifeToolNo Argument // (I) Group number // (I) Tool number // (O) Error code // (I) Group number // (I) Tool number // (O) Error code dwGroup: Sets the group numbers to which tool numbers are added. dwToolNo: Sets the tool numbers to be added. Automation argument: lGroup: Refer to the explanation of dwGroup. lToolNo: Refer to the explanation of dwToolNo. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_WRITE_WRITE: Data is not writable EZNC_DATA_DUPLICATE: Duplicated numbers EZ_ERR_DATA_RANGE: Invalid argument data range EZNC_DATA_TLFGROUP_ADDR: Invalid address (system specification) EZNC_DATA_TLFGROUP_OUTOFSPEC: The set group number is out of specifications EZNC_DATA_TLFTOOL_EXIST: Tool number already exists EZNC_DATA_TLFTOOL_OUTOFSPEC: Set tool number is out of specifications EZ_ERR_NOT_SUPPORT: Not supported Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Adds the tool numbers to the specified group. □ Function □ Reference □ Specification M800 Add tool number to tool life management group No □ Custom call procedure HRESULT AddToolLifeToolNo ( DWORD dwGroup, DWORD dwToolNo, LONG* plRet ) □ Automation call procedure Tool_ AddToolLifeToolNo ( lGroup As LONG lToolNo As LONG ) As LONG □ M700 GetToolLifeToolNoList(), ChangeToolLifeToolNo(), DeleteToolLifeToolNo() System 2-155 2.14.20 IEZNcTool3::ChangeToolLifeToolNo C70 2.14.20 IEZNcTool3::ChangeToolLifeToolNo □ Custom call procedure HRESULT ChangeToolLifeToolNo( DWORD dwGroup, DWORD dwSrcToolNo, DWORD dwDstToolNo, LONG* plRet ) □ Automation call procedure Tool_ ChangeToolLifeToolNo ( lGroup As LONG lSrcToolNo As LONG lDstToolNo As LONG ) As LONG □ Argument M700 Change tool life management group No // (I) Group number // (I) Old tool number // (I) New tool number // (O) Error code // (I) Group number // (I) Old tool number // (I) New tool number // (O) Error code dwGroup: Sets the group number in which the tool number is changed. dwSrcToolNo: Sets the old tool number. dwDstToolNo: Sets the new tool number. Automation argument: lGroup: Refer to the explanation of dwGroup. lSrcToolNo: Refer to the explanation of dwSrcToolNo. lDstToolNo: Refer to the explanation of dwDstToolNo. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_WRITE_WRITE: Data is not writable EZNC_DATA_NOT_EXIST: Data does not exist EZ_ERR_DATA_RANGE: Invalid argument data range EZNC_DATA_READ_READ: Data is not readable EZNC_DATA_TLFGROUP_ADDR: Invalid address (system specification) EZNC_DATA_TLFGROUP_NONEXIST: Group number does not exist EZNC_DATA_TLFGROUP_OUTOFSPEC: The set group number is out of specifications EZNC_DATA_TLFTOOL_EXIST: Tool number already exists EZNC_DATA_TLFTOOL_NONEXIST: Tool number does not exist EZNC_DATA_TLFTOOL_OUTOFSPEC: Set tool number is out of specifications EZ_ERR_NOT_SUPPORT: Not supported Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Changes the set tool number to the new tool number. □ Function □ Reference □ Specification GetToolLifeToolNoList(), AddToolLifeToolNo(), DeleteToolLifeToolNo() System 2-156 M800 2.14.21 IEZNcTool3::DeleteToolLifeToolNo C70 2.14.21 IEZNcTool3::DeleteToolLifeToolNo □ Custom call procedure HRESULT DeleteToolLifeToolNo ( DWORD dwGroup, DWORD dwToolNo, LONG* plRet ) □ Automation call procedure Tool_ DeleteToolLifeToolNo ( lGroup As LONG lToolNo As LONG ) As LONG □ Argument M700 Delete tool life management tool number // (I) Group number // (I) Tool number // (O) Error code // (I) Group number // (I) Tool number // (O) Error code dwGroup: Sets the group number from which tool numbers are deleted. dwToolNo: Sets the tool numbers to be deleted. Automation argument: lGroup: Refer to the explanation of dwGroup. lToolNo: Refer to the explanation of dwToolNo. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_WRITE_WRITE: Data is not writable EZNC_DATA_NOT_EXIST: Data does not exist EZ_ERR_DATA_RANGE: Invalid argument data range EZNC_DATA_READ_READ: Data is not readable EZNC_DATA_TLFGROUP_ADDR: Invalid address (system specification) EZNC_DATA_TLFGROUP_NONEXIST: Group number does not exist EZNC_DATA_TLFGROUP_OUTOFSPEC: The set group number is out of specifications EZNC_DATA_TLFTOOL_NONEXIST: Tool number does not exist EZNC_DATA_TLFTOOL_OUTOFSPEC: Set tool number is out of specifications EZ_ERR_NOT_SUPPORT: Not supported □ Return Value value S_OK S_FALSE Deletes the set tool numbers. □ Function □ Reference □ Specification Meaning Normal termination Communication failure GetToolLifeToolNoList(), AddToolLifeToolNo(), ChangeToolLifeToolNo() System 2-157 M800 2.14.22 IEZNcTool3::GetToolLifeValue C70 2.14.22 IEZNcTool3::GetToolLifeValue M700 M800 Get tool life management data □ Custom call procedure HRESULT GetToolLifeValue ( DWORD dwGroup, // (I) Group number DWORD dwToolNo, // (I) Tool number LPOLESTR** lpppwszData, // (O) Tool life management data value character string array LONG* plRet // (O) Error code ) □ Automation call procedure Tool_GetToolLifeValue ( lGroup As LONG // (I) Group number lToolNo As LONG // (I) Tool number pvData As VARIANT* // (O) Tool life management data value character string ) As LONG // (O) Error code dwGroup: Sets the group number for which tool life is got. □ Argument dwToolNo: Sets the tool number for which tool life is got. lpppwszData: Returns the life management data value as a UNICODE character string array. As the data value array is allocated in this product, the client needs to release it explicitly with CoTaskMemFree (). Refer to the index table. Automation argument: lGroup: Refer to the explanation of dwGroup. lToolNo: Refer to the explanation of dwToolNo. pvData: Returns the life control data value (UNICODE character string) array as VARIANT. For life control data values, refer to the index. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_READ: Data is not readable EZNC_DATA_NOT_EXIST: Data does not exist EZ_ERR_MEMORY_ALLOC: Memory cannot be allocated EZ_ERR_DATA_RANGE: Invalid argument data range EZNC_DATA_TLFGROUP_ADDR: Invalid address (system specification) EZNC_DATA_TLFGROUP_NONEXIST: Group number does not exist EZNC_DATA_TLFGROUP_OUTOFSPEC: The set group number is out of specifications EZNC_DATA_TLFTOOL_NONEXIST: Tool number does not exist EZNC_DATA_TLFTOOL_OUTOFSPEC: Set tool number is out of specifications EZ_ERR_NOT_SUPPORT: Not supported 2-158 Index table Array Index 0 1 2 3 4 5 6 7 8 9 10 Array Index Tool life type (data range) C70 M system Tool number (1 to 99999999) Status (depends on MTB specifications) Method (000 to 222)* Length dimension (±1 to 99999.999) Radius dimension (±1 to 99999.999) Life (Time: 0 to 4000, Count: 0 to 65000) Used (Time: 0 to 4000,Count: 0 to 65000) Auxiliary (0 to 65535, depends on MTBr specifications) Length wear (Reserved: 0) Radius wear (Reserved: 0) Group (1 to 99999999) 2 Tool life type (data range) M700/M800 series L system (TYPE I),C70 L system (TYPE I) Application of time management (0 to 995959) Application of number of times management (0 to 9999) Status A (0 to 2) 3 4 5 6 to 10 Life of time management (0 to 995959) Life of count management (0 to 9999) Status B (depends on MTB specifications) - Array Index 0 1 2 3 4 5 6 7 to 10 Tool life type (data range) C70 L system (TYPE II) Tool umber (1 to 999999) Group (1 to 9999) Method (0: Time, 1: Count) Compensation number (1 to 80) Status (0 to 3) Life (Time: 0 to 999999, Count: 0 to 999999) Used (Time: 0 to 999999,Count: 0 to 999999) - 0 1 M700/M800 series M system Tool number (1 to 99999999) Status (0x00 to 0xFF) Method (000 to 222)* Length dimension (±9999.999) Radius dimension (±9999.999) Life (Time: 0 to 4000, Count: 0 to 65000) Used (Time: 0 to 4000, Count: 0 to 65000) Auxiliary (0 to 65535, depends on MTB specifications) Length wear (Reserved: 0) Radius wear (Reserved: 0) Group (1 to 99999999) M700/M800 series L system (TYPE II) Tool number (1 to 999999) Compensation number (0 to 80) Usage (Time: 0 to 99999999, Count: 0 to 999999) ST (0 to 3) Method (Time: 0, Count: 1) Life (0 to 999999) - Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets life control data for the set tool number. Note that the number of elements of the character □ Function string array that returns life control data varies depending on models. * For the "method" for tool life management data, refer to the installation manual of each Mitsubishi CNC. □ SetToolLifeValue() Reference □ Specification System 2-159 2.14.23 IEZNcTool3::SetToolLifeValue C70 2.14.23 IEZNcTool3::SetToolLifeValue □ Custom call procedure HRESULT SetToolLifeValue ( DWORD dwGroup, DWORD dwToolNo, DWORD dwKind, LPCOLESTR lpcwszData, LONG* plRet ) □ Automation call procedure Tool_ SetToolLifeValue ( lGroup As LONG lToolNo As LONG lKind As LONG lpcwszData As STRING ) As LONG □ Argument M700 Set individual tool life management data // (I) Group number // (I) Tool number // (I) Type of tool life management data // (I) Tool life management // (O) Error code // (I) Group number // (I) Tool number // (I) Type of tool life management l data // (I) Tool life management data // (O) Error code dwGroup: Sets the group number for which tool life is set. dwToolNo: Sets the tool number for which tool life is set. dwKind: Sets the type of tool life. Refer to the parameter table. lpcwszData: Sets the specified type of life data. Automation argument: lGroup: Refer to the explanation of dwGroup. lToolNo: Refer to the explanation of dwToolNo. lKind: Refer to the explanation of dwKind. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_WRITE_WRITE: Data is not writable EZNC_DATA_NOT_EXIST: Data does not exist EZNC_DATA_READ_READ: Data is not readable EZ_ERR_DATA_RANGE: Invalid argument data range (dwKind) EZ_ERR_DATA_TYPE: Invalid argument data type EZNC_DATA_TLFGROUP_ADDR: Invalid address (system specification) EZNC_DATA_TLFGROUP_NONEXIST: Group number does not exist EZNC_DATA_TLFGROUP_OUTOFSPEC: The set group number is out of specifications EZNC_DATA_TLFTOOL_NONEXIST: Tool number does not exist EZNC_DATA_TLFTOOL_PARAMERR: Invalid type specified for life control data EZNC_DATA_TLFTOOL_MAXMINERR: Setting data is out of range EZNC_DATA_TLFTOOL_OUTOFSPEC: Set tool number is out of specifications EZ_ERR_NOT_SUPPORT: Not supported 2-160 M800 Parameter table Value Tool life type (data range) C70 M system 1 Tool number (1 to 99999999) 2 Status (depends on machine manufacturer specifications) 3 Method (000 to 222)* 4 Length dimension (±99999.999) 5 Radius dimension (±99999.999) 6 Life (Time: 0 to 4000, Count: 0 to 9999) 7 Used (Time: 0 to 4000,Count: 0 to 9999) 8 Auxiliary (0 to 65535, depends on MTB specifications) 9 Length wear (Reserved: 0) 10 Radius wear (Reserved: 0) 11 Group (1 to 99999999) Value M700/M800 series M system Tool number (1 to 99999999) Status (0x00 to 0xFF) Method (000 to 222)* Length dimension (±9999.999)* Radius dimension (±9999.999)* Life (Time: 0 to 4000, Count: 0 to 9999/65000) Used (Time: 0 to 4000,Count: 0 to 9999/65000) Auxiliary (0 to 65535, depends on MTB specifications) Length wear (Reserved: 0) Radius wear (Reserved: 0) Group (1 to 99999999) 3 Tool life type (data range) M700/M800 series L system (TYPE I), C70 L system (TYPE I) Application of time management (0 to 995959) Application of count management (0 to 9999) Status A (0 to 2) 4 5 6 Life of time management (0 to 995959) Life of count management (0 to 9999) Status B (depends on MTB specifications) Value Tool life type (data range) C70 L system (TYPE II) Tool number (1 to 999999) Group (1 to 9999) Method (0: Time, 1: Count) Compensation number (1 to 80) Status (0 to 3) Life (Time: 0 to 999999, Count: 0 to 999999) Used (Time: 0 to 999999, Count: 0 to 999999) 1 2 1 2 3 4 5 6 7 M700/M800 series L system (TYPE II) Tool number (1 to 999999) Compensation number (0 to 80) Used (Time: 0 to 99999999, Count: 0 to 999999) ST (0 to 3) Method (Time: 0, Count: 1) Life (0 to 999999) Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Individually sets life control data for the set tool number. This method is used for updating. To □ Function newly add a tool, use the following procedure. 1) AddToolLifeGroup( ) 2) AddToolLifeToolNo( ) 3) SetToolLifeValue( ) * For the "method" for tool life management data, refer to the installation guide of each Mitsubishi CNC. □ Reference □ Specification GetToolLifeValue(), AddToolLifeGroup(), AddToolLifeToolNo() System 2-161 2.14.24 IEZNcTool3::SetToolLifeValue2 C70 2.14.24 IEZNcTool3::SetToolLifeValue2 □ Custom call procedure HRESULT SetToolLifeValue2 ( DWORD dwGroup, DWORD dwToolNo, LPCOLESTR* lppcwszData, LONG* plRet ) □ Automation call procedure Tool_ SetToolLifeValue2 ( lGroup As LONG lToolNo As LONG vData As VARIANT □ Argument M700 M800 Set tool life management data // (I) Group number // (I) Tool number // (I) Tool life management data character string array // (O) Error code // (I) Group number // (I) Tool number // (I) Tool life management data character string array ) As LONG // (O) Error code DwGroup: Sets the group number for which tool life is set. dwToolNo: Sets the tool number for which tool life is set. lppcwszData: Sets a UNICODE character string array for the set type of life data. Automation argument: lGroup: Refer to the explanation of dwGroup. lToolNo: Refer to the explanation of dwToolNo. vData: Creates a UNICODE character string array for the specified type of life data and sets by substituting it in vData (VARIANT type). For examples of substitution, refer to " 2.11.13 WriteFile". plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_WRITE_WRITE: Data is not writable EZNC_DATA_NOT_EXIST: Data does not exist EZ_ERR_DATA_RANGE: Invalid argument data range (dwGroup, dwToolNo) EZ_ERR_NULLPTR: Argument is NULL pointer EZNC_DATA_TLFGROUP_ADDR: Invalid address (system specification) EZNC_DATA_TLFGROUP_NONEXIST: Group number does not exist EZNC_DATA_TLFGROUP_OUTOFSPEC: The set group number is out of specifications EZNC_DATA_TLFTOOL_NONEXIST: Tool number does not exist EZNC_DATA_TLFTOOL_MAXMINERR: Setting data is out of range EZNC_DATA_TLFTOOL_OUTOFSPEC: Set tool number is out of specifications EZ_ERR_NOT_SUPPORT: Not supported 2-162 Parameter table Array Tool life type (data range) Index C70 M system M700/M800 series M system 0 Tool number (1 to 99999999) Tool number (Reserved: 0) 1 Status (depends on MTB Status (0x00 to 0xFF) specifications) 2 Method (000 to 222)* Method (000 to 222)* 3 Length dimension (±99999.999) Length dimension (±9999.999)* 4 Radius dimension (±99999.999) Radius dimension (±9999.999)* Life (Time: 0 to 4000, Count: 0 to 65000) 5 Life (Time: 0 to 4000,Count: 0 to 9999) 6 Used (Time: 0 to 4000,Count: 0 to Usage (Time: 0 to 4000, Count: 0 to 65000) 9999) Auxiliary (0 to 65535, depends on MTB 7 Auxiliary (0 to 65535, depends on specifications) MTB specifications) 8 Length wear (Reserved: 0) Length wear (Reserved: 0) 9 Radius wear (Reserved: 0) Radius wear (Reserved: 0) 10 Group (1 to 99999999) Group (Reserved: 0) Array Index 0 1 2 3 4 5 6 to 10 Array Index 0 1 2 3 4 5 6 7 to 10 Tool life type (data range) M700/M800 series L system (TYPE I), C70 L system (TYPE I) Application of time management (0 to 995959) Application of count management (0 to 9999) Status A (0 to 2) M700/M800 series L system (TYPE II) Tool number (Reserved: 0) Compensation number (0 to 80) Usage (Time: 0 to 99999999, Number of times: 0 to 999999) Life of time management (0 to ST (0 to 3) 995959) Life of count management (0 to 9999) Method (Time: 0,Count: 1) Status B (depends on MTB specifications) Life (0 to 999999) Tool life type (data range) C70 L system (TYPE II) Tool number (1 to 999999) Group (1 to 9999) Method (0: Time, 1:Count) Compensation number (1 to 80) Status (0 to 3) Life (Time: 0 to 999999, Count: 0 to 999999) Usage (Time: 0 to 999999, Count: 0 to 999999) - 2-163 Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Sets tool life management data for the set tool number. This method is used for updating. To □ Function newly add a tool, use the following procedure. 1) AddToolLifeGroup( ) 2) AddToolLifeToolNo( ) 3) SetToolLifeValue2( ) For the "method" for tool life management data, refer to the installation guide of each Mitsubishi CNC. [Example] LPOLESTR* lppwszData; lppwszData = new LPOLESTR[11]; lppwszData[0] =L"0"; lppwszData[1] =L"1"; lppwszData[2] =L"220"; lppwszData[3] =L"10.000"; lppwszData[4] =L"20.000"; lppwszData[5] =L"40.000"; lppwszData[6] =L"18.000"; lppwszData[7] =L"0"; lppwszData[8] =L"0.000"; lppwszData[9] =L"0.000"; lppwszData[10] =L"0"; hr = pIEZNcTool->SetToolLifeValue2( 1, 100, (LPCOLESTR*)lppwszData, &lRet); if( S_OK != hr ){ wprintf(L"HRESULT Code = 0x%x, lRet Code = 0x%x\n", hr, lRet ); } delete[ ] lppwszData; □ Reference □ Specification GetToolLifeValue(), AddToolLifeGroup(), AddToolLifeToolNo() System 2-164 2.15 IEZNcATC3 Interface 2.15.1 IEZNcATC3::GetMGNControl C70 2.15.1 IEZNcATC3::GetMGNControl Argument // (O) Parameter value // (O) Error code // (O) Parameter value // (O) Error code plData: Returns a parameter that controls start magazine. 31 M800 Get ATC tool registration control parameter □ Custom call procedure HRESULT GetMGNControl( LONG* plData, LONG* plRet ) □ Automation call procedure ATC_GetMGNControl( plData As LONG* ) As LONG □ M700 1 0 (bit) 0: T 4 digits, 1: T 8 digits 0: 1 Start magazine, 1: 0 Start magazine plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_READ: Data is not readable Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets the control parameter value for ATC tool registration. □ Function □ Reference □ Specification 2-165 2.15.2 IEZNcATC3::GetMGNSize C70 2.15.2 IEZNcATC3::GetMGNSize □ Custom call procedure HRESULT GetMGNSize( LONG* plSize, LONG* plRet ) □ Automation call procedure ATC_GetMGNSize( plSize As LONG* ) As LONG □ Argument M700 M800 Get total number of sets of magazine pots for ATC tool registration // (O) Total number of sets of magazine pots // (O) Error code // (O) Total number of sets of magazine pots // (O) Error code plSize: Returns the total number of sets of magazine pots. Value: 0 to 360 (maximum) plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_READ: Data is not readable Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets the total number of sets of magazine pots. □ Function □ Reference □ Specification 2-166 2.15.3 IEZNcATC3::GetMGNSize2 C70 2.15.3 IEZNcATC3::GetMGNSize2 □ Custom call procedure HRESULT GetMGNSize2( LONG lMagazineNo, LONG* plSize, LONG* plRet ) □ Automation call procedure ATC_GetMGNSize2( lMagazineNo As LONG plSize As LONG* ) As LONG □ Argument M700 M800 Get number of sets of pots for each magazine for ATC tool registration // (I) Magazine number // (O) Number of sets of magazine pots // (O) Error code // (I) Magazine number // (O) Number of sets of magazine pots // (O) Error code lMagazineNo: Set the magazine number. Value: 1 to 5 (maximum) M700/M800 series Value: 1 to 3 (maximum) C70 plSize: Returns the number of sets of magazine pots. Value: 0 to 360 (maximum) M700/M800 series Value: 0 to 80 (maximum) C70 plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_READ: Data is not readable EZ_ERR_DATA_RANGE: Invalid argument data range (lMagazineNo) Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets the number of sets of the set magazine pots. □ Function □ Reference □ Specification 2-167 2.15.4 IEZNcATC3::GetMGNReady2 C70 2.15.4 IEZNcATC3::GetMGNReady2 Argument M800 Get tool number for ATC tool registration □ Custom call procedure HRESULT GetMGNReady2( LONG lMagazineNo, LONG lReady, LONG* plToolNo, LONG* plRet ) □ Automation call procedure ATC_GetMGNReady2( lMagazineNo As LONG lReady As LONG plToolNo As LONG* ) As LONG □ M700 // (I) Magazine number // (I) On standby // (O) Tool number // (O) Error code // (I) Magazine number // (I) On standby // (O) Tool number // (O) Error code lMagazineNo: Sets the magazine number. Value: 1 to 2 (Even if value is set for M700/M800 series, it is invalid.) lReady: Sets standby state. Value Meaning 0 Tool number to be installed 1 Tool number on standby 1 2 Tool number on standby 2 3 Tool number on standby 3 4 Tool number on standby 4 plToolNo: Returns the tool number. Value: 1 to 99999999 (maximum) plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_READ: Data is not readable EZ_ERR_DATA_RANGE: Invalid argument data range (lMagazineNo, lReady) Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets the tool number for ATC tool registration. □ Function □ Reference □ Specification 2-168 2.15.5 IEZNcATC3::GetMGNPot C70 2.15.5 IEZNcATC3::GetMGNPot □ Custom call procedure HRESULT GetMGNPot( LONG lIndex, LONG* plToolNo, LONG* plRet ) □ Automation call procedure ATC_GetMGNPot( lIndex As LONG plToolNo As LONG* ) As LONG □ Argument // (I) Magazine pot number // (O) Tool number // (O) Error code // (I) Magazine pot number // (O) Tool number // (O) Error code lIndex: Sets the magazine pot number. Value: 1 to 360 (maximum) M700/M800 series Value: 1 to 80 (maximum) C70 plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_READ: Data is not readable EZ_ERR_DATA_RANGE: Invalid argument data range (lIndex) Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets the tool number which is stored in the set pot of the magazine. □ Function Reference M800 Get tool number for magazine pot for ATC tool registration plToolNo: Returns the tool number. Value: 0 to 99999999 (maximum) □ M700 SetMGNPot(), GetMGNPotEx() □ Specification 2-169 2.15.6 IEZNcATC3::GetMGNPot3 C70 2.15.6 IEZNcATC3::GetMGNPot3 Argument // (I) Magazine number // (I) Pot number // (O) Tool number // (O) Error code // (I) Magazine number // (I) Pot number // (O) Tool number // (O) Error code lMagazineNo: Sets the magazine number. Value: 1 to 5 (maximum) M700/M800 series Value: 1 to 3 (maximum) C70 lIndex: Sets the pot number. Value: 1 to 360 (maximum) M700/M800 series Value: 1 to 80 (maximum) C70 plToolNo: Returns the tool number. Value: 0 to 99999999 (maximum) plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_READ: Data is not readable EZ_ERR_DATA_RANGE: Invalid argument data range (lMagazineNo, lIndex) Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets the tool number which is stored in the pot of the set magazine number. □ Function □ Reference M800 Get tool number for each magazine pot for ATC tool registration □ Custom call procedure HRESULT GetMGNPot3( LONG lMagazineNo, LONG lIndex, LONG* plToolNo, LONG* plRet ) □ Automation call procedure ATC_GetMGNPot3( lMagazineNo As LONG lIndex As LONG plToolNo As LONG* ) As LONG □ M700 SetMGNPot3() □ Specification 2-170 2.15.7 IEZNcATC3::SetMGNPot C70 2.15.7 IEZNcATC3::SetMGNPot □ Custom call procedure HRESULT SetMGNPot( LONG lIndex, LONG lToolNo, LONG* plRet ) □ Automation call procedure ATC_SetMGNPot( lIndex As LONG lToolNo As LONG ) As LONG □ Argument M700 M800 Set tool number for magazine pots for ATC tool registration // (I) Pot number // (I) Tool number // (O) Error code // (I) Pot number // (I) Tool number // (O) Error code lIndex: Sets the pot number. Value: 1 to 360 (maximum) M700/M800 series Value: 1 to 80 (maximum) C70 lToolNo: Sets the tool number. Value: 1 to 99999999 (maximum) plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_WRITE_WRITE: Data is not writable EZ_ERR_DATA_RANGE: Invalid argument data range (lIndex, lToolNo) Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Sets the tool number to be stored in the magazine pot. Care should be taken to avoid overlaps in □ Function tool numbers because double registration of a tool number is not checked. An alarm is raised when double registration is made. Alarm information can be got with GetAlarm(). For the M700/M800 series, if the tool number of the Mitsubishi CNC is specified for 4 digits, the lower 4 digits are registered when the number with 5 digits or more is specified, and the 5th digit and higher will be discarded. □ Reference GetMGNPot(), SetMGNPotEx(), GetAlarm() □ Specification 2-171 2.15.8 IEZNcATC3::SetMGNPot3 C70 2.15.8 IEZNcATC3::SetMGNPot3 Argument M800 Set tool number for each magazine pot for ATC tool registration □ Custom call procedure HRESULT SetMGNPot3( LONG lMagazineNo, LONG lIndex, LONG lToolNo, LONG* plRet ) □ Automation call procedure ATC_SetMGNPot3( lMagazineNo As LONG lIndex As LONG lToolNo As LONG ) As LONG □ M700 // (I) Magazine number // (I) Pot number // (I) Tool number // (O) Error code // (I) Magazine number // (I) Pot number // (I) Tool number // (O) Error code lMagazineNo: Sets the magazine number. Value: 1 to 5 (maximum) M700/M800 series Value: 1 to 3 (maximum) C70 lIndex: Sets the pot number. Value: 1 to 360 (maximum) M700/M800 series Value: 1 to 80 (maximum) C70 lToolNo: Sets the tool number. Value: 1 to 99999999 (maximum) plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_WRITE_WRITE: Data is not writable EZ_ERR_DATA_RANGE: Invalid argument data range (lMagazineNo, lIndex, lToolNo) Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Sets the tool number to be stored in the pot of the set magazine number. Care should be taken to □ Function avoid overlaps in tool numbers because double registration of a tool number is not checked. An alarm is raised when double registration is made. Alarm information can be got with GetAlarm(). If the tool number of the Mitsubishi CNC is specified for 4 digits, the lower 4 digits are registered when the number with 5 digits or more is specified, and the 5th digit and higher will be discarded. □ Reference GetMGNPot3(), GetAlarm() □ Specification 2-172 2.15.9 IEZNcATC3::GetMGNAux C70 2.15.9 IEZNcATC3::GetMGNAux M700 M800 Get user PLC interface for ATC tool registration □ Custom call procedure HRESULT GetMGNAux( LONG* plData, LONG* plRet ) □ Automation call procedure ATC_GetMGNAux( plData As LONG* ) As LONG // (O) Data // (O) Error code // (O) Data // (O) Error code plData: Returns sequence processing data for user programmable controller. □ Argumen Value: 0 to 65535 t plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_READ: Data is not readable Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Returns sequence processing data for user PLC. □ Function □ Referenc e □ Specification 2-173 2.15.10 IEZNcATC3::SetMGNAux C70 2.15.10 IEZNcATC3::SetMGNAux Argument M800 Set user PLC interface for ATC tool registration □ Custom call procedure HRESULT SetMGNAux( LONG lData, LONG* plRet ) □ Automation call procedure ATC_SetMGNAux( lData As LONG ) As LONG □ M700 // (I) Data // (O) Error code // (I) Data // (O) Error code lData: Sets sequence processing data for userPLC. Value: 0 to 65535 plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_READ: Data is not readable Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Sets sequence processing data for user PLC. □ Function □ Reference □ Specification 2-174 2.16 IEZNcParameter3 Interface 2.16.1 IEZNcParameter3::GetParameterData2 C70 2.16.1 IEZNcParameter3::GetParameterData2 □ Custom call procedure HRESULT GetParameterData2( LONG lGroup, LONG lItem, LONG lSize, LONG lAxis, LPOLESTR* lppwszValue, LONG* plRet ) □ Automation call procedure Parameter_GetData2( lGroup As LONG lItem As LONG lSize As LONG lAxis As LONG pvValue As VARIANT* ) As LONG □ lGroup: Sets the group number of parameter. Argument Model Setting M700 series Disabled C70 Disabled M700 M700 Get parameters // (I) Group number // (I) First item number // (I) Number of items // (I) Axis No. // (O) Parameter value character string array // (O) Error code // (I) Group number // (I) First item number // (I) Number of items // (I) Axis No. // (O) Parameter value character string array // (O) Error code lItem: Sets the first item number of parameter. This must be set. The parameter number described in setup manuals of each CNC will be this item number. Model M700 series C70 IB# of parameter manual IB-1500123 Item number to be set IB-1500905 Parameter number IB-1500932 Parameter number Mitsubishi CNC M70 series IB-1500878 Parameter number Mitsubishi CNC M70V series IB-1500957 Parameter number IB-1500264 Parameter number Mitsubishi CNC M700 series Mitsubishi CNC M700VS series Mitsubishi CNC M700VW series Parameter number lSize: Sets the number of items of parameter. The range starts from 1. lAxis: Sets the axis No. whose parameter is to be got. This argument needs not be set unless the parameter to be got is axis-dependent. lppwszValue: Gets the parameter value as a UNICODE character string array. Though the character string area will internally be allocated in this product, the pointer of the character string (for ISize) needs to be reserved by the client. As the character string area is internally allocated in this product, the client using VC++ needs to release the memory area explicitly with CoTaskMemFree(). The parameter value will be got as signed value regardless of its item number. In the case of unsigned SHORT type data "65535", "-1" will be got. pvValue: See the explanation of lppwszValue. 2-175 □ Argument plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_ADDR: Invalid part system, axis No. setting EZNC_PARAM_FILENOTEXIST: No parameter information file EZNC_DATA_NOT_EXIST: Data does not exist EZ_ERR_NOT_SUPPORT: Not supported Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets the parameter. □ Function This function is not supported with the M800 Series. (EZ_ERR_NOT_SUPPORT is returned to plRet.) □ SetParameterData2() Reference □ Specification 2-176 2.16.2 IEZNcParameter3::GetParameterData3 C70 2.16.2 IEZNcParameter3::GetParameterData3 □ Custom call procedure HRESULT GetParameterData3( LONG lGroup, LONG lItem, LONG lSize, LONG lAxis, LPOLESTR* lppwszValue, LONG* plRet ) □ Automation call procedure Parameter_GetData3( lGroup As LONG lItem As LONG lSize As LONG lAxis As LONG pvValue As VARIANT* ) As LONG □ lGroup: Sets the group number of parameter. Argument Model Setting C70 Disabled M700/M800 series Disabled M700 M800 Get parameters // (I) Group number // (I) First item number // (I) Number of items // (I) Aaxis No. // (O) Parameter value character string array // (O) Error code // (I) Group number // (I) First item number // (I) Number of items // (I) Axis No. // (O) Parameter value character string array // (O) Error code lItem: Sets the first item number of parameter. This must be set. The parameter number described in setup manuals of each CNC will be this item number. Model C70 M700 series M800 series IB# of parameter manual IB-1500264 IB-1500123 Item number to be set IB-1500905 Parameter number IB-1500932 Parameter number Mitsubishi CNC M70 series IB-1500878 Parameter number Mitsubishi CNC M70V series IB-1500957 Parameter number IB-1501265 Parameter number Mitsubishi CNC M700 series Mitsubishi CNC M700VS series Mitsubishi CNC M700VW series Parameter number Parameter number lSize: Sets the number of items of parameter. The range starts from 1. lAxis: Sets the axis whose parameter is to be got. This argument needs not be set unless the parameter to be got is axis-dependent. lppwszValue: Gets the parameter value as a UNICODE character string array. Though the character string area will internally be allocated in this product, the pointer of the character string (for ISize) needs to be reserved by the client. As the character string area is internally allocated in this product, the client using VC++ needs to release the memory area explicitly with CoTaskMemFree(). The parameter value will be got as signed value regardless of its item number. In the case of unsigned SHORT type data "65535", "-1" will be got. pvValue: See the explanation of lppwszValue. 2-177 □ Argument plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_ADDR: Invalid part system, axis No. setting EZNC_PARAM_FILENOTEXIST: No parameter information file EZNC_DATA_NOT_EXIST: Data does not exist □ Return Value value S_OK S_FALSE Gets the parameter. □ Function □ SetParameterData3() Meaning Normal termination Communication failure Reference □ Specification 2-178 2.16.3 IEZNcParameter3::SetParameterData2 C70 2.16.3 IEZNcParameter3::SetParameterData2 □ Custom call procedure HRESULT GetParameterData2( LONG lGroup, LONG lItem, LONG lSize, LONG lAxis, LPOLESTR* lppwszValue, LONG* plRet ) □ Automation call procedure Parameter_GetData2( lGroup As LONG lItem As LONG lSize As LONG lAxis As LONG pvValue As VARIANT* ) As LONG □ lGroup: Sets the group number of parameter. Argument Model Setting C70 Disabled M700 series Disabled M700 M700 Set parameters // (I) Group number // (I) First item number // (I) Number of items // (I) Axis No. // (O) Parameter value character string array // (O) Error code // (I) Group number // (I) First item number // (I) Number of items // (I) Axis No. // (O) Parameter value character string array // (O) Error code lItem: Sets the first item number of parameter. This must be set. The parameter number described in setup manuals of each CNC will be this item number. Model C70 M700 series IB# of parameter manual IB-1500264 IB-1500123 Item number to be set IB-1500905 Parameter number IB-1500932 Parameter number Mitsubishi CNC M70 series IB-1500878 Parameter number Mitsubishi CNC M70V series IB-1500957 Parameter number Mitsubishi CNC M700 series Mitsubishi CNC M700VS series Mitsubishi CNC M700VW series Parameter number Parameter number lSize: Sets the number of items of parameter. The range starts from 1. lAxis: Sets the axis whose parameter is to be got. This argument needs not be set unless the parameter to be got is axis-dependent. lppwszValue: Gets the parameter value as a UNICODE character string array. Automation argument: vValue: See the explanation of lppwszValue. □ Argument plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_ADDR: Invalid part system, axis No. setting EZNC_PARAM_FILENOTEXIST: No parameter information file EZNC_DATA_NOT_EXIST: Data does not exist EZ_ERR_NOT_SUPPORT: Not supported 2-179 Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets the parameter. □ Function When setting the machine parameters, the NC must be set to the machine parameter setting mode state. Refer to the Setup Manual for each CNC for details on setting the machine parameter setting mode. This function is not supported with the M800 Series. (EZ_ERR_NOT_SUPPORT is returned to plRet.) □ SetParameterData2() Reference □ Specification 2-180 2.16.4 IEZNcParameter3::SetParameterData3 C70 2.16.4 IEZNcParameter3::SetParameterData3 □ Custom call procedure HRESULT SetParameterData3( LONG lGroup, LONG lItem, LONG lSize, LONG lAxis, LPCOLESTR* lppcwszValue, LONG* plRet ) □ Automation call procedure Parameter_SetData3( lGroup As LONG lItem As LONG lAxis As LONG vValue As VARIANT ) As LONG lGroup: Sets the group number of parameter. □ Argument Model Setting C70 Disabled M700/M800 series Disabled M700 M700 Set Parameters // (I) Group number // (I) First item number // (I) Number of items // (I) Axis No. // (I) Parameter value character string array // (O) Error code // (I) Group number // (I) First item number // (I) Axis No. // (I) Parameter value character string array // (O) Error code lItem: Sets the first item number of parameter. This must be set. The parameter number described in setup manuals of each CNC will be this item number. Model C70 M700 series M800 series IB# of parameter manual IB-1500264 IB-1500123 Item number to be set IB-1500905 Parameter number IB-1500932 Parameter number Mitsubishi CNC M70 series IB-1500878 Parameter number Mitsubishi CNC M70V series IB-1500957 Parameter number IB-1501265 Parameter number Mitsubishi CNC M700 series Mitsubishi CNC M700VS series Mitsubishi CNC M700VW series Parameter number Parameter number lSize: Sets the number of items of parameter. The range starts from 1. lAxis: Sets the axis whose parameter is to be got. This argument needs not be set unless the parameter to be got is axis-dependent. lppcwszValue: Sets the parameter value as a UNICODE character string array. vValue: See the explanation of lppcwszValue. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_WRITE_ADDR: Invalid part system, axis No.setting EZNC_PARAM_FILENOTEXIST: No parameter information file EZNC_DATA_NOT_EXIST: Data does not exist 2-181 □ Return Value value S_OK S_FALSE Sets the parameter. □ Function To set a machine parameter, the NC how to set the NC to the machine Mitsubishi CNC. □ Reference Meaning Normal termination Communication failure needs to be in the machine parameter setting mode. For parameter setting mode, see the setup manual of the GetParameterData3() □ Specification 2-182 2.17 IEZNcOperation Interface 2.17.1 IEZNcOperation::Search C70 2.17.1 IEZNcOperation::Search □ Custom call procedure HRESULT Search( LPCOLESTR lpcwszSelectProgram, LONG lSequenceNo, LONG lBlockNo, LONG* plRet ) □ Automation call procedure Operation_Search( lpcwszSelectProgram As STRING lSequenceNo As LONG lBlockNo As LONG ) As LONG □ Argument M700 M800 Operation search // (I) Program file name // (I) Sequence number // (I) Block number // (O) Error code // (I) Program file name // (I) Sequence number // (I) Block number // (O) Error code lpcwszSelectProgram: Sets the program file name for operation search as a UNICODE character string. lSequenceNo: Sets the sequence number to be searched. lBlockNo: Sets the block number to be searched. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK : Normal termination EZNC_OPE_SELECTPRG_ADDR: Invalid system specification EZNC_OPE_SELECTPRG_FILESYSTEM: File system error EZNC_OPE_SELECTPRG_NOPRG: No program file EZNC_OPE_SELECTPRG_PRGFORMAT: Invalid program file name format EZNC_OPE_SELECTPRG_RUNNING: Program operation in progress Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Executes operation search. □ Function Use lpwcszSelectProgram to set the program file name whose operation is to be started. The name of the program files in the \PRG\USER\ directory of NC control unit or in the M□:\IC1\ directory of NC's CF card or NC’s SD card (M800S/M80: at the front panel SD card slot, M800W: at the rear panel SD card slot #2) can be set. Note that the file name of the program file in the \PRG\USER\ directory of NC control unit does not need to contain the drive name and directory path. Use a character string as below to specify the program file name. C70: " .PRG" Example) "1000.PRG" M700/M800 series: " " Example) "1000" M700/M800 series: "M□:\IC1\ " Example) "M01:\IC1\1000" lSequenceNo or lBlockNo can be used to set the sequence number or block number whose operation is to be started. Set 0 in lSequenceNo and lBlockNo when operation is to be started from the top of the program. □ Reference □ Specification IEZNcProgram::CurrentBlockRead() System 2-183 2.17.2 IEZNcOperation::Run C70 2.17.2 IEZNcOperation::Run Argument □ Reference // (O) Error code // (O) Error code plRet: Returns an error code. (Upon automation, the return value is used.) S_OK : Normal termination EZNC_OPE_ACTPLC_ADDR: Invalid NC control unit □ Return Value value S_OK S_FALSE Starts the PLC program. □ Function M800 Start PLC program □ Custom call procedure HRESULT Run( LONG* plRet ) □ Automation call procedure Operation_Run( ) As LONG □ M700 Meaning Normal termination Communication failure Stop() □ Specification 2-184 2.17.3 IEZNcOperation::Stop C70 2.17.3 IEZNcOperation::Stop Argument □ Reference // (O) Error code // (O) Error code plRet: Returns an error code. (Upon automation, the return value is used.) S_OK : Normal termination EZNC_OPE_ACTPLC_ADDR: Invalid NC control unit □ Return Value value S_OK S_FALSE Stops the PLC program. □ Function M800 Stop PLC program □ Custom call procedure HRESULT Stop( LONG* plRet ) □ Automation call procedure Operation_Stop( ) As LONG □ M700 Meaning Normal termination Communication failure Run() □ Specification 2-185 2.18 IEZNcDevice Interface 2.18.1 IEZNcDevice::SetDevice M700 2.18.1 IEZNcDevice::SetDevice M800 Set device settings □ Custom call procedure HRESULT SetDevice( DWORD dwLength, // (I) Number of device points LPCOLESTR* lppcwszDevice, // (I) Device character string LPDWORD lpdwDataType, // (I) Data type LPDWORD lpdwValue, // (I) Device value array LONG* plRet // (O) Error code ) □ Automation call procedure Device_SetDevice( vDevice As VARIANT, // (I) Device character string vDataType As VARIANT, // (I) Data type vValue As VARIANT // (I) Device value array ) As LONG // (O) Error code dwLength: Sets the number of device points to be set. The maximum value is 1K points. □ Argument lppcwszDevice: Sets the array of the device character string to be set. The device character string needs to be specified as UNICODE string. However if word format (or double word format) is set in the data type, the device character string needs to be set in multiples of 16 (or 32). lpdwDataType: Sets each data type of the device to be set as an array. Value Meaning Unit in Table 2-4 EZNC_PLC_BIT Bit 1 bit EZNC_PLC_WORD Word 16 bits EZNC_PLC_DWORD Double word 32 bits lpdwValue: Sets the array used to set the device value. When reading, set a dummy value that has the same number of array elements as that of the device character string. Automation argument: vDevice: Sets the array of the device character string to be set as VARIANT. It needs to be sets as UNICODE character string. However if word format (or double word format) is set in the data type, the device character string needs to be set in multiples of 16 (or 32). vDataType: Sets the array of the data type of the device value to be set as VARIANT. Value Meaning Unit in Table 2-4 EZNC_PLC_BIT Bit 1 bit EZNC_PLC_WORD Word 16 bits EZNC_PLC_DWORD Double word 32 bits vValue: Sets the array of the device value to be set as VARIANT. When reading, set a dummy value that has the same number of array elements as that of the device character string. 2-186 plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_DATATYPE: Invalid data type EZ_ERR_NOT_SUPPORT: Not supported Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Defines the device to be used in the user PLC. The device settings are all based on one-shot □ Function operation. The settings for one-shot operation may return to the original state after one cycle of the PLC operation. The settings cannot be retrieved when making the settings next time. This function is not supported with C70. (EZ_ERR_NOT_SUPPORT is returned to plRet.) □ ReadDevice(), WriteDevice(), DeleteDeviceAll() Reference □ Specification 2-187 Table 2-4 Applicable devices list Device name Name Unit B Counter (fixed counter) 1 bit/16 bits/32 bits M700 B0~B1FFF (8192 points) M800 B0~B1BFFF (114688 points) CI Counter coil 1 bit/16 bits/32 bits C0~C1255 (1256 points) C0~C101023 (101024 points) D E F Data register Special relay Alarm message interface. Temporary memory. Temporary memory I device J device Latch relay (backup memory) Temporary memory Q device File register *1 Special relay *1 Special relay (for link) Special register Cumulative timer Special register (for link) 10 ms unit timer coil For two input signal lines to programmable controller *1 V device For two output signal lines to programmable controller *1 Input signal to programmable controller *1 Output signal to programmable controller *1 File register 16 bits/32 bits 1 bit/16 bits/32 bits 1 bit/16 bits/32 bits D0~D2047 (2048 points) E0~E127 (128 points) F0~F1024 (1025 points) D0~D8191 (8192 points) E0~E9999 (10000 points) F0~F4095 (4096 points) 1 bit/16 bits/32 bits 1 bit/16 bits/32 bits 1 bit/16 bits/32 bits 1 bit/16 bits/32 bits 1 bit/16 bits/32 bits 1 bit/16 bits/32 bits 16 bits/32 bits 1 bit/16 bits/32 bits 1 bit/16 bits/32 bits 16 bits/32 bits 1 bit/16 bits/32 bits 16 bits/32 bits 1 bit 1 bit/16 bits/32 bits G0~G3071 (3072 points) I0~I3FF (1024 points) J0~J63F (1600 points) L0~L511 (512 points) M0~M10239 (10240 points) Q0~Q1151 (1152 points) R0~R32767 (32768 points) SM0~SM127 (128 points) SB0~SB1FF (512 points) SD0~SD127 (128 points) ST0~ST1063 (1064 points) SW0~SWFDF (4064 points) T0~T1703 (1704 points) U0~T17F (384 points) - - - L0~L2047 (2048 points) M0~M122879 (122880 points) Q0~Q2047 (2048 points) R0~R32767 (32768 points) SM0~SM16383 (16384 points) SB0~SB7FF (2048 points) SD0~SD16383 (16384 points) ST0~ST1255 (1256 points) SW0~SW7FF (2048 points) T0~104095 (104096 points) - 1 bit/16 bits/32 bits 1 bit/32 bits V0~V255 (256 points) W0~W1FF (512 points) V0~V1023 (1024 points) W0~W5FFF (24576 points) 1 bit/16 bits/32 bits X0~X1FFF (8192 points) X0~X1FFF (8192 points) 1 bit/16 bits/32 bits Y0~Y1FFF (8192 points) Y0~Y1FFF (8192 points) G I J L M Q R SM SB SD ST SW TI U V W X Y ZR Model 16 bits/32 bits ZR0~ZR32767 (32768 points) *1: The intended purpose of this device cannot be changed. Do not use any other device (including undefined device) than that corresponding to the I/O signal of the machine. *2: The devices are read-only. 2-188 2.18.2 IEZNcDevice::DeleteDeviceAll M700 2.18.2 IEZNcDevice::DeleteDeviceAll Delete all device settings □ Custom call procedure HRESULT DeleteDeviceAll( LONG* plRet ) □ Automation call procedure Device_DeleteAll( ) As LONG □ Argument M800 // (O) Error code // (O) Error code plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZ_ERR_NOT_SUPPORT: Not supported Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Deletes all the data set in SetDevice(). □ Function This function is not supported with C70. (EZ_ERR_NOT_SUPPORT is returned to plRet.) □ SetDevice() Reference □ Specification 2-189 2.18.3 IEZNcDevice::ReadDevice M700 2.18.3 IEZNcDevice::ReadDevice Read device □ Custom call procedure HRESULT ReadDevice( LPDWORD lpdwLength, LPDWORD* lppdwValue, LONG* plRet ) □ Automation call procedure Device_Read( pvValue As VARIANT* ) As LONG □ Argument M800 // (O) Number of read device points // (O) Array of read device value // (O) Error code // (O) Device value array // (O) Error code lpdwLength: Returns the number of read devices. lppdwValue: Returns the array that contains the device value. As the device value array is allocated in this product, the client needs to release it explicitly with CoTaskMemFree(). Automation argument: pvValue: Returns the array of the device value as VARIANT. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_DATATYPE: Invalid data type EZNC_DATA_READ_READ: Data is not readable. EZNC_DATA_READ_WRITEONLY: Write-only data EZ_ERR_NOT_SUPPORT: Not supported Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Reads all the devices set in SetDevice(). □ Function This function is not supported with C70. (EZ_ERR_NOT_SUPPORT is returned to plRet.) □ SetDevice(), WriteDevice() Reference □ Specification 2-190 2.18.4 IEZNcDevice::WriteDevice M700 2.18.4 IEZNcDevice::WriteDevice Write device □ Custom call procedure HRESULT WriteDevice( LONG* plRet ) □ Automation call procedure Device_Write( ) As LONG □ Argument M800 // (O) Error code // (O) Error code plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_WRITE_DATATYPE: Invalid data type EZNC_DATA_WRITE_WRITE: Data is not writable. EZNC_DATA_WRITE_READONLY: Read-only data EZ_ERR_NOT_SUPPORT: Not supported Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Writes all the devices set in SetDevice(). □ Function This function is not supported with C70. (EZ_ERR_NOT_SUPPORT is returned to plRet.) □ SetDevice(), ReadDevice() Reference □ Specification 2-191 2.18.5 IEZNcDevice::ReadBlockDevice M700 2.18.5 IEZNcDevice::ReadBlockDevice M800 Batch read devices □ Custom call procedure HRESULT ReadBlockDevice( DWORD dwLength, // (I) Number of device points LPCOLESTR lpcwszDevice, // (I) Head device character string DWORD dwDataType, // (I) Data type LPDWORD* lppdwValues, // (I) Read device value array LONG* plRet // (O) Error code ) □ Automation call procedure Device_ReadBlock( lLength As LONG // (I) Number of device points bstrDevice As STRING // (I) Head device character string lDataType As LONG // (I) Data type pvValues As VARIANT* // (I) Read device value array ) As LONG // (O) Error code dwLength: Sets the number of device points to be set. (2 or more) □ Argument The maximum number of points that can be got is determined by the data type of the device being got. Device data type Maximum number of getting points EZNC_PLC_BIT 1280 points EZNC_PLC_BYTE 1280 points EZNC_PLC_WORD 640 points EZNC_PLC_DWORD 320 points lppcwszDevice: Sets the array of the head device character string to be set. The device character string needs to be set as UNICODE string. However if word format (or double word format) is set in the data type, the device character string needs to be set in multiples of 16 (or 32). dwDataType: Sets each data type of the device to be set. Value Meaning Unit in EZNC_PLC_BIT Bit 1 bit EZNC_PLC_BYTE Byte 8 bit EZNC_PLC_WORD Word 16 bits EZNC_PLC_DWORD Double word 32 bits lpdwValue: Sets the array used to set the device value. The data array is secured on the EZSocket side, so explicitly release it on the client side using CoTaskMemFree(). The values are got in the device corresponds to the size for the data type at the lower end of the array. Example) Data type: EZNC_PLC_BYTE, Set device value: 0x82 Read device value: 0x00000082 Automation argument: lLength:See the explanation of dwLength. bstrDevice:See the explanation of lpcwszDevice. lDataType: See the explanation of lpdwDataType. pvValue:Returns the device value array in VARIANT. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_DATATYPE: Invalid data type EZNC_DATA_READ_READ: Data is not readable. EZNC_DATA_READ_WRITEONLY: Write-only data EZ_ERR_NOT_SUPPORT: Not supported 2-192 Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE A device with continuous device points from the head device character string is read out. □ Function This is valid only for the M700V/M70V/M800 series. This function is not supported with C70 and M700/M70 series. (EZ_ERR_NOT_SUPPORT is returned to plRet.) □ WriteBlockDevice() Reference □ Specification 2-193 2.18.6 IEZNcDevice::WriteBlockDevice M700 2.18.6 IEZNcDevice::WriteBlockDevice M800 Batch write devices □ Custom call procedure HRESULT WriteBlockDevice( DWORD dwLength, // (I) Number of device points LPCOLESTR lpcwszDevice, // (I) Head device character string DWORD dwDataType, // (I) Data type LPDWORD lppdwValues, // (I) Write device value array LONG* plRet // (O) Error code ) □ Automation call procedure Device_WriteBlock( lLength As LONG // (I) Number of device points bstrDevice As STRING // (I) Head device character string lDataType As LONG // (I) Data type vValues As VARIANT // (I) Write device value array ) As LONG // (O) Error code dwLength: Sets the number of device points to be set. (2 or more) □ Argument The maximum number of points that can be got is determined by the data type of the device being got. Device data type Maximum number of gettable points EZNC_PLC_BIT 1280 points EZNC_PLC_BYTE 1280 points EZNC_PLC_WORD 640 points EZNC_PLC_DWORD 320 points lppcwszDevice: Sets the array of the head device character string to be set. The device character string needs to be set as UNICODE string. However if word format (or double word format) is set in the data type, the device character string needs to be set in multiples of 16 (or 32). dwDataType: Sets each data type of the device to be set. Value Meaning Unit in Table 2-4 EZNC_PLC_BIT Bit 1 bit EZNC_PLC_BYTE Byte 8 bit EZNC_PLC_WORD Word 16 bits EZNC_PLC_DWORD Double word 32 bits lpdwValue: Sets the array used to set the device value. The value set in the device corresponds to the size for the data type at the lower end of the array. Example) Data type: EZNC_PLC_BYTE, Written device value: 0x12345678 Set device value: 0x78 Automation argument: lLength:See the explanation of dwLength. bstrDevice:See the explanation of lpcwszDevice. lDataType: See the explanation of lpdwDataType. vValue:Returns the device value array in VARIANT. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_DATA_READ_DATATYPE: Invalid data type EZNC_DATA_WRITE_WRITE: Data is not writable. EZNC_DATA_ WRITE_READONLY: Read-only data EZ_ERR_NOT_SUPPORT: Not supported 2-194 Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE A device with continuous device points from the head device character string is read out. □ Function This is valid only for the M700V/M70V/M800 series. This function is not supported with C70 and M700/M70 series. (EZ_ERR_NOT_SUPPORT is returned to plRet.) □ ReadBlockDevice() Reference □ Specification 2-195 2.19 IEZNcSubFunction3 Interface 2.19.1 IEZNcSubFunction3::ChangeInit2 C70 2.19.1 IEZNcSubFunction3::ChangeInit2 // (I) Mitsubishi CNC type // (I) Reservation 1 // (I) Reservation 2 // (O) Error code □ Automation call procedure ChangeInit2 ( lSystemType As LONG lReserve1 As LONG lReserve2 As LONG ) As LONG Argument // (I) Mitsubishi CNC type // (I) Reservation 1 // (I) Reservation 2 // (O) Error code lSystemType: Sets the Mitsubishi CNC type. Value Meaning EZNC_SYS_MELDASC70 EZNC_SYS_MELDAS700M EZNC_SYS_MELDAS700L EZNC_SYS_MELDAS800M EZNC_SYS_MELDAS800L M800 Initialize subfunction □ Custom call procedure HRESULT ChangeInit2 ( LONG lSystemType, LONG lReserve1, LONG lReserve2, LONG* plRet ) □ M700 Perform initialization on C70. Perform initialization on M700 M series. Perform initialization on M700 L series. Perform initialization on M800 M series. Perform initialization on M800 L series. lReserve1: Not used. (Always set 0.) lReserve2: Not used. (Always set 0.) plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZ_ERR_DATA_RANGE: Invalid data range □ Return Value value S_OK S_FALSE Initializes IEZNcSubFunction. □ Function Meaning Normal termination Communication failure □ Reference □ Specification 2-196 2.19.2 IEZNcSubFunction3::GetToolWorkOffsetOfFile C70 2.19.2 IEZNcSubFunction3::GetToolWorkOffsetOfFile □ Custom call procedure HRESULT GetToolWorkOffsetOfFile( LPCOLESTR lpcwszFileName, LONG lHead, LONG lIndex, LPCOLESTR* lppcwszAxis, LPOLESTR** lpppwszData, LONG* plRet ) □ Automation call procedure GetToolWorkOffsetOfFile( bstrFileName As STRING lHeadAs LONG lIndex As LONG vAxis As VARIANT pvData As VARIANT* □ Argument M700 M800 Get data from workpiece offset file // (I) File name containing a path // (I) Part system // (I) Workpiece coordinate system number // (I) Axis name character string array // (O) Workpiece coordinate data value character string array // (O) Error code // (I) File name containing a path // (I) Part system // (I) Workpiece coordinate system number // (I) Axis name character string array // (O) Workpiece coordinate data value character string array ) As LONG // (O) Error code lpcwszFileName: Sets the file name including path of the workpiece offset file as a UNICODE character string. Set the file with absolute path as below. Drive name + ":" + \directory name\file name lHead: Sets the system. lIndex: Sets the workpiece coordinate system number to be read. Value Meaning 54 G54 offset 55 G55 offset 56 G56 offset 57 G57 offset 58 G58 offset 59 G59 offset 60 EXT offset 61 P1 offset 62 P2 offset : : 108 P48 offset lppcwszAxis: Sets the axis name as a UNICODE character string array. (Example: "X") The number of array elements is 8 (0 to 7). Set a NULL character string to the axes not applicable. (A NULL pointer cannot be set.) This is used only in C70. Set a NULL character string to all elements in any other model. 2-197 lpppwszData: Returns the workpiece offset data value as a UNICODE character string array. As the data value array is allocated in this product, the client needs to release it explicitly with CoTaskMemFree (). Tool change data type Remarks lpppwszData 0 1st axis 1 2nd axis 2 3rd axis 3 4th axis 4 5th axis 5 6th axis 6 7th axis 7 8th axis The unit is [inch] or [mm] depending on the parameter setting of NC. Automation argument: bstrFileName: See the explanation of lpcwszFileName. vAxis: See the explanation of lppcwszAxis. pvData: Returns the workpiece offset data value as VARIANT. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_FILE_OPEN_FILENOTEXIST: File does not exist EZNC_FILE_OPEN_OPEN: File cannot be opened EZNC_FILE_READFILE_READ: Data is not readable EZNC_DATA_NOT_EXIST: Data does not exist EZ_ERR_MEMORY_ALLOC: Memory cannot be allocated. Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Gets the offset value of the workpiece coordinate system of the set part system and axis No. □ Function □ Reference OpenFile3(), CloseFile2(), ReadFile2(), WriteFile(), SetToolWorkOffsetFile() □ Specification 2-198 2.19.3 IEZNcSubFunction3::SetToolWorkOffsetOfFile C70 2.19.3 IEZNcSubFunction3::SetToolWorkOffsetOfFile □ Custom call procedure HRESULT SetToolWorkOffsetOfFile( LPCOLESTR lpcwszFileName, LONG lMode, LONG lHead, LONG lIndex, LPCOLESTR* lppcwszAxis, LPCOLESTR* lppcwszData, LONG* plRet ) □ Automation call procedure SetToolWorkOffsetOfFile( bstrFileName As STRING lModeAs LONG lHeadAs LONG lIndex As LONG vAxis As VARIANT vData As VARIANT ) As LONG □ Argument M700 M800 Set data to workpiece offset file // (I) File name containing a path // (I) Setting mode // (I) Part System // (I) Workpiece coordinate system number // (I) Axis name string character array // (I) Workpiece coordinate data value character string array // (O) Error code // (I) File name containing a path // (I) Setting mode // (I) Part system // (I) Workpiece coordinate system number // (I) Axis name character string array // (I) Workpiece coordinate data value character string array // (O) Error code lpcwszFileName: Sets the file name including path of the workpiece offset file as a UNICODE character string. Set the file with absolute path as below. Drive name + ":" + \directory name\file name lMode: Sets the setting mode of the tool life management file. Value Meaning EZNC_FILE_CREATE Creates a new tool life management file. EZNC_FILE_OPEN Modifies an existing tool life management file lHead: Sets the system. lIndex: Sets the workpiece coordinate system number to be written to. Value Meaning 54 G54 offset 55 G55 offset 56 G56 offset 57 G57 offset 58 G58 offset 59 G59 offset 60 EXT offset 61 P1 offset 62 P2 offset : : 108 P48 offset 2-199 lppcwszAxis: Sets the axis name as a UNICODE character string. Set a NULL character string to the axes that do not exist. This is used only in C70. Set a NULL character string to all elements in any other model. lppcwszData: Returns the workpiece offset data as a UNICODE character string. Set a NULL character string to the axes that do not exist. The unit is [inch] or [mm] depending on the parameter setting of CNC. lppcwszData 0 1 2 3 4 5 6 7 Tool change data type 1st axis 2nd axis 3rd axis 4th axis 5th axis 6th axis 7th axis 8th axis Remarks Automation argument: bstrFileName: See the explanation of lpcwszFileName. vAxis: See the explanation of lppcwszAxis. vData: Creates the workpiece offset data as a UNICODE character string and sets it by substituting it in vData(VARIANT). For details of the workpiece offset data, see the explanation of lppcwszData and the index above. plRet: Returns an error code. (Upon automation, the return value is used.) S_OK: Normal termination EZNC_FILE_OPEN_FILENOTEXIST: File does not exist EZNC_FILE_OPEN_OPEN: File cannot be opened EZNC_FILE_WRITEFILE_WRITE: Data is not writable EZ_ERR_NULLPTR: Argument is NULL pointer 2-200 [Example] LPOLESTR* lppwszAxis; lppwszAxis = new LPOLESTR[8]; lppwszAxis [0] =L""; lppwszAxis [1] =L""; lppwszAxis [2] =L""; lppwszAxis [3] =L""; lppwszAxis [4] =L""; lppwszAxis [5] =L""; lppwszAxis [6] =L""; lppwszAxis [7] =L""; LPOLESTR* lppwszData; lppwszData = new LPOLESTR[11]; lppwszData[0] =L"-1.000"; lppwszData[1] =L"1.000"; lppwszData[2] =L"3.000"; lppwszData[3] =L""; lppwszData[4] =L""; lppwszData[5] =L""; lppwszData[6] =L""; lppwszData[7] =L""; hr = pIEZNcTool->SetToolLifeValueOfFile(L"C:\TEMP\OFFSET.WRK",EZNC_FILE_OPEN, 1, 54, (LPCOLESTR*)lppwszAxis,(LPCOLESTR*)lppwszData, &lRet); if( S_OK != hr ){ wprintf(L"HRESULT Code = 0x%x, lRet Code = 0x%x\n", hr, lRet ); } delete[ ] lppwszData; Meaning □ Return Value value Normal termination S_OK Communication failure S_FALSE Sets the offset value of the workpiece coordinate system of the set part system and axis No. □ Function □ Referenc e OpenFile3(), CloseFile2(), ReadFile2(), WriteFile(), GetToolWorkOffsetFile() □ Specification 2-201 3. ERROR CODE LIST This section provides a list of error codes. Table 3-1 Error code list No. Error code EZ_ERR_NOT_OPEN 1. EZ_ERR_DOUBLE_OPEN 2. EZ_ERR_DATA_TYPE 3. EZ_ERR_DATA_RANGE 4. EZ_ERR_NOT_SUPPORT 5. EZ_ERR_CANNOT_OPEN 6. EZ_ERR_NULLPTR 7. EZ_ERR_DATA_LENGTH 8. EZ_ERR_OPEN_COMM 9. 10. EZ_ERR_MEMORY_ALLOC 11. EZNC_ERR_CANNOT_GETPCERR 12. EZNC_FILE_OPEN_MODE 13. EZNC_FILE_OPEN_NOTOPEN 14. EZNC_FILE_OPEN_FILEEXIST 15. EZNC_FILE_OPEN_ALREADYOPENED 16. EZNC_FILE_OPEN_CREATE 17. EZNC_FILE_WRITEFILE_NOTOPEN 18. EZNC_FILE_WRITEFILE_LENGTH 19. EZNC_FILE_WRITEFILE_WRITE 20. EZNC_FILE_READFILE_NOTOPEN 21. EZNC_FILE_READFILE_READ 22. EZNC_FILE_READFILE_CREATE 23. EZNC_FILE_OPEN_FILENOTEXIST 24. EZNC_FILE_OPEN_OPEN 25. EZNC_FILE_OPEN_ILLEGALPATH 26. EZNC_FILE_READFILE_ILLEGALFILE 27. EZNC_FILE_WRITEFILE_ILLEGALFILE Number 0x80A00101 0x80A00104 0x80A00105 0x80A00106 0x80A00107 0x80A00109 0x80A0010A 0x80A0010B 0x80A0010C 0x80B00101 0x80B00102 0x80B00201 0x80B00202 0x80B00203 0x80B00204 0x80B00205 0x80B00206 0x80B00207 0x80B00208 0x80B00209 0x80B0020A 0x80B0020B 0x80B0020C 0x80B0020D 0x80B0020E 0x80B0020F 0x80B00210 28. EZNC_COMM_CANNOT_OPEN 0x80B00301 29. EZNC_COMM_NOTSETUP_PROTOCOL 0x80B00302 30. EZNC_COMM_ALREADYOPENED 0x80B00303 31. 32. 33. 34. 35. 36. 37. 38. 39. 40. 41. 42. 43. 44. 45. 46. EZNC_COMM_NOTMODULE EZNC_COMM_CREATEPC EZNC_DATA_NOT_EXIST EZNC_DATA_DUPLICATE EZNC_PARAM_FILENOTEXIST EZNC_SYSFUNC_IOCTL_ADDR EZNC_SYSFUNC_IOCTL_NOTOPEN EZNC_SYSFUNC_IOCTL_FUNCTION EZNC_SYSFUNC_IOCTL_DATA EZNC_FILE_DIR_FILESYSTEM EZNC_FILE_DIR_NODIR EZNC_FILE_DIR_NODRIVE EZNC_PCFILE_DIR_NODIR EZNC_PCFILE_DIR_NODRIVE EZNC_OPE_CURRALM_ADDR EZNC_OPE_CURRALM_ALMTYPE 0x80B00304 0x80B00305 0x80B00401 0x80B00402 0x80B00501 0x80020190 0x80020102 0x80020132 0x80020133 0x80030143 0x80030191 0x8003019B 0x800301A2 0x800301A8 0x80050D90 0x80050D02 47. EZNC_OPE_CURRALM_DATAERR 0x80050D03 48. 49. 50. EZ_ERR_NOT_OPEN EZ_ERR_DOUBLE_OPEN EZ_ERR_DATA_TYPE 0x80A00101 0x80A00104 0x80A00105 3-1 Description Communication lines are not open. Double open error. Invalid argument data type. Invalid argument data range. Not supported. Communication line cannot be opened. Argument is NULL pointer. Invalid argument data. COMM port handle error. Memory cannot be allocated. EZSocketPc error cannot be obtained. Invalid mode specification. File is not open. File already exists. File is already open. Temporary file cannot be created. File is open without write mode specification. Invalid write data size. Not writable. File is open without read mode specification. Not readable. Temporary file cannot be created. File does not exist (READ mode). File cannot be opened. Invalid file path. Invalid read file. Invalid write file. Host name for local connection used for automation call is invalid. TCP/IP communication is not configured. Cannot be set because communication is already in progress. No submodule. EZSocketPc objects cannot be created. Data does not exist. Duplicate data. No parameter information file. Invalid NC control unit number. Device is not open. Invalid command. Invalid communication parameter data range. File system error. Directory does not exist. Drive does not exist. Directory does not exist. Drive does not exist. Invalid system, spindle specification. Invalid alarm type. Error in communication data between NC and personal computer. Communication lines are not open. Double open error. Invalid argument data type. No. 51. 52. 53. 54. 55. 56. 57. 58. 59. 60. 61. 62. 63. 64. 65. 66. 67. 68. 69. 70. 71. 72. 73. 74. Error code EZ_ERR_DATA_RANGE EZ_ERR_NOT_SUPPORT EZ_ERR_CANNOT_OPEN EZ_ERR_NULLPTR EZ_ERR_DATA_LENGTH EZ_ERR_OPEN_COMM EZ_ERR_MEMORY_ALLOC EZNC_ERR_CANNOT_GETPCERR EZNC_FILE_OPEN_MODE EZNC_FILE_OPEN_NOTOPEN EZNC_FILE_OPEN_FILEEXIST EZNC_FILE_OPEN_ALREADYOPENED EZNC_FILE_OPEN_CREATE EZNC_FILE_WRITEFILE_NOTOPEN EZNC_FILE_WRITEFILE_LENGTH EZNC_FILE_WRITEFILE_WRITE EZNC_FILE_READFILE_NOTOPEN EZNC_FILE_READFILE_READ EZNC_FILE_READFILE_CREATE EZNC_FILE_OPEN_FILENOTEXIST EZNC_FILE_OPEN_OPEN EZNC_FILE_OPEN_ILLEGALPATH EZNC_FILE_READFILE_ILLEGALFILE EZNC_FILE_WRITEFILE_ILLEGALFILE Number 0x80A00106 0x80A00107 0x80A00109 0x80A0010A 0x80A0010B 0x80A0010C 0x80B00101 0x80B00102 0x80B00201 0x80B00202 0x80B00203 0x80B00204 0x80B00205 0x80B00206 0x80B00207 0x80B00208 0x80B00209 0x80B0020A 0x80B0020B 0x80B0020C 0x80B0020D 0x80B0020E 0x80B0020F 0x80B00210 75. EZNC_COMM_CANNOT_OPEN 0x80B00301 76. EZNC_COMM_NOTSETUP_PROTOCOL 0x80B00302 77. EZNC_COMM_ALREADYOPENED 0x80B00303 78. 79. 80. 81. 82. 83. 84. 85. 86. 87. 88. 89. 90. 91. 92. 93. EZNC_COMM_NOTMODULE EZNC_COMM_CREATEPC EZNC_DATA_NOT_EXIST EZNC_DATA_DUPLICATE EZNC_PARAM_FILENOTEXIST EZNC_SYSFUNC_IOCTL_ADDR EZNC_SYSFUNC_IOCTL_NOTOPEN EZNC_SYSFUNC_IOCTL_FUNCTION EZNC_SYSFUNC_IOCTL_DATA EZNC_FILE_DIR_FILESYSTEM EZNC_FILE_DIR_NODIR EZNC_FILE_DIR_NODRIVE EZNC_PCFILE_DIR_NODIR EZNC_PCFILE_DIR_NODRIVE EZNC_OPE_CURRALM_ADDR EZNC_OPE_CURRALM_ALMTYPE 0x80B00304 0x80B00305 0x80B00401 0x80B00402 0x80B00501 0x80020190 0x80020102 0x80020132 0x80020133 0x80030143 0x80030191 0x8003019B 0x800301A2 0x800301A8 0x80050D90 0x80050D02 94. EZNC_OPE_CURRALM_DATAERR 0x80050D03 95. 96. 97. 98. 99. 100. EZNC_DATA_TLFTOOL_PARAMERR EZNC_DATA_TLFTOOL_MAXMINERR EZNC_DATA_TLFTOOL_UNMACH EZNC_DATA_TLFTOOL_OUTOFSPEC EZNC_DATA_READ_ADDR EZNC_DATA_READ_SECT 0x80041194 0x80041195 0x80041196 0x80041197 0x80040190 0x80040191 3-2 Description Invalid argument data range. Not supported. Communication line cannot be opened. Argument is NULL pointer. Invalid argument data. COMM port handle error. Memory cannot be allocated. EZSocketPc error cannot be obtained. Invalid mode specification. File is not open. File already exists. File is already open. Temporary file cannot be created. File is open without write mode specification. Invalid write data size. Not writable. File is open without read mode specification. Not readable. Temporary file cannot be created. File does not exist (READ mode). File cannot be opened. Invalid file path. Invalid read file. Invalid write file. Host name for local connection used for automation call is invalid. TCP/IP communication is not configured. Cannot be set because communication is already in progress. No submodule. EZSocketPc objects cannot be created. Data does not exist. Duplicate data. No parameter information file. Invalid NC control unit number. Device is not open. Invalid command. Invalid communication parameter data range. File system error. Directory does not exist. Drive does not exist. Directory does not exist. Drive does not exist. Invalid system, spindle specification. Invalid alarm type. Error in communication data between NC and personal computer. Invalid type specified for life control data. Setting data is out of range. Specified tool number mismatch. Specified tool number is out of specifications. Invalid system, spindle specification. Invalid section number. Error code EZNC_DATA_READ_SUBSECT EZNC_DATA_READ_DATASIZE EZNC_DATA_READ_DATATYPE EZNC_DATA_READ_READ EZNC_DATA_READ_WRITEONLY EZNC_DATA_READ_AXIS EZNC_DATA_READ_DATANUM EZNC_DATA_READ_NODATA EZNC_DATA_READ_VALUE EZNC_DATA_WRITE_ADDR EZNC_DATA_WRITE_SECT EZNC_DATA_WRITE_SUBSECT EZNC_DATA_WRITE_DATASIZE EZNC_DATA_WRITE_DATATYPE EZNC_DATA_WRITE_READONLY EZNC_DATA_WRITE_WRITE EZNC_DATA_WRITE_AXIS EZNCDATA_WRITE_SAFETYPWLOCK Number 0x80040192 0x80040196 0x80040197 0x8004019D 0x8004019F 0x800401A0 0x800401A1 0x800401A3 0x8004019A 0x80040290 0x80040291 0x80040292 0x80040296 0x80040297 0x8004029B 0x8004029E 0x800402A0 0x8004024D 119. EZNCDATA_WRITE_UOPEN_FORMAT 0x800402A2 120. EZNCDATA_WRITE_EDTFILE_REGIST 0x800402A4 121. 122. 123. 124. 125. 126. 127. 128. 129. 130. 131. 132. 133. 134. 135. 136. 137. 138. 139. 140. 141. 142. 143. 144. 145. 0x800402A5 0x800402A3 0x8004029A 0x800402A6 0x800402A7 0x800402A9 0x800402A8 0x80040501 0x80040402 0x80040401 0x80040490 0x80040491 0x80040492 0x80040497 0x8004049B 0x8004049D 0x8004049F 0x800404A0 0x80040BA3 0x80030101 0x80030103 0x80030148 0x80030198 0x80030190 0x80030194 No. 101. 102. 103. 104. 105. 106. 107. 108. 109. 110. 111. 112. 113. 114. 115. 116. 117. 118. EZNCDATA_WRITE_EDTFILE_RELEASE EZNCDATA_WRITE_NODATA EZNCDATA_WRITE_VALUE EZNCDATA_WRITE_SAFE_NOPASSWD EZNCDATA_WRITE_SAFE_CHECKERR EZNCDATA_WRITE_SAFE_DATATYPE EZNCDATA_WRITE_SORT EZNC_DATA_MDLCANCEL_NOTREGIST EZNC_DATA_MDLREGIST_PRIORITY EZNC_DATA_MDLREGIST_REGIST EZNC_DATA_MDLREGIST_ADDR EZNC_DATA_MDLREGIST_SECT EZNC_DATA_MDLREGIST_SUBSECT EZNC_DATA_MDLREGIST_DATATYPE EZNC_DATA_MDLREGIST_READONLY EZNC_DATA_MDLREGIST_READ EZNC_DATA_MDLREGIST_WRITEONLY EZNC_DATA_MDLREGIST_AXIS EZNC_DATA_RETHREADWRITE_NODATA EZNC_FILE_DIR_ALREADYOPENED EZNC_FILE_DIR_DATASIZE EZNC_FILE_DIR_NAMELENGTH EZNC_FILE_DIR_ILLEGALNAME EZNC_FILE_DIR_NOTOPEN EZNC_FILE_DIR_READ 146. EZNC_PCFILE_DIR_ALREADYOPENED 0x80030102 147. 148. 149. 150. 0x800301A0 0x800301A1 0x800301A5 0x80030447 EZNC_PCFILE_DIR_NOTOPEN EZNC_PCFILE_DIR_NOFILE EZNC_PCFILE_DIR_READ EZNC_FILE_COPY_BUSY 3-3 Description Invalid subsection number. Application does not fit into prepared buffer. Invalid data type. Data is not readable. Write-only data. Invalid axis specification. Invalid data number. Read data not found Invalid read data range. Invalid system, spindle specification. Invalid section number. Invalid subsection number. Application does not fit into prepared buffer. Invalid data type. Read-only data. Data is not writable. Invalid axis specification. Safety password locked. Formatting canceled because of invalid SRAM open parameter. Cannot register edit file (already being edited). Cannot release edit file. No data at write destination. Invalid write data range. Safety password not set. Safety data consistency check error Safety data type invalid Cannot write while sorting tool data. Not registered for fast read. Invalid priority specification. Exceeded the limit of registrations. Invalid address. Invalid section number. Invalid subsection number. Invalid data type. Read-only data. Data is not readable. Write-only data. Invalid axis specification. Rethread cut position not set. A different directory is already opened. Exceeded maximum data size. File name is too long. Invalid file name format. Not open. File information read error. A different directory is already opened (personal computer only). Not open. File does not exist. File information read error. Copying is disabled (during operation). No. 151. 152. 153. 154. 155. 156. 157. 158. 159. 160. 161. 162. 163. 164. 165. 166. 167. 168. 169. 170. 171. Error code EZNC_FILE_COPY_ENTRYOVER EZNC_FILE_COPY_FILEEXIST EZNC_FILE_COPY_FILESYSTEM EZNC_FILE_COPY_NAMELENGTH EZNC_FILE_COPY_ILLEGALNAME EZNC_FILE_COPY_MEMORYOVER EZNC_FILE_COPY_NODIR EZNC_FILE_COPY_NODRIVE EZNC_FILE_COPY_NOFILE EZNC_FILE_COPY_PLCRUN EZNC_FILE_COPY_READ EZNC_FILE_COPY_WRITE EZNC_FILE_COPY_PROTECT EZNC_FILE_COPY_DIFFER EZNC_FILE_COPY_NOTSUPPORTED EZNC_FILE_COPY_EXECUTING EZNC_FILE_COPY_NOTOPEN EZNC_FILE_COPY_WRITE_WARNING EZNC_FILE_COPY_SAFETYPWLOCK EZNC_FILE_COPY_ILLEGALFORMAT EZNC_FILE_COPY_WRONGPASSWORD Number 0x80030403 0x80030401 0x80030443 0x80030448 0x80030498 0x80030404 0x80030491 0x8003049B 0x80030442 0x80030446 0x80030494 0x80030495 0x8003044A 0x80030405 0x80030449 0x8003044C 0x80030490 0x80030495 0x8003044D 0x8003049D 0x8003049E 172. EZNC_PCFILE_COPY_CREATE 0x800304A4 173. EZNC_PCFILE_COPY_OPEN 0x800304A3 174. 175. 176. 177. 178. 179. 180. 181. 182. 183. 184. 185. 186. 187. 188. 189. 190. 191. 192. 193. 194. 195. 196. 197. 198. 199. 200. 0x80030402 0x800304A7 0x800304A2 0x800304A8 0x800304A1 0x800304A5 0x800304A6 0x80030406 0x800304A0 0x80030201 0x80030242 0x80030243 0x80030247 0x80030248 0x8003024A 0x80030291 0x80030298 0x8003029B 0x80030202 0x800302A7 0x800302A2 0x800302A8 0x800302A1 0x80030301 0x80030342 0x80030343 0x80030347 EZNC_PCFILE_COPY_FILEEXIST EZNC_PCFILE_COPY_ILLEGALNAME EZNC_PCFILE_COPY_NODIR EZNC_PCFILE_COPY_NODRIVE EZNC_PCFILE_COPY_NOFILE EZNC_PCFILE_COPY_READ EZNC_PCFILE_COPY_WRITE EZNC_PCFILE_COPY_MEMORYOVER EZNC_PCFILE_COPY_NOTOPEN EZNC_FILE_DEL_NOTDELETE EZNC_FILE_DEL_NOFILE EZNC_FILE_DEL_FILESYSTEM EZNC_FILE_DEL_BUSY EZNC_FILE_DEL_NAMELENGTH EZNC_FILE_DEL_PROTECT EZNC_FILE_DEL_NODIR EZNC_FILE_DEL_ILLEGALNAME EZNC_FILE_DEL_NODRIVE EZNC_PCFILE_DEL_NOTDELETE EZNC_PCFILE_DEL_ILLEGALNAME EZNC_PCFILE_DEL_NODIR EZNC_PCFILE_DEL_NODRIVE EZNC_PCFILE_DEL_NOFILE EZNC_FILE_REN_FILEEXIST EZNC_FILE_REN_NOFILE EZNC_FILE_REN_FILESYSTEM EZNC_FILE_REN_BUSY 3-4 Description Exceeded the limit of registrations. Copy destination file already exists. File system error. File name is too long. Invalid file name format. Memory capacity exceeded. Directory does not exist. Drive does not exist. File does not exist. Copying is disabled (PLC in operation). Transfer source file is not readable. Transfer destination file is not writable. Copying is disabled (protected). Verification error. Verification function is not supported. Copying file. File is not open. Transfer destination file is not writable. Safety password locked. Invalid file format. Password is wrong. File cannot be created (personal computer only). File cannot be opened (personal computer only). Copy destination file already exists. Invalid file name format. Directory does not exist. Drive does not exist. File does not exist. Transfer source file is not readable. Transfer destination file is not writable. Disk space exceeded. File is not open. File cannot be deleted. File does not exist. File system error. Deletion is disabled (during operation). File name is too long. Deletion is disabled (protected). Directory does not exist. Invalid file name format. Drive does not exist. File cannot be deleted. Invalid file name format. Directory does not exist. Drive does not exist. File does not exist. New file name already exists. File does not exist. File system error. Renaming is disabled (during operation). No. 201. 202. 203. 204. 205. 206. 207. 208. 209. 210. 211. 212. 213. 214. 215. 216. 217. Error code EZNC_FILE_REN_NAMELENGTH EZNC_FILE_REN_PROTECT EZNC_FILE_REN_NODIR EZNC_FILE_REN_ILLEGALNAME EZNC_FILE_REN_NODRIVE EZNC_PCFILE_REN_NOTRENAME EZNC_PCFILE_REN_SAMENAME EZNC_PCFILE_REN_FILEEXIST EZNC_PCFILE_REN_ILLEGALNAME EZNC_PCFILE_REN_NODIR EZNC_PCFILE_REN_NODRIVE EZNC_PCFILE_REN_NOFILE EZNC_FILE_DISKFREE_NODIR EZNC_FILE_DISKFREE_NODRIVE EZNC_FILE_DISKFREE_FILESYSTEM EZNC_FILE_DISKFREE_NAMELENGTH EZNC_FILE_DISKFREE_ILLEGALNAME Number 0x80030348 0x8003034A 0x80030391 0x80030398 0x8003039B 0x80030303 0x80030305 0x80030302 0x800303A7 0x800303A2 0x800303A8 0x800303A1 0x80030691 0x8003069B 0x80030643 0x80030648 0x80030648 218. EZNC_PCFILE_DISKFREE_NODIR 0x800306A2 219. EZNC_PCFILE_DISKFREE_NODRIVE 0x800306A8 220. 221. 222. 223. 224. 225. 226. 227. 228. 229. 230. 231. 232. 233. 234. 235. 236. 237. 238. 239. 240. 241. 242. 243. 244. 245. 246. 247. 248. 249. 250. EZNC_FILE_DRVLIST_DATASIZE EZNC_FILE_DRVLIST_READ EZNC_ENET_ALREADYOPEN EZNC_ENET_NOTOPEN EZNC_ENET_CARDNOTEXIST EZNC_ENET_BADCHANNEL EZNC_ENET_BADFD EZNC_ENET_NOTCONNECT EZNC_ENET_NOTCLOSE EZNC_ENET_TIMEOUT EZNC_ENET_DATAERR EZNC_ENET_CANCELED EZNC_ENET_ILLEGALSIZE EZNC_ENET_TASKQUIT EZNC_ENET_UNKNOWNFUNC EZNC_ENET_SETDATAERR EZNC_READ_CACHE_REGIST EZNC_READ_CACHE_ADDR EZNC_READ_CACHE_SECT EZNC_READ_CACHE_SUBSECT EZNC_READ_CACHE_DATATYPE EZNC_READ_CACHE_DATA EZNC_READ_CACHE_READ EZNC_READ_CACHE_WRITEONLY EZNC_READ_CACHE_AXIS EZNC_FS_OPEN_FILE_MALLOC EZNC_FS_OPEN_FILE_OPEN EZNC_FS_OPEN_FILE_BUSY EZNC_FS_OPEN_FILE_NAMELENGTH EZNC_FS_OPEN_FILE_NOTSUPPORTED EZNC_FS_OPEN_FILE_ALREADYOPEN 0x80030701 0x80030794 0x82020001 0x82020002 0x82020004 0x82020006 0x82020007 0x8202000A 0x8202000B 0x82020014 0x82020015 0x82020016 0x82020017 0x82020018 0x82020032 0x82020033 0x80060001 0x80060090 0x80060091 0x80060092 0x80060097 0x8006009A 0x8006009D 0x8006009F 0x800600A0 0x80070140 0x80070142 0x80070147 0x80070148 0x80070149 0x80070192 3-5 Description File name is too long. Renaming is disabled (protected). Directory does not exist. Invalid file name format. Drive does not exist. Renaming is disabled. New and old file names are identical. New file name already exists. Invalid file name format. Directory does not exist. Drive does not exist. File does not exist. Directory does not exist. Drive does not exist. File system error. File name is too long. Invalid file name format. Directory does not exist (personal computer only). Drive does not exist (personal computer only). Application does not fit into prepared buffer. Drive information read error. Already open. Not open. Card does not exist. Invalid channel number. Invalid file descriptor. Not connected. Not closed. Time-out. Invalid data. Terminated by cancel request. Invalid packet size. Terminated due to by end of task. Invalid command. Invalid setting data. Invalid data read cache. Invalid address. Invalid section number. Invalid subsection number. Invalid data type. Invalid data range. Data is not readable. Invalid data type. Invalid axis specification. Work area cannot be allocated. File cannot be opened. File cannot be opened (during operation). File path is too long. Not supported (CF not supported). Already open. No. 251. 252. 253. 254. 255. 256. 257. 258. 259. 260. 261. 262. 263. 264. 265. 266. 267. 268. 269. 270. 271. 272. 273. 274. 275. 276. 277. 278. 279. 280. 281. 282. 283. 284. 285. 286. 287. 288. 289. 290. Error code EZNC_FS_OPEN_FILE_FILEFULL EZNC_FS_OPEN_FILE_ALREADYOPEN EZNC_FS_OPEN_FILE_SORT EZNC_FS_OPEN_FILE_SAFE_NOPASSWD EZNC_FS_CLOSE_FILE_NOTOPEN EZNC_FS_CREATE_FILE_MALLOC EZNC_FS_CREATE_FILE_BUSY EZNC_FS_CREATE_FILE_NAMELENGTH EZNC_FS_CREATE_FILE_NOTSUPPORTED EZNC_FS_CREATE_FILE_ALREADYOPEN EZNC_FS_CREATE_FILE_CREATE EZNC_FS_CREATE_FILE_FILEFULL EZNC_FS_CREATE_FILE_NODRIVE EZNC_FS_READ_FILE_NOTOPEN EZNC_FS_READ_FILE_READ EZNC_FS_WRITE_FILE_NOTSUPPORTED EZNC_FS_WRITE_FILE_NOTOPEN EZNC_FS_WRITE_FILE_WRITE EZNC_FS_REMOVE_FILE_REMOVEERR EZNC_FS_REMOVE_FILE_NOFILE EZNC_FS_REMOVE_FILE_BUSY EZNC_FS_REMOVE_FILE_NAMELENGTH EZNC_FS_REMOVE_FILE_NOTSUPPORTED EZNC_FS_REMOVE_FILE_ALREADYOPEN EZNC_FS_REMOVE_FILE_NODRIVE EZNC_FS_RENAME_FILE_NOFILE EZNC_FS_RENAME_FILE_NOTRENAME EZNC_FS_RENAME_FILE_NAMELENGTH EZNC_FS_RENAME_FILE_NOTSUPPORTED EZNC_FS_RENAME_FILE_ALREADYOPEN EZNC_FS_RENAME_FILE_FILEFULL EZNC_FS_RENAME_FILE_NODRIVE EZNC_FS_IOCTL_FILE_FUNCTION EZNC_FS_IOCTL_FILE_NOTOPEN EZNC_FS_IOCTL_FILE_READ EZNC_FS_IOCTL_FILE_WRITE EZNC_FS_IOCTL_FILE_DATASIZE EZNC_FS_IOCTL_FILE_DATATYPE EZNC_FS_IOCTL_FILE_NOTSUPPORTED EZNC_FS_OPEN_DIR_MALLOC Number 0x80070199 0x80070192 0x8007019F 0x800701B0 0x80070290 0x80070340 0x80070347 0x80070348 0x80070349 0x80070392 0x80070393 0x80070399 0x8007039B 0x80070490 0x80070494 0x80070549 0x80070590 0x80070595 0x80070740 0x80070742 0x80070747 0x80070748 0x80070749 0x80070792 0x8007079B 0x80070842 0x80070843 0x80070848 0x80070849 0x80070892 0x80070899 0x8007089B 0x80070944 0x80070990 0x80070994 0x80070995 0x80070996 0x80070997 0x80070949 0x80070A40 291. EZNC_FS_OPEN_DIR_BUSY 0x80070A47 292. 293. 294. 295. 0x80070A48 0x80070A49 0x80070A91 0x80070A92 EZNC_FS_OPEN_DIR_NAMELENGTH EZNC_FS_OPEN_DIR_NOTSUPPORTED EZNC_FS_OPEN_DIR_NODIR EZNC_FS_OPEN_DIR_NOTOPEN 296. EZNC_FS_OPEN_DIR_FILEFULL 0x80070A99 297. 298. 299. 300. 0x80070A9B 0x80070B90 0x80070B91 0x80070B96 EZNC_FS_OPEN_DIR_NODRIVE EZNC_FS_READ_DIR_NOTOPEN EZNC_FS_READ_DIR_NODIR EZNC_FS_READ_DIR_DATASIZE 3-6 Description Maximum number of open files exceeded. Already open. Cannot open while sorting tool data. Safety password not authenticated. File is not open. Work area cannot be allocated. File cannot be created (during operation). File path is too long. Not supported (CF not supported). Already created. File cannot be created. Maximum number of open files exceeded. Drive does not exist. File is not open. File information read error. Write is not available. File is not open. File write error. File deletion error. File does not exist. File cannot be deleted (during operation). File path is too long. Not supported (CF not supported). File is already open. Drive does not exist. File does not exist. File cannot be renamed. File path is too long. Not supported (CF not supported). File is already open. Maximum number of open files exceeded. Drive does not exist. Invalid command (not supported). Not open. Read error. Write error. Application does not fit into prepared buffer. Invalid data type. Not supported (CF not supported). Work area cannot be allocated. Directory cannot be opened (during operation). File path is too long. Not supported (CF not supported). Directory does not exist. Already open. Maximum number of open directories exceeded. Drive does not exist. Directory is not open. Directory does not exist. Application does not fit into prepared buffer. No. 301. 302. 303. 304. 305. 306. 307. 308. 309. 310. 311. Error code EZNC_FS_CLOSE_DIR_NOTOPEN EZNC_FS_STAT_FILE_NAMELENGTH EZNC_FS_STAT_FILE_NOTSUPPORTED EZNC_FS_STAT_FILE_STATERR EZNC_FS_STAT_FILE_FILEFULL EZNC_FS_STAT_FILE_NODRIVE EZNC_FS_FSTAT_FILE_NAMELENGTH EZNC_FS_FSTAT_FILE_NOTSUPPORTED EZNC_FS_FSTAT_FILE_STATERR EZNC_FS_FSTAT_FILE_NOTOPEN EZNC_FS_FSTAT_FILE_NODRIVE Number 0x80070D90 0x80070E48 0x80070E49 0x80070E94 0x80070E99 0x80070E9B 0x80070F48 0x80070F49 0x80070F94 0x80070F90 0x80070F9B 312. EZNC_FS_IOCTL_UOPEN_FORMAT 0x8007099C 313. Error codes output by NC control unit. 314. Error codes output by NC control unit. 315. Error codes output by EZSocket (EZSocketPc) for MELSEC programmable controllers (C70 only) 0xF00000FF 0xFFFFFFFF 0x01XXXXXX 0x02XXXXXX 0x03XXXXXX 0x04XXXXXX 0x10XXXXXX 3-7 Description Directory is not open. File path is too long. Supported (CF not supported). File information read error. Maximum number of open files exceeded. Drive does not exist. File path is too long. Not supported (CF not supported). File information read error. File is not open. Drive does not exist. Formatting canceled because of invalid SRAM open parameter. Invalid argument. Data is not readable/writable. For details, refer to the following manuals: EZSocket Standard, Reference Manual (for MELSEC)(BAD-801Q013) EZSocket Pro-FX CPU-supported Edition, Reference Manual (for MELSEC)(BAD-801Q025) 4. API OPERATING PROCEDURE 4.1 API Operating Procedure This section provides instructions and procedures for using the product. Use the product by performing the following steps: Create IEZNcCommunication3 CoCreateInstance(ObjCom) Create IEZNcPosition object ObjCom→QueryInterface(ObjPos) (*1) Open with IEZNcCommunication3 object ObjCom->Open2(...) NC control unit connection Specify system with IEZNcCommunication3 object ObjCom->SetHead(...) Processing range for NC-specific Obtain position data with IEZNcPosition object ObjPos->GetWorkPosition(...) function's objects Close IEZNcCommunication3 object ObjCom->Close() Release IEZNcPosition object ObjPos->Release() Release IEZNcCommunication3 object ObjCom->Release() End of flow 4-1 4.2 Initialization for Enabling OLE/COM Interface The product uses the OLE/COM interface. Thus, the VC++ project must support OLE/COM. For the project that was created without OLE/COM being enabled, it is possible to enable OLE/COM by modifying appropriate parts of the two files created by VC++, as shown below. Note that a project name is Project in the explanation below. Project.cpp BOOL CProjectApp::InitInstance() { // Initialize OLE library. if (!AfxOleInit()) { // Show error message. return FALSE; } } // The rest is omitted. Stdafx.h // stdafx.h: Describes standard system include files // or project specific include files that are used frequently // but changed infrequently. // #define VC_EXTRALEAN // Excludes rarely-used stuff from Windows headers. // #include // MFC core and standard components #include // MFC extensions #include // MFC OLE/COM #ifndef _AFX_NO_AFXCMN_SUPPORT #include // MFC support for Windows Common Controls #endif // _AFX_NO_AFXCMN_SUPPORT 4-2 4.3 Object Creation The product uses the OLE/COM interface; therefore, objects must be created/released in the thread where OLE/COM initialization was performed. This is not a matter of concern if your program is single-threaded. In the sample below, the application is for displaying position data, and it is display-centric and single-threaded. Thus, objects are created when the View window is created, and released when the window is closed. First, create an IEZNcCommunication3 communication object by using CoCreateInstance in the COM library. Then, from the created communication object, create an IEZNcPosition object and other objects by using QueryInterface. The following shows how to create IEZNcCommunication3 and IEZNcPosition objects. Table 4-1 Creation of IEZNcCommunication3 object Creation of IEZNcCommunication3 communication object Calling procedure CLSID clsid; IEZNcCommunication pComm; HRESULT hr = CLSIDFromProgID(L"EZSocketNc.EZNcCommunication",&clsid); *1 hr = CoCreateInstance( clsid, NULL, CLSCTX_INPROC_SERVER, IID_IEZNcCommunication3, (VOID**)&pComm); Return value S_OK is returned if the object is successfully created, and if not, another value is returned. Function Creates a communication object and returns its address in the parameter pComm. *1 Refer to *2 in "1.8.1 VC++ program flow (1)". Table 4-2 Creation of IEZNcPosition object Creation of IEZNcPosition parameter object Calling procedure IEZNcPosition pPos; HRESUTL hr = pComm->QueryInterface(IID_IEZNcPosition,(void**)&pPos); Return value S_OK is returned if the object is successfully created, and if not, another value is returned. Function Creates a parameter object and returns its address in the parameter pPos. 4.4 Include Files To use the product, include the following header files in the project as necessary. #include "EZSocketNc.h" ……… Header file for method definitions #include "EZSocketNcStr.h" ……… Header file for structure definitions (*) #include "EZSocketNcDef.h" ……… Header file for miscellaneous definitions #include "EZSocketNcErr.h" #include "EasysocketDef.h" ……… Header file for error definitions ……… Header file for miscellaneous definitions (*) (*) These are necessary when the product is used in the C70. 4-3 4.5 Overview of VB Programming of Automation Interface This section explains programming with Microsoft Visual Basic (hereinafter referred to as "VB"). The VC++ programs and VB programs can be written in a similar flow; therefore, VB can be used to create a prototype of your application and verify it at an early stage. VB's functions that assist programming also help make programming efficient. 4.5.1 Using OLE automation interface with VB (1) Setting references: Check (select) object libraries. This section describes a way to enable early binding by setting references. Setting references will enable VB's object browsing function. (Install the product prior to this procedure.) (2) Object browser: In your programming window, select the EZNcCommunication object. Object browser 4-4 (3) Method browser: In your programming window, select a method for the EZNcCom object and check its argument. Method browser (4) Module file: Sets definitions and error code references. Add a module file so that the definitions of the product and error codes can be used in the VB. Select "Project", "Add a standard module", and then "Existing file" to add EZNcDef.bas, EZNcErr.bas, and EZComErr.bas module files to the project. Definitions and error codes can now be referred to easily through VB's object browser function. 4-5 4.5.2 VB program flow (1) This section shows the flow of the program that uses early binding. Reference setting in the product is required. Private Sub Command1_Click() 'Create object. Dim EZNcCom As New DispEZNcCommunication 'Open communication. Dim lRet As Long lRet = EZNcCom.Open2(EZNC_SYS_MAGICBOARD64, 1, 1) If lRet <> 0 Then GoTo Error_Proc 'Processing lRet = EZNcCom.SetHead(1) If lRet <> 0 Then GoTo Error_Proc Dim CurPos(1 To 3) As Double For Axis = 1 To 3 lRet = EZNcCom.Position_GetCurrentPosition(Axis,CurPos(Axis)) If lRet <> 0 Then GoTo Error_Proc Next Axis X.Text = CurPos(1) Y.Text = CurPos(2) Z.Text = CurPos(3) 'Close. lRet = EZNcCom.Close If lRet <> 0 Then GoTo Error_Proc GoTo Last_Proc Error_Proc: MsgBox ("Error! Code = " + "&H" + CStr(Hex(lRet))) Last_Proc: 'Release object. Set EZNcCom = Nothing End Sub 4-6 4.5.3 VB program flow (2) This section shows the flow of the program that uses late binding. Reference setting in the product is not required. Note that the object browser function with VB cannot be used. Private Sub Command1_Click() 'Create object. Dim EZNcCom As Object Set EZNcCom = CreateObject("EZNcAut.DispEZNcCommunication","10.20.123.12") 'Open communication. Dim lRet As Long lRet = EZNcCom.Open2(EZNC_SYS_MAGICBOARD64, 1, 1) If lRet <> 0 Then GoTo Error_Proc 'Processing lRet = EZNcCom.SetHead(1) If lRet <> 0 Then GoTo Error_Proc Specify the connection destination's IP address or domain name. Dim CurPos(1 To 3) As Double For Axis = 1 To 3 lRet = EZNcCom.Position_GetCurrentPosition(Axis,CurPos(Axis)) If lRet <> 0 Then GoTo Error_Proc Next Axis X.Text = CurPos(1) Y.Text = CurPos(2) Z.Text = CurPos(3) 'Close. lRet = EZNcCom.Close If lRet <> 0 Then GoTo Error_Proc GoTo Last_Proc Error_Proc: MsgBox ("Error! Code = " + "&H" + CStr(Hex(lRet))) Last_Proc: 'Release object. Set EZNcCom = Nothing End Sub (Note) For the first argument setting of CreateObject(), refer to *2 in "1.8.1 VC++ program flow (1)". 4-7 5. APPLICATION INSTALLATION PROCEDURE 5.1 Overview To redistribute the application that uses the product and to run it on other computers, it is necessary to copy the user-developed software modules as well as files contained in the product to the computers, and set them properly in their system registry. This section provides the guideline and the procedure for these steps. There are two methods to redistribute the product. Choose one that suits your application environment. (1) Method to use the redistribution installer contained in the enclosed DVD-ROM. (2) Method to use your own installer created according to the redistribution procedure. < > The method (1) above is time saving in that the installer does not need to be created. It is still necessary to add a mechanism to execute the redistribution installer from your application's installer. For the method (2), the installer created according to the redistribution procedure can be directly and suitably embedded to your application's installer. This method is suitable especially when it is difficult to embed the redistribution installer in your application's installer. Please be aware that the product may be used by more than one application. When installing/uninstalling your application, please make sure to follow the instructions and procedures specified in this document, to avoid causing problems to the operation of other applications. < > The installation specifications of the product are different for different platforms. The table shows the differences in the specifications. Table 5-1 Installation specifications for different platforms x86 platform EZSocket (32-bit) Operating environment Specifications Destination of installation Recommended folder (Any folder may be specified.) %ProgramFiles%\EZSocket Actual destination of installation c:\Program Files ∟ \EZSocket * This applies when recommended values are specified. Destination registry HKEY_LOCAL_MACHINE ∟ SOFTWARE ∟ MITSUBISHI ∟ EZSocketNc (*1) For x64 platform, install the product in the recommended folder. 5-1 x64 platform EZSocket (32-bit) Recommended folder (*1) %ProgramFiles%\EZSocket c:\Program Files (x86) ∟ \EZSocket * This applies when recommended values are specified. HKEY_LOCAL_MACHINE ∟ SOFTWARE ∟ Wow6432Node ∟ MITSUBISHI ∟ EZSocketNc 5.2 Distribution Method with Redistribution Installer This section explains the redistribution method that uses the redistribution installer contained in the enclosed DVD-ROM. Distribution is easy with the redistribution installer because it has been created in compliance with "5.3 Terms of Redistribution". 5.2.1 Location where redistribution installer is stored The redistribution installer that can be embedded in your product is stored in the following folder on the enclosed DVD-ROM: EZSocketNc\RedistributableInstaller 5.2.2 Destination where redistribution installer is installed The product is installed in the location specified in the INI file described in the section 5.2.3. Any location may be specified. (Note that this applies only when the product is installed on the target computer for the first time. If the product already exists on the computer, it must be installed in the existing directory and the new installation overwrites the old one.) For x64 platform, install the product in the recommended folder, C:\Program Files (x86)\EZSocket. 5.2.3 Specifications for redistribution installer INI file This file is used for interaction between your product's installer and the redistribution installer. Section USER SETUP Key Name Company Target ERROR ERROR DETAIL DOINSTALL START END Description User name. Company name. Installation destination folder. The recommended folder is %ProgramFiles%\EZSocket. If this key is not specified, the product is installed in the recommended folder. Example) C:\Program Files\EZSocket Specify the full path of the folder. (Environment variables cannot be used.) Error flag 0: No error 1: Error occurred Error details 0: Other error 1: Insufficient capacity in installation destination * When ERROR=0, this key is not set. 1: Start installation 1: End installation 5-2 I/O IN OUT 5.2.4 Processing flow and specifications of redistribution installer This section explains the processing flow and specifications of the redistribution installer. Make sure to perform thorough operation check when embedding the redistribution installer in your product. No. 1 Processing flow Your product's installer is executed. Specifications Your product's installer should: Create an EZSNCSET.INI file in the folder that can be managed by your product's installer. The specifications of the EZSNCSET.INI file are as follows: [Specifications of EZSNCSET.INI] [USER] Name=user name (maximum 256 bytes) Company=user's company name (maximum 256 bytes) [SETUP] Target=path to installation destination [USER] section: Register the Name value under Name in Table 5-2. Register the Company value under Organization in Table 5-2. [SETUP] section: Register the Target value to InstallPath in Table 5-2. However, if InstallPath is already registered, prioritize it. The product is installed in (Target)\EZSocketNc. It is recommended that the following folder be specified as Target: x86 platform: Target=C:\Program Files\EZSocket x64 platform: Target=C:\Program Files (x86)\EZSocket [Example of EZSNCSET.INI] [USER] Name=Taro Mitsubishi Company=Mitsubishi Electric Corporation [SETUP] Target=C:\Program Files\EZSocket 2 Your product's installer redistribution installer. executes the Execute the redistribution installer's Setup.exe, which is stored on your product's media (for example, DVD-ROM), with the following command line: Setup.exe△full path to where EZSNCSET.INI is located where the symbol △ means a space. Example) Setup.exe C:\temp Place EZSNCSET.INI in the C:\temp folder. 5-3 No. 3 4 Processing flow Specifications The window that indicates that the The installation preparation window is displayed. redistribution installer is preparing is displayed. If the language of the operating system is other than Japanese, the display language is English. Make sure that your product's installer refers to Set the installation start flag in the EZSNCSET.INI. the START value of the [DOINSTALL] section of EZSNCSET.INI, and that the redistribution Specifications of [EZSNCSET.INI] [USER] installer has started. (*1) Name=user name (maximum 256 bytes) Company=user's company name (maximum 256 bytes) [SETUP] Target=EZSocket installation folder [DOINSTALL] START=1 [DOINSTALL] section: The redistribution installer sets the START value to 1 when the installation is started, and the END value to 1 when the installation is completed. 5 The "Installing...:" window is displayed. Perform the installation. If the language of the operating system is other than Japanese, the display language is English. 6 The "Registering registry" window is displayed. Register registry information required for this product according to the installation procedure. If the language of the operating system is other than Japanese, the display language is English. 7 When the registry registration is completed, the When the registry registration is completed, the window closes and the installation finishes. "Registering registry" window closes and the installation finishes. 5-4 8 Make sure that your product's installer refers to After the installer is finished, record results in the END value of the [DOINSTALL] section of EZSNCSET.INI. EZSNCSET.INI, and that the redistribution installer is completed. (*1) Specifications of [EZSNCSET.INI] Also, check the ERROR and DETAIL values in the [ERROR] section of EZSNCSET.INI, and perform post-installation processes. [USER] Name=user name (maximum 256 bytes) Company=user's company name (maximum 256 bytes) [SETUP] Target=Installation destination folder [DOINSTALL] START=1 END=1 If the redistribution installer is abnormally [ERROR] terminated, resolve the error status, and then Error=0 *0=completed successfully, execute the installer by following the procedure 1=terminated abnormally again. For common errors, refer to 5.2.5 Troubleshooting. [ERROR] section: The Error value is set to 0 when the installation is successfully completed, and set to 1 when it is abnormally terminated. When ERROR=1, set error details to the DETAIL key. 9 Your product's installer deletes EZSNCSET.INI. EZSNCSET.INI must be deleted at the end because it is a common file. (*1) Refer to "5. 2. 6 Precautions". 5-5 5.2.5 Troubleshooting This section explains how to handle errors that may occur in the installer. No . 1. Error case Action If EZSNCSET.INI is invalid, the window below is displayed. Click [OK] to close. If the language of the operating system is other than Japanese, the display language is English. [Possible cause] 1) User name or user company name cannot be obtained. 2) User name/user company name exceeds 256-byte limit. [Action] EZSNCSET.INI [ERROR] Error=1 2. Check the contents of EZSNCSET.INI, and set them correctly. Or, place EZSNCSET.INI in the specified folder. If the path to the installation destination is [Possible cause] incorrect, The read path to the installation destination is the window below is displayed. Click [OK] to incorrect. close. [Action] If the language of the operating system is other EZSNCSET.INI than Japanese, the display language is [ERROR] English. Error=1 The path specified in Target of EZSNCSET.INI is incorrect. Set the path correctly. 5-6 5.2.6 Precautions Starting of redistribution installer If your product's installer uses the LaunchAppAndWait() function to start the redistribution installer, it may give a return value before the installation of the product is completed. To avoid this, it is necessary to have your product's installer monitor the completion of the redistribution installer. For this monitoring, use the START and END values in the [DOINSTALL] section of EZSNCSET.INI. For the specifications of the INI file, refer to section 5. 2. 3. Your product's installer * Launch of installer LaunchAppAndWait() Setup.exe Waiting for start (Poll START=1) Set START=1 EZSNCSET.INI Ref [DOINSTALL] Set Installing... Set END=1 Waiting for end (Poll END-1) End Check results (Check ERROR) To next process * The installer cannot set the START value in the [DOINSTALL] section if the cancel button is pressed on the InstallShield initial screen. Make sure to set time-outs for waiting for start. 5-7 5.3 Terms of Redistribution This section describes the terms of redistribution of the product. 5.3.1 Redistributable modules Modules that can be redistributed are as follows: Redistributable files contained in the product Upon installation of the product on your development machine, these files are installed on the hard disk of the machine. To make sure that the files of the correct version are distributed when redistributing the product, copy the product from the installation DVD-ROM, not from the hard disk, and then embed it in a disk for distribution. 5.3.2 Redistributable files The following files that are stored on the installation DVD-ROM are redistributable. Make sure to redistribute both the custom and automation interfaces. The following files need to be same version; otherwise, an error may occur. \Lib\EZSocketNc.dll: DLL for custom interface \Lib\EZNcAutxxx.dll: DLL for automation interface (where xxx in the file name represents a version-specific number.) \Lib\CommServer: \Lib\Parameter: \Lib\Ini\melcfg.ini: Related folder Related folder Initialization file 5-8 5.4 Installation Procedure 5.4.1 Version upgrade of redistributable files The redistributable files with the same name but with different versions (older or newer) may be distributed by different applications. In such cases, make sure that the newer version overwrites the older version, not the other way around. Normally the setup program performs version check. If the application does not have a setup program, the user needs to manually check the version before embedding the redistribution program. (Note 1) If the initialization file melcfg.ini already exists on the personal computer, do not overwrite it however old it may be. (Note 2) The DLL file name of the automation interface is different for different versions. Do not delete the automation interface file that has already been installed. It will cause the application compatible with the automation interface that has already been installed to fail-to start. 5.4.2 x86 platform 5.4.2.1 Installation directory for files When installing the product for the first time, it can be installed in any directory. For the second or later installation, it must be installed in the directory where the product already exists so that more than one product does not exists on the same computer. To meet this requirement, follow the procedure below. (1) Determine if it is the first-time installation or not Check if the following registry key exists and the correct path to the installation directory is registered as its data. Registry key: HKEY_LOCAL_MACHINE\SOFTWARE\MITSUBISHI\EZSocketNc\CurrentVersion\InstallPath Data (Example): C:\Program Files\EZSocket\EZSocketNc If the correct path name is registered as registry key data, the product is considered to have been installed once or more, and if not, for instance, the registry key does not exist, or the path name is not registered, the product is considered to have never been installed for the first time. Do not add "\" to the end of the path, or related files cannot be read. (2) Installing for the first time Have the user specify the installation directory through a dialog or other appropriate method. Register the directory in the registry as installation directory. Other registry settings also need to be configured at this time. For details about registry settings, refer to "5.4.2.3 Registry settings". (3) Installing from the second time onward Install the product in the installation directory that is registered to the registry. If the installation directory does not exist, create one. When copying files, make sure not to overwrite the new version with the old version. 5-9 5.4.2.2 Configuration of installation directory The configuration of the installation directory is shown below: Copy all files stored on the installation DVD-ROM to the directory as follows: Installation directory Path to the installation files in the installation DVD-ROM Any desired directory EZSocket EZSocketNc CommServer \Lib\EZSocketNc.dll, EZNcAutxxx.dll and other files in the directory Under \Lib\CommServer M700 M800 C70 Parameter M700 Under \Lib\Parameter Parameter file for the M700 M800 C70 Parameter file for the M800 Parameter file for the C70 Windows folder melcfg.ini App WindowsOS folder \Lib\Ini\melcfg.ini Application files (for example) 5-10 5.4.2.3 Registry settings Registries required for the product to run are listed below: When installing the product, create the registry structure as shown, and register data accordingly. Table 5-2 List of registries Key Name Type Data Description Character string "EZSocketNc" Organization Character string User-specified company name Name Character string User-specified user name Remarks HKEY_LOCAL_MACHINE SOFTWARE MITSUBISHI EZSocketNc CurrentVersion MajorVersion Custom value MinorVersion Character string InstallPath (Note 1) Character string FileVersion (Note 2) EZSocketNcName Automation DWORD FileVersion (Note 2) EZSocketNcName Character string Character string Character string Character string Fixed data. Register the company name specified by the user at the time of installation. Register the user name specified by the user at the time of installation. Version Version "User-specified directory \EZSocketNc" Register the path specified by the user at the time of installation. Date of EZSocketNc.dll file YYYY-MM-DD format. “EZSocketNc.dll” Fixed data. Date of EZNcAut.dll file YYYY-MM-DD format. “EZNcAutxxx.dll” xxx are numeric characters. (Note 1) The data to be registered to "InstallPath" must be "drive: directory specified by the user at the time of package installation + \EZSocketNc". (Note 2) After copying installation files to the HD, get the time stamp of the specified file, and register this data as "FileVersion". 5.4.2.4 System environment variable settings The system environment variable required for the product to run is shown below. When installing the product, register it as an additional system environment variable. The default value is shown in the list below. If the file is not in the specified path, change the path. Table 5-3 List of system environment variable Model System environment variable (default value) M700/M800 PATH=installation path of the product (Example: C:\EZSocket\EZSocketNc) 5-11 5.4.2.5 COM information registry settings For EZSocketNc.dll and EZNcAutxxx.dll stored in the installation directory, COM information must be registered to the registry. To register the information, use the redistributable REGSVR32.EXE command, which is shipped with Microsoft Visual C++, at the time of installation. The information is registered as follows: REGSVR32 /s installation directory\EZSocketNc.dll REGSVR32 /s installation directory\EZNcAutxxx.dll 5.4.2.6 Precautions for uninstallation The product may be used by more than one application. If that is the case, and if the product is deleted by uninstalling one of the applications that are installed, the operation of the remaining applications will be affected. To avoid this, do not delete the files and the registry of the product by uninstalling the application in which the product is embedded. 5-12 5.4.3 x64 platform 5.4.3.1 Installation directory for files Install the files to %ProgramFiles%\EZSocket. Register the installation destination directory to the registry as installation directory. Other registry settings also need to be configured at this time. When copying files, make sure not to overwrite the new version with the old version. Registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\MITSUBISHI\EZSocketNc\CurrentVersion\InstallPath Data (example): C:\Program Files (x86)\EZSocket\EZSocketNc\ 5.4.3.2 Configuration of Installation directory The configuration of the installation directory is shown below: Copy all files stored on the installation DVD-ROM to the directory as follows: Installation directory Path to the installation files in the installation DVD-ROM %ProgramFiles% EZSocket EZSocketNc CommServer \Lib\EZSocketNc.dll, EZNcAutxxx.dll and other files in the directory Under \Lib\CommServer M700 M800 C70 Parameter M700 Under \Lib\Parameter Parameter file for the M700 M800 C70 Parameter file for the M800 Parameter file for the C70 Windows folder melcfg.ini App WindowsOS folder \Lib\Ini\melcfg.ini Application files (for example) 5-13 5.4.3.3 Registry settings Registries required for the product to run are listed below: When installing the product, create the registry structure as shown, and register data accordingly. Table 5-4 List of registries Key Name Type Data Description Character string "EZSocketNc" Organization Character string User-specified company name Name Character string User-specified user name Remarks HKEY_LOCAL_MACHINE SOFTWARE Wow6432Node MITSUBISHI EZSocketNc CurrentVersion MajorVersion Custom value Version MinorVersion Character string Version InstallPath (Note 1) Character string "%ProgramFiles%directory\EZSock et\EZSocketNc" Register the path specified by the user at the time of installation. Date of EZSocketNc.dll file YYYY-MM-DD format. “EZSocketNc.dll” Fixed data. Date of EZNcAut.dll file YYYY-MM-DD format. “EZNcAutxxx.dll” xxx are characters. FileVersion (Note 2) EZSocketNcName Automation DWORD Fixed data. Register the company name specified by the user at the time of installation. Register the user name specified by the user at the time of installation. FileVersion (Note 2) EZSocketNcName Character string Character string Character string Character string numeric (Note 1) The data to be registered to "InstallPath" must be "%ProgramFiles%\EZSocket\EZSocketNc". (Note 2) After copying installation files to the HD, get the time stamp of the specified file, and register this data as "FileVersion". 5.4.3.4 System environment variable settings The system environment variable required for the product to run is shown below. When installing the product, register it as an additional system environment variable. The default value is shown in the list below. If the file is not in the specified path, change the path. Table 5-5 List of system environment variable Model System environment variable (default value) M700/M800 PATH=installation path of the product (Example: C:\Program Files (x86)\EZSocket\EZSocketNc) 5-14 5.4.3.5 COM information registry settings For EZSocketNc.dll and EZNcAutxxx.dll stored in the installation directory, COM information must be registered to the registry. To register the information, use the redistributable REGSVR32.EXE command, which is shipped with Microsoft Visual C++, at the time of installation. The information is registered as follows: REGSVR32 /s installation directory\EZSocketNc.dll REGSVR32 /s installation directory\EZNcAutxxx.dll 5.4.3.6 Precautions for uninstallation The product may be used by more than one application. If that is the case, and if the product is deleted by uninstalling one of the applications that are installed, the operation of the remaining applications will be affected. To avoid this, do not delete the files and the registry of the product by uninstalling the application in which the product is embedded. 5-15 6. SAMPLE APPLICATION 6.1 Overview of the Sample Application The sample application that uses this product is provided with compilable project files for Visual C++ Version 6.0 and Visual Basic Version 6.0. The macro sample program using the OLE interface macros that allow custom interfaces to be called easily is also provided. The OLE interface macros are provided as samples. The sample application includes the following: Position data display application: \samples\Vc\Position\Position.dsw Monitoring application: \samples\Vb\EZNcAutSample\EZNcAutSample.vbp Macro sample program: \samples\Vc\Macros\MacSmp\MacSmp.dsw 6.2 Position Data Display Application This section explains the sample application for Visual C++ Version 6.0 using this product. 6.2.1 Operating requirements The sample application operates in the following system configuration: Operating Windows 2000, Windows XP systems Compiler Microsoft Visual C++ Version 6.0 Controller Mitsubishi CNC C70, Mitsubishi CNC M700/M700V/M70/M70V, M800/M80 H/W Personal computer on which the operating systems, compiler, and controllers above can be operated 6.2.2 Installation and uninstallation This section explains installation and uninstallation of the sample application. For installation of operating systems and VC++ other than the product as well as operations of hardware, refer to the respective instruction manuals. (1) Installation The sample application is created in the samples folder when this product is installed. The sample application has the subfolders with respective project names and each contains its source code and execution file. The sample application includes the Visual C++ 6.0 project workspace files. Opening the corresponding project workspace file enables Visual C++ to open the project. (2) Uninstallation To uninstall the sample application, delete the subfolder with the project name or delete the samples folder. 6-1 6.2.3 Executing the sample application This section explains execution of the sample application. The execution file is stored under the Debug folder or the Release folder in the sample application folder. To open the position data display application, execute Position.exe. For instructions for using the position data display application, refer to the following sections. Note that this sample application is a monitor application for the Mitsubishi CNC. Operations such as operation search and cycle start are required for the computerized numerical controller. For details on the operation methods, refer to the instruction manuals. 6.2.4 Function list This section explains the functions of the sample application. The position data display application monitors specified position data and displays values obtained as counters. Table 6-1 Position data display application function list [File] [Exit application] Ends the position data display application. [Edit] [Position data] Edits the position data type to be displayed. Current position Workpiece coordinate position Machine position Command remaining distance [Display] [Refresh cycle] Edits the refresh cycle for the display. [Communica [Communication selection] Selects a communication target. tion] CNC C70 CNC M700M (*1) CNC M700L (*2) CNC M800M(*3) CNC M800L(*4) [Execution] Starts/Stops communication. [Help] [Version information] Displays version information of the position data display application. (*1) A communication target is the Mitsubishi CNC machining center system M700/M700V/M70/M70V. (*2) A communication target is the Mitsubishi CNC lathe system M700/M700V/M70/M70V. (*3) A communication target is the Mitsubishi CNC machining center system M800/M80. (*4) A communication target is the Mitsubishi CNC lathe system M800/M80 6-2 6.2.5 Screen structure and functions This section describes the screen structure for the position data display application and the functions for each menu item. (1) Basic screen structure The basic screen is shown below: 1) Title bar (displays the application title) 2) Menu 3) Docking toolbar (Display/hide is selectable and a c b d the file function is not available in the sample.) 4) Communication target display area Area for the connected machine name 5) Screen display area a. Displays the current position b. Displays the workpiece position c. Displays the machine position d. Displays the command remaining distance 6) Status line (Display/hide is selectable.) (2) File function In the position data display application, the available file function is the exit of the application only. There is no file selection function. 6-3 (3) Edit function a. Position data function dialog Selects the position data types to be displayed. 1) Title bar 2) Cancel button 3) OK button 4) Cancel button 5) Check box to display the current position 6) Check box to display the workpiece coordinate position 7) Check box to display the machine position 8) Check box to display the command remaining distance 1) to 4): Explanation omitted. The following explanation is also omitted. 5) Check box to display the current position: Selects whether to display or hide the relative position to the position at a completion of the dog type zero point return or to the preset position configured by G92/origin set/counter set. 6) Check box to display the workpiece coordinate position: Selects whether to display or hide the coordinate position in the current workpiece coordinate system. 7) Check box to display the machine position: Selects whether to display or hide the coordinate position for each axis in the basic machine coordinate system. 8) Check box to display the command remaining distance: Selects whether to display or hide the remaining distance for the travel command being executed. (4) Display function Refresh cycle function dialog Sets the refresh cycle for the screen display. 1) Edit box to specify the refresh cycle 1) Edit box to specify the refresh cycle: Specifies the refresh cycle for the position data displayed on the screen. The range is from 200 to 10000 (ms). 6-4 (5) Communication function Communication selection function dialog Selects a communication target. 1) Combo box for the remotely connected machine 2) Combo box for communication target selection (*1) 1) Combo box for the remotely connected machine: Sets the machine name of a personal computer equipped with the NC. Allows the domain name and IP address to be specified. 2) Combo box for the communication target selection: Sets an NC control module communication target. Selection range is as follows: MELDASMAGIC64, MELDAS6x5M, MELDAS6x5L, MELDASC6/C64, CNC C70, CNC M700M, CNC M700L, CNC M800M, CNC M800L. (6) Execution function Connects/disconnects the selected communication target. If connection fails, an error message is output and the message box appears. (7) Version display "Help - Version display" displays the dialog box for version information of the position data display application. 6-5 6.2.6 Setting project workspaces This section explains how to set the project workspace used for creating the position data display application. The application project configuration is as follows. Table 6-2 Project configuration Setting item Application type Database support Automation support OLE compound document support Functions to be embedded into the application Setting value SDI (Single Document Interface). Not supported. Supported. Not supported. Docking toolbar. Initial status bar. 3D control. MAPI support Not supported. Windows Sockets support Not supported. Number of the latest files to be 4 files. (The default value is applied to the advanced settings.) displayed. 6.2.7 IEZNcCommunication object The IEZNcCommunication3 object is used for connection to the communication circuit. This sample application uses the following methods: Open2() .…… Open line method Close() ……… Line disconnect method SetHead()………………… System specification method 6.2.8 IEZNcPosition object The IEZNcPosition object executes position information acquisition for the opened NC control module. This sample application uses the following methods: GetWorkPosition()……… Workpiece coordinate position acquisition method GetMachinePosition()… Machine position acquisition method GetCurrentPosition()… Current position acquisition method GetDistance()…………… Command remaining distance acquisition method 6-6 6.3 Monitoring Application This section explains the sample application for Visual Basic Version 6.0 using this product. 6.3.1 Operating requirements The sample application operates in the following system configuration: Operating Windows 2000, Windows XP systems Compiler Microsoft Visual Basic Version 6.0 Controller Mitsubishi CNC C70, Mitsubishi CNC M700/M700V/M70/M70V, M800/M80 H/W Personal computer on which the operating systems, compiler, and controllers above can be operated 6.3.2 Installation and uninstallation This section explains installation and uninstallation of the sample application. For installation of operating systems and VB other than the product as well as operations of hardware, refer to the respective instruction manual. (1) Installation The sample application is created in the samples folder when this product is installed. The sample application has the subfolders with respective project names and each contains its source code and execution file. The sample application includes the Visual Basic 6.0 project workspace files. Opening the corresponding project workspace file enables Visual Basic to open the project. (2) Uninstallation To uninstall the sample application, delete the subfolder with the project name or delete the samples folder. 6.3.3 Executing the sample application This section explains execution of the sample application. The execution file is stored under the sample application folder. To open the monitoring application, execute EZNcAutSample.exe. For instruction for using the monitoring application, refer to the following sections. Note that this sample application is a monitor application for the computerized numerical controller. Operations such as operation search and cycle start are required for the computerized numerical controller. For details on the operation methods, refer to the instruction manuals. 6-7 6.3.4 Function list This section explains the functions of the sample application. The monitoring application monitors the currently-running NC program and the current position, and displays the obtained values as counters. Table 6-3 Monitoring application function list Function item Overview NC control module Sets NC control module communication parameters and communication start/stop starts/stops communication. Sets the NC control module number. Sets communication time-out value. Executes communication. Displays the NC system version. Position display Reads the position data. Displays the current coordinate position. Displays the workpiece coordinate position. Displays the machine coordinate position. Alarm display Displays the current alarm. Program display Displays the currently-running program and the ongoing line position. Displays the currently-running program list Displays the running block position and sequence number. Error display Displays the API error codes for this product. 6-8 6.3.5 Screen structure and functions This section describes the screen structure for the position data display application and the functions for each menu item. (1) Basic screen structure The basic screen is shown below: 5) Radio button to start/stop 1) Edit box for the connected machine name 3) Edit box for the NC control module number 4) Edit box for the communication time-out value 2) Button for connection/disconnection 6) Execution button to start/stop communication 1) Edit box for the connected machine name Sets the machine name of a personal computer equipped with the NC. Allows the domain name and IP address to be specified. 2) Button for connection/disconnection Connects/disconnects a specified machine. 3) Edit box for the NC control module number Sets the NC control module number. The NC control module number is determined when setting up the NC control module. 4) Edit box for the communication time-out value Sets the communication time-out value for the NC control module. 5) Radio button to start/stop communication Sets to start or stop communication with the NC control module. 6) Execution button to start/stop communication Executes a communication start or stop after setting 1) to 3). 6-9 6.3.6 Setting project workspaces This section explains how to set the project workspace used for creating the position data display application. The application project configuration is as follows. This project uses late binding to call methods of this product. Table 6-4 Project configuration Setting item Setting value Application type Standard EXE Addition of the standard module Select EZNcDef.bas or EZNcErr.bas from [Add standard module] in [Project]. 6-10 7. CONSOLE PROGRAM SAMPLE 7.1 Console Program to Connect Mitsubishi CNC C70 (via Ethernet) // // Simple sample program for the console application // // Copyright(C) 2008 MITSUBISHI ELECTRIC CORPORATION #include "stdafx.h" #include "stdio.h" #include // EZSocket header file #include "EZSocketNc.h" #include "EZSocketNcStr.h" #include "EZSocketNcDef.h" #include "EasysocketDef.h" int main(int argc, char* argv[]) { HRESULT LONG EZNCST_OPEN LPOLESTR HANDLE BYTE* const DWORD DWORD DWORD hr = S_OK; lRet = 0; stOpen; lpwszBuffer = NULL; hSampleFile = NULL; pbData = NULL; dwLength = 256; dwNumRead = 0; dwWrittenSize = 0; memset(&stOpen, 0x00, sizeof(stOpen)); // COM initialization hr = CoInitialize(NULL); if( S_OK != hr ){ wprintf(L"Failed in CoInitialize!\n"); return 0; } setlocale( LC_ALL, "Japanese" ); IEZNcCommunication3 *pIEZNcCom = NULL; IEZNcFile6 *pIEZNcFile = NULL; // Communication object // File object // // EZNcCommunication object creation // For the first argument of CLSIDFromProgID(), refer to *2 in "1.8.1 VC++ program flow (1)". CLSID clsid; CLSIDFromProgID( L"EZSocketNc.EZNcCommunication", &clsid ); hr = CoCreateInstance(clsid, NULL, CLSCTX_INPROC_SERVER, IID_IEZNcCommunication3, (void **)&pIEZNcCom); if( S_OK != hr ) { wprintf(L"EZSocket is not installed!\n"); goto END; } // // EZNcFile object creation // if(pIEZNcCom->QueryInterface(IID_IEZNcFile6, (void**)&pIEZNcFile) != S_OK){ wprintf(L"EZSocket is not installed!\n"); goto END; } // // Open parameter setting // stOpen.lNetworkNumber = 0x01; 7-1 stOpen.lStationNumber = 0x01; stOpen.lUnitNumber stOpen.lConnectUnitNumber stOpen.lIONumber stOpen.lCpuType stOpen.lUnitType stOpen.lPacketType stOpen.lProtocolType stOpen.lPortNumber stOpen.lBaudRate stOpen.lDataBits stOpen.lParity stOpen.lStopBits stOpen.lControl = 0x00; stOpen.lpcwszHostAddress stOpen.lCpuTimeOut stOpen.lTimeOut stOpen.lSumCheck stOpen.lSourceNetworkNumber = 0x01; stOpen.lSourceStationNumber stOpen.lDestinationPortNumber = 5001; stOpen.lDestinationIONumber stOpen.lConnectChannelNumber = 0x00; stOpen.lMultiDropChannelNumber stOpen.lThroughNetworkType stOpen.lIntelligentPreferenceBit = 0x00; stOpen.lDidPropertyBit = 0x01; stOpen.lDsidPropertyBit = 0x01; = 0x00; = 0x00; = 0x3E1; = CPU_Q17NNCCPU; = UNIT_QJ71E71; = PACKET_PLC1; = PROTOCOL_UDPIP; = 0x00; = 0x00; = 0x00; = 0x00; = 0x00; = L"10.20.123.12"; = 0x00; = 1000; = FALSE; = 0x04; = 0x00; = 0x00; = 0x00; hr = pIEZNcCom->SetMelsecProtocol(&stOpen, &lRet); if( S_OK != hr ){ wprintf(L"Can't SetMelsecProtocol! Error Code = 0x%x\n",lRet); goto END; } // IEZNcCommunication3 open hr = pIEZNcCom->Open2(EZNC_SYS_MELDASC70, 1, 20, &lRet); if( S_OK != hr ){ wprintf(L"Can't Open2! Error Code = 0x%x\n",lRet); goto END; } // // File search // hr = pIEZNcFile->FindDir2(L"M01:\\PRG\\USER\\", 0x00, &lpwszBuffer, &lRet); if( S_OK != hr ){ wprintf(L"Can't FindDir! Error Code = 0x%x\n",lRet); goto END; } while(lRet >= 1){ if(wcscmp(lpwszBuffer, L"10.PRG") == 0){ break; } CoTaskMemFree(lpwszBuffer); lpwszBuffer = NULL; hr = pIEZNcFile->FindNextDir2(&lpwszBuffer, &lRet); if( S_OK != hr ){ wprintf(L"Can't FindNextDir! Error Code = 0x%x\n",lRet); goto END; } } if(lRet == 0){ wprintf(L"File is not found.\n"); pIEZNcFile->ResetDir(&lRet); goto END; } hr = pIEZNcFile->ResetDir(&lRet); if( S_OK != hr ){ wprintf(L"Can't ResetDir! Error Code = 0x%x\n",lRet); goto END; } // 7-2 // File read // hr = pIEZNcFile->OpenFile3(L"M01:\\PRG\\USER\\10.PRG", EZNC_FILE_READ, &lRet); if( S_OK != hr ){ wprintf(L"Can't OpenFile3! Error Code = 0x%x\n",lRet); goto END; } hSampleFile = ::CreateFile("C:\\SAMPLE.PRG", GENERIC_WRITE, FILE_SHARE_READ, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); if(hSampleFile == INVALID_HANDLE_VALUE ){ wprintf(L"Can't create file.\n"); goto END; } do{ hr = pIEZNcFile->ReadFile2(dwLength, &pbData, &dwNumRead, &lRet); if( S_OK != hr ){ wprintf(L"Can't ReadFile2! Error Code = 0x%x\n",lRet); pIEZNcFile->AbortFile2(&lRet); ::CloseHandle(hSampleFile); goto END; } if(dwNumRead != 0){ ::WriteFile(hSampleFile, (LPCVOID)pbData, dwNumRead, &dwWrittenSize, NULL); CoTaskMemFree(pbData); pbData = NULL; } }while(dwLength == dwNumRead); ::CloseHandle(hSampleFile); END: hr = pIEZNcFile->CloseFile2(&lRet); if( S_OK != hr ){ wprintf(L"Can't CloseFile2! Error Code = 0x%x\n",lRet); goto END; } if(lpwszBuffer != NULL){ CoTaskMemFree(lpwszBuffer); lpwszBuffer = NULL; } if(pbData != NULL){ CoTaskMemFree(pbData); pbData = NULL; } // IEZNcCommunication3 close if(pIEZNcCom != NULL){ pIEZNcCom->Close(&lRet); } // Object release if(pIEZNcFile != NULL){ pIEZNcFile->Release(); pIEZNcFile = NULL; } if(pIEZNcCom != NULL){ pIEZNcCom->Release(); pIEZNcCom = NULL; } // COM library release CoUninitialize(); return 0; } 7-3 Revision History Date of revision Dec.2013 Manual No. IB-1501209-A Jan. 2014 IB-1501209-B First edition created. Revision details 1. Changed the compatible NC models Changed the compatible NC models to be M700 and C70 Corrected the description so that only the compatible models are given in each item. 2. 3. Added the descriptions and corrections on C70 Added the compatible methods Added the description and caution on I/F in accordance with the added methods Added a C70 sample program Added the description on the compatibility with 64bit OS Added the description and caution on x64 platform 4. Corrected the method versions Before correction After correction IEZNcFile5 IEZNcFile6 FindDir FindDir2 FindNextDir IEZNcATC2 FindNextDir2 IEZNcATC3 GetMNGReady IEZNcParameter2 GetMNGReady2 IEZNcParameter3 GetParameter GetParameter2 SetParameter IEZNcSubFunciton SetParameter2 IEZNcSubFunciton2 ChangeInit ChangeInit2 Applied these version changes also to the other parts of this manual. 5. 6. Error codes Added the related error codes to the I/F description Revised the list of error codes Others Corrected errors, modified the layout, etc. Jul. 2014 IB-1501209-C 1. 2. Corrected the method versions Before correction After correction IEZNcParameter3 IEZNcParameter3 GetParameter2 GetParameter3 SetParameter2 SetParameter3 Others Corrected errors. Sept. 2015 IB-1501208-D 1. Added information related to M800 series 2. Added and corrected information for M700 series and C70 series 3. Others Corrected errors, modified the layout, etc. Global Service Network AMERICA MITSUBISHI ELECTRIC AUTOMATION INC. (AMERICA FA CENTER) Central Region Service Center 500 CORPORATE WOODS PARKWAY, VERNON HILLS, ILLINOIS 60061, U.S.A. TEL: +1-847-478-2500 / FAX: +1-847-478-2650 Michigan Service Satellite ALLEGAN, MICHIGAN 49010, U.S.A. TEL: +1-847-478-2500 / FAX: +1-847-478-2650 Ohio Service Satellite LIMA, OHIO 45801, U.S.A. TEL: +1-847-478-2500 / FAX: +1-847-478-2650 CINCINATTI, OHIO 45201, U.S.A. TEL: +1-847-478-2500 / FAX: +1-847-478-2650 Minnesota Service Satellite ROGERS, MINNESOTA 55374, U.S.A. TEL: +1-847-478-2500 / FAX: +1-847-478-2650 West Region Service Center 16900 VALLEY VIEW AVE., LAMIRADA, CALIFORNIA 90638, U.S.A. TEL: +1-714-699-2625 / FAX: +1-847-478-2650 Northern CA Satellite SARATOGA, CALIFORNIA 95070, U.S.A. TEL: +1-714-699-2625 / FAX: +1-847-478-2650 Pennsylvania Service Satellite PITTSBURG, PENNSYLVANIA 15644, U.S.A. TEL: +1-732-560-4500 / FAX: +1-732-560-4531 Connecticut Service Satellite TORRINGTON, CONNECTICUT 06790, U.S.A. TEL: +1-732-560-4500 / FAX: +1-732-560-4531 South Region Service Center 1845 SATTELITE BOULEVARD STE. 450, DULUTH, GEORGIA 30097, U.S.A. TEL +1-678-258-4529 / FAX +1-678-258-4519 Texas Service Satellites GRAPEVINE, TEXAS 76051, U.S.A. TEL: +1-678-258-4529 / FAX: +1-678-258-4519 HOUSTON, TEXAS 77001, U.S.A. TEL: +1-678-258-4529 / FAX: +1-678-258-4519 Tennessee Service Satellite Nashville, Tennessee, 37201, U.S.A. TEL: +1-678-258-4529 / FAX: +1-678-258-4519 Florida Service Satellite WEST MELBOURNE, FLORIDA 32904, U.S.A. TEL: +1-678-258-4529 / FAX: +1-678-258-4519 EUROPE MITSUBISHI ELECTRIC EUROPE B.V. GOTHAER STRASSE 10, 40880 RATINGEN, GERMANY TEL: +49-2102-486-0 / FAX: +49-2102-486-5910 Germany Service Center KURZE STRASSE. 40, 70794 FILDERSTADT-BONLANDEN, GERMANY TEL: + 49-711-770598-123 / FAX: +49-711-770598-141 France Service Center DEPARTEMENT CONTROLE NUMERIQUE 25, BOULEVARD DES BOUVETS, 92741 NANTERRE CEDEX FRANCE TEL: +33-1-41-02-83-13 / FAX: +33-1-49-01-07-25 France (Lyon) Service Satellite DEPARTEMENT CONTROLE NUMERIQUE 120, ALLEE JACQUES MONOD 69800 SAINT PRIEST FRANCE TEL: +33-1-41-02-83-13 / FAX: +33-1-49-01-07-25 Italy Service Center VIALE COLLEONI, 7 - CENTRO DIREZIONALE COLLEONI PALAZZO SIRIO INGRESSO 1 20864 AGRATE BRIANZA (MB), ITALY TEL: +39-039-6053-342 / FAX: +39-039-6053-206 Italy (Padova) Service Satellite VIA G. SAVELLI, 24 - 35129 PADOVA, ITALY TEL: +39-039-6053-342 / FAX: +39-039-6053-206 U.K. Branch TRAVELLERS LANE, HATFIELD, HERTFORDSHIRE, AL10 8XB, U.K. TEL: +49-2102-486-0 / FAX: +49-2102-486-5910 Spain Service Center CTRA. DE RUBI, 76-80-APDO. 420 08173 SAINT CUGAT DEL VALLES, BARCELONA SPAIN TEL: +34-935-65-2236 / FAX: +34-935-89-1579 Poland Service Center UL.KRAKOWSKA 50, 32-083 BALICE, POLAND TEL: +48-12-630-4700 / FAX: +48-12-630-4701 Mitsubishi Electric Turkey A.Ş Ümraniye Şubesi Turkey Service Center ŞERIFALI MAH. NUTUK SOK. NO.5 34775 ÜMRANIYE, ISTANBUL, TURKEY TEL: +90-216-526-3990 / FAX: +90-216-526-3995 Czech Republic Service Center KAFKOVA 1853/3, 702 00 OSTRAVA 2, CZECH REPUBLIC TEL: +420-59-5691-185 / FAX: +420-59-5691-199 Russia Service Center 213, B.NOVODMITROVSKAYA STR., 14/2, 127015 MOSCOW, RUSSIA TEL: +7-495-748-0191 / FAX: +7-495-748-0192 Canada Region Service Center 4299 14TH AVENUE MARKHAM, ONTARIO L3R OJ2, CANADA TEL: +1-905-475-7728 / FAX: +1-905-475-7935 MITSUBISHI ELECTRIC EUROPE B.V. (SCANDINAVIA) Sweden Service Center HAMMARBACKEN 14 191 49 SOLLENTUNA, SWEDEN TEL: +46-8-6251000 / FAX: +46-8-966877 Canada Service Satellite EDMONTON, ALBERTA T5A 0A1, CANADA TEL: +1-905-475-7728 FAX: +1-905-475-7935 Bulgaria Service Center 4 A.LYAPCHEV BOUL., POB 21, BG-1756 SOFIA, BULGARIA TEL: +359-2-8176009 / FAX: +359-2-9744061 Mexico Region Service Center MARIANO ESCOBEDO 69 TLALNEPANTLA, 54030 EDO. DE MEXICO TEL: +52-55-3067-7500 / FAX: +52-55-9171-7649 Ukraine (Kharkov) Service Center APTEKARSKIY LANE 9-A, OFFICE 3, 61001 KHARKOV, UKRAINE TEL: +380-57-732-7774 / FAX: +380-57-731-8721 Monterrey Service Satellite MONTERREY, N.L., 64720, MEXICO TEL: +52-81-8365-4171 Ukraine (Kiev) Service Center 4-B, M. RASKOVOYI STR., 02660 KIEV, UKRAINE TEL: +380-44-494-3355 / FAX: +380-44-494-3366 BRAZIL Belarus Service Center OFFICE 9, NEZAVISIMOSTI PR.177, 220125 MINSK, BELARUS TEL: +375-17-393-1177 / FAX: +375-17-393-0081 MELCO CNC do Brasil Comércio e Serviços S.A Brazil Region Service Center ACESSO JOSE SARTORELLI, KM 2.1 CEP 18550-000, BOITUVA-SP, BRAZIL TEL: +55-15-3363-9900 / FAX: +55-15-3363-9911 South Africa Service Center 5 ALBATROSS STREET, RHODESFIELD, KEMPTON PARK 1619, GAUTENG, SOUTH AFRICA TEL: +27-11-394-8512 / FAX: +27-11-394-8513 ASEAN CHINA MITSUBISHI ELECTRIC ASIA PTE. LTD. (ASEAN FA CENTER) MITSUBISHI ELECTRIC AUTOMATION (CHINA) LTD. (CHINA FA CENTER) Singapore Service Center 307 ALEXANDRA ROAD #05-01/02 MITSUBISHI ELECTRIC BUILDING SINGAPORE 159943 TEL: +65-6473-2308 / FAX: +65-6476-7439 China (Shanghai) Service Center 1-3,5-10,18-23/F, NO.1386 HONG QIAO ROAD, CHANG NING QU, SHANGHAI 200336, CHINA TEL: +86-21-2322-3030 / FAX: +86-21-2308-3000 China (Ningbo) Service Dealer China (Wuxi) Service Dealer China (Jinan) Service Dealer China (Hangzhou) Service Dealer China (Wuhan) Service Satellite Malaysia (KL) Service Center 60, JALAN USJ 10 /1B 47620 UEP SUBANG JAYA SELANGOR DARUL EHSAN, MALAYSIA TEL: +60-3-5631-7605 / FAX: +60-3-5631-7636 Malaysia (Johor Baru) Service Center 17 & 17A, JALAN IMPIAN EMAS 5/5, TAMAN IMPIAN EMAS, 81300 SKUDAI, JOHOR MALAYSIA. TEL: +60-7-557-8218 / FAX: +60-7-557-3404 Philippines Service Center UNIT NO.411, ALABAMG CORPORATE CENTER KM 25. WEST SERVICE ROAD SOUTH SUPERHIGHWAY, ALABAMG MUNTINLUPA METRO MANILA, PHILIPPINES 1771 TEL: +63-2-807-2416 / FAX: +63-2-807-2417 VIETNAM MITSUBISHI ELECTRIC VIETNAM CO.,LTD Vietnam (Ho Chi Minh) Service Center UNIT 01-04, 10TH FLOOR, VINCOM CENTER 72 LE THANH TON STREET, DISTRICT 1, HO CHI MINH CITY, VIETNAM TEL: +84-8-3910 5945 / FAX: +84-8-3910 5946 Vietnam (Hanoi) Service Satellite 6th Floor, Detech Tower, 8 Ton That Thuyet Street, My Dinh 2 Ward, Nam Tu Liem District, Hanoi,Vietnam TEL: +84-4-3937-8075 / FAX: +84-4-3937-8076 INDONESIA China (Beijing) Service Center 9/F, OFFICE TOWER 1, HENDERSON CENTER, 18 JIANGUOMENNEI DAJIE, DONGCHENG DISTRICT, BEIJING 100005, CHINA TEL: +86-10-6518-8830 / FAX: +86-10-6518-8030 China (Beijing) Service Dealer China (Tianjin) Service Center UNIT 2003, TIANJIN CITY TOWER, NO 35 YOUYI ROAD, HEXI DISTRICT, TIANJIN 300061, CHINA TEL: +86-22-2813-1015 / FAX: +86-22-2813-1017 China (Shenyang) Service Satellite China (Changchun) Service Satellite China (Chengdu) Service Center ROOM 407-408, OFFICE TOWER AT SHANGRI-LA CENTER, NO. 9 BINJIANG DONG ROAD, JINJIANG DISTRICT, CHENGDU, SICHUAN 610021, CHINA TEL: +86-28-8446-8030 / FAX: +86-28-8446-8630 China (Shenzhen) Service Center ROOM 2512-2516, 25/F., GREAT CHINA INTERNATIONAL EXCHANGE SQUARE, JINTIAN RD.S., FUTIAN DISTRICT, SHENZHEN 518034, CHINA TEL: +86-755-2399-8272 / FAX: +86-755-8218-4776 China (Xiamen) Service Dealer China (Dongguan) Service Dealer PT. MITSUBISHI ELECTRIC INDONESIA Indonesia Service Center ( Cikarang Office ) JL.Kenari Raya Blok G2-07A Delta Silicon 5, Lippo Cikarang-Bekasi 17550, INDONESIA TEL: +62-21-2961-7797 / FAX: +62-21-2961-7794 KOREA MITSUBISHI ELECTRIC AUTOMATION KOREA CO., LTD. (KOREA FA CENTER) THAILAND Korea Service Center 8F, Gangseo Hangang Xi-tower, 401 Yangcheon-ro, Gangseo-gu, Seoul 157-801, KOREA TEL: +82-2-3660-9602 / FAX: +82-2-3664-8668 MITSUBISHI ELECTRIC FACTORY AUTOMATION (THAILAND) CO.,LTD Thailand Service Center 12TH FLOOR, SV.CITY BUILDING, OFFICE TOWER 1, NO. 896/19 AND 20 RAMA 3 ROAD, KWAENG BANGPONGPANG, KHET YANNAWA, BANGKOK 10120,THAILAND TEL: +66-2-682-6522-31 / FAX: +66-2-682-6020 Korea Taegu Service Satellite 4F KT BUILDING, 1630 SANGYEOK-DONG, BUK-KU, DAEGU 702-835, KOREA TEL: +82-53-382-7400 / FAX: +82-53-382-7411 TAIWAN INDIA MITSUBISHI ELECTRIC INDIA PVT. LTD. India Service Center 2nd FLOOR, TOWER A & B, DLF CYBER GREENS, DLF CYBER CITY, DLF PHASE-III, GURGAON 122 002, HARYANA, INDIA TEL: +91-124-4630 300 / FAX: +91-124-4630 399 Ludhiana satellite office Jamshedpur satellite office India (Pune) Service Center EMERALD HOUSE, EL-3, J-BLOCK, MIDC BHOSARI. PUNE – 411 026, MAHARASHTRA, INDIA TEL: +91-20-2710 2000 / FAX: +91-20-2710 2100 Baroda satellite office Mumbai satellite office India (Bangalore) Service Center PRESTIGE EMERALD, 6TH FLOOR, MUNICIPAL NO. 2, LAVELLE ROAD, BANGALORE - 560 043, KAMATAKA, INDIA TEL: +91-80-4020-1600 / FAX: +91-80-4020-1699 Chennai satellite office Coimbatore satellite office OCEANIA MITSUBISHI ELECTRIC AUSTRALIA LTD. Australia Service Center 348 VICTORIA ROAD, RYDALMERE, N.S.W. 2116 AUSTRALIA TEL: +61-2-9684-7269 / FAX: +61-2-9684-7245 MITSUBISHI ELECTRIC TAIWAN CO., LTD. (TAIWAN FA CENTER) Taiwan (Taichung) Service Center (Central Area) NO.8-1, INDUSTRIAL 16TH RD., TAICHUNG INDUSTRIAL PARK, SITUN DIST., TAICHUNG CITY 40768, TAIWAN R.O.C. TEL: +886-4-2359-0688 / FAX: +886-4-2359-0689 Taiwan (Taipei) Service Center (North Area) 10F, NO.88, SEC.6, CHUNG-SHAN N. RD., SHI LIN DIST., TAIPEI CITY 11155, TAIWAN R.O.C. TEL: +886-2-2833-5430 / FAX: +886-2-2833-5433 Taiwan (Tainan) Service Center (South Area) 11F-1., NO.30, ZHONGZHENG S. ROAD, YONGKANG DISTRICT, TAINAN CITY 71067, TAIWAN, R.O.C. TEL: +886-6-252-5030 / FAX: +886-6-252-5031 Notice Every effort has been made to keep up with software and hardware revisions in the contents described in this manual. However, please understand that in some unavoidable cases simultaneous revision is not possible. Please contact your Mitsubishi Electric dealer with any questions or comments regarding the use of this product. Duplication Prohibited This manual may not be reproduced in any form, in part or in whole, without written permission from Mitsubishi Electric Corporation. 2013-2015 MITSUBISHI ELECTRIC CORPORATION ALL RIGHTS RESERVED.
Source Exif Data:
File Type : PDF File Type Extension : pdf MIME Type : application/pdf PDF Version : 1.6 Linearized : Yes Encryption : Standard V4.4 (128-bit) User Access : Print, Copy, Extract, Assemble, Print high-res Author : Mitsubishi Electric Corporation Create Date : 2015:10:19 14:54:51+09:00 Modify Date : 2015:10:19 15:43:47+09:00 Subject : IB-1501209-D Has XFA : No XMP Toolkit : Adobe XMP Core 5.2-c001 63.139439, 2010/09/27-13:37:26 Metadata Date : 2015:10:19 15:43:47+09:00 Creator Tool : Word 用 Acrobat PDFMaker 10.1 Document ID : uuid:0dbfba06-ffdb-4b4d-ad16-31c155d3fbe5 Instance ID : uuid:f1c671ef-d0e3-4caf-aa2b-ef89dc8a79c3 Format : application/pdf Title : MITSUBISHI Communication Software for CNC FCSB1224W000 Reference Manual Creator : Mitsubishi Electric Corporation Description : IB-1501209-D Producer : Adobe PDF Library 10.0 Page Layout : SinglePage Page Mode : UseOutlines Page Count : 264EXIF Metadata provided by EXIF.tools