FANUC Series 30*/300*/300*s-MODEL A FANUC Series 31*/310*/310*s-MODEL A5 FANUC Series 31*/310*/310*s-MODEL A FANUC Series 32*/320*/320*s-MODEL A

Similar documents
GE Fanuc Automation Europe. Computer Numerical Controls. I/O Link II. Connection Manual B-62714EN/04 TECHNOLOGY AND MORE

GE Fanuc Automation Europe. Computer Numerical Controls FAPT PICTURE. for Windows. Operator s Manual B-66244EN/02 TECHNOLOGY AND MORE

GE Fanuc Automation Europe. Computer Numerical Controls. FANUC DeviceNet Board. Operator s Manual B-63404EN/03 TECHNOLOGY AND MORE

GE Fanuc Automation. Computer Numerical Control Products. Series 15i/150i-Model A Programming Manual (Macro Compiler/Macro Executor)

GE Fanuc Automation. Series 30i-Model A Series 300i-Model A Series 300is-Model A. Macro Compiler / Macro Executor. Computer Numerical Control Products

GE Fanuc Automation. Computer Numerical Control Products. DeviceNet Board. Operator's Manual. GFZ-63404EN/03 March FANUC CNC Controls

FANUC OPEN CNC OPERATOR S MANUAL BASIC OPERATION PACKAGE 2 B-63924EN/01

GE Fanuc Automation. Series 0i Model A. Computer Numerical Control Products. Connection Manual (Hardware)

GE Fanuc Automation. FAPT Picture for Windows. Computer Numerical Control Products. Operator's Manual

OPERATOR S MANUAL B-63734EN/01

GE Fanuc Automation. Series 16i / 18i / 21i Model TA Manual Guide. Computer Numerical Control Products. Operator's Manual

GE Fanuc Automation. PROFIBUS-DP Board. Computer Numerical Control Products. Operator's Manual

GE Fanuc Automation. Open CNC Ladder Editing Package (Windows) Computer Numerical Control Products. Operator's Manual

GE Fanuc Automation. Open CNC CNC Screen Display Function. Computer Numerical Control Products. Operator's Manual

Computer Numerical Control Products. Basic Operation Package 1 (BOP 1) for Windows 95/NT

=== Be sure to read this note. === MISRA C Rule Checker SQMlint V.1.03 Release 00B Release Notes

Byte Ordering. Jin-Soo Kim Computer Systems Laboratory Sungkyunkwan University

FA SYSTEM FOR PC OPERATORS MANUAL B 75044EN/02

Memory Upgrade for the Fanuc 16B (0010) Series CNC FROM Module Installation

Byte Ordering. Jinkyu Jeong Computer Systems Laboratory Sungkyunkwan University

DriveWizard Plus Instruction Manual

GE Fanuc Automation Computer Numerical Control Products. CNC Setting Tool. Operator s Manual, GFZ-64174EN/01. September 2004

ASPRS LiDAR SPRS Data Exchan LiDAR Data Exchange Format Standard LAS ge Format Standard LAS IIT Kanp IIT Kan ur

Series 0ί -MD Mate CNC STANDARD FEATURES

FAPT PICTURE & FPAssist

Character LCD Interface for ez80acclaim! MCUs

Memory Upgrade for the Fanuc 15B CNC

GE Fanuc Automation. Open CNC DNC Operation Management Package. Computer Numerical Control Products. Operator s Manual

Computers Programming Course 5. Iulian Năstac

PLC ONBOARD INSTRUCTION MANUAL

ECE2049-E18 Lecture 6 Notes 1. ECE2049: Embedded Computing in Engineering Design E Term Lecture #6: Exam Review

National Aeronautics and Space and Administration Space Administration. cfe Release 6.6

L2 - C language for Embedded MCUs

GE Fanuc Automation. Symbolic CAP T Basic Module V1. Computer Numerical Control Products. Operator s Manual

A Fast Review of C Essentials Part I

GE Fanuc Automation. Open CNC DNC Operation Management Package. Operator's Manual. Computer Numerical Control Products

AN703. Micro64/128. Accessing the 36k of SRAM 12/3/04

Instruction Set Architecture

Lecture 13: I/O I/O. Interrupts. How?

Engineering Tool for PC SDWP001 Operating Manual

FANUC PLC Parts. GE Fanuc Automation. Series 15i / 150i Model A Remote Buffer. Computer Numerical Control Products. Descriptions Manual

SmartHeap for Multi-Core

e-pg Pathshala Subject: Computer Science Paper: Embedded System Module: Interfacing External Devices using Embedded C Module No: CS/ES/22

Data Storage. August 9, Indiana University. Geoffrey Brown, Bryce Himebaugh 2015 August 9, / 19

Machine Controller MP900/MP2000 Series New Ladder Editor USER'S MANUAL

DEPARTMENT OF ECE QUESTION BANK SUBJECT: MICROPROCESSOR AND MICROCONTROLLER UNIT-1 PART-A (2 MARKS)

Instruction Sets: Characteristics and Functions

FANUC Series 30+-MODEL B FANUC Series 31+-MODEL B FANUC Series 32+-MODEL B. For Lathe System OPERATOR'S MANUAL B-64484EN-1/02

2. (2 pts) If an external clock is used, which pin of the 8051 should it be connected to?

B Interface description 12.01/

Technical Questions. Q 1) What are the key features in C programming language?

MEMEX FANUC METER (512K) HSL5/MME MEMORY UPGRADE INSTALLATION AND USER MANUAL M100704A

Fanuc Focas Ethernet Driver Help Kepware, Inc.

ARM Cortex-M4 Programming Model

Lab Overview. Lab Details. ECEN 4613/5613 Embedded System Design Week #7 Spring 2005 Lab #4 2/23/2005


Lecture 3. Review. CS 141 Lecture 3 By Ziad Kobti -Control Structures Examples -Built-in functions. Conditions: Loops: if( ) / else switch

Cat.No. V015-E1-1. NT-series. Host Interface Unit Direct Connection OPERATION MANUAL

Computer Organization (II) IA-32 Processor Architecture. Pu-Jen Cheng

EL2310 Scientific Programming

13-1. This chapter explains how to use different objects.

Distributed Systems. How do regular procedure calls work in programming languages? Problems with sockets RPC. Regular procedure calls

Reminder: compiling & linking

Programming refresher and intro to C programming

TPEditor User Manual

Programming with μc/os-ii Operating System on the Ide68k Integrated Development Environment

Chapter 6. Input Settings Screen

CS 326 Operating Systems C Programming. Greg Benson Department of Computer Science University of San Francisco

SYSdev Program Development Manual Version 4.3

Manual 09/11 MN Z-EN. NZM-XATS-C Automatic Transfer Switch-Controller Modbus Communication Protocol

Memory and C/C++ modules

Advanced Pointer & Data Storage

C Programming. Course Outline. C Programming. Code: MBD101. Duration: 10 Hours. Prerequisites:

Chaper 1: E10+ PLCs Host-Link Command Format

FIFTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLOGY-MARCH 2014 EMBEDDED SYSTEMS (Common for CT,CM) [Time: 3 hours] (Maximum marks : 100)

LCM-100 LCD Module User s Manual

IDEA. User s Guide. Part No IDE02 Issue 1-0, April 1995 Printed in U.S.A. (183)

DX200 OPTIONS INSTRUCTIONS

Computer Science 322 Operating Systems Mount Holyoke College Spring Topic Notes: C and Unix Overview

Lecture 03 Bits, Bytes and Data Types

Edition:2A ODM- 88. DVI Matrix Router USER MANUAL

DEC HEX ACTION EXTRA DESCRIPTION

31i-B5M 2/11/2016 Page 1

ECE2049-E17 Lecture 6 1. ECE2049: Embedded Computing in Engineering Design E Term Lecture #6: Exam Review

Target Definition Builder. Software release 4.20

AFRecorder 4800R Serial Port Programming Interface Description For Software Version 9.5 (Last Revision )

ECE2049: Homework 1. Due: Thursday, 25 May 2017 by 7pm

IAI Corporation Robot Controller X-SEL Series X-SEL-K. Sample Screen Manual. Mitsubishi Electric Corporation

Representation of Information

SIMATIC. Standard Software for S7-300 and S7-400 Standard Functions Part 2. Preface, Contents. Bit Logic Functions. Table Functions.

CncGcoder Models HD & HDx Manual

'C/C++' Project/Code Tutorial for Code Composter Studio (CCS)

