Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

About Development Cautionary Note of Customization Software

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

7169FPDAVxTjbjuntGBbibBhLmV7rOz9MW/0zLDNscA7SdMIC+2wd68VWEg==

About development cautionary note of


customization software

Table of Contents
1 Outline ................................................................................................................................. 2
2 Recommended programming method.................................................................................. 3
3 Case of trouble..................................................................................................................... 5
4 FOCAS application to add load ............................................................................................ 9
5 List of FOCAS2 functions that require support ................................................................... 22
6 FANUC application ............................................................................................................30
7 GENERAL WARNINGS FOR CNC APPLICATION DEVELOPMENT ............................... 31

Copyright © 2020- FANUC CORPORATION

Ed
About development 04 Draw A-42148-00093EN
Title cautionary note of
Date Sheet
customization software 2021. FANUC CORPORATION 1/33
07/19

© MyFANUC B702B2F68851464B8B0D71626E906C08
7169FPDAVxTjbjuntGBbibBhLmV7rOz9MW/0zLDNscA7SdMIC+2wd68VWEg==

1 Outline
For the operation management of production equipment by IoT, the machine users who add the data
communication from FOCAS2 application to the existing machine via Ethernet are increasing.

CNC
Ladder
program PC application

CNC data

Machine Tool
Updating machining data

Correct cutting with updating machining data

After adding the software for monitoring operation (FIELD system and MT-LINKi are included), Reading or
writing CNC’s data from Customizing software (PMC ladder program, PC application, C-language executor
application and FANUC PICTURE application) might become slow very rarely.
Customizing software don't assume the delay of reading CNC data or writing CNC data, the alarm and the
warning might occur. Moreover, the machine sometimes fails to work at the worst case.

Software for monitoring


operation
Alarm Factory LAN
CNC Alarm
Ladder
program PC application

CNC data

Machine Tool
Delay of updating machining data

Incorrect cutting by the delay of updating machining data

Possible trouble Case:


- Machine suddenly stopped
- Erroneous machining occurred
- Machining defect occurred

Above trouble might occur when Machine user adds our software for monitoring operation (FIELD system and
MT-LINKi).

Ed
About development 04 Draw A-42148-00093EN
Title cautionary note of
Date Sheet
customization software 2021. FANUC CORPORATION 2/33
07/19

© MyFANUC B702B2F68851464B8B0D71626E906C08
7169FPDAVxTjbjuntGBbibBhLmV7rOz9MW/0zLDNscA7SdMIC+2wd68VWEg==

This report describes “Recommended programming method” and “Case of trouble” to prevent from trouble.
Confirm that your Customizing software are supporting the delay of reading/writing CNC data.

After confirmation of Customizing software, check that the process for delay runs correctly on machine tool.
For checking the process, we prepared the application to add load (LoadFocasFunc.exe). This application
communicates with CNC periodically. In this report, the method to use the application (LoadFocasFunc.exe) is
described.

About a general CNC application development,”GENERAL WARNINGS FOR CNC APPLICATION


DEVELOPMENT ” is described in CONNECTION MANUAL (FUNCTION). Please refer to section 7 in this
document that was copied from CONNECTION MANUAL.

2 Recommended programming method

2.1 FOCAS application


Retry procedure for EW_BUSY
If FOCAS library function cannot work immediately because the access to CNC information increases by
expansion of IoT equipment, FOCAS library function returns “EW_BUSY”. In this case, FOCAS application
should retry accessing. If it is difficult to retry, make an error or a warning processing properly.
Please refer following document about detail of return status specification.
Manual Description location
Documentation for the FANUC FOCAS 1/2 9. Return Status of Data Window Functions
library shipped with FOCAS1/2 Library
Disk (A02B-0207-K737/K739). and
10.Function Reference

However, if multiple FOCAS applications work on with processing, the execution of the FOCAS library
functions may be synchronized and EW_BUSY may always occur.
In such a case, you should take counter measures such as making the retry timing variable

Getting and releasing library handle


Don’t repeat getting library handle (cnc_allclibhndl, cnc_allclibhndl2, cnc_allclibhndl3) and releasing it
frequently while FOCAS application is running.
Please keep using the gotten library handle until FOCAS application ends.

2.2 Ladder program


In ladder program, if the access to CNC information increases by expansion of IoT equipment, the time until
complete of low speed type window function will be change. If there is a process which should wait for the
completion of the window function, you should add the completion of the window function to the start condition
of that process.
Please make a ladder program properly as following manuals.
Manual Description location
FANUC PMC MODEL B.2 LOW-SPEED RESPONSE AND
PA1/PA3/SA1/SA2/SA3/SA5/SB/SB2/SB3/SB4
/SB5/SB6/SB7/SC/SC3/SC4/NB/NB2/NB6 HIGH-SPEED RESPONSE OF WINDOW
LADDER LANGUAGE PROGRAMMING MANUAL FUNCTION
(B-61863E/16)

Ed
About development 04 Draw A-42148-00093EN
Title cautionary note of
Date Sheet
customization software 2021. FANUC CORPORATION 3/33
07/19

© MyFANUC B702B2F68851464B8B0D71626E906C08
7169FPDAVxTjbjuntGBbibBhLmV7rOz9MW/0zLDNscA7SdMIC+2wd68VWEg==

Manual Description location


FANUC Series 30i/300i/300is-MODEL A
5.2 LOW-SPEED RESPONSE AND
FANUC Series 31i/310i/310is-MODEL A
FANUC Series 32i/320i/320is-MODEL A HIGH-SPEED RESPONSE
PMC PROGRAMMING MANUAL (B-63983EN/04)
FANUC Series 0i-MODEL D
5.2 LOW-SPEED RESPONSE AND
FANUC Series 0i Mate-MODEL D
PMC PROGRAMMING MANUAL (B-64393EN/03) HIGH-SPEED RESPONSE
FANUC Series 30i-MODEL B
5.2 LOW-SPEED RESPONSE AND
FANUC Series 31i-MODEL B
FANUC Series 32i-MODEL B HIGH-SPEED RESPONSE
FANUC Series 35i-MODEL B
FANUC Power Motion i-MODEL A
FANUC Series 0i-MODEL F
PMC PROGRAMMING MANUAL (B-64513EN/04)
TMN19/059 6.1 LOW-SPEED RESPONSE AND
FANUC Series 30i/31i/32i/35i-MODEL B
FANUC Power Motion i-MODEL A HIGH-SPEED RESPONSE
FANUC Series 0i-MODEL F
PMC Supplemental Programming
Manual(B-64513EN/04-03)

2.3 C Language Executor application


C Language Executor library function returns “EW_BUSY” if that function can not work immediately. In this
case, make a retry processing, an error processing or a warning processing properly.
Please refer following document about detail of return status specification.
Manual Description location
FANUC Series 30i/31i/32i-MODEL A II.PROGRAMMING
FANUC Series 30i/31i/32i-MODEL B 3. Function References
FANUC Series 0i-MODEL F 5. C Language Executor Function
FANUC Series 35i-MODEL B
FANUC Power Motion i-MODEL A
C Language Executor PROGRAMMING
MANUAL(B-63943EN-3/04)

2.4 FANUC PICTURE application


When Ruby script is used, library function might return “EW_BUSY” as same as C Language Executor. In this
case, make a retry processing, an error processing or a warning processing properly.
Please refer following document about detail of return status specification.
Manual Description location
FANUC PICTURE Specification (Edition 8.0 or later) 5. LIBRAY FUNCTIONS CAN BE USED FROM RUBY
included in CNC Application Development Kit SCRIPT
(A08B-9010-J555#ZZ12).

Ed
About development 04 Draw A-42148-00093EN
Title cautionary note of
Date Sheet
customization software 2021. FANUC CORPORATION 4/33
07/19

© MyFANUC B702B2F68851464B8B0D71626E906C08
7169FPDAVxTjbjuntGBbibBhLmV7rOz9MW/0zLDNscA7SdMIC+2wd68VWEg==

3 Case of trouble

3.1 CASE1: Erroneous machining occurred


Behavior)
Erroneous machining occurred because the machining program was not selected correctly.

Cause)
- In the existing machine, the machining program is automatically selected by the application on the PC.
- Before adding the IoT equipment, calling FOCAS function “cnc_pdf_slctmain” for main program selection
and the main program was selected correctly without returning the return status EW_BUSY.
- After adding IoT equipment, due to the influence of it, there was a case where EW_BUSY was returned
from FOCAS function for main program selection.
- Because the processing of FOCAS function as return status for the main program selection was not
considered, the main program was not changed from the previous program, and machining was started with
the wrong program, and erroneous machining occurred.

Countermeasure)
Add processing of the FOCAS function for the main program selection as return status.

Incorrect program example

cnc_pdf_slctmain( m_FlibHndl, pFilePath );


// The return value is not checked and processing continues as normal
…….

Correct program example


When calling FOCAS function cnc_pdf_slctmain for main program selection and returning error code
EW_BUSY, it is necessary to recall this function until EW_BUSY does not return. And when an application
ends abnormally, the application should do termination processing for abnormally ends properly.

while( sRetry < RETRY_MAX ) { // same function recall at 10 times


ret = cnc_pdf_slctmain( m_FlibHndl, pFilePath );
if( ret != EW_BUSY ) {
break;
}
Sleep( RETRY_INTERVAL ); // Sleep time about 50msec
sRetry++;
}
if( ret != EW_OK ) {
// When an application ends abnormally, the application should do termination
processing for abnormally ends properly such as outputting log.
return ret;
}
//Continue processing only normal case.

Ed
About development 04 Draw A-42148-00093EN
Title cautionary note of
Date Sheet
customization software 2021. FANUC CORPORATION 5/33
07/19

© MyFANUC B702B2F68851464B8B0D71626E906C08
7169FPDAVxTjbjuntGBbibBhLmV7rOz9MW/0zLDNscA7SdMIC+2wd68VWEg==

FOCAS function requiring attention


- Write related FOCAS functions (parameters, offset data, etc.)
- FOCAS function related to program editing (selection of main program, etc.)
Please refer to "List of FOCAS2 functions that require support " for details on the FOCAS function requiring
attention.

Ed
About development 04 Draw A-42148-00093EN
Title cautionary note of
Date Sheet
customization software 2021. FANUC CORPORATION 6/33
07/19

© MyFANUC B702B2F68851464B8B0D71626E906C08
7169FPDAVxTjbjuntGBbibBhLmV7rOz9MW/0zLDNscA7SdMIC+2wd68VWEg==

3.2 CASE2: Machining defect occurred


Behavior)
Machining defect occurred because the tool compensation amount was not updated correctly.

Cause)
- In the existing machine, the tool compensation amount is changed by the low speed type PMC window
function during the tool change operation. The tool change operation is completed in about 0.7 to 0.8
seconds.
- Before adding the IoT equipment, the process of changing the tool compensation amount was completed in
about 64 milliseconds, and the tool change operation was completed after the new tool compensation
amount was applied, and the machining was started.
- After adding the IoT equipment, due to the influence of the IoT application, execution of the low speed
type PMC window function was kept waiting, and a phenomenon occurred which took more than 1 second
to update the tool compensation amount.
- As the result of the delay, machining started with the tool compensation amount before update and
machining defect occurred because the tool change operation completed before the completion of updating
the tool compensation amount.

Countermeasure)
Add the completion for updating the tool compensation amount to the completion condition of the tool change
operation.

Ladder program before correction

Ed
About development 04 Draw A-42148-00093EN
Title cautionary note of
Date Sheet
customization software 2021. FANUC CORPORATION 7/33
07/19

© MyFANUC B702B2F68851464B8B0D71626E906C08
7169FPDAVxTjbjuntGBbibBhLmV7rOz9MW/0zLDNscA7SdMIC+2wd68VWEg==

Ladder program after correction


The completion of the tool compensation amount of the low speed type PMC window function is added to the
completion condition of the tool change operation in order to ensure the tool change operation completes after
the completion of updating tool compensation amount.

Note
In the above example of ladder program, checking completion code of WINDW
instruction is omitted in order to make the difference clear. It is recommended that
the practical ladder program checks if the completion code is “0” at the
completion of WINDW instruction.

Window function requiring attention


All low speed type window functions

Ed
About development 04 Draw A-42148-00093EN
Title cautionary note of
Date Sheet
customization software 2021. FANUC CORPORATION 8/33
07/19

© MyFANUC B702B2F68851464B8B0D71626E906C08
7169FPDAVxTjbjuntGBbibBhLmV7rOz9MW/0zLDNscA7SdMIC+2wd68VWEg==

4 FOCAS application to add load


It is necessary to check the process for delay of reading / writing CNC data on machine tool.
We prepared the application (LoadFocasFunc.exe) to support the checking that process.
This application can create similar situation in which operation status monitoring software such as MT-LINK i
is added by imposing a load of reading / writing data on the CNC. This application supports that the machine
tool builders confirms the following process.
- The operation when the operation status software fails in the data acquisition
- The error process when FOCAS function returns an error in PC application
- The sequence process when PMC window is delayed
- The error process when Library function returns an error in C-language executor application
- The error process when Library function returns an error in FANUC PICTURE application

LoadFocasFunc.exe has been included in FOCAS2 library disk.

Notice
Don’t consider that your application is supporting the delay of reading / writing
CNC data even if Machine tool works correctly with this application.
Confirm the source of Customizing software.

LoadFocasFunc.exe
Factory LAN
CNC
Ladder
program PC application

CNC data

Machine Tool

Confirm the delay of updating machining data

4.1 Installation procedure


Copy the files in the “EthernetLoad” folder on the FOCAS2 library disk to any folder on your PC.

Application file name


LoadFocasFunc.exe

Operating environment
Windows XP Professional, Windows Vista Business,
Windows 7 Professional, Windows 10 Pro/IoT

Ed
About development 04 Draw A-42148-00093EN
Title cautionary note of
Date Sheet
customization software 2021. FANUC CORPORATION 9/33
07/19

© MyFANUC B702B2F68851464B8B0D71626E906C08
7169FPDAVxTjbjuntGBbibBhLmV7rOz9MW/0zLDNscA7SdMIC+2wd68VWEg==

The supported CNC models are as follows.

Table List of support CNC models


CNC Model
FANUC Series 15i-MODEL A
FANUC Series 15i-MODEL B
FANUC Series 16i-TA/MA
FANUC Series 18i-TA/MA
FANUC Series 21i-TA/MA
FANUC Series 16i-TB/MB
FANUC Series 18i-MB5
FANUC Series 18i-TB/MB
FANUC Series 18i-LNB
FANUC Series 21i-TB/MB
FANUC Series 30i-MODEL A
FANUC Series 31i-MODEL A5
FANUC Series 31i-MODEL A
FANUC Series 32i-MODEL A
FANUC Series 30i-MODEL B
FANUC Series 31i-MODEL B5
FANUC Series 31i-MODEL B
FANUC Series 32i-MODEL B
FANUC Series 35i-MODEL B
FANUC Series 30i-LB/PB
FANUC Series 31i-LB/PB
FANUC Series 0i-TB/MB
FANUC Series 0i-TC/MC
FANUC Series 0i-TD/MD
FANUC Series 0i-Mate TD/MD
FANUC Series 0i-TF/MF/PF/LF
FANUC Series 0i-TF Plus/MF Plus/LF Plus
FANUC Power Mate i-D
FANUC Power Mate i-H
FANUC Power Motion i - MODEL A