Operation Manual First Edition

Special Topics for Embedded Programming

The industrial technology is rapidly moving towards ARM based solutions. Keeping this in mind, we are providing a Embedded ARM Training Suite.

DSP Mapping, Coding, Optimization

EL6483: Brief Overview of C Programming Language

CS240: Programming in C. Lecture 2: Overview

GE Fanuc Automation. Series 15 / 150 Model B for Machining Center. Computer Numerical Control Products. Descriptions Manual

ECE 477 Digital Systems Senior Design Project. Module 10 Embedded Software Development

Transcription:

FANUC Series 30*/300*/300*s-MODEL A FANUC Series 31*/310*/310*s-MODEL A5 FANUC Series 31*/310*/310*s-MODEL A FANUC Series 32*/320*/320*s-MODEL A C Language Executor Library (For Conversion from PMC C Language Function) PROGRAMMING MANUAL B-64183EN/01

!! "

B-64183EN/01 DEFINITION OF WARNING, CAUTION, AND NOTE DEFINITION OF WARNING, CAUTION, AND NOTE This manual includes safety precautions for protecting the user and preventing damage to the machine. Precautions are classified into Warning and Caution according to their bearing on safety. Also, supplementary information is described as a Note. Read the Warning, Caution, and Note thoroughly before attempting to use the machine. WARNING Applied when there is a danger of the user being injured or when there is a danger of both the user being injured and the equipment being damaged if the approved procedure is not observed. CAUTION Applied when there is a danger of the equipment being damaged, if the approved procedure is not observed. NOTE The Note is used to indicate supplementary information other than Warning and Caution. Read this manual carefully, and store it in a safe place. s-1

B-64183EN/01 TABLE OF CONTENTS TABLE OF CONTENTS DEFINITION OF WARNING, CAUTION, AND NOTE...s-1 1 GETTING STARTED...1 1.1 OVERVIEW... 2 1.2 RELATED DRAWING NUMBER... 3 2 HOW TO MAKE APPLICATION...4 2.1 INSTALLATION OF THE "C LIBRARY FOR CONVERSION" ON A PERSONAL COMPUTER... 5 2.2 CNC HARDWARE... 9 2.3 COMPATIBILITY WITH THE "C LIBRARY FOR C LANGUAGE BOARD".. 10 2.4 CONVERSION POINTS... 13 3 FUNCTION REFERENCE...18 3.1 FUNCTION LIST... 19 3.2 SYSTEM CALL... 25 3.2.1 Read the Task Timer Value...25 3.2.2 Set the Task Timer Value...26 3.2.3 Wait for the Timer Value...27 3.2.4 Wait for Time...28 3.2.5 Create an Event Flag...29 3.2.6 Delete the Event Flag...30 3.2.7 Set the Event Flag...31 3.2.8 Wait for the Event Flag...32 3.2.9 Clear the Event Flag...33 3.2.10 Set the Event Flag (Pulse type)...34 3.2.11 Create a Semaphore...35 3.2.12 Delete the Semaphore...36 3.2.13 Set the Semaphore...37 3.2.14 Wait for the Semaphore...38 3.3 SWITCH SCREEN... 39 3.3.1 Switch to the User Application Screen...39 3.3.2 Wait for Switching to the User Application Screen...40 3.3.3 Switch to the CNC Screen...41 3.4 MDI KEYS... 42 3.4.1 MDI Key Code Table...42 c-1

TABLE OF CONTENTS B-64183EN/01 3.4.2 Read key...44 3.4.3 Control a Key-in Line...46 3.4.4 Read Key Status...49 3.4.5 Disable Function Keys...50 3.4.6 Enable Function Keys...51 3.4.7 Read a Function Key...52 3.4.8 Disable Custom Keys...53 3.4.9 Enable Custom Keys...54 3.5 ACCESS TO THE PMC ADDRESS... 55 3.5.1 Read from the PMC Address (bit)...56 3.5.2 Write to the PMC Address (bit)...57 3.5.3 Read from the PMC Address (char)...58 3.5.4 Read from the PMC Address (short)...59 3.5.5 Read from the PMC Address (long)...60 3.5.6 Read from the PMC Address (unsigned char)...61 3.5.7 Read from the PMC Address (unsigned short)...62 3.5.8 Read from the PMC Address (unsigned long)...63 3.5.9 Write to the PMC Address (char)...64 3.5.10 Write to the PMC Address (short)...65 3.5.11 Write to the PMC Address (long)...66 3.5.12 Write to the PMC Address (unsigned char)...67 3.5.13 Write to the PMC Address (unsigned short)...68 3.5.14 Write to the PMC Address (unsigned long)...69 3.6 READ SYSTEM INFORMATION... 70 3.6.1 Read CNC Information...70 3.6.2 Read Symbol and Comment in LADDER Program (16 characters symbol is available)...71 3.6.3 Read Symbol and Comment in LADDER Program...73 3.6.4 Read a Message in LADDER Program...75 3.7 ACCESS TO THE EXTENDED NONVOLATILE MEMORY... 76 3.7.1 Read from the Extended Nonvolatile Memory...76 3.7.2 Write to the Extended Nonvolatile Memory...77 3.7.3 Get Size of the Extended Nonvolatile Memory...78 3.8 CHARACTER DISPLAY... 79 3.8.1 Color Palette for the Character Display...79 3.8.2 Coordinates of the Character Screen...80 3.8.3 Character Code...81 c-2

B-64183EN/01 TABLE OF CONTENTS 3.8.4 Initialize the Character Screen (80 Columns x 30 Lines)...82 3.8.5 Initialize a Character Screen (80 Columns x 25 Lines or 40 Columns x 16 Lines)...83 3.8.6 Erase the Entire Screen...84 3.8.7 Clear Lines...85 3.8.8 Clear Columns...86 3.8.9 Set a Display Position...87 3.8.10 Set a Display Attribute...88 3.8.11 Change Attribute of the Characters Being Displayed...89 3.8.12 Display ASCII Characters...90 3.8.13 Display Characters (Kanji, Hiragana and Special Characters)...91 3.8.14 Display Hex Size Characters...93 3.8.15 Display Cursor...94 3.8.16 Display Characters (ASCII, Kanji and Hiragana)...96 3.8.17 Save the Character Screen...98 3.8.18 Restore the Character Screen...100 3.8.19 Control the Screen...101 3.8.20 Set Background Color of the Character Screen...102 3.8.21 Set Palette for Character Screen...103 3.8.22 Initialize the Character Screen (74 Columns x 27 Lines)...104 3.8.23 Initialize the Character Screen (74 Columns x 30 Lines)...105 3.8.24 Initialize printf()...106 3.9 GRAPHIC DISPLAY... 107 3.9.1 Color Palette for Graphic Display...107 3.9.2 Coordinates of the Graphic Screen...108 3.9.3 Open the Graphic Screen...109 3.9.4 Close the Graphic Screen...110 3.9.5 Clear the Graphic Screen...111 3.9.6 Display or Hide the Graphic Screen...112 3.9.7 Set a Graphic Line Type...113 3.9.8 Set a Graphic Color...114 3.9.9 Draw Straight Lines...115 3.9.10 Draw an Arc...116 3.9.11 Paint...118 3.9.12 Shift...119 3.9.13 Get Graphic Screen Status...120 3.9.14 Erase the Square...121 c-3

TABLE OF CONTENTS B-64183EN/01 3.9.15 Set Palette for the Graphic Screen...122 3.10 READER / PUNCHER INTERFACE... 123 3.10.1 Open the Reader / Puncher Interface...124 3.10.2 Close the Reader / Puncher Interface...127 3.10.3 Read from the Reader / Puncher Interface...128 3.10.4 Write to the Reader / Puncher Interface...129 3.10.5 Open the Reader / Puncher Interface (for FANUC Handy File)...130 3.10.6 Get the File Information...134 3.10.7 Delete the File...136 3.10.8 Open the Reader / Puncher Interface...138 3.10.9 Close the Reader / Puncher Interface...141 3.10.10 Read from the Reader / Puncher Interface...142 3.10.11 Write to the Reader / Puncher Interface...143 3.10.12 Open the Reader / Puncher Interface (for FANUC Handy File)...144 3.10.13 Get the File Information...147 3.10.14 Delete the File...148 3.11 CNC WINDOW... 150 3.11.1 CNC Window Function (Read)...150 3.11.2 CNC Window Function (Write)...152 3.11.3 External Data...154 3.12 CNC PROGRAM... 155 3.12.1 Start Registration of the CNC Program...155 3.12.2 Register the CNC Program...156 3.12.3 End Registration of the CNC Program...158 3.12.4 Start DNC running of the CNC Program...159 3.12.5 Run the CNC Program (DNC running)...161 3.12.6 End DNC Running of the CNC Program...163 3.12.7 Search the CNC Program (Supported 8 Digits Program Number)...164 3.12.8 Search the CNC Program...165 3.12.9 Delete All CNC Programs...166 3.12.10 Delete the CNC Program (Supported 8 Digits Program Number)...167 3.12.11 Delete the CNC Program...168 3.12.12 Start Reading of the CNC Program (Supported 8 Digits Program Number)...169 3.12.13 Start Reading of the CNC Program...170 3.12.14 Read the CNC Program...171 3.12.15 End Reading of the CNC Program...173 3.12.16 Read the CNC Program Memory Information...174 c-4