Ed
About development 04 Draw A-42148-00093EN
Title cautionary note of
Date Sheet
customization software 2021. FANUC CORPORATION 10/33
07/19

© MyFANUC B702B2F68851464B8B0D71626E906C08
7169FPDAVxTjbjuntGBbibBhLmV7rOz9MW/0zLDNscA7SdMIC+2wd68VWEg==

4.2 Explanation

Measures to increase the load on the CNC


This application increases the load on CNC by executing the following functions.
According to the series of CNC, suitable functions are used.

Table List of functions


No Function name Function contents
1 cnc_upstart3 Start reading NC data (3)
2 Read NC data (3)
cnc_upload3
Read all CNC parameters
3 cnc_upend3 End of reading NC data (3)
4 cnc_pdf_rdmain Get main program information
5 cnc_rdprgnum Read the number of the program being executed
6 cnc_rdmdlconfig2 Read CNC module configuration information (2)
7 Read arbitrary data of PMC (range specification)
pmc_rdpmcrng
Lead D1000-D1999
8 cnc_rdsyssoft3 Read CNC system software series / version

CONNECT SETTING
(1) Connect the PC on which LoadFocasFunc.exe is installed to the CNC with an Ethernet cable or HSSB
cable.
(2) For Ethernet connection, check the CNC IP address and FOCAS2 PORT NUMBER (TCP).

Ed
About development 04 Draw A-42148-00093EN
Title cautionary note of
Date Sheet
customization software 2021. FANUC CORPORATION 11/33
07/19

© MyFANUC B702B2F68851464B8B0D71626E906C08
7169FPDAVxTjbjuntGBbibBhLmV7rOz9MW/0zLDNscA7SdMIC+2wd68VWEg==

(3) Start LoadFocasFunc.exe. The following screen will be displayed.

The main screen

(4) Make settings for connecting to the CNC.

Area Name Item Function


A CONNECT Ethernet / Select a connection method.
SETTING HSSB Ethernet connection or HSSB connection can be selected.
IP Address When connecting to Ethernet, enter the IP address of CNC.
When connecting to Ethernet, enter the value of PORT NUMBER
Port No
(TCP) of CNC.
Timeout(sec) Enter the timeout value for Ethernet connection.
Node No Enter the connection node number for HSSB.

Ed
About development 04 Draw A-42148-00093EN
Title cautionary note of
Date Sheet
customization software 2021. FANUC CORPORATION 12/33
07/19

© MyFANUC B702B2F68851464B8B0D71626E906C08
7169FPDAVxTjbjuntGBbibBhLmV7rOz9MW/0zLDNscA7SdMIC+2wd68VWEg==

(5) Click “CONNECT” button to connect with CNC.


If the connection fails, a pop-up screen will be displayed.

3
4

Error window (connection error)

No Item Display contents


1・5 ×/ OK Close the pop-up window and return to the connection setting screen.
2 Function name Displays the function in error.
3 Return value Displays the return value of the function that caused the error.
EW_SOCKET (-16)
Timeout occurred without response from FOCAS2 function in Ethernet
connection. Check that the IP address and port number matching the CNC.
EW_NUMBER (3)
Node number is incorrect for HSSB connection.
4 Detailed error The detailed error that caused the error is displayed
err_no : Detailed status
err_dtno:Error data number

If the CNC model is not supported with this application, the following pop-up screen will be displayed.

Error window (Support model error)

No Item Display contents


1・2 ×/ OK Close the pop-up window and return to the connection setting window.

(6) If connection with CNC is successful, "CONNECTED" is displayed in STATUS.

Ed
About development 04 Draw A-42148-00093EN
Title cautionary note of
Date Sheet
customization software 2021. FANUC CORPORATION 13/33
07/19

© MyFANUC B702B2F68851464B8B0D71626E906C08
7169FPDAVxTjbjuntGBbibBhLmV7rOz9MW/0zLDNscA7SdMIC+2wd68VWEg==

LOAD SETTING
Set the output folder of the log file and set load settings.

Log File

Area Name Item Function


B LOAD Log File Specify the folder name on the PC that is the output destination of the
SETTING log file.
The default folder name will be where LOAD Application is placed.
File name cannot be specified.
… Display the folder of Log File selection dialog.
The selection result of the dialog will be reflected in “Log File”.

Function
Select the function to be executed to load the CNC. Basically, select all functions.

Area Name Item Function


B LOAD Function Select the function to be executed.The selected functions will be
SETTING executed in parallel.
The functions are as follows.
Upload Get CNC parameters
PMC Data Get PMC data
Program Number/ Get the number of the program
Main Program * being executed/
Get the main program
Module Configuration/ Get CNC module configuration
CNC System Soft * information/
Get CNC system software
*The display changes depending on the type of CNC.

Interval (msec)
Specify the execution interval of the function (the time from the completion of the execution of the function to
the start of the next function).
Drag the slider with your mouse and move it left or right. Alternatively, you can move the slider with the cursor
keys on the left and right of the keyboard.

Area Name Item Function


B LOAD Interval Specify the execution interval.
SETTING (msec) One scale is displayed in units of 100msec and it can be specified in
units of 10msec.

Ed
About development 04 Draw A-42148-00093EN
Title cautionary note of
Date Sheet
customization software 2021. FANUC CORPORATION 14/33
07/19

© MyFANUC B702B2F68851464B8B0D71626E906C08
7169FPDAVxTjbjuntGBbibBhLmV7rOz9MW/0zLDNscA7SdMIC+2wd68VWEg==

Area Name Item Function


Drag the slider with your mouse and move it left or right. Alternatively,
you can move the slider with the cursor keys on the left and right of the
keyboard.
Minimum : 0
Maximum :1000
Initial :100

After completing the settings, press the “START” button. Start executing the FOCAS function.
After pressing the "START" button, if the required settings are not set or if an error occurs during execution, the
following pop-up screen will be displayed.

Error window (File path error)

No Item Display contents


1・3 × / OK Closes the pop-up window and returns to the load setting screen.
2 Message Display error reason
content Failed to open log file OPEN FAILED
No function is selected in the check box CANNOT START
Please select function
Failed to write log file WRITE FAILED
Unexpected error Unexpected error

Ed
About development 04 Draw A-42148-00093EN
Title cautionary note of
Date Sheet
customization software 2021. FANUC CORPORATION 15/33
07/19

© MyFANUC B702B2F68851464B8B0D71626E906C08
7169FPDAVxTjbjuntGBbibBhLmV7rOz9MW/0zLDNscA7SdMIC+2wd68VWEg==

Check overwriting of log file


If a log file already exists in the selected folder, a pop-up will be displayed to confirm that it is safe to overwrite.
After confirming that there is no problem by overwriting the log file, click the "OK" button.

2 3

Overwrite check window

No Item Display contents


1・3 × / Cancel Stop execution of "START".
Log files are not deleted.
2 OK Delete the existing log file and continue execution.

NOTE
1. If the log file already exists in the folder on the PC that is the output destination of the
log file, this application overwrites it after deleting the file.
2. Also note that once you stop execution with the "STOP" button and then "START"
again, it will be executed after deleting the files in the specified folder.
3. When multiple applications are started at the same time, the same folder name
cannot be specified for "LogFile".Specify a different folder name.

STATUS
During execution of the FOCAS function, the execution status of the function is displayed in the
"STATUS" area.
The display format is described as follows.

1 2

Execution status display

Ed
About development 04 Draw A-42148-00093EN
Title cautionary note of
Date Sheet
customization software 2021. FANUC CORPORATION 16/33
07/19

© MyFANUC B702B2F68851464B8B0D71626E906C08
7169FPDAVxTjbjuntGBbibBhLmV7rOz9MW/0zLDNscA7SdMIC+2wd68VWEg==

No Item Display contents


1 Function name Displays each function name.
Upload Status of Get CNC Parameter
PMC Data Status of Get PMC data
Main Prog/Prog Status of Get Main program/Get
Num※ executing program number
Sys Soft/Mdl Conf Status of Get CNC System software/
※ Get Module configuration information
2 Execution status Displays the execution status of each function.
Blue / Red / Green / Yellow is running and white is stopped.
※The display changes depending on the type of CNC.

Details of log file


When the application is executed, the execution status will be output as a log file. The execution status
will be output to the LoadLog00.csv file. When Logs reach 1 million lines, LoadLog01.csv file will be
output. By repeating the above, a total of 100 file logs from 00 to 99 can be output. The output file name is
as follows.
File name:LoadLog00.csv ~ LoadLog99.csv

In addition, if the above log file exists in the specified folder when the “START” button is pressed, all log
files will be deleted. After deletion, the output is executed with the file name "LoadLog00.csv".

The log file output format is described as follows. (EXAMPLE)

1
Interval,100msec
2 Exec Function: Upload, PMCdata, MainProg, SystemSoft

Function, Start time, End time, Result, Detailed error

Upload , Start time, End time, Result, Detailed error

PMCdata , Start time, End time, Result, Detailed error

MainProg, Start time, End time, Result, Detailed error


SystemSoft,Start time, End time, Result, Detailed error

3 4 5 6 7
Log output format

No Item Display content


1 Interval The time specified in “Interval” is output.
2 Function A list of selected functions is output.
3 Function name The name of function executed is output.
Upload Get NC data
PMCdata Get PMC data
MainProg / ProgNum Get the main program /
Get the number of the
program being executed
SystemSoft / ModuleConf Get CNC system software

Ed
About development 04 Draw A-42148-00093EN
Title cautionary note of
Date Sheet
customization software 2021. FANUC CORPORATION 17/33
07/19

© MyFANUC B702B2F68851464B8B0D71626E906C08
7169FPDAVxTjbjuntGBbibBhLmV7rOz9MW/0zLDNscA7SdMIC+2wd68VWEg==

/ Get CNC module


configuration information
4 Start time The start time of the executed function is output.
The output format is as follows
Hour: minute: second.millisecond:HH:MM:SS.000
5 End time The end time of the executed function is output.
The output format is as follows.
Hour: minute: second.millisecond:HH:MM:SS.000
6 Result The return value of the executed function is output.
7 Detailed error If an error occurs in the result, a detailed error is output.
If a normal value is returned as the return value, a detailed
error is not output.
The detailed error output format is as follows.
err_no = X, err_dtno = Y (X and Y are acquired values)
Detailed status : err_no
Error data number : err_dtno

4.3 HOW TO CHECK OPERATION

This section describes how to check the following items using this application.

- The operation status monitoring software fails to collect data


- Check an error processing of PC application
- Check whether PMC window delay is supported

Note
Please do not judge whether your application supports the delay of data reading /
writing only by whether the machine tool works by using this application.
Please also check the ladder sequence processing and source code to see
whether your application supports the delay of data reading / writing.

Check the operation status monitoring software can operate


If LoadFocasFunc.exe terminates with an error, it indicates that an application on the IoT equipment
such as MT-LINK i may fail to acquire data. The following describes the causes and countermeasures for
possible phenomena.

Behavior 1
When executing any of the following functions, LoadFocasFunc.exe may terminate with an error of ret =
-16 (EW_SOCKET).
- Write CNC parameters using PMC window
- Write CNC parameters by FOCAS2 function

STATUS is as following.

Ed
About development 04 Draw A-42148-00093EN
Title cautionary note of
Date Sheet
customization software 2021. FANUC CORPORATION 18/33
07/19

© MyFANUC B702B2F68851464B8B0D71626E906C08
7169FPDAVxTjbjuntGBbibBhLmV7rOz9MW/0zLDNscA7SdMIC+2wd68VWEg==

Causing
If any of the following functions is executed while LoadFocasFunc.exe is transferring CNC parameters, CNC
parameter writing will be in a standby state.
- Write CNC parameters using PMC window
- Write CNC parameters by FOCAS2 function

If CNC parameter writing is in a standby state, the following functions will be also in a standby state.
- all low-speed PMC window functions
- FOCAS functions described in “ List of FOCAS2 functions that require support "
Please note that cnc_pdf_rdmain () used in the Main Program acquisition of LoadFocasFunc.exe is also in the
standby state. After the number of seconds setting in Timeout (sec), LoadFocasFunc.exe may terminate with an
error of "ret = -16".

Countermeasure
Set the Timeout (sec) time of the ethernet connection to more than 30 seconds.
Because of transferring all CNC parameters may take more than 5 seconds, there is also a delay of more than 5
seconds in executing the low-speed type PMC window and FOCAS functions.
Please also check that the PMC ladder and PC application have been created correctly.

Behavior 2
The execution time (end time-start time) of MainProg, PMCdata, and SystemSoft recorded in the log file
LoadLog00.csv is 1 second or more.

Causing
It is possible that the low-speed PMC window in the PMC ladder and the FOCAS functions in the PC
application are executed frequently.

Countermeasure
Please consider whether the execution frequency of the low-speed type PMC window in the PMC ladder and the
FOCAS functions in the PC application can be reduced.

Behavior 3
Transferring (Upload) of the CNC parameters recorded in the log file LoadLog00.csv ends with EW_RESET
(-2).
Example) Upload, 11: 29: 43.944, 11: 29: 59.869, -2, err_no = 0, err_dtno = 0

Caussing
This is normal behavior when a reset is performed on the CNC.
No problem.

Ed
About development 04 Draw A-42148-00093EN
Title cautionary note of
Date Sheet
customization software 2021. FANUC CORPORATION 19/33
07/19

© MyFANUC B702B2F68851464B8B0D71626E906C08
7169FPDAVxTjbjuntGBbibBhLmV7rOz9MW/0zLDNscA7SdMIC+2wd68VWEg==

4.4 Check an error processing of PC application


This section describes an example of the procedure for checking the operation of a PC application using this
application.

(1) Connect the computer including the PC application development environment to the CNC.
(2) In Visual Studio, set a breakpoint in the process where the return value is EW_BUSY.

while( sRetry < RETRY_MAX ) { // About 10 recalls


ret = cnc_pdf_slctmain( m_FlibHndl, pFilePath );
if( ret != EW_BUSY ) {
break;
}
Sleep( RETRY_INTERVAL ); // Sleep of about 50msec
sRetry++;
}
if( ret != EW_OK ) {
// When an application ends abnormally, the application should do
termination processing for abnormally ends properly such as outputting log.
return ret;
}
// Continue processing only when normal

(3) Connect the PC on which LoadFocasFunc.exe is installed with CNC and Ethernet.
(4) Start LoadFocasFunc.exe on the computer.
(5) Enter the IP address and Port number of CNC into LoadFocasFunc.exe and press the CONNECT button.
(6) Press the START button on the computer to load the CNC data reading and writing.
(7) Check that EW_BUSY processing of PC application is executed in Visual Studio. If do not come to
EW_BUSY processing, please reduce the value of Interval of LoadFocasFunc.exe.

Ed
About development 04 Draw A-42148-00093EN
Title cautionary note of
Date Sheet
customization software 2021. FANUC CORPORATION 20/33
07/19

© MyFANUC B702B2F68851464B8B0D71626E906C08
7169FPDAVxTjbjuntGBbibBhLmV7rOz9MW/0zLDNscA7SdMIC+2wd68VWEg==

4.5 Check PMC window delay