B-64183EN/01 TABLE OF CONTENTS 3.12.17 Start Reading of the CNC Program List (Supported 8 Digits Program Number) 175 3.12.18 Start Reading of the CNC Program List...177 3.12.19 Read the CNC Program List...178 3.12.20 End Reading of the Program List...180 3.12.21 Start Registration of the CNC Program...181 3.12.22 Register the CNC Program...182 3.12.23 End Registration of the CNC Program...184 3.12.24 Start DNC running of the CNC Program...185 3.12.25 Run the CNC Program (DNC running)...186 3.12.26 End DNC Running of the CNC Program...188 3.12.27 Search the CNC Program (Supported 8 Digits Program Number)...189 3.12.28 Search the CNC Program...190 3.12.29 Delete All CNC Programs...191 3.12.30 Delete the CNC Program (Supported 8 Digits Program Number)...192 3.12.31 Delete the CNC Program...193 3.12.32 Start Reading of the CNC Program (Supported 8 Digits Program Number)...194 3.12.33 Start Reading of the CNC Program...195 3.12.34 Read the CNC Program...196 3.12.35 End Reading of the CNC Program...198 3.12.36 Read the CNC Program Memory Information...199 3.12.37 Start Reading of the CNC Program List (Supported 8 Digits Program Number) 200 3.12.38 Start Reading of the CNC Program List...201 3.12.39 Read the CNC Program List...202 3.12.40 End Reading of the Program List...204 3.13 CHARACTER CODE CONVERSION... 205 3.13.1 Convert Characters from ASCII to ISO Code...205 3.13.2 Convert Characters from ISO to ASCII Code...206 4 CHARACTER CODE (KANJI, HIRAGANA AND OTHERS)...207 c-5

B- 64183EN/01 1.GETTING STARTED 1 GETTING STARTED -1-

1.GETTING STARTED B- 64183EN/01 1.1 OVERVIEW The "C language executor library (for conversion from PMC C language)" is for the Series 30i/ 31i/ 32i and provides functions that are compatible with "Series 15i/ 150i/ 16i/ 160i/ 160is/ 18i/ 180i/ 180is/ 21i/ 210i/ 210is C-language library for C language board". If you use the "C language executor library (for conversion from PMC C language)" when you convert the C language application running on the "Series 15i/ 150i/ 16i/ 160i/ 160is/ 18i/ 180i/ 180is/ 21i/ 210i/ 210is C language board" to one running on the "Series 30i/ 31i/ 32i C language executor", there are following merits. You can save your efforts to convert the calling of C library functions in the C language program. In this manual, the function reference for the "C language executor library (for conversion from PMC C language)" is mainly described. About details of the "Series 30i/ 31i/ 32i C language executor", refer to the following manual. Manual Series 30i/ 300i/ 300is-MODEL A Series 31i/ 310i/ 310is-MODEL A Series 31i/ 310i/ 310is-MODEL A5 Series 32i/ 320i/ 320is-MODEL A C language executor operator's manual Drawing number B-63944EN-3 In this manual, following abbreviations will be used. Item C language executor library (for conversion from PMC C language) Series 15i/ 150i/ 16i/ 160i/ 160is/ 18i/ 180i/ 180is/ 21i/ 210i/ 210is C language board Series 15i/ 150i/ 16i/ 160i/ 160is/ 18i/ 180i/ 180is/ 21i/ 210i/ 210is C language library for C language board C language library (for C language executor) Abbreviation C library for conversion C language board C library for C language board C library for C executor -2-

B- 64183EN/01 1.GETTING STARTED 1.2 RELATED DRAWING NUMBER The related drawing number is shown below. Drawing number Name Contents A02B-0303-J734 Macro executor + This is the execution option for C executor. C language executor A02B-0303-J738#1M Custom software size 1 MB This is the memory option for C executor. A02B-0303-J738#2M Custom software size 2 MB The system of C executor uses about 700 KB A02B-0303-J738#3M Custom software size 3 MB memories and the "C library for conversion" A02B-0303-J738#4M Custom software size 4 MB uses about 100 KB memories. A02B-0303-J738#5M Custom software size 5 MB Therefore, the memory size that you can use is A02B-0303-J738#6M Custom software size 6 MB smaller than the total memory size. [Memory size] = [Total memory size] [about 800 KB] A02B-0303-J736 C language executor additional SRAM This is the nonvolatile memory option. (Optional) You can use 192 KB of nonvolatile memory. A02B-0303-J993#64K Nonvolatile memory expansion 64 KB This is the nonvolatile memory option. (Optional) A02B-0303-J993#256K Nonvolatile memory expansion 256 KB You can use 64 KB or 256 KB of nonvolatile memory. To access this memory, you have to use the function pmc_rdkpm(), pmc_wrkpm(), pl_kpmrd() or pl_kpmwrt(). A08B-9010-J610#EN07 C language library (for C language executor) This is the "C language library" for the C executor. B-63944JA-3 Series 30i/ 300i/ 300is-MODEL A This is the manual for the C executor. Series 31i/ 310i/ 310is-MODEL A Series 31i/ 310i/ 310is-MODEL A5 Series 32i/ 320i/ 320is-MODEL A C language executor operator's manual A08B-9210-J719#ZZ11 C language executor library (for conversion from PMC C language) This is the "C library for conversion". If you use this library, you can save efforts to convert the C language program running on a "C language board" to one running on a "30i/ 31i/ 32i C executor". WindRiver Diab C/C++ Power-PC Compiler This is the C/C++ compiler and linker. -3-

2.HOW TO MAKE APPLICATION B- 64183EN/01 2 HOW TO MAKE APPLICATION -4-

B- 64183EN/01 2.HOW TO MAKE APPLICATION 2.1 INSTALLATION OF THE "C LIBRARY FOR CONVERSION" ON A PERSONAL COMPUTER The development environment of C executor The "C library for conversion" has to be installed on the development environment of C executor on a personal computer. If a C compiler and the "C library for C executor" have not been installed on a personal computer, install them. About the installation of C compiler and the "C library for C executor", refer to the following manual. "C language executor operator's manual B-63944EN-3" C library for conversion The files and directories structure of the installation CD-ROM of the "C library for conversion" is shown below. <CD-ROM> inc lib pmclib.h clblib.o pmclib.h clblib.o Header file Library file The example of files and directories structure of the development environment of C executor is shown below. To install the "C library for conversion", (1) Copy the file "pmclib.h" into "inc" directory. (2) Copy the file "clblib.o" into "lib" directory. <Install directory of the C library for C executor> inc <- pmclib.h lib <- clblib.o man tool user Modification of "makefile" To use the "C library for conversion", you have to bind the "clblib.o" to the executable file when a linking process. To do this, you should apply modifications, that is to add the file "$(FCLIB) clblib.o" to the description of source files of linking command, in the "makefile". -5-

2.HOW TO MAKE APPLICATION B- 64183EN/01 The example of modification of "makefile" is shown below. The number of modification point is 10. # Make file for FS30i C Executor user application # # This makefile is for NMAKE.EXE # # 2000.09.10 FANUC LTD. # 2000.09.12... #. STEP1 STEP1_1.MAP : $(TASK1) $(RAMOBJ) $(SELEC). STEP1 STEP1_1.LNK $(TOOL) STEP1.LNK 1 $(LINK) -@<<$(TMP_FILE). STEP1 STEP1_1.LNK -o. STEP1 STEP1_1.ELF $(TASK1) $(RAMOBJ) $(FCLIB) tsk1_lib.o $(FCLIB) cexe_lib.o $(FCLIB) clblib.o $(FCLIB) jump_tbl.o -@O=. STEP1 STEP1_1.MAP <<NOKEEP $(TASK1LEN) :. STEP1 STEP1_1.MAP $(TOOL) GAWK -v task=1 -f $(TOOL) CHK_LEN1.AWK. STEP1 STEP1_1.MAP > $(TASK1LEN) #. STEP1 STEP1_2.MAP : $(TASK2) $(RAMOBJ) $(SELEC). STEP1 STEP1_2.LNK $(TOOL) STEP1.LNK 2 $(LINK) -@<<$(TMP_FILE). STEP1 STEP1_2.LNK -o. STEP1 STEP1_2.ELF $(TASK2) $(RAMOBJ) $(FCLIB) tsk2_lib.o $(FCLIB) cexe_lib.o $(FCLIB) clblib.o $(FCLIB) jump_tbl.o -@O=. STEP1 STEP1_2.MAP <<NOKEEP $(TASK2LEN) :. STEP1 STEP1_2.MAP $(TOOL) GAWK -v task=2 -f $(TOOL) CHK_LEN1.AWK. STEP1 STEP1_2.MAP > $(TASK2LEN) #. STEP1 STEP1_3.MAP : $(TASK3) $(RAMOBJ) $(SELEC). STEP1 STEP1_3.LNK $(TOOL) STEP1.LNK 3 $(LINK) -@<<$(TMP_FILE). STEP1 STEP1_3.LNK -o. STEP1 STEP1_3.ELF $(TASK3) $(RAMOBJ) $(FCLIB) tsk3_lib.o $(FCLIB) cexe_lib.o $(FCLIB) clblib.o $(FCLIB) jump_tbl.o -@O=. STEP1 STEP1_3.MAP <<NOKEEP $(TASK3LEN) :. STEP1 STEP1_3.MAP $(TOOL) GAWK -v task=3 -f $(TOOL) CHK_LEN1.AWK. STEP1 STEP1_3.MAP > $(TASK3LEN)... -6-

B- 64183EN/01 2.HOW TO MAKE APPLICATION #. STEP1 STEP1_4.MAP : $(TASK4) $(RAMOBJ) $(SELEC). STEP1 STEP1_4.LNK $(TOOL) STEP1.LNK 4 $(LINK) -@<<$(TMP_FILE). STEP1 STEP1_4.LNK -o. STEP1 STEP1_4.ELF $(TASK4) $(RAMOBJ) $(FCLIB) tsk4_lib.o $(FCLIB) cexe_lib.o $(FCLIB) clblib.o $(FCLIB) jump_tbl.o -@O=. STEP1 STEP1_4.MAP <<NOKEEP $(TASK4LEN) :. STEP1 STEP1_4.MAP $(TOOL) GAWK -v task=4 -f $(TOOL) CHK_LEN1.AWK. STEP1 STEP1_4.MAP > $(TASK4LEN) #. STEP1 STEP1_5.MAP : $(TASK5) $(RAMOBJ) $(SELEC). STEP1 STEP1_5.LNK $(TOOL) STEP1.LNK 5 $(LINK) -@<<$(TMP_FILE). STEP1 STEP1_5.LNK -o. STEP1 STEP1_5.ELF $(TASK5) $(RAMOBJ) $(FCLIB) tsk5_lib.o $(FCLIB) cexe_lib.o $(FCLIB) clblib.o $(FCLIB) jump_tbl.o -@O=. STEP1 STEP1_5.MAP <<NOKEEP $(TASK5LEN) :. STEP1 STEP1_5.MAP $(TOOL) GAWK -v task=5 -f $(TOOL) CHK_LEN1.AWK. STEP1 STEP1_5.MAP > $(TASK5LEN) # $(TASKALEN) : $(CHK_LEN) echo s/sram_len/$(sram_len)/g> $(TASKALEN) $(TOOL) GAWK -f $(TOOL) CHK_LEN2.AWK <<$(TMP_FILE) >> $(TASKALEN) $(CHK_LEN) <<NOKEEP # TASK1.ELF : $(TASKALEN) $(SELEC). STEP2 TASK1.DAT $(TOOL) STEP2.LNK 1 $(TOOL) SED -f $(TASKALEN). STEP2 TASK1.DAT >. STEP2 TASK1.LNK $(LINK) -@<<$(TMP_FILE). STEP2 TASK1.LNK -o TASK1.ELF $(TASK1) $(RAMOBJ) $(FCLIB) tsk1_lib.o $(FCLIB) cexe_lib.o $(FCLIB) clblib.o $(FCLIB) jump_tbl.o -@O=. map task1.map <<NOKEEP # TASK2.ELF : $(TASKALEN) $(SELEC). STEP2 TASK2.DAT $(TOOL) STEP2.LNK 2 $(TOOL) SED -f $(TASKALEN). STEP2 TASK2.DAT >. STEP2 TASK2.LNK $(LINK) -@<<$(TMP_FILE). STEP2 TASK2.LNK -o TASK2.ELF $(TASK2) $(RAMOBJ) $(FCLIB) tsk2_lib.o $(FCLIB) cexe_lib.o $(FCLIB) clblib.o $(FCLIB) jump_tbl.o -@O=. map task2.map <<NOKEEP #... -7-

2.HOW TO MAKE APPLICATION B- 64183EN/01 # TASK3.ELF : $(TASKALEN) $(SELEC). STEP2 TASK3.DAT $(TOOL) STEP2.LNK 3 $(TOOL) SED -f $(TASKALEN). STEP2 TASK3.DAT >. STEP2 TASK3.LNK $(LINK) -@<<$(TMP_FILE). STEP2 TASK3.LNK -o TASK3.ELF $(TASK3) $(RAMOBJ) $(FCLIB) tsk3_lib.o $(FCLIB) cexe_lib.o $(FCLIB) clblib.o $(FCLIB) jump_tbl.o -@O=. map task3.map <<NOKEEP # TASK4.ELF : $(TASKALEN) $(SELEC). STEP2 TASK4.DAT $(TOOL) STEP2.LNK 4 $(TOOL) SED -f $(TASKALEN). STEP2 TASK4.DAT >. STEP2 TASK4.LNK $(LINK) -@<<$(TMP_FILE). STEP2 TASK4.LNK -o TASK4.ELF $(TASK4) $(RAMOBJ) $(FCLIB) tsk4_lib.o $(FCLIB) cexe_lib.o $(FCLIB) clblib.o $(FCLIB) jump_tbl.o -@O=. map task4.map <<NOKEEP # TASK5.ELF : $(TASKALEN) $(SELEC). STEP2 TASK5.DAT $(TOOL) STEP2.LNK 5 $(TOOL) SED -f $(TASKALEN). STEP2 TASK5.DAT >. STEP2 TASK5.LNK $(LINK) -@<<$(TMP_FILE). STEP2 TASK5.LNK -o TASK5.ELF $(TASK5) $(RAMOBJ) $(FCLIB) tsk5_lib.o $(FCLIB) cexe_lib.o $(FCLIB) clblib.o $(FCLIB) jump_tbl.o -@O=. map task5.map <<NOKEEP... -8-

B- 64183EN/01 2.HOW TO MAKE APPLICATION 2.2 CNC HARDWARE The comparison between the hardware, to execute the C language application, for the "Series 30i/ 31i/ 32i C executor" and one for the "Series 15i/ 16i/ 18i/ 21i C language board" is shown below. Item CPU Program code Work memory Work memory (Nonvolatile) Series 30i/ 31i/ 32i C executor PowerPC compatible CPU About 5.2 MB in the maximum (Optional) *Note 1 About 250 KB in the maximum (Optional) *Note 2, 3 Series 16i/ 18i/ 21i C language board 80486DX2 2 MB in the maximum (Optional) 256 KB in the maximum 64 KB in the maximum (Optional) Display 10.4" color LCD 10.4" color LCD 9.5" monochrome LCD 8.4" color LCD 7.2" monochrome LCD Series 15i C language board 80486DX2 2 MB in the maximum (Optional) 256 KB in the maximum 64 KB in the maximum (Optional) 10.4" color LCD 9.5" monochrome LCD RS-232C 2ch 2ch 2ch Memory card Supported Not supported Not supported Touch panel Supported Not supported Not supported NOTE 1. When a "Custom software size 6MB" option, A02B-0303-J738#6M, is equipped and the "C library for conversion" is used, you can use about 5.2 MB memory. 2. When a "C language executor additional SRAM" option, A02B-0303-J736, is equipped, you can use about 250 KB nonvolatile memory. 3. When a "Nonvolatile memory expansion 256 KB" option, A02B-0303-J993#256K, is equipped, you can use additional 256 KB of nonvolatile memory. -9-