This section describes an example of the procedure for checking the operation of the PMC ladder
using this application.

Use the PMC trace function to check the address related to the request in the PMC window.

(1) Set the PMC trace function.


Mode setting example of PMC trace function
Item Display Content
Sampling Mode Period
Resolution 4ms or 8ms
Time 30 sec
Stop condition Trigger
Trigger Address M06_CMD
Mode Rise
Position 0%
Start trigger Invalid

Example of sampling address


No Set value Remarks
1 M06_CMD Indicates that M6 was executed by the program
2 WIN_ACT Starting the low-speed type PMC window
3 WIN_FIN Completion coil for low-speed type PMC window
4 TLCHGFIN
5 TLOFSFIN Indicates completion of rewriting of tool offset
6 M06_FIN Returns FIN for M6

(2) Connect the CNC and PC with Ethernet.


(3) Start LoadFocasFunc.exe on the computer.
(4) Enter the IP address and Port number of CNC into LoadFocasFunc.exe and press the CONNECT button.
(6) Start the PMC trace function on the CNC.
(7) Execute the auxiliary function M6 on the CNC and check the trace result with a light load.
(8) Start the PMC trace function on the CNC.
(9) Press the START button on the computer to put a load on CNC data reading / writing.
(10) Execute the auxiliary function M6 on the CNC and check the trace result under heavy load.

Note
If writing to the CNC parameters using a PMC ladder, etc., please turn off the check
box of Main
Program of LOAD SETTING of LoadFocasFunc.exe.
When writing to the CNC parameters using a PMC ladder, etc., if both Upload (READ
of CNC
parameters) and Main Program are executed, LoadFocasFunc.exe may terminate
with an error "ret = -16".

Ed
About development 04 Draw A-42148-00093EN
Title cautionary note of
Date Sheet
customization software 2021. FANUC CORPORATION 21/33
07/19

© MyFANUC B702B2F68851464B8B0D71626E906C08
7169FPDAVxTjbjuntGBbibBhLmV7rOz9MW/0zLDNscA7SdMIC+2wd68VWEg==

5 List of FOCAS2 functions that require support


This chapter describes lists of FOCAS2 functions which have return value EW_BUSY.
If you are using these features, make sure that the proper error handling described in Section 3.1 is in place.
5.1 CNC: Function Reference related to library handle, node
Function Name Brief description
cnc_allclibhndl Allocate library handle
cnc_allclibhndl2 Allocate the library handle(for multi-connection)
cnc_allclibhndl3 Get the library handle(for Ethernet)
cnc_freelibhndl Free library handle

5.2 CNC: Function related to controlled axis/spindle


Function Name Brief description
cnc_wrrelpos Set origin/preset relative axis position
cnc_prstwkcd Preset work coordinate
cnc_canmovrlap Cancel manual overlapped motion value
cnc_rd3dtooltip Read tool tip coordinates for 3-dimensional handle feed
cnc_rd3dpulse Read handle interrupt pulse amount for 3-dimensional handle feed
cnc_rd3dmovrlap Read handle interrupt move amount for 3-dimensional handle feed
cnc_clr3dplsmov Clear handle interrupt pulse and move amount for 3-dimensional handle feed
cnc_clr5axpls Clear the pulse amount for manual feed for 5-axis machining

5.3 CNC: Function related to CNC program


Function Name Brief description
cnc_dwnstart Start downloading NC program
cnc_download Download NC program
cnc_cdownload Download NC program(conditional)
cnc_dwnend End of downloading NC program
cnc_dwnstart3 Start downloading NC program (3)
cnc_download3 Download NC program (3)
cnc_dwnend3 End of downloading NC program (3)
cnc_dwnstart4 Start downloading NC program (4)
cnc_download4 Download NC program (4)
cnc_dwnend4 End of downloading NC program (4)
cnc_vrfstart Start verification of NC program
cnc_verify Verify NC program
cnc_cverify Verify NC program(conditional)
cnc_vrfend End of verification
cnc_vrfstart4 Start verification of NC program(4)
cnc_verify4 Verify NC program(4)
cnc_vrfend4 End of verification(4)
cnc_buff Read buffer status for downloading/verification NC program
cnc_dncstart Start downloading DNC program
cnc_dnc Download DNC program
cnc_cdnc Download DNC program(conditional)
cnc_dncend End of downloading DNC program
cnc_dncstart2 Start downloading DNC program (2)

Ed
About development 04 Draw A-42148-00093EN
Title cautionary note of
Date Sheet
customization software 2021. FANUC CORPORATION 22/33
07/19

© MyFANUC B702B2F68851464B8B0D71626E906C08
7169FPDAVxTjbjuntGBbibBhLmV7rOz9MW/0zLDNscA7SdMIC+2wd68VWEg==

Function Name Brief description


cnc_dnc2 Download DNC program (2)
cnc_dncend2 End of downloading DNC program (2)
cnc_upstart Start uploading NC program
cnc_upload Upload NC program
cnc_cupload Upload NC program(conditional)
cnc_upend End of uploading NC program
cnc_upstart3 Start uploading NC program (3)
cnc_upload3 Upload NC program (3)
cnc_upend3 End of uploading NC program (3)
cnc_upstart4 Start uploading NC program (4)
cnc_upload4 Upload NC program (4)
cnc_upend4 End of uploading NC program (4)
cnc_search Search specified program
cnc_delall Delete all programs
cnc_delete Delete specified program
cnc_rdprogdir2 Read program directory (2)
cnc_rdprogdir3 Read program directory (3)
cnc_rdproginfo Read program information
cnc_seqsrch Search specified sequence number
cnc_seqsrch2 Search specified sequence number(2)
cnc_rewind Rewind cursor of NC program
cnc_wrmdiprog Write program for MDI operation
cnc_wrmdipntr Write execution pointer for MDI operation
cnc_rdproctime Read processing time stamp data
cnc_rdprgdirtime Read directory for processing time stamp data
cnc_copyprog Copy program
cnc_renameprog Change program number
cnc_condense Condense program
cnc_rdprogline Read NC program by line basis
cnc_rdprogline2 Read NC program by line basis(2)
cnc_wrprogline Write NC program by line basis
cnc_delprogline Delete NC program by line basis
cnc_searchword Search string in NC program
cnc_setpglock Set the protection of running/editing of NC program
cnc_resetpglock Reset the protection of running/editing of NC program
cnc_rdpglockstat Get the status of running/editing of NC program
cnc_rdactpt Get execution pointer
cnc_wractpt Set execution pointer
cnc_rdpdf_drive Read information of Program memory drive
cnc_rdpdf_inf Read information Program memory file
cnc_rdpdf_curdir Read information of current folder
cnc_wrpdf_curdir Set current folder
cnc_rdpdf_subdir Read information of subfolder
cnc_rdpdf_alldir Read file information
cnc_rdpdf_subdirn Read number of subfolders or files
cnc_pdf_add Create folder or file
cnc_pdf_del Delete folder or file
cnc_pdf_delall Delete all programs

Ed
About development 04 Draw A-42148-00093EN
Title cautionary note of
Date Sheet
customization software 2021. FANUC CORPORATION 23/33
07/19

© MyFANUC B702B2F68851464B8B0D71626E906C08
7169FPDAVxTjbjuntGBbibBhLmV7rOz9MW/0zLDNscA7SdMIC+2wd68VWEg==

Function Name Brief description