2.HOW TO MAKE APPLICATION B- 64183EN/01 2.3 COMPATIBILITY WITH THE "C LIBRARY FOR C LANGUAGE BOARD" Overview The "C library for conversion" is designed to be compatible with the "C library for C language board". However, some functions are unavailable and behavior of some functions is different from "C library for C language board" because of the difference of hardware and CNC system software, and the restriction of the C executor. In this case, to use a similar conventional function of C executor is worth considering. The software block diagram of "C library for conversion" is shown below. C language application C library for C executor C library for conversion CNC system software Display driver Keyboard driver RS-232C driver Memory card driver Other driver Many functions of the "C library for conversion" are designed to call some functions of the "C library for C executor" to carry out the purpose. This means that the "C library for conversion" have tendency to be slower than the "C library for C executor". Furthermore, the simultaneous use of some similar function of the "C library for C executor" may be restricted, such as functions related to RS-232C and CNC program. If the execution speed or above restriction turn into a grave issue, to use a similar conventional function of C executor is worth considering. The different points from the "C library for C language board" The differences between the "C library for conversion" and the "C library for C language board" are shown below. About the details, see the reference of each function. - System call - Following functions are unavailable. os_chng_pri(), os_new_mem(), os_disp_mem(), os_rep_mem(), os_mak2_sem(), os_queu_sem(), os_make_mbx(), os_delt_mbx(), os_read_mbx(), os_red2_mbx(), os_writ_mbx(), os_wrt2_mbx(), os_make_pkt(), os_delt_pkt(), os_send_pkt(), os_recv_pkt(), os_mark_pkt(), os_rmrk_pkt(), os_curr_tsk() -10-

B- 64183EN/01 2.HOW TO MAKE APPLICATION - Switch screen - MDI keys Some behaviors of the following function are different. pl_pcmdi() Following functions are unavailable. pl_fcustom_ign(), pl_fcustom_avail() Some behaviors of following functions are different. pl_keysts(), pl_fkey_ign(), pl_fkey_avail() - Access to the PMC address Following functions are unavailable. pl_memc(), pl_memuc(), pl_mems(), pl_memus(), pl_meml(), pl_memul(), pl_memc2(), pl_memuc2(), pl_mems2(), pl_memus2(), pl_meml2(), pl_memul2() Following functions are added. pl_memcrd2(), pl_memucrd2(), pl_memsrd2(), pl_memusrd2(), pl_memlrd2(), pl_memulrd2(), pl_memcwrt2(), pl_memucwrt2(), pl_memswrt2(), pl_memuswrt2(), pl_memlwrt2(), pl_mwmulwrt2() - Read system information Some behaviors of the following function are different. pl_sysinfrd() The following function is added. pl_symcmt2() - Access to the extended nonvolatile memory The "Nonvolatile memory expansion 256 KB" option is added. - Character display Following functions are unavailable. pl_dspopen2(), pl_dspopen3() Some behaviors of following functions are different. pl_dspopen4(), pl_dspstrw(), pl_cursor(), initreq_printf() - Graphic display The following function is unavailable. pl_grpopen2() Some behavior of the following function is different. pl_grparc() -11-

2.HOW TO MAKE APPLICATION B- 64183EN/01 - Reader / puncher interface The baud rate setting "19200 bps" is unavailable. The simultaneous use of similar function in "C library for C executor" is restricted. - CNC window The following function is unavailable. pl_exin() Some behaviors of following functions are different. pl_windr(), pl_windw() - CNC program The following functions are unavailable. pl_nc_vrfstart(), pl_nc_verify(), pl_nc_vrfend(), pl_nc_vrfstart2(), pl_nc_verify2(), pl_nc_vrfend2() - Character code conversion All functions are compatible. The simultaneous use of similar function in "C library for C executor" is restricted. - Floating point All functions defined in the file "math.h" are available. There may be some difference of accuracy because the CPU and the C compiler are different. -12-

B- 64183EN/01 2.HOW TO MAKE APPLICATION 2.4 CONVERSION POINTS Conversion points from C language board to C executor are shown below. C Compiler Followings are conversion points caused by the differences of C compiler. Item 30i/ 31i/ 32i C executor Diab C/C++ 15i/ 16i/ 18i/ 21i C language board INTEL i-c286 Addressing 32 bit addressing 16 bit addressing Size of "int" 4 bytes 2 bytes Size of pointer Data alignment 4 bytes 2 bytes (near) 4 bytes (far) char 1 byte 1 byte short 2 bytes 2 bytes long 4 bytes 2 bytes float 4 bytes 2 bytes double 8 bytes 2 bytes pointer 4 bytes 2 bytes Byte order Big endian Little endian Syntax checking of compiler Stricter Looser Conversion Points The addressing size is extended from 16 bits to 32 bits. You can access memory over 64 KB size. The size of "int" is different. The program, that the size of "int" is assumed 2 bytes, has to be modified. The size of pointer is different. The program, that the size of pointer is assumed 2 bytes, has to be modified. The default setting of data alignment is different. The program, that the location address of a member in a structure is assumed, has to be modifiled. The byte order is different. The program, that the byte order is assumed little endian, has to be modified. The syntax checking of a C compiler becomes stricter. -13-

2.HOW TO MAKE APPLICATION B- 64183EN/01 Tasks The differences between task on "30i/ 31i/ 32i C executor" and task on "15i/ 16i/ 18i/ 21i C language board" are shown below. Item 30i/ 31i/ 32i C executor 15i/ 16i/ 18i/ 21i C language board Number of tasks 5 in the maximum 16 in the maximum Task priority Fixed Programmable Execution cycle Fixed Programmable Other character The purpose of each task have been defined and fixed. All tasks have a same character. On "C executor", you can use up to five tasks. The purpose of an each task has been defined and an each task will executed automatically in certain cycle with certain task priority. The characters of each task on C executor are shown below. CNC System Task (Axes Control etc.) Real-time Custom Macro (A-5) High-level Task CNC System Task (Preparing etc.) Auxiliary Macro of Macro Executor (A-3) Alarm Task (A-2) Communication Task CNC System Task (A-1) Main Task (Display etc.) (A-4) Window Task High Low Priority (A-1) Main task (Priority: Low) This task is to execute a process for user application screen. In this task, you can use almost all the library functions. When the user application screen is changed to another screen, this task is automatically suspended by the system. When the user application screen is displayed again, this task is automatically executed again. If no background process is necessary in the user application, you should describe all programs in this task. (A-2) Communication task (Priority: Middle) This task is to execute a background communication process using RS-232C. In this task, the use of some kind of functions is restricted. You should describe a background communication process using RS-232C in this task. If the background communication process is not required, this means that the communication process runs only on the user screen, you should describe it in the Main task. (A-3) Alarm task (Priority: Middle) This task is to execute a background process. In this task, the use of some kind of functions is restricted. This task is executed automatically and cyclically. Its execution cycle occasionally may changes because of the busy status of the -14-

B- 64183EN/01 2.HOW TO MAKE APPLICATION CNC system software. Therefore, you should describe background process, which does not require strict cyclic execution, in this task. (A-4) Window task (Priority: Low) This task is to execute a virtual machine operator's panel function or virtual keyboard function using a touch panel. In this task, the use of some kind of functions is restricted. (A-5) High-level task (Priority: High) This task is to execute a background process that requires a short and accurate execution cycle. The priority of this task is very high, this means that a large process in this task may have effect on the execution of CNC system software. Carefully you should select the process running in this task. In this task, the use of some kind of functions is restricted. The functions that you can use are described in the following manuals. - "3.1 Function List" in this manual - "C language executor operator's manual, B-63944EN-3, Function List" The details of the High-level task are described in the following manual. - "C language executor operator's manual, B-63944EN-3, High-level Task" When you convert a C program running on "C language board" to "C executor", you should assign all tasks on C language board to five tasks on C executor. The assignment policy is shown below. (1) Classify all tasks on "C language board" under following four types. (B-1) Background process (High priority) Select process carefully that has to be executed in high and accurate cycle such a machine and a CNC control. (B-2) Background process (Low priority) Select process that is nearly executed in cyclically. (B-3) Background process (RS-232C) Select RS-232C process that has to be executed in background on any screens. (B-4) User application screen process Select process that is executed when a user application screen is displayed, such a displaying process, key handling and so on. You should select a RS-232C process that is only executed on user screen too. -15-

2.HOW TO MAKE APPLICATION B- 64183EN/01 (2) You should describe above classified process to following each task on C executor. Classification in (1) (B-1) (B-2) (B-3) (B-4) Tasks on C executor (A-5) High-level task (A-3) Alarm task (A-2) Communication task (A-1) Main task Using functions When you use the "C library for conversion", you can use both functions of "C library for conversion" and "C library for C executor". Using the "C library for conversion", you can save your efforts to convert the calling of C library functions in the C language program. Furthermore, you can also use the rich functions of the "C library for C executor". However, the mixed use of some kind of functions in each library may be restricted, such as RS-232C functions and CNC program functions. About the details, refer to the following manual. "3.10 READER / PUNCHER INTERFACE" in this manual "3.12 CNC PROGRAM" in this manual By the library structure, the "C library for conversion" have tendency to be slower than the "C library for C executor". If the slower execution speed of the user program turn into grave issue, to use a similar conventional function of "C library for C executor" is worth considering. If you develop a new user application, we recommend that you use the rich functions in "C library for C executor" rather than "C library for conversion". Common variables Nonvolatile variables You should define common variables in the file "DRAMVAR.C". There are two types of nonvolatile memory. The way to access is different between them. If you use nonvolatile memory area newly, the type (1) is recommended because of the easy programming. (1) "C language executor additional SRAM (A02B-0303-J736)" You can use about 250 KB nonvolatile memory. In addition, you can program and use it by the description of normal C language sentence. (2) "Nonvolatile memory expansion 64 KB (A02B-0303-J993#64K)" or "Nonvolatile memory expansion 256 KB (A02B-0303-J993#256K)" You can use 64 KB or 256 KB nonvolatile memory. You can access it using the function pl_kpmrd() or pl_kpmwrt(). -16-

B- 64183EN/01 2.HOW TO MAKE APPLICATION PMC address The byte order is different between "C executor" and "C language board" because they have different type of CPU. This means that the direct accessing using a pointer is not compatible between them. Therefore, following functions are unavailable in "C library for conversion". pl_memc(), pl_memuc(), pl_mems(), pl_memus(), pl_meml(), pl_memul() pl_memc2(), pl_memuc2(), pl_mems2(), pl_memus2(), pl_meml2(), pl_memul2() You should use functions "pmc_rdpmcrng()" and "pmc_wrpmcrng()" in "C library for C executor" or following new functions in "C library for conversion" pl_memcrd2(), pl_memucrd2(), pl_memsrd2(), pl_memusrd2(), pl_memlrd2(), pl_memulrd2() pl_memcwrt2(), pl_memucwrt2(), pl_memswrt2(), pl_memuswrt2(), pl_memlwrt2(), pl_mwmulwrt2() The example using "C library for conversion" is shown below. Before) num = *pl_mems2(id, offset); num = 0x8000; *pl_mems2(id, offset) = num; After) num = pl_memsrd2(id, offset, NULL); num = 0x8000; pl_memswrt2(id, offset, num); -17-

3.FUNCTION REFERENCE B- 64183EN/01 3 FUNCTION REFERENCE -18-

B- 64183EN/01 3.FUNCTION REFERENCE 3.1 FUNCTION LIST SYSTEM CALL No. Name Content Available task 3.2.1 os_show_tim() Read the Task Timer Value MWAC 3.2.2 os_set_tim() Set the Task Timer Value MWAC 3.2.3 os_sync_tim() Wait for the Timer Value MWAC 3.2.4 os_wait_tim() Wait for Time MWAC 3.2.5 os_make_flg() Create an Event Flag MAC 3.2.6 os_delt_flg() Delete the Event Flag MAC 3.2.7 os_sign_flg() Set the Event Flag MAC 3.2.8 os_wait_flg() Wait for the Event Flag MAC 3.2.9 os_clar_flg() Clear the Event Flag MAC 3.2.10 os_puls_flg() Set the Event Flag (Pulse type) MAC 3.2.11 os_make_sem() Create a Semaphore MAC 3.2.12 os_delt_sem() Delete the Semaphore MAC 3.2.13 os_sign_sem() Set the Semaphore MAC 3.2.14 os_wait_sem() Wait for the Semaphore MAC - os_chng_pri() Change the Task Priority - - os_new_mem() Allocate Memory - - os_disp_mem() Free Memory - - os_repo_mem() Get Memory Information - - os_mak2_sem() Create a Semaphore (Exclusive control type) - - os_queu_sem() Change the Semaphore Type - - os_make_mbx() Create a Mailbox - - os_delt_mbx() Delete the Mailbox - - os_read_mbx() Receive Message (4 bytes) - - os_red2_mbx() Receive Message (8 bytes) - - os_writ_mbx() Send Message (4 bytes) - - os_wrt2_mbx() Send Message (8 bytes) - - os_make_pkt() Create a Packet - - os_delt_pkt() Delete the Packet - - os_send_pkt() Send the Packet - - os_recv_pkt() Receive a Packet - - os_mark_pkt() Set Mark to the Packet - - os_rmrk_pkt() Clear Mark to the Packet - - os_curr_tsk() Get Task ID - M: Main Task, W: Window Task, A: Alarm Task, C: Communication Task, H: High-level Task, -: Not supported SWITCH SCREEN No. Name Content Available task 3.3.1 pl_pcmdi() Switch to the User Application Screen MWAC 3.3.2 pl_pcmdi_wait() Wait for Switching to the User Application Screen M 3.3.3 pl_ncmdi() Switch to the CNC Screen MWAC M: Main Task, W: Window Task, A: Alarm Task, C: Communication Task, H: High-level Task, -: Not supported -19-

3.FUNCTION REFERENCE B- 64183EN/01 MDI KEYS No. Name Content Available task 3.4.2 pl_mdikey() Read key M 3.4.3 pl_keydef() Control a Key-in Line M 3.4.4 pl_keysts() Read Key Status M 3.4.5 pl_fkey_ign() Disable Function Key M 3.4.6 pl_fkey_avail() Enable Function Keys M 3.4.7 pl_fkey_sts() Read a Function Key M 3.4.8 pl_fcustom_ign() Disable Custom Keys M 3.4.9 pl_fcustom_avail() Enable Custom Keys M M: Main Task, W: Window Task, A: Alarm Task, C: Communication Task, H: High-level Task, -: Not supported ACCESS TO THE PMC ADDRESS No. Name Content Available task 3.5.1 pl_membrd2() Read from the PMC Address (bit) MWACH 3.5.2 pl_membwrt2() Write to the PMC Address (bit) MWACH 3.5.3 pl_memcrd2() Read from the PMC Address (char) MWACH 3.5.4 pl_memsrd2() Read from the PMC Address (short) MWACH 3.5.5 pl_memlrd2() Read from the PMC Address (long) MWACH 3.5.6 pl_memucrd2() Read from the PMC Address (unsigned char) MWACH 3.5.7 pl_memusrd2() Read from the PMC Address (unsigned short) MWACH 3.5.8 pl_memulrd2() Read from the PMC Address (unsigned long) MWACH 3.5.9 pl_memcwrt2() Write to the PMC Address (char) MWACH 3.5.10 pl_memswrt2() Write to the PMC Address (short) MWACH 3.5.11 pl_memlwrt2() Write to the PMC Address (long) MWACH 3.5.12 pl_memucwrt2() Write to the PMC Address (unsigned char) MWACH 3.5.13 pl_memuswrt2() Write to the PMC Address (unsigned short) MWACH 3.5.14 pl_memulwrt2() Write to the PMC Address (unsigned long) MWACH - pl_memc() Get Pointer to the PMC Address (char *) - - pl_mems() Get Pointer to the PMC Address (short *) - - pl_meml() Get Pointer to the PMC Address (long *) - - pl_memuc() Get Pointer to the PMC Address (unsigned char *) - - pl_memus() Get Pointer to the PMC Address (unsigned short *) - - pl_memul() Get Pointer to the PMC Address (unsigned long *) - - pl_membrd() Read from the PMC Address - - pl_membwrt() Write to the PMC Address - - pl_memc2() Get Pointer to the PMC Address (char *) - - pl_mems2() Get Pointer to the PMC Address (short *) - - pl_meml2() Get Pointer to the PMC Address (long *) - - pl_memuc2() Get Pointer to the PMC Address (unsigned char *) - - pl_memus2() Get Pointer to the PMC Address (unsigned short *) - - pl_memul2() Get Pointer to the PMC Address (unsigned long *) - M: Main Task, W: Window Task, A: Alarm Task, C: Communication Task, H: High-level Task, -: Not supported -20-