cnc_pdf_rename Rename folder or file
cnc_pdf_copy Copy file
cnc_pdf_move Move file
cnc_pdf_cond Rearrange the contents of the program
cnc_wrpdf_attr Change attribute of folder or file
cnc_pdf_rdmain Read main program
cnc_pdf_slctmain Select main program
cnc_rdpdf_line Read NC program by line basis(For arbitrary file name)
cnc_wrpdf_line Write NC program by line basis(For arbitrary file name)
cnc_pdf_delline Delete NC program by line basis(For arbitrary file name)
cnc_pdf_searchword Search string in NC program(For arbitrary file name)
cnc_pdf_searchresult Get result of string search in NC program(For arbitrary file name)
cnc_setpdf_pglock Set the protection of running/editing of NC program
cnc_resetpdf_pglock Reset the protection of running/editing of NC program
cnc_rdpdf_pglockstat Get the status of running/editing of NC program
cnc_pdf_rdactpt Get execution pointer(For arbitrary file name)
cnc_pdf_wractpt Set execution pointer(For arbitrary file name)
cnc_saveprog_start Starts of the manual saving for the high speed program management
cnc_saveprog_end Get execution result of the manual saving for the high speed program management

5.4 CNC: Function related to CNC file data


Function Name Brief description
cnc_wrtofs Write tool offset value
cnc_wrtofsr Write tool offset value(area specified)
cnc_tofs_rnge Read the effective setting range of tool offset value
cnc_wrzofs Write work zero offset value
cnc_rdzofsr Read work zero offset value(area specified)
cnc_wrzofsr Write work zero offset value(area specified)
cnc_zofs_rnge Read the effective setting range of work zero offset value
cnc_wrparam Write parameter
cnc_wrparas Write parameter(area specified)
cnc_wrset Write setting data
cnc_wrsets Write setting data(area specified)
cnc_wrpitchr Write pitch error compensation data(area specified)
cnc_rdvolc Read 3-dimensional error compensation data
cnc_wrvolc Write 3-dimensional error compensation data
cnc_rdvolccomp Read 3-dimensional error compensation value at current position
cnc_rdrotvolc Read the 3-dimensional rotary error compensation data
cnc_wrrotvolc Write the 3-dimensional rotary error compensation data
cnc_wrmacro Write custom macro variable
cnc_rdmacror Read custom macro variables(area specified)
cnc_wrmacror Write custom macro variables(area specified)
cnc_rdmacror2 Read custom macro variables(double precision)
cnc_wrmacror2 Write custom macro variables(double precision)
cnc_rdpmacro Read P code macro variable
cnc_rdpmacror Read P code macro variables(area specified)
cnc_rdpmacror2 Read P code macro variables(double precision)

Ed
About development 04 Draw A-42148-00093EN
Title cautionary note of
Date Sheet
customization software 2021. FANUC CORPORATION 24/33
07/19

© MyFANUC B702B2F68851464B8B0D71626E906C08
7169FPDAVxTjbjuntGBbibBhLmV7rOz9MW/0zLDNscA7SdMIC+2wd68VWEg==

Function Name Brief description


cnc_wrpmacror Write P code macro variables(area specified)
cnc_wrpmacror2 Write P code macro variables(double precision)
cnc_rdmgrpdata Read M code group data
cnc_wrmgrpdata Write M code group data
cnc_rdhpccset Read setting data for High-speed and high-precision machining
cnc_hpccattune Tune up tuning data for HPCC automatically
cnc_hpccselfine Select fine level for HPCC
cnc_rdactfixofs Read active fixture offset
cnc_rdfixofs Read fixture offset value(area specified)
cnc_wrfixofs Write fixture offset value(area specified)
cnc_rdintchk Read interference check data(area specified)
cnc_wrintchk Write interference check data(area specified)
cnc_wrwkcdshft Write work coordinate shift value
cnc_rdwkcdsfms Read work coordinate shift measured value
cnc_wrwkcdsfms Write work coordinate shift measured value
cnc_wksft_rnge Read the effective setting range of work coordinate shift value

5.5 CNC: Function related to tool life management data


Function Name Brief description
cnc_wrcountr Write tool life management data(tool life counter)(area specified)
cnc_wr1tlifedat2 Write tool life management data(tool data1) 2
cnc_wr2tlifedata Write tool life management data(tool data2)
cnc_wrgrpinfo Write tool life management data(tool group information)
cnc_wrgrpinfo2 Write tool life management data(tool group information 2)
cnc_wrgrpinfo3 Write tool life management data(tool group information 3)
cnc_deltlifegrp Delete tool life management data(tool group)
cnc_instlifedt Insert tool life management data(tool data)
cnc_deltlifedt Delete tool life management data(tool data)
cnc_clrcntinfo Clear tool life management data(tool life counter, tool information)(area specified)
cnc_rdexchgtgrp Read tool life management data(Exchange necessary tool group number)

5.6 CNC: Function related to tool management data


Function Name Brief description
cnc_regtool New registration of Tool management data
cnc_regtool_f2 New registration of Tool management data (2)
cnc_deltool Delete Tool management data
cnc_rdtool Read Tool management data
cnc_rdtool_f2 Read Tool management data (2)
cnc_wrtool Write Tool management data
cnc_wrtool_f2 Write Tool management data (2)
cnc_wrtool2 Write individual data of Tool management data
cnc_regmagazine New registration of Magazine management data
cnc_delmagazine Delete Magazine management data
cnc_rdmagazine Read Magazine management data
cnc_wrmagazine Write individual data of Magazine management data
cnc_wrtoolgeom_tlm Write tool geometry data

Ed
About development 04 Draw A-42148-00093EN
Title cautionary note of
Date Sheet
customization software 2021. FANUC CORPORATION 25/33
07/19

© MyFANUC B702B2F68851464B8B0D71626E906C08
7169FPDAVxTjbjuntGBbibBhLmV7rOz9MW/0zLDNscA7SdMIC+2wd68VWEg==

Function Name Brief description


cnc_rdtoolgeom_tlm Read tool geometry data
cnc_btlfpotsrh Search empty pot for oversize tool

5.7 CNC: Function related to tool geometry size data


Function Name Brief description
cnc_rdtlgeomsize_ext Read the tool geometry size data
cnc_wrtlgeomsize_ext Write the tool geometry size data

5.8 CNC: Function related to history data


Function Name Brief description
cnc_stopophis Stop logging operation history data
cnc_startophis Restart logging operation history data
cnc_rdophisno Read number of operation history data
cnc_rdophistry4 Read operation history data (4)
cnc_clearophis Clear operation history data
cnc_rdhissgnl Read signals related operation history
cnc_wrhissgnl Write signals related operation history
cnc_rdhissgnl2 Read signals related operation history(2)
cnc_wrhissgnl2 Write signals related operation history(2)
cnc_rdhissgnl3 Read signals related operation history(3)
cnc_wrhissgnl3 Write signals related operation history(3)
cnc_wrkeyhistry Record of key stroke
cnc_rdalmhisno Read number of alarm history data
cnc_rdalmhistry Read alarm history data
cnc_rdalmhistry2 Read alarm history data (2)
cnc_rdalmhistry5 Read alarm history data (5)
cnc_stopomhis Stop logging external operator's message history data
cnc_startomhis Restart logging external operator's message history data
cnc_rdomhisinfo Read external operator's message history data information
cnc_rdomhisno Read number of external operator's message history data
cnc_rdomhistry Read external operator's message history data
cnc_rdomhistry2 Read external operator's message history data (2)
cnc_clearomhis Clear external operator's message history data

5.9 CNC: Function related to servo/spindle


Function Name Brief description
cnc_sdtsetchnl Setting of channel data.
cnc_sdtsetchnl2 Setting of channel data.(2)
cnc_sdtclrchnl Clear of channel data.
cnc_sdtstartsmpl Start of Sampling.
cnc_sdtstartsmpl2 Start of Sampling.(2)
cnc_sdtcancelsmpl Cancel of sampling
cnc_sdtreadsmpl Read of sampling data
cnc_sdtreadsmpl2 Read of sampling data(2)
cnc_sdtendsmpl End of sampling
cnc_sdtendsmpl2 End of sampling(2)