B- 64183EN/01 3.FUNCTION REFERENCE READ SYSTEM INFORMATION No. Name Content Available task 3.6.1 pl_sysinfrd() Read CNC Information MWACH 3.6.2 pl_symcmt2() Read Symbol and Comment in LADDER Program MWACH (16 characters symbol is available) 3.6.3 pl_symcmt() Read Symbol and Comment in LADDER Program MWACH 3.6.4 pl_message() Read a Message in LADDER Program MWACH M: Main Task, W: Window Task, A: Alarm Task, C: Communication Task, H: High-level Task, -: Not supported ACCESS TO THE EXTENDED NONVOLATILE MEMORY No. Name Content Available task 3.7.1 pl_kpmrd() Read from the Extended Nonvolatile Memory MWACH 3.7.2 pl_kpmwrt() Write to the Extended Nonvolatile Memory MWACH 3.7.3 pl_kpmsiz() Get Size of the Extended Nonvolatile Memory MWACH M: Main Task, W: Window Task, A: Alarm Task, C: Communication Task, H: High-level Task, -: Not supported CHARACTER DISPLAY No. Name Content Available task 3.8.4 pl_dspopen4() Initialize the Character Screen M (80 Columns x 30 Lines) 3.8.5 pl_dspopen() Initialize a Character Screen M (80 Columns x 25 Lines or 40 Columns x 16 Lines) 3.8.6 pl_dspclr() Erase the Entire Screen MW 3.8.7 pl_dspclrl() Clear Lines MW 3.8.8 pl_dspclrc() Clear Columns MW 3.8.9 pl_dsppos() Set a Display Position MW 3.8.10 pl_dspcolor() Set a Display Attribute MW 3.8.11 pl_dspattr() Change Attribute of the Characters Being Displayed MW 3.8.12 pl_dspstr() Display ASCII Characters MW 3.8.13 pl_dspstrw() Display Characters MW (Kanji, Hiragana and Special Characters) 3.8.14 pl_dsptrblr() Display Hex Size Characters MW 3.8.15 pl_cursor() Display Cursor MW 3.8.16 pl_dspchar() Display Characters MW (ASCII, Kanji and Hiragana) 3.8.17 pl_dspsave() Save the Character Screen MW 3.8.18 pl_dspresave() Restore the Character Screen MW 3.8.19 pl_dspcntl() Control the Screen MW 3.8.20 pl_backcolor() Set Background Color of the Character Screen MW 3.8.21 pl_dsppalette() Set Palette for Character Screen MW 3.8.22 pl_dspopen2() Initialize the Character Screen M (74 Columns x 27 Lines) 3.8.23 pl_dspopen3() Initialize the Character Screen M (74 Columns x 30 Lines) 3.8.24 initreq_printf() Initialize printf() MW M: Main Task, W: Window Task, A: Alarm Task, C: Communication Task, H: High-level Task, -: Not supported -21-

3.FUNCTION REFERENCE B- 64183EN/01 GRAPHIC DISPLAY No. Name Content Available task 3.9.3 pl_grpopen() Open the Graphic Screen M 3.9.4 pl_grpclose() Close the Graphic Screen M 3.9.5 pl_grpclr() Clear the Graphic Screen MW 3.9.6 pl_grpdspon() Display or Hide the Graphic Screen MW 3.9.7 pl_grplntyp() Set a Graphic Line Type MW 3.9.8 pl_grpcolor() Set a Graphic Color MW 3.9.9 pl_grpline() Draw Straight Lines MW 3.9.10 pl_grparc() Draw an Arc MW 3.9.11 pl_paint() Paint MW 3.9.12 pl_grpsft() Shift MW 3.9.13 pl_grpstatus() Get Graphic Screen Status MW 3.9.14 pl_grpclr2() Erase the Square MW 3.9.15 pl_grppalette() Set Palette for the Graphic Screen MW - pl_grpopen2() Open the Graphic Screen (432 dots x 592 dots) - M: Main Task, W: Window Task, A: Alarm Task, C: Communication Task, H: High-level Task, -: Not supported READER / PUNCHER INTERFACE No. Name Content Available task 3.10.1 pl_rsopen2() Open the Reader / Puncher Interface C 3.10.2 pl_rsclose2() Close the Reader / Puncher Interface C 3.10.3 pl_rsrd2() Read from the Reader / Puncher Interface C 3.10.4 pl_rswrt2() Write to the Reader / Puncher Interface C 3.10.5 pl_fopen2() Open the Reader / Puncher Interface C (for FANUC Handy File) 3.10.6 pl_fdir2() Get the File Information C 3.10.7 pl_fdel2() Delete the File C 3.10.8 pl_rsopen() Open the Reader / Puncher Interface C 3.10.9 pl_rsclose() Close the Reader / Puncher Interface C 3.10.10 pl_rsrd() Read from the Reader / Puncher Interface C 3.10.11 pl_rswrt() Write to the Reader / Puncher Interface C 3.10.12 pl_fopen() Open the Reader / Puncher Interface C (for FANUC Handy File) 3.10.13 pl_fdir() Get the File Information C 3.10.14 pl_fdel() Delete the File C M: Main Task, W: Window Task, A: Alarm Task, C: Communication Task, H: High-level Task, -: Not supported -22-

B- 64183EN/01 3.FUNCTION REFERENCE CNC WINDOW No. Name Content Available task 3.11.1 pl_nc_windr() CNC Window Function (Read) No. 23, 24, 25, 26, 27, 28, 29, 30, 31, 34, 50, 153 MWACH Others MWAC 3.11.2 pl_nc_windw() CNC Window Function (Write) MWAC - pl_exin() External Data - M: Main Task, W: Window Task, A: Alarm Task, C: Communication Task, H: High-level Task, -: Not supported CNC PROGRAM No. Name Content Available task 3.12.1 pl_nc_dwnstart2() Start Registration of the CNC Program MWAC 3.12.2 pl_nc_download2() Register the CNC Program MWAC 3.12.3 pl_nc_dwnend2() End Registration of the CNC Program MWAC - pl_nc_vrfstart2() Start Verification of the CNC Program - - pl_nc_verify2() Verify the CNC Program - - pl_nc_vrfend2() End Verification of the CNC Program - 3.12.4 pl_nc_dncstart2() Start DNC running of the CNC Program MWAC 3.12.5 pl_nc_dnc2() Run the CNC Program (DNC running) MWAC 3.12.6 pl_nc_dncend2() End DNC Running of the CNC Program MWAC 3.12.7 pl_nc_search2_8d() Search the CNC Program MWAC (Supported 8 Digits Program Number) 3.12.8 pl_nc_search2() Search the CNC Program MWAC 3.12.9 pl_nc_delall2() Delete All CNC Programs MWAC 3.12.10 pl_nc_delete2_8d() Delete the CNC Program MWAC (Supported 8 Digits Program Number) 3.12.11 pl_nc_delete2() Delete the CNC Program MWAC 3.12.12 pl_nc_upstart2_8d() Start Reading of the CNC Program MWAC (Supported 8 Digits Program Number) 3.12.13 pl_nc_upstart2() Start Reading of the CNC Program MWAC 3.12.14 pl_nc_upload2() Read the CNC Program MWAC 3.12.15 pl_nc_upend2() End Reading of the CNC Program MWAC 3.12.16 pl_nc_dir2() Read the CNC Program Memory Information MWAC 3.12.17 pl_nc_pdirstart2_8d() Start Reading of the CNC Program List MWAC (Supported 8 Digits Program Number) 3.12.18 pl_nc_pdirstart2() Start Reading of the CNC Program List MWAC 3.12.19 pl_nc_progdir2() Read the CNC Program List MWAC 3.12.20 pl_nc_pdirend2() End Reading of the Program List MWAC 3.12.21 pl_nc_dwnstart() Start Registration of the CNC Program MWAC 3.12.22 pl_nc_download() Register the CNC Program MWAC 3.12.23 pl_nc_dwnend() End Registration of the CNC Program MWAC - pl_nc_vrfstart() Start Verification of the CNC Program - - pl_nc_verify() Verify the CNC Program - - pl_nc_vrfend() End Verification of the CNC Program - -23-

3.FUNCTION REFERENCE B- 64183EN/01 No. Name Content Available task 3.12.24 pl_nc_dncstart() Start DNC running of the CNC Program MWAC 3.12.25 pl_nc_dnc() Run the CNC Program (DNC running) MWAC 3.12.26 pl_nc_dncend() End DNC Running of the CNC Program MWAC 3.12.27 pl_nc_search_8d() Search the CNC Program MWAC (Supported 8 Digits Program Number) 3.12.28 pl_nc_search() Search the CNC Program MWAC 3.12.29 pl_nc_delall() Delete All CNC Programs MWAC 3.12.30 pl_nc_delete_8d() Delete the CNC Program MWAC (Supported 8 Digits Program Number) 3.12.31 pl_nc_delete() Delete the CNC Program MWAC 3.12.32 pl_nc_upstart_8d() Start Reading of the CNC Program MWAC (Supported 8 Digits Program Number) 3.12.33 pl_nc_upstart() Start Reading of the CNC Program MWAC 3.12.34 pl_nc_upload() Read the CNC Program MWAC 3.12.35 pl_nc_upend() End Reading of the CNC Program MWAC 3.12.36 pl_nc_dir() Read the CNC Program Memory Information MWAC 3.12.37 pl_nc_pdirstart_8d() Start Reading of the CNC Program List MWAC (Supported 8 Digits Program Number) 3.12.38 pl_nc_pdirstart() Start Reading of the CNC Program List MWAC 3.12.39 pl_nc_progdir() Read the CNC Program List MWAC 3.12.40 pl_nc_pdirend() End Reading of the Program List MWAC M: Main Task, W: Window Task, A: Alarm Task, C: Communication Task, H: High-level Task, -: Not supported CHARACTER CODE CONVERSION No. Name Content Available task 3.13.1 pl_asciso() Convert Characters from ASCII to ISO Code MWACH 3.13.2 pl_isoasc() Convert Characters from ISO to ASCII Code MWACH M: Main Task, W: Window Task, A: Alarm Task, C: Communication Task, H: High-level Task, -: Not supported -24-

B- 64183EN/01 3.FUNCTION REFERENCE 3.2 SYSTEM CALL 3.2.1 Read the Task Timer Value os_show_tim #include <oscall.h> void os_show_tim(unsigned long *time) ; *time: Timer value This function reads a timer value. The unit of a timer value is the tick: one tick = eight msec. This function reads the timer value of the timer specific to each task. A timer value read with this function does not fully match the actually elapsed time. To simply read time, use the clock() function, which has a higher precision. -25-

3.FUNCTION REFERENCE B- 64183EN/01 3.2.2 Set the Task Timer Value os_set_tim #include <oscall.h> void os_set_tim(unsigned long new_time, unsigned long *old_time); new_time: *old_time: New timer value Old timer value This function sets a timer value. This function reads the timer value of the timer specific to each task. A timer value read with this function does not fully match the actually elapsed time. To simply read time, use the clock function, which has a higher precision. -26-

B- 64183EN/01 3.FUNCTION REFERENCE 3.2.3 Wait for the Timer Value os_sync_tim #include <oscall.h> unsigned short os_sync_tim(unsigned long wakeup_time); wakeup_time: EC_TIMOUT: Timer value (0x011a) Normal termination. This function makes the task wait until specified time comes. No other tasks can be held in wait state. This instruction does not return the error value 0. When specified time has come, the error value "EC_TIMOUT" is returned. Actually, the task is held for the period ("wakeup_time" - current time). If the "wakeup_time" is less than the current time (that is, if a past point time is specified), the task is not held in wait state. Before this function can be executed, the current time must be read using os_show_tim(). In wakeup_time, a value not greater than 7FFFFFFFh (198 days, 20 hours, 11 minutes, 9 seconds, and 180 msec) may be set. The unit of a time value to be specified in "wakeup_time" is the tick (= 8 msec). -27-

3.FUNCTION REFERENCE B- 64183EN/01 3.2.4 Wait for Time os_wait_tim #include <oscall.h> unsigned short os_wait_tim(unsigned long timeout_value); timeout_value: EC_TIMOUT: Wait time (0x011a) Normal completion This function makes the task wait for a specified time. No other tasks can be held in wait state. This instruction does not return the error value 0. When specified time has come, the error value "EC_TIMOUT" is returned. The task is held in wait state for the time specified in "timeout_value". In "timeout_value", a value not greater than FFFFFFFFH (397 days, 16 hours, 22 minutes, 18 seconds, and 360 msec) may be set. The unit of a time value to be specified in "timeout_value" is the tick (= 8 msec). -28-

B- 64183EN/01 3.FUNCTION REFERENCE 3.2.5 Create an Event Flag os_make_flg #include <oscall.h> unsigned short os_make_flg(unsigned char event_flag_id); event_flag_id: Event flag ID 0: Normal termination EC_FLGID: (0x0107) Event flag ID error EC_EXSTFLG: (0x0111) The event flag already exists. This function creates an event flag. The size of an event flag is 32 bits. (Thirty-two flags make up one group.) Before an event flag can be used, this function must be issued. -29-

3.FUNCTION REFERENCE B- 64183EN/01 3.2.6 Delete the Event Flag os_delt_flg #include <oscall.h> unsigned short os_delt_flg(unsigned char event_flag_id); event_flag_id: Event flag ID 0: Normal termination EC_FLGID: (0x0107) Event flag ID error EC_NXSTFLG: (0x0112) The event flag does not exists. This function deletes an event flag. The error code "EC_DELFLG" is returned to the task that possessed a deleted event flag. -30-

B- 64183EN/01 3.FUNCTION REFERENCE 3.2.7 Set the Event Flag os_sign_flg #include <oscall.h> unsigned short os_sign_flg(unsigned char event_flag_id, unsigned long flag_on_message); event_flag_id: Event flag ID flag_on_message: Flag pattern 0: Normal completion EC_FLGID: (0x0107) Event flag ID error EC_NXSTFLG: (0x0112) The event flag does not exists. This function sets an event flag. A flag is recorded in the image of the event flag. -31-

3.FUNCTION REFERENCE B- 64183EN/01 3.2.8 Wait for the Event Flag os_wait_flg #include <oscall.h> unsigned short os_wait_flg(unsigned char event_flag_id, unsigned long wait_message, unsigned short and_or, long wait_limit, unsigned long *return_message); event_flag_id: Event flag ID wait_message: Flag pattern and_or: 0:AND,1:OR wait_limit: Be sure to set 0 (*). return_message: When zero (AND) is set in "and_or", zero is returned at all times. When one (OR) is set in "and_or", the signaled flags are returned. 0: Normal completion EC_FLGID: (0x0107) Event flag ID error EC_NXSTFLG: (0x0112) The event flag does not exists. EC_DELFLG: (0x0117) The event flag was deleted. This function makes the task wait until the event flag is signaled. When "AND_W(0)" is set in "and_or", an "AND" wait is specified. In this case, the system waits for all flags specified in "wait_message" to be signaled. When "OR_W(1)" is set, an "OR" wait is specified. In this case, the system waits for at least one of the flags specified in "wait_message" to be signaled. -32-

B- 64183EN/01 3.FUNCTION REFERENCE 3.2.9 Clear the Event Flag os_clar_flg #include <oscall.h> unsigned short os_clar_flg(unsigned char event_flag_id, unsigned long clear_message); event_flag_id: clear_message: Event flag ID Flag pattern 0: Normal completion EC_FLGID: (0x0107) Event flag ID error EC_NXSTFLG: (0x0112) The event flag does not exists. This function clears an event flag. The flag specified in "clear_message" of the image of an event flag is cleared. -33-

3.FUNCTION REFERENCE B- 64183EN/01 3.2.10 Set the Event Flag (Pulse type) os_puls_flg #include <oscall.h> unsigned short os_puls_flg(unsigned char event_flag_id, unsigned long puls_message); event_flag_id: puls_message: Event flag ID Flag pattern 0: Normal completion EC_FLGID: (0x0107) Event flag ID error EC_NXSTFLG: (0x0112) The event flag does not exists. This function sets an event flag. A signaled flag is recorded in the image of the event flag. -34-