Ed
About development 04 Draw A-42148-00093EN
Title cautionary note of
Date Sheet
customization software 2021. FANUC CORPORATION 26/33
07/19

© MyFANUC B702B2F68851464B8B0D71626E906C08
7169FPDAVxTjbjuntGBbibBhLmV7rOz9MW/0zLDNscA7SdMIC+2wd68VWEg==

cnc_sdtread1shot 1 shot read of sampling data

5.10 CNC: Function related to waveform diagnosis


Function Name Brief description
cnc_wavestart Start sampling waveform diagnosis data
cnc_wavestop Stop sampling waveform diagnosis data
cnc_wavestat Read sampling status of waveform diagnosis data
cnc_rdwavedata Read waveform diagnosis data

5.11 CNC: Function related to PUNCH PRESS


Function Name Brief description
cnc_wrtlctldata Write tool control data
cnc_wrtooldata Write tool data
cnc_wrmultitldt Write multiple tool data
cnc_wrsafetyzone Write safety zone data
cnc_wrtoolzone Write tool zone data
cnc_wrsetzone Write number of automatic setting zone
cnc_wrpunchtl_ex Get tool data(Registration number specification)

5.12 CNC: Function related to LASER


Function Name Brief description
cnc_wrpscdproc Write cutting condition file(cutting data)
cnc_wrpscdpirc Write cutting condition file(piercing data)
cnc_wrpscdslop Write cutting condition file(slope control data)
cnc_wrlpwrdty Write duty data for power control
cnc_wrlagslt Write assist gas selection
cnc_wrledgprc Write laser power for contouring
cnc_wrlprcprc Write laser power for piercing
cnc_wrlpwrslt Write laser power selection
cnc_wrlpwrctrl Write laser power control
cnc_wrmngtime Write the management time
cnc_wrlppfbdt Write the power feedback data of actual output estimation type
cnc_wrpscdedge2 Write cutting condition file(edge cutting data)
cnc_wrlpscdpwrctl Write cutting condition file(power control data)
cnc_wrldsplc2 Write command data of reference displace

5.13 CNC: Function Reference related to data server, DNC1, DNC2,


OSI-Ethernet
Function Name Brief description
eth_rdparam Get the parameter of Ethernet
eth_wrparam Set the parameter of Ethernet
eth_rddsmode Get the mode of DATA SERVER
eth_wrdsmode Set the mode of DATA SERVER
eth_rddsstate Get the maintenance information on DATA SERVER
eth_rdhost Get the connection host number of Ethernet

Ed
About development 04 Draw A-42148-00093EN
Title cautionary note of
Date Sheet
customization software 2021. FANUC CORPORATION 27/33
07/19

© MyFANUC B702B2F68851464B8B0D71626E906C08
7169FPDAVxTjbjuntGBbibBhLmV7rOz9MW/0zLDNscA7SdMIC+2wd68VWEg==

Function Name Brief description


eth_wrhost Set the connection host number of Ethernet
eth_rddsm198dir Get the folder for M198 operation of DATA SERVER
eth_wrdsm198dir Set the folder for M198 operation of DATA SERVER
eth_rddsm198host Get the host for M198 operation of DATA SERVER
eth_wrdsm198host Set the host for M198 operation of DATA SERVER
eth_rddsformat Get the format form of the ATA card of DATA SERVER
eth_dsformat Format of the ATA card of DATA SERVER
eth_dschkdsk Check disk of the ATA card of DATA SERVER
cnc_rddsdncfile Get file for DNC operation
cnc_wrdsdncfile Set file for DNC operation
cnc_rddsdevinfo Get memory device information on DATA SERVER
cnc_rddsdir Get current folder
cnc_rddsfile Get file list information
cnc_dsmkdir Make folder
cnc_dsrmdir Delete folder
cnc_dsremove Delete file
cnc_dschdir Change current folder
cnc_dsrename Change folder name or file name
cnc_dscopyfile Copy file of DATA SERVER
cnc_dsget_req Start GET of DATA SERVER
cnc_dsput_req Start PUT of DATA SERVER
cnc_dsmget_req Start MGET of DATA SERVER
cnc_dsmput_req Start MPUT of DATA SERVER
cnc_dslistget_req Start List-GET of DATA SERVER
cnc_dslistput_req Start List-PUT of DATA SERVER
cnc_dslistdel_req Start List-DEL of DATA SERVER function
cnc_dsftpstat Read file transfer result of DATA SERVER
cnc_dsftpcancel Stop file transfer of DATA SERVER

5.14 CNC: Function Reference related to servo learning data


Function Name Brief description
cnc_svdtstartrd Start of reading servo learning data
cnc_svdtrddata Reading of the data from I/F buffer for the servo learning data
cnc_svdtendrd End of reading servo learning data
cnc_svdtstartwr Start of writing servo learning data
cnc_svdtwrdata Writing of the data to I/F buffer for the servo learning data
cnc_svdtendwr End of writing servo learning data
cnc_svdtstopexec Stop of reading/writing of the servo learning data

5.15 PMC: Function related to PMC


Function Name Brief description
pmc_rdalmmsg Read PMC alarm messages

5.16 PMC: Function Reference related to PROFIBUS-DP


Function Name Brief description
pbm_rd_param Reading of the parameters of the PROFIBUS master function

Ed
About development 04 Draw A-42148-00093EN
Title cautionary note of
Date Sheet
customization software 2021. FANUC CORPORATION 28/33
07/19

© MyFANUC B702B2F68851464B8B0D71626E906C08
7169FPDAVxTjbjuntGBbibBhLmV7rOz9MW/0zLDNscA7SdMIC+2wd68VWEg==

Function Name Brief description


pbm_wr_param Setting the parameters of the PROFIBUS master function
pbm_ini_prm Initialization of the specified parameters of the PROFIBUS master function
pbm_rd_allslvtbl Reading of all slave table
pbm_exe_subfunc Execution of sub-function
pbm_rd_subprm Reading of the setting assistant parameters
pbm_rd_errcode Reading of an error code
pbm_chg_mode Change of the operation mode
pbm_rd_cominfo Reading of the communicating information
pbm_rd_nodetable Reading of status of connected slave
pbm_rd_nodeinfo Reading of the information of slave station
pbm_rd_slot Reading of the number of slot on master function
pbm_rd_slotinfo Reading of the slot information on master function
pbs_rd_param Reading of the parameters of the PROFIBUS slave function
pbs_wr_param Setting of the parameters of the PROFIBUS slave function
pbs_ini_prm Initialization of the parameters of the PROFIBUS slave function
pbs_rd_cominfo Reading of the communication state of the PROFIBUS slave function
pbs_rd_param2 Reading of the parameters of the PROFIBUS slave function(2)
pbs_wr_param2 Setting of the parameters of the PROFIBUS slave function(2)
pbs_rd_cominfo2 Reading of the communication state of the PROFIBUS slave function(2)

5.17 CNC: Function related to others


Function Name Brief description
cnc_rdalminfo Read alarm information
cnc_rdalmmsg Read alarm message
cnc_rdalmmsg2 Read alarm message (2)
cnc_diagnoss Read diagnosis data
cnc_diagnosr Read diagnosis data(area specified)
cnc_rddiag_ext Read random number diagnosis data
cnc_rdopmsg Read operator's message
cnc_rdopmsg2 Read operator's message (2)
cnc_rdopmsg3 Read operator's message (3)
cnc_rdprstrinfo Read program restart information
cnc_rstrseqsrch Search sequence number for program restart
cnc_rstrseqsrch2 Search sequence number for program restart (2)
cnc_rdopnlsgnl Read output signal image of software operator's panel
cnc_wropnlsgnl Write output signal of software operator's panel
cnc_rdopnlgnrl Read general signal image of software operator's panel
cnc_wropnlgnrl Write general signal image of software operator's panel
cnc_rdopnlgsname Read general signal name of software operator's panel
cnc_wropnlgsname Write general signal name of software operator's panel
cnc_rdmenuswitch Read menu switch signal
cnc_wrmenuswitch Write menu switch signal
Read internal position compensation data(cutter compensation/tool nose radius
cnc_rdradofs
compensation)
cnc_rdlenofs Read internal position compensation data(tool length compensation)
cnc_rdfixcycle Read internal position compensation data(canned cycle)(canned cycle)
cnc_rdcdrotate Read internal position compensation data(coordinate rotation)

Ed
About development 04 Draw A-42148-00093EN
Title cautionary note of
Date Sheet
customization software 2021. FANUC CORPORATION 29/33
07/19

© MyFANUC B702B2F68851464B8B0D71626E906C08
7169FPDAVxTjbjuntGBbibBhLmV7rOz9MW/0zLDNscA7SdMIC+2wd68VWEg==

Function Name Brief description


cnc_rd3dcdcnv Read internal position compensation data(3-D coordinate conversion)
cnc_rdmirimage Read internal position compensation data(programmable mirror image)
cnc_rdscaling Read internal position compensation data(scaling)
cnc_rd3dtofs Read internal position compensation data(3-D tool compensation)
cnc_rdsyssoft3 Read series/version of CNC system software (3)
cnc_rdsyshard Read of CNC hardware configuration
cnc_settimer Set calendar timer of CNC
cnc_rdtimer Get timer data of CNC
cnc_wrtimer Set timer data of CNC
cnc_reset CNC reset
cnc_reset2 CNC reset (2)
cnc_clralm Clear CNC alarm
cnc_fromgetstart Start of reading F-ROM data from CNC
cnc_fromget Read F-ROM data from CNC
cnc_fromgetend End of reading F-ROM data from CNC
cnc_fromputstart Start of writing F-ROM data to CNC
cnc_fromput Write F-ROM data to CNC
cnc_fromputend End of writing F-ROM data to CNC
cnc_fromremove Delete F-ROM data on CNC
cnc_sramgetstart Start of reading S-RAM data from CNC
cnc_sramget Read S-RAM data from CNC
cnc_sramgetend End of reading S-RAM data from CNC
cnc_rdcexesram Read SRAM variable area for C language executor
cnc_wrcexesram Write SRAM variable area for C language executor
cnc_rdpm_mcnitem Read machine specific maintenance item for periodic maintenance
cnc_wrpm_mcnitem Write machine specific maintenance item for periodic maintenance
cnc_rdpm_cncitem Read cnc maintenance item for periodic maintenance
cnc_rdpm_item Read maintenance item status for periodic maintenance
cnc_wrpm_item Write maintenance item status for periodic maintenance
cnc_rdcncid Read the CNC ID number

6 FANUC application
The following FANUC application was improved that load of CNC was reduced.
Use the latest version.

Software Version Remarks


SERVO VIEWER 3.20

Ed
About development 04 Draw A-42148-00093EN
Title cautionary note of
Date Sheet
customization software 2021. FANUC CORPORATION 30/33
07/19

© MyFANUC B702B2F68851464B8B0D71626E906C08
7169FPDAVxTjbjuntGBbibBhLmV7rOz9MW/0zLDNscA7SdMIC+2wd68VWEg==

7 GENERAL WARNINGS FOR CNC APPLICATION DEVELOPMENT


WARNING

Be careful enough for the following warnings when you develop two or more
applications or use networks.
If you neglect them, machine may behave in an unexpected working and tool, work
piece, and machine may be damaged. In the worst case, there is an operator’s
extreme risk of death or serious injury.

1 Be careful enough if you write an identical NC data, an identical PMC data or a


series of related data set by two or more above applications including network
functions. Because they are executed based on each individual cycles (in other
words, asynchronous cycles), there is a possibility that the data will be written in
an unexpected order.

Therefore, do NOT write above data in the following cases.


- Applications and network functions
- Two or more applications
- Two or more network functions
Data, applications and network functions of interest are listed in below. However,
all may not be listed completely because new features will be added in the future.

2 Be careful enough that you must prevent PMC signals in the same byte from
being written by the following two or more applications including network
functions. While an application reads and writes one byte of PMC signals, other
applications may write the same byte.

3 Be careful enough if you process a PMC signal set that is related to a NC function
by using the following two or more applications including network functions.
Because they are executed based on each individual cycles (in other words,
asynchronous cycles), there is a possibility that the NC may receive the PMC
signal set in an unexpected order.

4 Generally, when multi-byte data are read or written at once among the following
two or more applications including network functions, the coherency of the read
multi-byte data (in other words, reading all latest data at once) is not guaranteed.
To ensure the coherency of the multi-byte data, prepare flags to notify the
completion of reading or writing process that is separated from the entity of the
data and make the handshaking process to access the data by using the flags.

Ed
About development 04 Draw A-42148-00093EN
Title cautionary note of
Date Sheet
customization software 2021. FANUC CORPORATION 31/33
07/19

© MyFANUC B702B2F68851464B8B0D71626E906C08
7169FPDAVxTjbjuntGBbibBhLmV7rOz9MW/0zLDNscA7SdMIC+2wd68VWEg==

WARNING
Data List Table
Category Data
Parameter, Tool compensation value and related data,
Work zero offset value and related data,
Workpiece coordinate system shift value and related data,
Macro variable, P-CODE variable, Program and related data,
General data for NC
Tool management function data, Tool life management data,
Error compensation related data ,
Overtravel check (Interference check) related data ,
Software operator’s panel related data
PMC data PMC signal, PMC parameter
Tool data for punch press and related data, Safety zone data and related data,
Data for Laser, Laser cutting condition data and related data, Laser oscillator setting data and
Punch press or Wire cut related data, Wire consumption compensation data, Guide position
compensation data, Workpiece leveling data
Other data Parameters for Data Server, Parameters for network setting

List Table of Applications and Network Functions


Category Functions
PMC Ladder, Macro Executor, C Language Executor, FANUC PICTURE,
Applications
FOCAS2
FL-net, EtherNet/IP, PROFINET, Modbus/TCP, PROFIBUS-DP, DeviceNet,
Network functions
CC-Link

5 CNC has functions that read or write PMC signals in other than the G/F address.
Be careful enough if the above mentioned applications and network read or write
PMC signals used by these functions. When reading or writing the same PMC
signal, applications or CNC functions may work in an unexpected manner.
As for the CNC functions of interest, refer to the connection manual
(Function) ”Appendix B. List of Functions Using PMC Signals Other Than G/F
Address”.

Ed
About development 04 Draw A-42148-00093EN
Title cautionary note of
Date Sheet
customization software 2021. FANUC CORPORATION 32/33
07/19

© MyFANUC B702B2F68851464B8B0D71626E906C08
7169FPDAVxTjbjuntGBbibBhLmV7rOz9MW/0zLDNscA7SdMIC+2wd68VWEg==

【Version history】

Ed Date Description
01 Jun.13,2019 The first edition registration
02 Feb.05,2020 1.Outline was modified. 4.FOCAS application was added.
03 Oct.30,2020 Section 2.3, 2.4 and 7 are added. A note in 3.2 was added.
04 Jul.19,2021 ‘Getting and releasing library handle’ is added to the section 2.1.
Description about website is deleted in the 1.Outline.

Ed
About development 04 Draw A-42148-00093EN
Title cautionary note of
Date Sheet
customization software 2021. FANUC CORPORATION 33/33
07/19

© MyFANUC B702B2F68851464B8B0D71626E906C08

You might also like