Page 3B–61863E–1/06 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, supple
Page 4B–61863E–1/06 PREFACE PREFACE The models covered by this manual, and their abbreviations are: Product Name Abbreviation Applicable CNC FANUC PMC–MODEL SC PMC–SC FANUC Series 16 MODEL A FANUC PMC–MODEL SC3 PMC–SC3 FANUC Series 16 MODEL A/B/C FANUC Series 18 MODEL B/C FANUC PMC–MODEL SC4 PMC–SC4 FANUC
Page 19B–61863E–1/06 GENERAL 1. GENERAL 1 GENERAL Since PMC has been developed as a substitute of the relay control panel, the PMC control action has been represented by the ladder language based on the ladder diagram which has been familiarized from the relay control era. However, the PMC control action s
Page 202. PMC HARDWARE GENERAL B–61863E–1/06 2 PMC HARDWARE (1) PMC-SC/SC3/SC4 hardware Item Specification Remarks CPU 80386SX Program code block 1MB max. Transferred to RAM for debug- (ROM) ging (NOTE3) Including sequence programs Program data block Standard volatile RAM: 64KB (NOTE1) (RAM) Nonvolatile RA
Page 21B–61863E–1/06 GENERAL 2. PMC HARDWARE NOTE 1 The volatile RAM area for the ladder programs and C program data is 160K bytes. The data area can be expanded by reducing the ladder program size on the system parameter setting screen of the programmer function. 2 PMC–SC requires the additional option of
Page 223. PMC SOFTWARE GENERAL B–61863E–1/06 3 PMC SOFTWARE ROS developed by FANUC is used as the operating system (OS). The features of ROS are: D Realtime OS D Multitasking (up to 16 or 32 tasks for PMC–SC/SC3/SC4/NB/NB2 or 16i/18i/21i/15i–A) D A highly independent task structure can be built. D OS funct
Page 23B–61863E–1/06 GENERAL 3. PMC SOFTWARE 3.1 PMC C language applications are to be created by the machine tool builder. APPLICATION D Use a commercially available personal computer for program SOFTWARE (C development (editing, compilation, and creation of executable load PROGRAM) modules). DEVELOPMENT
Page 243. PMC SOFTWARE GENERAL B–61863E–1/06 3.2 DEVELOPMENT (1) Commercially available items The following are required for all PMC: SYSTEM a) PC-9801 (NEC Corp.) or IBM PC/AT COMPONENTS b) MS-DOS (Version 3.1 or later) c) Development language (by Intel Corporation) D C compiler (iC–286) Ver.4.1 or above
Page 25B–61863E–1/06 GENERAL 3. PMC SOFTWARE 3.3 APPLICATION (1) Segment memory model: Compact model EXECUTION MODE (2) Protect mode: Operating at privilege level = 3 9
Page 263. PMC SOFTWARE GENERAL B–61863E–1/06 3.4 The procedure for developing a PMC application program in the C language is shown below. PROGRAM DEVELOPMENT PROCEDURE Design specifications Design functions Performed on a personalcomputer Create and edit program Compile and link Debug Modification Test Per
Page 27B–61863E–1/06 GENERAL 3. PMC SOFTWARE Link control statement creation tool C language source Link control statement source iC 286 (Compiler) Library provided by FANUC BND386 (Binder) BLD386 (Binder) OH386 (Hex converter) Tool and library provided by FANUC Executable load module in Intel hexadecimal
Page 284. LIST OF PMC C LIBRARIES GENERAL B–61863E–1/06 4 LIST OF PMC C LIBRARIES (1) PMC system call library D Switching task priorities D Setting and referencing timer values D Signaling an event flag, and waiting for EVENT FLAG signaling D Allocation and deallocation from/to the pooled memory area D Sig
Page 29B–61863E–1/06 GENERAL 4. LIST OF PMC C LIBRARIES NOTE The routines of the WINDOW library can be executed also using ladder function instructions. Only the PMC-SC/SC3/SC4/C language libraries have the functions marked with *. (4) NC command programs D Input/output of NC data for registration D Input/
Page 305. TUTORIAL GENERAL B–61863E–1/06 5 TUTORIAL This section explains the main features of the PMC C language program. By following the procedures shown in each section with some sample programs, you will learn PMC C language. Detailed explanations are not given because this section is for learning fun
Page 31B–61863E–1/06 GENERAL 5. TUTORIAL 5.1 This section explains with following sample programs. FILE LISTING FOR These files are contained in PMC C language library floppy disk. THE TUTORIAL Please follow the procedure in section 5.2 to install these files. Directory File \TUTORIAL \5–2 Files for “5.2 I
Page 33B–61863E–1/06 GENERAL 5. TUTORIAL 5.2 INSTALLATION (1) Installation confirmation for compiler. In case of default execution of the installation program for iC–286 CONFIRMATION compiler and RLL386 (builder, other tools, etc.), the directories are as follows. Directory File \INTEL \IC286 ic286.exe \IN
Page 345. TUTORIAL GENERAL B–61863E–1/06 c. Binding. The following command is executed in the directory with task1.obj. > bnd386 &
Page 35B–61863E–1/06 GENERAL 5. TUTORIAL 5.3 Let’s execute the C language application(\tutorial\5–3). PROGRAM (1) File confirmation. Please use the files (ctl.c and tutorial.bld) in the directories as listed EXECUTION below. The files in \tutorial\5–3\rc for PMC–SC/SC3/SC4. The files in \tutorial\5–3\rb fo
Page 365. TUTORIAL GENERAL B–61863E–1/06 (7) Loading to PMC Loading to PMC is done by transfer through RS232C. RS232C setting: Baud rate : below 9600bps Character length : 8bit Parity check : none Stop bit number : 2bit X Parameter : none a. PC setting. In case of PC98, speed r0 9600 pn b8 s2 none. In case
Page 37B–61863E–1/06 GENERAL 5. TUTORIAL 5.4 This section explains about the PMCMDI task that is a task for the display screen. PMCMDI TASK 5.4.1 The application program in chapter 5.3 can only be executed once after Execution by Switch to pressing the [RUN] key. Application in chapter 5.4.1 is modified an
Page 385. TUTORIAL GENERAL B–61863E–1/06 (3) Procedure for execution. Same as described in chapter 5.3. The following steps are necessary for operation. > ic286 task1.c pr(task1.lis) oj(task1.obj) compact extend rom > ic286 ctl.c pr(ctl.lis) oj(ctl.obj) compact extend rom > bnd386 & bnd386 &
Page 39B–61863E–1/06 GENERAL 5. TUTORIAL File task1.con ctl.obj ,& task1.obj ,& softkey.obj ,& ← added pmc2.lib ,& clib2c.lib & oj(task1.lnk) nolo nopl ec(task1) & pr(task1.mp1) name(task1) ss(stack(0))& rn(code to task1_code, data to task1_data) (3) Procedure for execution. Compiling softkey.c was added t
Page 405. TUTORIAL GENERAL B–61863E–1/06 5.4.3 With this application display and reading of softkey can be performed. Read Input Key and The files are in the directory \tutorial\5–4–3. Change Display Screen (1) File confirmation. Please use the files (ctl.c and tutorial.bld) in the directories as listed be
Page 41B–61863E–1/06 GENERAL 5. TUTORIAL 5.5 This section describes about the task for cyclic execution and how to create tool life counter application by cyclic task. CYCLIC TASK The files are in the directory \tutorial\5–5. (1) File confirmation.Please use the files (ctl.c and tutorial.bld) in the direct
Page 425. TUTORIAL GENERAL B–61863E–1/06 (4) Execution At first assign the tool number (No.1, No.2, ..) to the address (D8, D16, D24, D32) on the PMCPRM screen. In the sample program each address is defined as shown below. The data type is long integer. D0 Tool number specification D4 Over all run time D8
Page 43B–61863E–1/06 GENERAL 5. TUTORIAL 5.6 Parallel execution of the PMCMDI task from chapter 5.4.3 (task1) and the cyclic task of chapter 5.5 (task2) is described in this section. MULTITASK-I The files are in the directory \tutorial\5–6. (1) File confirmation. Please use the files (ctl.c and tutorial.bl
Page 445. TUTORIAL GENERAL B–61863E–1/06 Task information definition screen of MKC(Link control statement creation tool) Setting for task2 was added. LINK CONTROL DATA(TASK) Ver1.2 TASK ENTRY NO.2 (TASK ID=11) ENTRY ADDRESS NAME = task2 DATA SEGMENT GDT ENTRY = 35(32 – 95) STACK SIZE = 1024 TASK LE
Page 465. TUTORIAL GENERAL B–61863E–1/06 D tutorial.h Contains combination of 5.4.3. and 5.5. (3) Procedure for execution. The necessary operations are described below. > ic286 softkey.c pr(softkey.lis) oj(softkey.obj) compact extend rom > ic286 task1.c pr(task1.lis) oj(task1.obj) compact extend rom > ic28
Page 47B–61863E–1/06 GENERAL 5. TUTORIAL 5.7 In 5.6 the display screen of task1 and task2 executing have no relation. Change the task1 to display the status of task2 in this chapter. The system DEBUG PRACTICE alarm which occurs at this process is subject in the debugging example. The files are in the direc
Page 485. TUTORIAL GENERAL B–61863E–1/06 (5) Alarm message Explanation of the message at the system alarm screen. In case of PMC–SC/SC3/SC4 972 NMI OCCURRED IN OTHER MODULE SLOT 02 ← Occurred at the board attatched to SLOT2 PC113 CPU INTERRUPT 0103 00000408 ^^ ^^^^ ^^^^^^^^ Address of system error Offset(H
Page 49B–61863E–1/06 GENERAL 5. TUTORIAL b. Search the function with the base GDT(32), which has the nearest offset value below 00000408H, in the map file tutorial.map. MODULE = TASK1 ←File PUBLIC NAME BASE OFFSET TYPE WC ABSOLUTE ADDRESS CRT_SIZE14 . . GDT(33) 0000H INTEGER(2) 0 00000000H DISP_COUNTER . G
Page 505. TUTORIAL GENERAL B–61863E–1/06 d. Investigation of the cause for the system error. Investigation of the pointer operation especially, because the exceptional process code of the system alarm message is 13. The part of the pointer operation is “*pl_memul2(D, ALL_TIME)” at line 70 and 71 of the sou
Page 51B–61863E–1/06 GENERAL 5. TUTORIAL 5.8 In this section, 3 tasks execution is described. Task3 which detect if the tool life is over is made. MULTITASK-II The files are in the directory \tutorial\5–8. (COMPLEX (1) File confirmation COMMUNICATION) Please use the files (ctl.c and tutorial.bld) in the di
Page 525. TUTORIAL GENERAL B–61863E–1/06 NOTE USER GDT ADDRESS = 845000 for PMC–SC/SC3/SC4. USER GDT ADDRESS = 245000 for PMC–NB/NB2. USER GDT ADDRESS = 900200 for PMC C Language function (Series 16i/18i/21i/15i–A). Task information definition screen of MKC (Link control statement creation tool) Setting fo
Page 53B–61863E–1/06 GENERAL 5. TUTORIAL D tutorial.bld Segments for task3 ware added. File tutorial.bld tutorial.bld USER; SEGMENT TASK1_CODE (DPL=3), TASK1_DATA (DPL=3), TASK2_CODE (DPL=3), TASK2_DATA (DPL=3), TASK3_CODE (DPL=3), ← added TASK3_DATA (DPL=3), ← added SEG_PMCLIB_CODE (DPL=3) ; TABLE GDT ( R
Page 545. TUTORIAL GENERAL B–61863E–1/06 D tutorial.con Binder file task3.lnk was added. File tutorial.con task1.lnk ,& task2.lnk ,& task3.lnk ,& ← added pmc.lib ,& oj(tutorial.lnk) nolo & pr(tutorial.mp1) name(tutorial) (3) Procedure for execution. The necessary operations are described below. > ic286 sof
Page 55B–61863E–1/06 GENERAL 5. TUTORIAL 5.9 MULTITASKING-III (INTERTASK COMMUNICATION) 5.9.1 Internal rely area(D address) was used for intertask communication Common Memory in the application in the chapter before here. And this reduced internal relay area which can be used by sequence program. Preventin
Page 565. TUTORIAL GENERAL B–61863E–1/06 D ctl.c On the main screen of MKC(Link control statement creation tool). COMMON MEMORY COUNT 0 → 1 (common memory created) GDT ENTRY COUNT 7 → 8 (Segment for common memory was added) LINK CONTROL DATA(MAIN) Ver 1.2 USER GDT ADDRESS = 845000 (NOTE) GDT ENTRY
Page 57B–61863E–1/06 GENERAL 5. TUTORIAL D tutorial.bld Segment for common memory added. File tutorial.bld tutorial.bld USER; SEGMENT TASK1_CODE (DPL=3), TASK1_DATA (DPL=3), TASK2_CODE (DPL=3), TASK2_DATA (DPL=3), TASK3_CODE (DPL=3), TASK3_DATA (DPL=3), COMMON_DATA (DPL=3), ← added SEG_PMCLIB_CODE (DPL=3)
Page 585. TUTORIAL GENERAL B–61863E–1/06 (3) Procedure for execution. The necessary operations are described below. > ic286 softkey.c pr(softkey.lis) oj(softkey.obj) compact extend rom > ic286 task1.c pr(task1.lis) oj(task1.obj) compact extend rom > ic286 task2.c pr(task2.lis) oj(task2.obj) compact extend
Page 59B–61863E–1/06 GENERAL 5. TUTORIAL D task3.con Command file for binder D common.c Source code D common.con Command file for binder D tutorial.bld Build file D tutorial.con Command file for binder D tutorial.h Header file (2) Modification. The difference from chapter 5.9.1 is described below. D task1.
Page 605. TUTORIAL GENERAL B–61863E–1/06 (6) Modification. The difference from (1) is described below. D task1.c The part to wait for getting semaphore before tool number specification is changed, and the part to release the semaphore after the change are added. D task2.c The part to make semaphore at powe
Page 61B–61863E–1/06 GENERAL 5. TUTORIAL (2) Modification. The difference from chapter 5.9.1 is described below. D task1.c The part to refer the flag if run time over the limit is replaced with the part of reading mailbox. D task2.c The part to create mailbox is added. D task3.c The part writing the flag i
Page 651. CONCEPT OF PMC CONTROL B–61863E–1/06 PMC CONTROL SOFTWARE SOFTWARE 1 CONCEPT OF PMC CONTROL SOFTWARE The PMC control software systematically contains software groups to attain: 1) Easy design of PMC software 2) Control of PMC software execution 3) Improvement of maintenance of PMC software 49
Page 661. CONCEPT OF PMC CONTROL SOFTWARE PMC CONTROL SOFTWARE B–61863E–1/06 1.1 Since PMC control software is positioned to enclose the PMC hardware, PMC software utilizes hardware resources through PMC control PMC CONTROL software. Thus, the PMC software design is released from complicated SOFTWARE proce
Page 671. CONCEPT OF PMC CONTROL B–61863E–1/06 PMC CONTROL SOFTWARE SOFTWARE 1.2 Major functions of the PMC control software are: PMC CONTROL (1) Initializing function of system Initializes various hardware, PMC control software and PMC SOFTWARE software when power is turned on. FUNCTIONS (2) Exceptional p
Page 682. TASK CONTROL FUNCTION PMC CONTROL SOFTWARE B–61863E–1/06 2 TASK CONTROL FUNCTION The PMC software is generally divided into several processing units for the convenience because of the following reasons. 1) Division by processing Division to collect PMC software having the same processing conditio
Page 69B–61863E–1/06 PMC CONTROL SOFTWARE 2. TASK CONTROL FUNCTION 2.1 The PMC software generally functions in real time. This real time means the “immediate” response to the occurrence. Certain events may require REAL-TIME SYSTEM high-speed processing so that it cannot be said for these events that respon
Page 702. TASK CONTROL FUNCTION PMC CONTROL SOFTWARE B–61863E–1/06 2.2 Even in case of real time system, it can execute only one processing on the processor when a certain moment is presumed. However, plural PREFERENTIAL concurrent events can be processed as if they had been processed at a time PROCESSING
Page 71B–61863E–1/06 PMC CONTROL SOFTWARE 2. TASK CONTROL FUNCTION 2.3 By utilizing the parallel processing function of PMC control software, processing capacity can be improved by eliminating the waste of PARALLEL processor resources as much as possible. PROCESSING In the next example, task C executes the
Page 722. TASK CONTROL FUNCTION PMC CONTROL SOFTWARE B–61863E–1/06 Task C Processing A External motion is started PWAIT command is issued. processing B Task C Processing External motion Event wait function Processing A is started. is issued. B External motion Event wait release function is issued. Task D P
Page 73B–61863E–1/06 PMC CONTROL SOFTWARE 2. TASK CONTROL FUNCTION 2.4 Tasks must be registered with the PMC control software when the PMC software is created. Up to 16 tasks can be registered.(For the C function REGISTRATION OF of the Series 16i/18i/21i/15i–A, up to 32 tasks) Registration of a task, as TA
Page 742. TASK CONTROL FUNCTION PMC CONTROL SOFTWARE B–61863E–1/06 2.4.7 The stack size to be used by each task is specified. The stack size must Task Stack Size be calculated taking into consideration the size used when a function is called. (See Appendix B) 2.4.8 The task level at which each activated ta
Page 75B–61863E–1/06 PMC CONTROL SOFTWARE 2. TASK CONTROL FUNCTION 2.5 Every task belongs to one of the states shown in the figure below. The task state can be changed by a system call (mentioned later). TASK STATES State transition between the running state and ready state occurs automatically as the PMC
Page 762. TASK CONTROL FUNCTION PMC CONTROL SOFTWARE B–61863E–1/06 2.6 The PMC control software provides many system calls to perform task management, intertask synchronization, exclusive control, intertask SYSTEM CALL communication, and so forth. 2.6.1 Each task has a specific task ID and task priority. T
Page 77B–61863E–1/06 PMC CONTROL SOFTWARE 2. TASK CONTROL FUNCTION 2.6.3 Semaphores are used for synchronization and exclusive control between Intertask tasks. A semaphore consists of a signed integer variable (counter) and a semaphore queue. The semaphore queue holds tasks waiting for the Synchronization
Page 782. TASK CONTROL FUNCTION PMC CONTROL SOFTWARE B–61863E–1/06 (1) Counter type semaphores Counter type semaphores are used for synchronous control and exclusive control. The major difference between the counter type and exclusive control type semaphores is that the counter type semaphore is not applic
Page 79B–61863E–1/06 PMC CONTROL SOFTWARE 2. TASK CONTROL FUNCTION “Example of exclusive control with a counter type semaphore” Suppose that up to three resources can be acquired, and that these resources are shared by tasks. To protect the resources, control is provided using a counter type semaphore as s
Page 802. TASK CONTROL FUNCTION PMC CONTROL SOFTWARE B–61863E–1/06 “Example of synchronous control with counter type semaphores” Suppose that a task is waiting until processing of another task is completed. In this example, task A is assumed to wait until processing of task B is completed, and task B is as
Page 81B–61863E–1/06 PMC CONTROL SOFTWARE 2. TASK CONTROL FUNCTION TASK A TASK B SEM C SEM D 3 0 Signal D –1 Wait C (Wait) 2 Write Signal D 0 Read Wait C (Ready) 1 Write Signal D 1 Wait C 0 Write Signal D 2 Wait C –1 Signal C 0 Initial value of semaphore C All buffer areas Semaphore C Positive : Available
Page 822. TASK CONTROL FUNCTION PMC CONTROL SOFTWARE B–61863E–1/06 D To create an exclusive control type semaphore, use the system call, os_mak2_sem. This system call specifies the owner priority used at semaphore acquisition and whether to permit multiple signaling. If multiple signaling is permitted, an
Page 83B–61863E–1/06 PMC CONTROL SOFTWARE 2. TASK CONTROL FUNCTION if (sem owner = current task) → If the current task is the semaphore owner count-- → Decrementing the counter if (count = 0) → If the counter is 0 sem owner = NONE → Returning the ownership of the semaphore current pri = old pri → Returning
Page 842. TASK CONTROL FUNCTION PMC CONTROL SOFTWARE B–61863E–1/06 2.6.4 Event flags are used for synchronization between tasks. In applications, Intertask up to 32 event flags related to certain processing (for example, notifying other tasks when a task detects an emergency stop signal) are grouped. Synch
Page 85B–61863E–1/06 PMC CONTROL SOFTWARE 2. TASK CONTROL FUNCTION (2) Waiting for event flags Use the system call, os_wait_flg, to enter the flag wait state. For example, to wait until flags 1, 2, and 3 are set on, specify 0...0111 as the parameter of os_wait_flg. (This parameter is referred to as the wai
Page 862. TASK CONTROL FUNCTION PMC CONTROL SOFTWARE B–61863E–1/06 (3) Flag signaling To signal flags, use the system call, os_sign_flg or os_puls_flg. To set flags 1, 2, and 3 on, for example, specify 0..0111 as the parameter of os_sign_flg. (This parameter is referred to as a signal message.) In this cas
Page 87B–61863E–1/06 PMC CONTROL SOFTWARE 2. TASK CONTROL FUNCTION (4) Clearing flags To clear the event flag image, use the system call, os_clar_flg. To clear flag 1, for example, specify 0..0001 as the parameter of os_clar_flg. (This parameter is referred to as a clear message.) Operation flag image = ~c
Page 882. TASK CONTROL FUNCTION PMC CONTROL SOFTWARE B–61863E–1/06 “Example of intertask synchronous control using event flags” The following gives a sample application in which the activation of a communication task and nonvolatile-memory write task is controlled using event flags. Task activation conditi
Page 89B–61863E–1/06 PMC CONTROL SOFTWARE 2. TASK CONTROL FUNCTION 2.6.5 Mailboxes are used for communication between tasks. A mailbox is an Intertask FIFO-based message queue placed between tasks. It consists of a ring buffer. Communication The mailbox is an area open to the entire system area. Any task c
Page 902. TASK CONTROL FUNCTION PMC CONTROL SOFTWARE B–61863E–1/06 For mailbox control, use the following system calls: Function name Description os_make_mbx Creates a mailbox. os_delt_mbx Deletes a mailbox. os_read_mbx Reads a 4-byte message from a mailbox. os_red2_mbx Reads an 8-byte message from a mailb
Page 91B–61863E–1/06 PMC CONTROL SOFTWARE 2. TASK CONTROL FUNCTION (3) Writing data to a mailbox To write a message to the mailbox, use the system call, os_write_mbx or os_wrt2_mbx. os_write_mbx writes data in the low-order 4 bytes of a message area and sets 0s in the high-order 4 bytes. os_wrt2_mbx writes
Page 922. TASK CONTROL FUNCTION PMC CONTROL SOFTWARE B–61863E–1/06 “Example of exclusive control with a mailbox” Exclusive control can be implemented not only using semaphores but also using mailboxes. In this example, suppose that there are two memory blocks temporarily used by tasks and that these memory
Page 93B–61863E–1/06 PMC CONTROL SOFTWARE 2. TASK CONTROL FUNCTION 2.6.6 Packets are used for communication between tasks. When a task sends Intertask a packet, it notifies a receiving task of the packet address Communication The concept of ownership is applicable to packets. Once a task obtains a packet a
Page 942. TASK CONTROL FUNCTION PMC CONTROL SOFTWARE B–61863E–1/06 (3) Sending a packet To send a packet, use the system call, os_send_pkt. When a packet is sent, the task ID of the receiving task must be specified. The sent packet is then linked to the packet queue of the receiving task. Since packets con
Page 95B–61863E–1/06 PMC CONTROL SOFTWARE 2. TASK CONTROL FUNCTION (6) Specifying a received packet using a packet ID When packets may be sent from multiple tasks, only a particular packet may need to be received. To do this, an identifier called an packet ID is used. In the following example, tasks A, B,
Page 962. TASK CONTROL FUNCTION PMC CONTROL SOFTWARE B–61863E–1/06 2.7 RELATIONSHIP BETWEEN LADDER PROGRAMS AND C PROGRAMS 2.7.1 PMC-SC/SC3/SC4/NB/ (1) Priority NB2 In the PMC control software, the execution priority of ladder programs, PMC screen display, and C programs is as follows: First-level ladder p
Page 97B–61863E–1/06 PMC CONTROL SOFTWARE 2. TASK CONTROL FUNCTION (3) Execution ratio of PMC screen display to C program tasks As explained in (1), PMC screen display (*c) has priority over the execution of C program tasks (*d). So, when PMC screen display is being performed, C program tasks do not genera
Page 982. TASK CONTROL FUNCTION PMC CONTROL SOFTWARE B–61863E–1/06 2.7.2 PMC C Function (1) Priority (Series The PMC screen display and C program execution are assigned the 16i/18i/21i/15i–A) following priorities. Highest–priority C program > PMC screen display > C program tasks A PMC screen display task d
Page 99B–61863E–1/06 PMC CONTROL SOFTWARE 2. TASK CONTROL FUNCTION 2.7.3 Warning when (1) Please avoid writing data to the same bit address from both LADDER program and C language program. LADDER program and If LADDER program and C language program write data in the same C language program bit address, the
Page 1002. TASK CONTROL FUNCTION PMC CONTROL SOFTWARE B–61863E–1/06 (b) Good example of not writing to the same address LADDER program and C language program do not write data to the same bit address. LADDER program R8.0 R20.0 R10.0 R10.0 C language program if ( (pl_membrd(R10.0) != 0) && (pl_membrd(R20.0)
Page 101B–61863E–1/06 PMC CONTROL SOFTWARE 3. DATA CONTROL FUNCTION 3 DATA CONTROL FUNCTION 85
Page 1023. DATA CONTROL FUNCTION PMC CONTROL SOFTWARE B–61863E–1/06 3.1 When each task of PMC executes processing, data are generally read from the outside of PMC, and processing results are written to the outside of OUTLINE OF DATA PMC. These data are inputted or outputted via the data control function CON
Page 103B–61863E–1/06 PMC CONTROL SOFTWARE 3. DATA CONTROL FUNCTION 3.1.2 Various data is accessed by a corresponding funciton. Access Method 3.1.3 Functions Function Function name DI from MT pl_memc,pl_mems,pl_meml DI from NC pl_membrd pl_memc2,pl_mems2,pl_meml2 pl_membrd2 DO to MT pl_memc,pl_mems,pl_meml
Page 1043. DATA CONTROL FUNCTION PMC CONTROL SOFTWARE B–61863E–1/06 3.1.4 The MDI keyboard, CRT graphic display, reader/punch interface, and NC Device Control command program are accessed using the functions listed in Subsection 3.1.3. Either of the following two types can be specified for the device Parame
Page 105B–61863E–1/06 PMC CONTROL SOFTWARE 3. DATA CONTROL FUNCTION 3.2 REFERENCING MEMORY 3.2.1 Data of control relay and nonvolatile memory (timer set value, counter set Control Relay and value, count value, keep relay, data table, etc.) employed by ladder programs can be read out or rewritten. Nonvolatil
Page 1063. DATA CONTROL FUNCTION PMC CONTROL SOFTWARE B–61863E–1/06 3.2.2 To what physical address each PMC address is as following table. Relation Between PMC PMC-SC Address and Physical PMC address Byte address PMC address Bit address Address G000 0 G0000.0 0 G255 255 G0255.7 2047 G1000 256 G1000.0 2048 G
Page 1163. DATA CONTROL FUNCTION PMC CONTROL SOFTWARE B–61863E–1/06 3.3 It is necessary for providing sufficient peripheral equipment control function to PMC to fully understand the CNC conditions. Accordingly, DATA TO PASS CNC a window is provided for making closer between PMC and CNC, and the WINDOW follo
Page 117B–61863E–1/06 PMC CONTROL SOFTWARE 3. DATA CONTROL FUNCTION 3.3.1 CRT/MDI Data PMC software PMC control software NC Hardware Operator data control function software Procedure Function Key input Keyed–in key code dedicated to the MDI Key input control keyboard Procedure Function Code of character CRT
Page 1183. DATA CONTROL FUNCTION PMC CONTROL SOFTWARE B–61863E–1/06 The procedure (functions) for the MDI keyboard, screen character display, and graphic display is shown below. (For details, see Chapters 3, 4, 8, and 9 of Part III.) Function name Description pl_pcmdi Switches PMCMDI screens, and signals a
Page 119B–61863E–1/06 PMC CONTROL SOFTWARE 3. DATA CONTROL FUNCTION (1) PMCMDI screen The PMCMDI screen can be displayed by user application programs. It is independent of the screens displayed by the CNC and PMC control software. Each user can create his or her own PMCMDI screens. MDI key reading and displ
Page 1203. DATA CONTROL FUNCTION PMC CONTROL SOFTWARE B–61863E–1/06 NOTE The case of FS15i–A: The pl_fkey_sts() function is not supported. By using the pl_fkey_ign() and the pl_fkey_avil() function, it is possible to protect to switch screen by function key. By using these functions, the screen can be switc
Page 121B–61863E–1/06 PMC CONTROL SOFTWARE 3. DATA CONTROL FUNCTION [MDI key codes] (00H to 7FH) 0 1 2 3 4 5 6 7 0 Space 0 @ P 1 ! 1 A Q 2 ” 2 B R 3 # 3 C S 4 $ 4 D T 5 % 5 E U 6 & 6 F V 7 ’ 7 G W 8 ( 8 H X 9 ) 9 I Y A ; * : J Z (EOB) B + K [ C , < L O D - = M ] E . > N F / ? O _ 105
Page 1223. DATA CONTROL FUNCTION PMC CONTROL SOFTWARE B–61863E–1/06 (80H to FFH) 8 9 A B C D E F 0 Reset F0 ** ** 1 MMC F1 ** ** 2 CNC F2 ** ** 3 F3 ** 4 Shift Insert F4 ** ** 5 Delete F5 ** ** 6 CAN Alter F6 ** ** 7 F7 ** 8 Cur → Input Positn F8 ** ** ** ** 9 Cur ← Progrm F9 ** ** ** A Cur ↓ Help Offset **
Page 123B–61863E–1/06 PMC CONTROL SOFTWARE 3. DATA CONTROL FUNCTION [MDI key codes] (with PMC-NB/NB2 and FANUC Series 15-B) 0 1 2 3 4 5 6 7 0 NULL SPACE 0 @ P 1 1 A Q 2 2 B R 3 # 3 C S 4 4 D T 5 5 E U 6 & 6 F V 7 7 G W 8 ( 8 H X 9 ) 9 I Y A (EOB) * J Z B + K [ C , L D - = M ] E . N F / ? O 8 9 A B C D E F 0
Page 1243. DATA CONTROL FUNCTION PMC CONTROL SOFTWARE B–61863E–1/06 [MDI key codes] (with FANUC Series 15i-A) 0 1 2 3 4 5 6 7 0 NULL SPACE 0 @ P 1 1 A Q 2 2 B R 3 # 3 C S 4 4 D T 5 5 E U 6 & 6 F V 7 7 G W 8 ( 8 H X 9 ) 9 I Y A (EOB) * J Z B + K [ C , L D - = M ] E . N F / ? O _ 8 9 A B C D E F 0 RESET F0 1
Page 125B–61863E–1/06 PMC CONTROL SOFTWARE 3. DATA CONTROL FUNCTION [How to handle soft keys] Codes F0 to F9, FR, and FL are codes for soft keys. The correspondence between the key codes and the MDI keyboard is shown below. (For a 9-inch CRT) F0 to F4, FR, and FL [ ] [ ] [ ] [ ] [ ] “FL” “F4” “F3” “F2” “F1”
Page 1263. DATA CONTROL FUNCTION PMC CONTROL SOFTWARE B–61863E–1/06 (For a 9-inch CRT) PMC–SC/SC3/SC4 X coordinate 0 1 2 3 · · · · · · · · · · · · · · · 37 38 39 0 1 2 3 Y coordinate · · · · l 13 14 15 PMC–NB/NB2 X coordinate 0 1 2 3 · · · · · · · · · · · · · · · 37 38 39 0 1 2 3 · Y coordinate · · · 13 l 1
Page 127B–61863E–1/06 PMC CONTROL SOFTWARE 3. DATA CONTROL FUNCTION (For a 10-inch LCD or 14–inch CRT) PMC–SC/SC3/SC4 X coordinate 0 1 2 3 · · · · · · · · · · · · · · · · 77 78 79 0 1 2 3 · Y coordinate · · · · · · l 20 21 22 23 24 PMC–NB/NB2 X coordinate 0 1 2 3 · · · · · · · · · · · · · · · · 77 78 79 0 1
Page 1283. DATA CONTROL FUNCTION PMC CONTROL SOFTWARE B–61863E–1/06 (For 9.5”LCD,10.4”LCD) PMC–NB6 X coordinate 0 1 2 3 · · · · · · · · · · · · · · · · 77 78 79 0 1 The part enclosed by bold line is the display range in default. 2 ↓ 3 · Y coordinate · · · · · · l 25 26 27 28 29 The line indicated by “l” is
Page 129B–61863E–1/06 PMC CONTROL SOFTWARE 3. DATA CONTROL FUNCTION [CRT codes] (00H to 7FH) 0 1 2 3 4 5 6 7 0 Space 0 @ P 1 ! 1 A Q 2 ” 2 B R 3 # 3 C S 4 $ 4 D T 5 % 5 E U 6 & 6 F V 7 ’ 7 G W 8 ( 8 H X 9 ) 9 I Y A * : J Z B + ; K [ C , < L O D - = M ] E . > N ^ F / ? O _ (80H to FFH) 8 9 A B C D E F 0 1 2
Page 1303. DATA CONTROL FUNCTION PMC CONTROL SOFTWARE B–61863E–1/06 When a character is sent, the present display position indicates its display position. The present display position is updated according to whether the character is positioned halfway or at the right end as shown in the following table. X c
Page 131B–61863E–1/06 PMC CONTROL SOFTWARE 3. DATA CONTROL FUNCTION (5) Graphic display screen(15i–A) The coordinate of Graphic screen is as follows: Y coordinate (0, 263) (–320, 0) (319, 0) X coordinate (0, 0) (0, –216) When PMCMDI screen is displayed, The PMC control software clears the graphic screen. To
Page 1323. DATA CONTROL FUNCTION PMC CONTROL SOFTWARE B–61863E–1/06 3.3.2 NC programs can be read and registered by PMC software. CNC Command Programs PMC software PMC control NC software Hardware software data control function CNC command Procedure Functions program read dedicated to the NC data command pr
Page 133B–61863E–1/06 PMC CONTROL SOFTWARE 3. DATA CONTROL FUNCTION 3.3.3 To control the transmission of data between the PMC and the host Processing of computer, the reader/punch interface RS-232-C, provides for data I/O. Data processed via this interface is called reader/punch interface I/O data. Reader/P
Page 1343. DATA CONTROL FUNCTION PMC CONTROL SOFTWARE B–61863E–1/06 3.3.4 Window data between the PMC and the NC can be read and written. The NC Data window data items are listed below. (1) Data input from the NC Function No. Description 0 Reads CNC system information. *2 13 Reads tool offset values. 15 Rea
Page 135B–61863E–1/06 PMC CONTROL SOFTWARE 3. DATA CONTROL FUNCTION (2) Data output to the NC Function No. Description *1 14 Writes tool offset values. *1 16 Writes an offset from the workpiece reference point. *1 18 Writes parameters. *1 20 Writes setting data. *1 22 Writes custom macro variables. *1 60 Wr
Page 1363. DATA CONTROL FUNCTION PMC CONTROL SOFTWARE B–61863E–1/06 CAUTION 2 For the TT system, specify window data input/output as follows: D Tool post 1: Specify the function codes indicated previously. D Tool post 2: Specify the function codes indicated previously + 1000. Function code 1034 cannot be sp
Page 137B–61863E–1/06 PMC CONTROL SOFTWARE 3. DATA CONTROL FUNCTION 3.3.5 By using the NC window function (pl_nc_windr(), pl_nc_windw()), a NC Window window data between PMC and NC can be read and written. (1) Data read from NC Function No. Description Type *1 13 Reads tool offset value Low 15 Reads workpie
Page 1383. DATA CONTROL FUNCTION PMC CONTROL SOFTWARE B–61863E–1/06 (2) Data output to NC Function No. Description Type *1 14 Writes tool offset values Low 18 Writes parameter data and setting data Low 22 Writes custom macro variables. Low 150 Writes program check screen data. Low 152 Writes torque limit da
Page 139B–61863E–1/06 PMC CONTROL SOFTWARE 3. DATA CONTROL FUNCTION 3.4 In addition to the normal nonvolatile areas (timer setting, counter setting, etc.) a nonvolatile area dedicated to the user program can be used. This EXPANDED area is reserved by CNC option. NONVOLATILE MEMORY PMC software PMC control s
Page 1404. DIAGNOSTIC FUNCTION PMC CONTROL SOFTWARE B–61863E–1/06 4 DIAGNOSTIC FUNCTION By checking the following areas on the PMCDGN screen (signal status screen) of the PMC, the operating status and error status of the user C program can be monitored. 124
Page 141B–61863E–1/06 PMC CONTROL SOFTWARE 4. DIAGNOSTIC FUNCTION 4.1 OUTLINE OF THE USER PROGRAM STATUS R9060 User program execution status R9062 User program error status R9066 Error codes related to libraries R9068 D R9060 to R9061: Status of the user program during execution D R9062 to R9065: Error stat
Page 1424. DIAGNOSTIC FUNCTION PMC CONTROL SOFTWARE B–61863E–1/06 4.2 DETAILS OF THE #7 #6 #5 #4 #3 #2 #1 #0 EXECUTION STATUS R9060 USRPROG PMCMDI OF THE USER USRPROG : Whether the user program is provided PROGRAM 0 : No 1 : Yes PMCMDI : CRT screen mode 0 : Other than the PMCMDI screen 1 : PMCMDI screen 126
Page 143B–61863E–1/06 PMC CONTROL SOFTWARE 4. DIAGNOSTIC FUNCTION 4.3 R9062 to R9065 are used as the user program error status area. Error status information is displayed on the PMCDGN screen (alarm screen) of DETAILS OF THE the PMC. If any bit in this area is on, the user program does not start. For ERROR
Page 1444. DIAGNOSTIC FUNCTION PMC CONTROL SOFTWARE B–61863E–1/06 Table 4.3 User Program Error Messages (2/3) Message Description and action to be taken WN28 DATA SEG TYPE The data segment type is illegal. A wrong RENAMESEG ERROR data segment is specified for the bind control file. (Action to be taken) Corr
Page 145B–61863E–1/06 PMC CONTROL SOFTWARE 4. DIAGNOSTIC FUNCTION Table 4.3 User Program Error Messages (3/3) Message Description and action to be taken WN41 LANGUAGE TYPE The C program type does not match. UNMATCH (Action to be taken) Correct the C program. WN42 UNDEFINE The language origin address is not
Page 1464. DIAGNOSTIC FUNCTION PMC CONTROL SOFTWARE B–61863E–1/06 4.4 When the USRDGN key on the diagnosis screen (PMCDGN) of the PMC screen is pressed, the execution status of each user task (including the USER TASK third-level ladder program) is indicated dynamically (Fig. 4.4). EXECUTION STATUS With this
Page 147B–61863E–1/06 PMC CONTROL SOFTWARE 4. DIAGNOSTIC FUNCTION (3) Wait information Message Description TIM Wait for time-out EVT.A Event flag AND wait EVT.O Event flag OR wait SEM Wait for semaphore MBX.R Wait for reading of a mailbox MBX.W Wait for writing of a mailbox PKT Wait for packet reception PCM
Page 1485. PARAMETER FOR DISPLAY CONTROL PMC CONTROL SOFTWARE B–61863E–1/06 5 PARAMETER FOR DISPLAY CONTROL #7 #6 #5 #4 #3 #2 #1 #0 K18 or K90 IGNDINT IGNKEY IGNKEY 0: The function keys are effective while the PMCMDI screen is displayed by the user program. 1: The function keys are not effective while the P
Page 151B–61863E–1/06 PMC LIBRARY 1. GENERAL 1 GENERAL The table below lists the functions for PMC C language library. PMC system call No. Function name Description RC/RC3/RC4 NB/NB2 16i/18i/21i 15i-A 2.1 os_chng_pri Changes the priority level of a task. f f f f 2.2 os_show_tim Reads the current timer value
Page 1521. GENERAL PMC LIBRARY B–61863E–1/06 No. Function name Description RC/RC3/RC4 NB/NB2 16i/18i/21i 15i-A 2.32 os_rmrk_pkt Clears the packet mark. f f f f 2.33 os_curr_tsk Reports the ID of the task being executed. f f f f f: Supported, : Not supported PMC screen switching control functions No. Functio
Page 153B–61863E–1/06 PMC LIBRARY 1. GENERAL System information reading functions No. Function name Description RC/RC3/RC4 NB/NB2 16i/18i/21i 15i-A 6.1 pl_sysinfrd Reads the system information. f f f f 6.2 pl_symcmt Reads symbol and comment data of the lad- f f f der program. 6.3 pl_message Reads message da
Page 1541. GENERAL PMC LIBRARY B–61863E–1/06 No. Function name Description RC/RC3/RC4 NB/NB2 16i/18i/21i 15i-A 8.20 pl_dsppalette Sets all palettes (for character display). f f 8.21 initreg_printf Set the initialization bit of printf to ON. f f: Supported, : Not supported, ∆: Partly modified CRT graphics di
Page 155B–61863E–1/06 PMC LIBRARY 1. GENERAL NC window library functions No. Function name Description RC/RC3/RC4 NB/NB2 16i/18i/21i 15i-A 11.1 pl_nc_windr Inputs window data from the NC. f f f f 11.2 pl_nc_windw Outputs window data to the NC. f f f f 11.3 pl_exin Inputs external data. f f f f: Supported, :
Page 1561. GENERAL PMC LIBRARY B–61863E–1/06 No. Function name Description RC/RC3/RC4 NB/NB2 16i/18i/21i 15i-A 12.23 pl_nc_vrfstart2 Executes processing to start outputting the f f data of the NC command to be verified. (Corresponding to TT) 12.24 pl_nc_verify2 Outputs the data of the NC command to be f f v
Page 157B–61863E–1/06 PMC LIBRARY 1. GENERAL No. Function name Description RC/RC3/RC4 NB/NB2 16i/18i/21i 15i-A 14.3 pl_mmc3r Reads arbitrary window data from MMC. f f (MMC-III) 14.4 pl_mmc3w Writes arbitrary window data into MMC. f f (MMC-III) f: Supported, : Not supported Conversion functions between the A
Page 1582. PMC SYSTEM CALL PMC LIBRARY B–61863E–1/06 2 PMC SYSTEM CALL 142
Page 159B–61863E–1/06 PMC LIBRARY 2. PMC SYSTEM CALL 2.1 TASK PRIORITY SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f CHANGE [Name] os_chng_pri [Description] Changes priority of specified tasks and tasks which are being executed. [Format] ret = os_chng_pri(task_id, new_priority, old_priority) ; unsigned short
Page 1602. PMC SYSTEM CALL PMC LIBRARY B–61863E–1/06 2.2 OBTAIN THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f CURRENT TIMER VALUE [Name] os_show_tim [Description] Obtains the current timer value. [Format] void os_show_tim(current_timer_value) ; unsigned long *current_timer_value ; [Input] ______ [Output]
Page 161B–61863E–1/06 PMC LIBRARY 2. PMC SYSTEM CALL 2.3 SET THE CURRENT SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f TIMER VALUE [Name] os_set_tim [Description] Obtains the current timer value. [Format] void os_set_tim(new_timer_value, old_timer_value) ; unsigned long new_timer_value ; unsigned long *old_ti
Page 1622. PMC SYSTEM CALL PMC LIBRARY B–61863E–1/06 2.4 KEEPING THE TASK SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f IN THE WAITING STATE UNTIL THE [Name] SPECIFIED TIME os_sync_tim [Description] Keeps the task that issued this function in the waiting state until the specified time arrives. This function c
Page 163B–61863E–1/06 PMC LIBRARY 2. PMC SYSTEM CALL 2.5 KEEPING THE TASK SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f IN THE WAITING STATE FOR A [Name] SPECIFIED TIME os_wait_tim PERIOD [Description] Keeps the task in the waiting state for a specified time period. The other tasks cannot be kept in the waiti
Page 1642. PMC SYSTEM CALL PMC LIBRARY B–61863E–1/06 2.6 EVENT FLAG SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f CREATION [Name] os_make_flg [Description] Creates an event flag. [Format] ret = os_make_flg(event_flag_id) ; unsigned short ret ; unsigned char event_flag_id ; [Input] event_flag_id Event flag ID
Page 165B–61863E–1/06 PMC LIBRARY 2. PMC SYSTEM CALL 2.7 EVENT FLAG SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f DELETION [Name] os_delt_flg [Description] Deletes an event flag. [Format] ret = os_delt_flg(event_flag_id) ; unsigned short ret ; unsigned char event_flag_id ; [Input] event_flag_id Event flag ID
Page 1662. PMC SYSTEM CALL PMC LIBRARY B–61863E–1/06 2.8 EVENT FLAG SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f SIGNALLING [Name] os_sign_flg [Description] Signals the event flag. [Format] ret = os_sign_flg(event_flag_id, flag_on_message) ; unsigned short ret ; unsigned char event_flag_id ; unsigned long fl
Page 167B–61863E–1/06 PMC LIBRARY 2. PMC SYSTEM CALL 2.9 EVENT FLAG SIGNAL SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f WAIT [Name] os_wait_flg [Description] Waits for an event flag signal. [Format] ret = os_wait_flg(event_flag_id, wait_message, and_or, wait_limit, return_message); unsigned short ret ; unsig
Page 1682. PMC SYSTEM CALL PMC LIBRARY B–61863E–1/06 2.10 EVENT FLAG SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f CLEARING [Name] os_clar_flg [Description] Clears the event flag. [Format] ret = os_clar_flg(event_flag_id, clear_message); unsigned short ret ; unsigned char event_flag_id ; unsigned long clear_m
Page 169B–61863E–1/06 PMC LIBRARY 2. PMC SYSTEM CALL 2.11 EVENT FLAG SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f SIGNALLING (PULSE TYPE) [Name] os_puls_flg [Description] Reads the MDI keys. [Format] ret = os_puls_flg(event_flag_id, puls_message); unsigned short ret ; unsigned char event_flag_id ; unsigned l
Page 1702. PMC SYSTEM CALL PMC LIBRARY B–61863E–1/06 2.12 ALLOCATING A PART SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f OF THE POOLED AREA TO MEMORY [Name] os_new_mem [Description] Allocates an available part of the user-pooled area to memory. The contents of allocated memory is not cleared. The allocated m
Page 171B–61863E–1/06 PMC LIBRARY 2. PMC SYSTEM CALL 2.13 DEALLOCATING SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f MEMORY AND RETURNING THE [Name] AREA TO THE os_disp_mem POOLED AREA [Description] Deallocates memory allocated by the os_new_mem function and returns the area to the pooled area. [Format] ret =
Page 1722. PMC SYSTEM CALL PMC LIBRARY B–61863E–1/06 2.14 REPORTING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f USE-STATE OF THE POOLED MEMORY [Name] AREA os_repo_mem [Description] Reports the use-state of the user-pooled area. [Format] ret = os_repo_mem(total_size,available_size) ; unsigned short ret ;
Page 173B–61863E–1/06 PMC LIBRARY 2. PMC SYSTEM CALL 2.15 CREATING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f COUNTER TYPE SEMAPHORE [Name] os_make_sem [Description] Creates the counter type semaphore. [Format] ret = os_make_sem(semaphore_id,initial_value) ; unsigned short ret ; unsigned char semaphore
Page 1742. PMC SYSTEM CALL PMC LIBRARY B–61863E–1/06 2.16 DELETING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f SEMAPHORE [Name] os_delt_sem [Description] Deletes the semaphore. [Format] ret = os_delt_sem(semaphore_id) ; unsigned short ret ; unsigned char semaphore_id ; [Input] semaphore_id Semaphore ID
Page 175B–61863E–1/06 PMC LIBRARY 2. PMC SYSTEM CALL 2.17 SIGNALING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f SEMAPHORE [Name] os_sign_sem [Description] Signals the semaphore. [Format] ret = os_sign_sem(semaphore_id) ; unsigned short ret ; unsigned char semaphore_id ; [Input] semaphore_id Semaphore ID
Page 1762. PMC SYSTEM CALL PMC LIBRARY B–61863E–1/06 2.18 WAITING FOR THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f SEMAPHORE TO BE SIGNALED [Name] os_wait_sem [Description] Waits for the semaphore to be signaled. [Format] ret = os_wait_sem(semaphore_id,wait_limit) ; unsigned short ret ; unsigned char sem
Page 177B–61863E–1/06 PMC LIBRARY 2. PMC SYSTEM CALL 2.19 CREATING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f EXCLUSIVE CONTROL [Name] SEMAPHORE os_mak2_sem [Description] Creates the exclusive control semaphore. [Format] ret = os_mak2_sem(semaphore_id,owner_priority,multi_signal) ; unsigned short ret ;
Page 1782. PMC SYSTEM CALL PMC LIBRARY B–61863E–1/06 2.20 CHANGING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f SEMAPHORE QUEUE TYPE [Name] os_queu_sem [Description] Changes the semaphore queue type. [Format] ret = os_queu_sem(semaphore_id,wait_queue_type) ; unsigned short ret ; unsigned char semaphore_i
Page 179B–61863E–1/06 PMC LIBRARY 2. PMC SYSTEM CALL 2.21 CREATING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f MAILBOX [Name] os_make_mbx [Description] Creates the mailbox. Up to 255 entries can be created as the number of mail buffers for each mail ID. [Format] ret = os_make_mbx(mailbox_id,buffer_size)
Page 1802. PMC SYSTEM CALL PMC LIBRARY B–61863E–1/06 2.22 DELETING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f MAILBOX [Name] os_delt_mbx [Description] Deletes the mailbox. [Format] ret = os_delt_mbx(mailbox_id) ; unsigned short ret ; unsigned char mailbox_id ; [Input] mailbox_id Mailbox ID (10 to 39) [
Page 181B–61863E–1/06 PMC LIBRARY 2. PMC SYSTEM CALL 2.23 AREADING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f FOUR-BYTE MESSAGE FROM [Name] THE MAILBOX os_read_mbx [Description] Reads the low-order four bytes of the message from the mailbox. [Format] ret = os_read_mbx(mailbox_id,wait_limit,read_message
Page 1822. PMC SYSTEM CALL PMC LIBRARY B–61863E–1/06 2.24 READING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f EIGHT-BYTE MESSAGE FROM [Name] THE MAILBOX os_red2_mbx [Description] Reads eight bytes of the message entry from the mailbox. [Format] ret = os_red2_mbx(mailbox_id,wait_limit, read_message_lo,re
Page 183B–61863E–1/06 PMC LIBRARY 2. PMC SYSTEM CALL 2.25 WRITING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f FOUR-BYTE MESSAGE INTO THE [Name] MAILBOX os_writ_mbx [Description] Writes the low-order four bytes into the message entry of the mailbox. [Format] ret = os_writ_mbx(mailbox_id,wait_limit,write_
Page 1842. PMC SYSTEM CALL PMC LIBRARY B–61863E–1/06 2.26 WRITING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f EIGHT-BYTE MESSAGE INTO THE [Name] MAILBOX os_wrt2_mbx [Description] Writes the eight bytes into the message entry of the mailbox. [Format] ret = os_wrt2_mbx(mailbox_id,wait_limit, write_message
Page 185B–61863E–1/06 PMC LIBRARY 2. PMC SYSTEM CALL 2.27 SELECTING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f PACKET [Name] os_make_pkt [Description] Selects the packet from the packet or memory pool. [Format] ret = os_make_pkt(packet_type,packet_address) ; unsigned short ret ; unsigned char packet_ty
Page 1862. PMC SYSTEM CALL PMC LIBRARY B–61863E–1/06 2.28 RETURNING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f USED PACKET [Name] os_delt_pkt [Description] Returns the used packet to the pool area. [Format] ret = os_delt_pkt(UBYTE *packet_address) ; unsigned short ret ; unsigned char *packet_address ;
Page 187B–61863E–1/06 PMC LIBRARY 2. PMC SYSTEM CALL 2.29 SENDING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f PACKET [Name] os_send_pkt [Description] Sends the packet to the specified task. [Format] ret = os_send_pkt(packet_address,task_id,priority,packet_id) ; unsigned short ret ; unsigned char *packet
Page 1882. PMC SYSTEM CALL PMC LIBRARY B–61863E–1/06 2.30 RECEIVING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f PACKET [Name] os_recv_pkt [Description] Receives the packet from the sending destination task. [Format] ret = os_recv_pkt(packet_id,timeout_value,packet_address, recv_packet_id,recv_packet_typ
Page 189B–61863E–1/06 PMC LIBRARY 2. PMC SYSTEM CALL 2.31 MARKING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f PACKET [Name] os_mark_pkt [Description] Marks the received packet. [Format] ret = os_mark_pkt(task_id,mark_number) ; unsigned short ret ; unsigned char task_id ; unsigned char *mark_number ; [In
Page 1902. PMC SYSTEM CALL PMC LIBRARY B–61863E–1/06 2.32 CLEARING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f PACKET MARK [Name] os_rmrk_pkt [Description] Clears the packet mark. [Format] ret = os_rmrk_pkt(task_id,remark_number) ; unsigned short ret ; unsigned char task_id ; unsigned char *remark_numbe
Page 191B–61863E–1/06 PMC LIBRARY 2. PMC SYSTEM CALL 2.33 POSTING THE ID OF SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f THE TASK BEING EXECUTED [Name] os_curr_tsk [Description] Posts the ID of the task being executed. [Format] void os os_curr_tsk(current_task_id) ; unsigned char *current_task_id ; [Input] _
Page 193B–61863E–1/06 PMC LIBRARY 3. PMC SCREEN SWITCH FUNCTIONS 3.1 SWITCHING TO THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f PMCMDI SCREEN AND SIGNALING THE [Name] TASK WAITING FOR pl_pcmdi THE PCMDI EVENT [Description] Switches to the PMCMDI screen and then signals the task waiting for PMCMDI event. [
Page 1943. PMC SCREEN SWITCH FUNCTIONS PMC LIBRARY B–61863E–1/06 3.2 AWAITING FOR THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f PCMDI EVENT [Name] pl_pcmdi_wait [Description] Waits for the PMCMDI event (pl_pcmdi) or the FUNCTION key CUSTOM to be pressed. [Format] void pl_pcmdi_wait() ; [Input] ______ [Out
Page 195B–61863E–1/06 PMC LIBRARY 3. PMC SCREEN SWITCH FUNCTIONS 3.3 SWITCH TO THE NC SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f SCREEN [Name] pl_ncmdi [Description] Switches to the NC screen. [Format] void pl_ncmdi() ; [Input] ______ [Output] ______ [Returns] ______ [Remarks] If the PMCMDI screen is displ
Page 197B–61863E–1/06 PMC LIBRARY 4. MDI KEYS 4.1 READING THE MDI SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f KEYS [Name] pl_mdikey [Description] Reads the MDI keys [Format] cmd = pl_mdikey(input_len, input_buffer); short cmd ; unsigned short *input_len ; char *input_buffer ; [Input] ______ [Output] input_l
Page 1984. MDI KEYS PMC LIBRARY B–61863E–1/06 4.2 KEY-IN LINE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A CONTROL f f [Name] pl_keydef [Description] Changes the setting of key-in line display control. [Format] ret = pl_keydef( P1 ); short ret ; short *P1 ; [Input] *P1 Key-in line control information P1 0 CF CF
Page 199B–61863E–1/06 PMC LIBRARY 4. MDI KEYS LN : Number of key input characters Sets the maximum number of input characters on the key input line (0 to 60). If 0, a negative value, or 60 or more is set, 60 is assumed. LA : Key-in line display attribute PA : Prompt display attribute NOTE The key-in line an
Page 2004. MDI KEYS PMC LIBRARY B–61863E–1/06 4.3 READING THE KEY SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f ∆ f f INPUT CODE [Name] pl_keysts [Description] Reads key codes during the key is pressed. In case of PMC–SC/SC3/SC4 and 16i/18i/21i, two keys which are pressed simultaneously can be read. [Format] ret =
Page 201B–61863E–1/06 PMC LIBRARY 4. MDI KEYS 4.4 DISABLING SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f FUNCTION KEY INPUT [Name] pl_fkey_ign [Description] Invalidates the screen switching executed by pressing a function key while the PMCMDI screen is displayed. As a result, switching to other than the PMCM
Page 2024. MDI KEYS PMC LIBRARY B–61863E–1/06 4.5 ENABLING SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f FUNCTION KEY INPUT [Name] pl_fkey_avail [Description] Validates the screen switching executed by pressing a function key while the PMCMDI screen is displayed. As a result, switching to other than the PMCMD
Page 203B–61863E–1/06 PMC LIBRARY 4. MDI KEYS 4.6 POSTING FUNCTION SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f KEY INPUT [Name] pl_fkey_sts [Description] Posts information indicating whether a screen switching request is issued by a function key input when screen switching to other than the PMCMDI screen is
Page 2044. MDI KEYS PMC LIBRARY B–61863E–1/06 4.7 DISABLING CUSTOM SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f KEY INPUT [Name] pl_fcustom_ign [Description] Disables the switching to PMCMDI screen by pressing CUSTOM key. As a result, switching to the PMCMDI screen can be executed only by pl_pcmdi function.
Page 205B–61863E–1/06 PMC LIBRARY 4. MDI KEYS 4.8 ENABLING CUSTOM SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f KEY INPUT [Name] pl_fcustom_avail [Description] Enables the switching to PMCMDI screen by pressing CUSTOM key. As a result, switching to the PMCMDI screen is executed by pl_pcmdi function or pressin
Page 2065. PMC ADDRESS ACCESS PMC LIBRARY B–61863E–1/06 5 PMC ADDRESS ACCESS General There are two functions to access the PMC address area. One is pl_mem*** and the other is pl_mem***2. ’***’ filled with one of c, s, l, uc, us, ul, brd, bwrt. These functions are different by the specification of address. T
Page 207B–61863E–1/06 PMC LIBRARY 5. PMC ADDRESS ACCESS 5.1 ACCESSING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f PMC ADDRESS AREA [Name] pl_memc pl_mems pl_meml pl_memuc pl_memus pl_memul [Description] Reads and writes data at a specified PMC address in a specified format. [Format] p1 = pl_memc(byte_ad
Page 2085. PMC ADDRESS ACCESS PMC LIBRARY B–61863E–1/06 5.2 READING A ONE BIT SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f LONG DATA ITEM FROM THE PMC [Name] ADDRESS AREA pl_membrd [Description] Reads out the contents of a PMC address whose length is one bit. [Format] bit_inf = pl_membrd(bit_addr) ; short bi
Page 209B–61863E–1/06 PMC LIBRARY 5. PMC ADDRESS ACCESS 5.3 WRITING A ONE BIT SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f LONG DATA ITEM INTO THE PMC [Name] ADDRESS AREA pl_membwrt [Description] Rewites the contents of a PMC address whose length is one bit. [Format] void pl_membwrt(bit_addr, bit_inf) ; unsi
Page 2105. PMC ADDRESS ACCESS PMC LIBRARY B–61863E–1/06 5.4 ACCESSING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f PMC ADDRESS AREA [Name] pl_memc2 pl_mems2 pl_meml2 pl_memuc2 pl_memus2 pl_memul2 [Description] Reads and writes data at a specified PMC address in a specified format. [Format] p1 = pl_memc2(
Page 211B–61863E–1/06 PMC LIBRARY 5. PMC ADDRESS ACCESS 5.5 READING A ONE BIT SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f LONG DATA ITEM FROM THE PMC [Name] ADDRESS AREA pl_membrd2 [Description] Reads a one bit long data item from the PMC address area. [Format] bit_inf = pl_membrd2(id,offset_addr,bit_pos) ;
Page 2125. PMC ADDRESS ACCESS PMC LIBRARY B–61863E–1/06 5.6 WRITING A ONE BIT SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f LONG DATA ITEM INTO THE PMC [Name] ADDRESS AREA pl_membwrt2 [Description] Changes the one bit of data at a specified PMC address. [Format] ret = pl_membwrt2(id,offset_addr,bit_pos, bit_i
Page 213B–61863E–1/06 PMC LIBRARY 5. PMC ADDRESS ACCESS 5.7 READING A DATA SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f TABLE CONTROL DATA [Name] pl_rdcntldata [Description] Reads a control data of PMC data table. [Format] ret = pl_rdcntldata(s_number, e_number, length, buf) short ret; short s_number; short
Page 2145. PMC ADDRESS ACCESS PMC LIBRARY B–61863E–1/06 5.8 WRITING A DATA SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f TABLE CONTROL DATA [Name] pl_wrcntldata [Description] Writes a control data of PMC data table. [Format] ret = pl_wrcntldata(length, buf) short ret; short length; short *buf; [Input] length
Page 215B–61863E–1/06 PMC LIBRARY 5. PMC ADDRESS ACCESS 5.9 READING GROUP SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f NUMBER OF DATA TABLE [Name] pl_rdcntlgrp [Description] Reads group number of PMC data table. [Format] pl_rdcntlgrp(grp_no) short *grp_no; [Input] ______ [Output] *grp_no Group number of PMC
Page 2165. PMC ADDRESS ACCESS PMC LIBRARY B–61863E–1/06 5.10 WRITING GROUP SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f NUMBER OF DATA TABLE [Name] pl_wrcntlgrp [Description] Writes group number of PMC data table. [Format] ret = pl_wrcntlgrp(grp_no) short ret; short grp_no; [Input] grp_no Group number of PMC
Page 2176. OBTAINING THE SYSTEM B–61863E–1/06 PMC LIBRARY INFORMATION 6 OBTAINING THE SYSTEM INFORMATION 201
Page 2186. OBTAINING THE SYSTEM INFORMATION PMC LIBRARY B–61863E–1/06 6.1 OBTAINING THE NC SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A SYSTEM f f f f INFORMATION [Name] pl_sysinfrd [Description] Obtains the system information of NC. [Format] ret = pl_sysinfrd(P1) ; short ret ; unsigned short P1 ; [Input] System Typ
Page 2196. OBTAINING THE SYSTEM B–61863E–1/06 PMC LIBRARY INFORMATION NOTE 15i–A allows read operation. [Output] ______ [Returns] ret System information error code –1 (input parameter out of range) [Remarks] ______ 203
Page 2206. OBTAINING THE SYSTEM INFORMATION PMC LIBRARY B–61863E–1/06 6.2 READING SYMBOL SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f AND COMMENT DATA OF THE [Name] SEQUENCE pl_symcmt PROGRAM [Description] Reads symbol and comment data at the specified PMC address. [Format] ret = pl_symcmt(id,type,offset_add
Page 2216. OBTAINING THE SYSTEM B–61863E–1/06 PMC LIBRARY INFORMATION Indentification PMC address code (ID) 0 G 1 F 2 Y 3 X 4 A 5 R 6 T 7 K 8 C 9 D 20 P 21 L D NULL (= 0) is added at the end of symbol and comment data. The size of each buffer (symbl, cmnt) must be the maximum number of characters + 1 (symbo
Page 2226. OBTAINING THE SYSTEM INFORMATION PMC LIBRARY B–61863E–1/06 6.3 READING MESSAGE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f DATA OF THE SEQUENCE [Name] PROGRAM pl_message [Description] Reads message data set in the PMC address (A0.0 to A24.7 or A0.0 to A124.7). [Format] ret = pl_message(offset_add
Page 2237. READING FROM AND WRITING TO B–61863E–1/06 PMC LIBRARY EXPANDED NONVOLATILE MEMORY READING FROM AND WRITING TO EXPANDED 7 NONVOLATILE MEMORY 207
Page 2247. READING FROM AND WRITING TO EXPANDED NONVOLATILE MEMORY PMC LIBRARY B–61863E–1/06 7.1 READING DATA SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f FROM EXPANDED NONVOLATILE [Name] MEMORY pl_kpmrd [Description] Read out is performed from expanded nonvolatile memory by specified address and size. [Form
Page 2257. READING FROM AND WRITING TO B–61863E–1/06 PMC LIBRARY EXPANDED NONVOLATILE MEMORY 7.2 WRITING DATA INTO SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f EXPANDED NONVOLATILE [Name] MEMORY pl_kpmwrt [Description] Writes into expanded nonvolatile memory by specified address and size. [Format] ret = pl_k
Page 2267. READING FROM AND WRITING TO EXPANDED NONVOLATILE MEMORY PMC LIBRARY B–61863E–1/06 7.3 READING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f MAXIMUM SIZE OF EXPANDED [Name] NONVOLATILE pl_kpmsiz MEMORY [Description] Reads the maximum size of expanded nonvolatile memory. [Format] size = pl_kpmsiz
Page 227B–61863E–1/06 PMC LIBRARY 8. CRT CHARACTER DISPLAY 8 CRT CHARACTER DISPLAY When the screen is switched to the PMCMDI screen, the whole screen is cleared by the PMC control software. General There are two function group to display character on CRT. One group is standard C function like printf, putcha
Page 2288. CRT CHARACTER DISPLAY PMC LIBRARY B–61863E–1/06 8.1 CLEARING THE CRT SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f CHARACTER DISPLAY [Name] pl_dspclr [Description] Clears the entire screen. Graphic display cannot be cleared with this function. [Format] ret = pl_dspclr() ; short ret ; [Input] ______
Page 229B–61863E–1/06 PMC LIBRARY 8. CRT CHARACTER DISPLAY 8.2 CLEARING LINES ON SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f THE CRT CHARACTER [Name] DISPLAY pl_dspclrl [Description] Clears a specified number of lines starting at the specified line. [Format] ret = pl_dspclrl(P1) ; short ret ; short *P1 ; [I
Page 2308. CRT CHARACTER DISPLAY PMC LIBRARY B–61863E–1/06 8.3 CLEARING AN AREA SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f ON THE CRT CHARACTER [Name] DISPLAY SPECIFIED pl_dspclrc IN UNITS OF [Description] Clears a specified number of characters from specified coordinates COLUMNS (X, Y) [Format] ret = pl_d
Page 231B–61863E–1/06 PMC LIBRARY 8. CRT CHARACTER DISPLAY 8.4 SPECIFYING A SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f POSITION ON THE CRT CHARACTER [Name] DISPLAY pl_dsppos [Description] Specifies character display position. This function specifies the position where the first character of a character str
Page 2328. CRT CHARACTER DISPLAY PMC LIBRARY B–61863E–1/06 8.5 SPECIFYING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f COLOR OF CHARACTERS ON [Name] THE CRT pl_dspcolor CHARACTER [Description] This function specifies the color of the character strings and the DISPLAY reverse display which are specified b
Page 233B–61863E–1/06 PMC LIBRARY 8. CRT CHARACTER DISPLAY 8.6 CHANGING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f ATTRIBUTES OF CHARACTERS ON [Name] THE CRT pl_dspattr CHARACTER [Description] Such attributes as color, reverse and blinking are changed without DISPLAY changing the display characters. At
Page 2348. CRT CHARACTER DISPLAY PMC LIBRARY B–61863E–1/06 8.7 DISPLAYING SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f ALPHANUMERIC AND OTHER [Name] CHARACTERS ON pl_dspstr THE CRT SCREEN [Description] Displays character strings in the standard size. This function is used to display alphanumeric and other ch
Page 235B–61863E–1/06 PMC LIBRARY 8. CRT CHARACTER DISPLAY 8.8 DISPLAYING KANJI, SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f HIRAGANA AND OTHER SPECIAL [Name] CHARACTERS ON pl_dspstrw THE CRT SCREEN [Description] Displays character strings in the standard size. This function is used to display Kanji and Hir
Page 2368. CRT CHARACTER DISPLAY PMC LIBRARY B–61863E–1/06 8.9 DISPLAYING SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f CHARACTERS TRIPLED IN SIZE ON [Name] THE CRT SCREEN pl_dsptrblr [Description] Displays character strings tripled in size. This function can be used only for alphanumerics, minus sign (-), pe
Page 237B–61863E–1/06 PMC LIBRARY 8. CRT CHARACTER DISPLAY 8.10 DISPLAYING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A CURSOR ON THE f n f f CRT SCREEN [Name] pl_cursor [Description] Displays and erases the character cursor: underline cursor which is displayed under a character or reverse cursor. (This function
Page 2388. CRT CHARACTER DISPLAY PMC LIBRARY B–61863E–1/06 (c) Reverse cursor length The length of the reverse cursor being displayed is specified in units of characters. The maximum length of a reverse cursor that can be displayed on a screen is 40 characters. [Output] ______ [Returns] ret Complete code (–
Page 239B–61863E–1/06 PMC LIBRARY 8. CRT CHARACTER DISPLAY 8.11 INITIALIZING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f CRT CHARACTER DISPLAY [Name] (PMC STANDARD pl_dspopen FORMAT) [Description] Initializes the display screen according to the CRT type. D 9′′ CRT : Initializes the display screen having
Page 2408. CRT CHARACTER DISPLAY PMC LIBRARY B–61863E–1/06 8.12 INITIALIZING THE 14′′ SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f CRT SCREEN (CHARACTER [Name] DISPLAY) HAVING 27 pl_dspopen2 ROWS 74 [Description] Initializes the 14′′ CRT screen having 27 rows 74 columns. COLUMNS The key-in line display posit
Page 241B–61863E–1/06 PMC LIBRARY 8. CRT CHARACTER DISPLAY 8.13 INITIALIZING THE 14′′ SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f CRT SCREEN (CHARACTER [Name] DISPLAY) HAVING 27 pl_dspopen3 ROWS 80 [Description] Initializes the 14′′ CRT screen having 27 rows 80 columns. COLUMNS The key-in line display posit
Page 2428. CRT CHARACTER DISPLAY PMC LIBRARY B–61863E–1/06 8.14 DISPLAYING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A CHARACTER STRING f f f f WITH THE SPECIFIED [Name] DISPLAY POSITION pl_dspchar AND DISPLAY [Description] ATTRIBUTE Displays a series of character strings with the specified display position and
Page 243B–61863E–1/06 PMC LIBRARY 8. CRT CHARACTER DISPLAY N : Display character data size (a) For single-size character display (S=1), the number of characters is set (up to 100 characters, 100 bytes). (b) For double-size character display (S=2), the number of characters x 2 is set (up to 100 characters, 2
Page 2448. CRT CHARACTER DISPLAY PMC LIBRARY B–61863E–1/06 [Remarks] (1) The display data size (N) is used to set the data section size. (a) For 10 characters of the ASCII character string, (S=1,3,5) N = 10 (b) For 10 characters of the Kanji code, (S=2) N = 20 (c) For the combination type of ASCII
Page 245B–61863E–1/06 PMC LIBRARY 8. CRT CHARACTER DISPLAY 8.15 SAVING THE CRT SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f CHARACTER DISPLAY [Name] pl_dspsave [Description] Saves the specified part of the screen being displayed, the entire character display data, and attributes. However, the cursor cannot b
Page 2468. CRT CHARACTER DISPLAY PMC LIBRARY B–61863E–1/06 8.16 RESTORING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f CRT CHARACTER DISPLAY [Name] pl_dspresave [Description] Redisplays on the CRT screen the display character data and attributes saved by the CRT display character saving function (pl_dsps
Page 247B–61863E–1/06 PMC LIBRARY 8. CRT CHARACTER DISPLAY 8.17 COMMANDING CRT SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f DISPLAY CONTROL [Name] pl_dspcntl [Description] Controls the CRT display. [Format] ret = pl_dspcntl( P1 ); short ret ; short P1 ; [Input] P1 Control code 0 : No gradation display (color
Page 2488. CRT CHARACTER DISPLAY PMC LIBRARY B–61863E–1/06 8.18 INITIALIZING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f VGA SCREEN (CHARACTER [Name] DISPLAY) HAVING 30 pl_dspopen4 ROWS 80 [Description] Initializes the VGA screen in 30 rows 80 columns mode. COLUMNS The position of key–in line display is
Page 249B–61863E–1/06 PMC LIBRARY 8. CRT CHARACTER DISPLAY 8.19 SPECIFYING SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f BACKGROUND COLOR OF [Name] CHARACTER pl_backcolor DISPLAY [Description] Specifies the background color of character display. [Format] ret = pl_backcolor(P1); short ret; short P1; [Input] P1
Page 2508. CRT CHARACTER DISPLAY PMC LIBRARY B–61863E–1/06 8.20 SETTING COLOR SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f PALETTE FOR VGA CHARACTER [Name] DISPLAY pl_dsppalette [Description] Sets the all color palette for VGA character display. [Format] ret = pl_dsppalette(p1); short ret; long *p1 [Input] *
Page 251B–61863E–1/06 PMC LIBRARY 8. CRT CHARACTER DISPLAY 8.21 INQUIRING TO SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f INITIALIZE printf() FUNCTION [Function Name] initreq_printf [Description] Initializing the holding information of printf() [Format] initreq_printf(task_id); unsigned char task_id; [Input]
Page 2528. CRT CHARACTER DISPLAY PMC LIBRARY B–61863E–1/06 8.22 COMPLETION CODE –1 : Other than the PMCMDI display 0 : Character display command to the CRT has been executed TYPES normally 2 : The specified data length is incorrect, or an odd- number of bytes or 0 or less data have been specified. 3 : The s
Page 2549. GRAPHICS DISPLAY PMC LIBRARY B–61863E–1/06 9.1 INITIALIZING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f CRT GRAPHICS DISPLAY [Name] pl_grpopen [Description] Initializes the graphics display. The graphics are cleared. [Format] ret = pl_grpopen() ; short ret ; [Input] ______ [Output] ______ [Re
Page 255B–61863E–1/06 PMC LIBRARY 9. GRAPHICS DISPLAY 9.2 TERMINATING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f CRT GRAPHICS DISPLAY [Name] pl_grpclose [Description] Terminates the graphics display. [Format] ret = pl_grpclose() ; short ret ; [Input] ______ [Output] ______ [Returns] ret Complete code (
Page 2569. GRAPHICS DISPLAY PMC LIBRARY B–61863E–1/06 9.3 ERASING THE CRT SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f GRAPHICS DISPLAY [Name] pl_grpclr [Description] Erases the graphic information. This function does not erase characters. [Format] ret = pl_grpclr() ; short ret ; [Input] ______ [Output] ____
Page 257B–61863E–1/06 PMC LIBRARY 9. GRAPHICS DISPLAY 9.4 ERASING THE CRT SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f GRAPHICS DISPLAY TEMPORARILY THEN [Name] REDISPLAYING IT pl_grpdspon [Description] Erases the graphics display temporarily and then displays it again. [Format] ret = pl_grpdspon(P1) ; short
Page 2589. GRAPHICS DISPLAY PMC LIBRARY B–61863E–1/06 9.5 SPECIFYING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f TYPE OF LINE TO BE USED ON THE CRT [Name] GRAPHICS DISPLAY pl_grplntyp [Description] Specifies the type of line to be used to display information in graphics format. The specified line type w
Page 259B–61863E–1/06 PMC LIBRARY 9. GRAPHICS DISPLAY 9.6 SPECIFYING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f COLOR TO BE USED ON THE CRT [Name] GRAPHICS DISPLAY pl_grpcolor [Description] Specifies the color or brightness (9′′ CRT, high-resolution monochrome) to be used on the graphics display. The s
Page 2609. GRAPHICS DISPLAY PMC LIBRARY B–61863E–1/06 9.7 DRAWING A SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f STRAIGHT LINE ON THE CRT GRAPHICS [Name] DISPLAY pl_grpline [Description] Draws a straight line in graphics format. [Format] ret = pl_grpline(P1, P2) ; short ret ; short *P1 ; unsigned short P2 ;
Page 261B–61863E–1/06 PMC LIBRARY 9. GRAPHICS DISPLAY 9.8 DRAWING AN ARC SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f ON THE CRT GRAPHICS DISPLAY [Name] pl_grparc [Description] Draws an arc. [Format] ret = pl_grparc(P1,P2) ; short ret ; short *P1 ; unsigned short P2 ; [Input] *P1 Display information P1 0 X 2
Page 2629. GRAPHICS DISPLAY PMC LIBRARY B–61863E–1/06 (c) Second axis of the arc: Second axis for drawing the arc (d) First axis of the arc: First axis for drawing the arc Specify the first and second axes for drawing the arc. Arcs can be drawn only on a plane. The direction that the plane faces determines
Page 263B–61863E–1/06 PMC LIBRARY 9. GRAPHICS DISPLAY 9.9 PAINTING AN AREA SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f ON THE CRT GRAPHICS DISPLAY [Name] pl_paint [Description] Paints an area in a closed curve contained in the information displayed in graphics format. This function paints the area using the
Page 2649. GRAPHICS DISPLAY PMC LIBRARY B–61863E–1/06 9.10 AINITIALIZING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f 14′′ CRT GRAPHICS DISPLAY (432 DOTS [Name] 592 DOTS) pl_grpopen2 [Description] Initializes 432 dots 592 dots (equivalent to 27 rows 74 columns for the character display) for the 14′′ CRT
Page 265B–61863E–1/06 PMC LIBRARY 9. GRAPHICS DISPLAY 9.11 SHIFTING CRT SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f GRAPHICS [Name] pl_grpsft [Description] Specifies the shift of the graphic that is to be displayed at the shifted location on the CRT screen. [Format] ret = pl_grpsft( ) ; short ret ; short *P
Page 2669. GRAPHICS DISPLAY PMC LIBRARY B–61863E–1/06 9.12 POSTING SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f VALIDATION OR INVALIDATION OF [Name] GRAPHICS DATA pl_grpstatus [Description] Posts information indicating whether graphics data previously drawn is valid on the PMCMDI screen. [Format] ret = pl_gr
Page 267B–61863E–1/06 PMC LIBRARY 9. GRAPHICS DISPLAY 9.13 ERASING GRAPHIC SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f DISPLAY OF A RECTANGLE AREA [Name] pl_grpclr2 [Description] Erases a graphic display in the specified rectangle. Character display is not erased. [Format] ret = pl_grpclr2(P1); short ret; s
Page 2689. GRAPHICS DISPLAY PMC LIBRARY B–61863E–1/06 9.14 SETTING COLOR SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f PALETTE FOR VGA GRAPHIC DISPLAY [Name] pl_grppalette [Description] Sets the all color palette for VGA graphic display. [Format] ret = pl_grppalette(p1); short ret; long *p1 [Input] *p1 Palett
Page 269B–61863E–1/06 PMC LIBRARY 9. GRAPHICS DISPLAY 9.15 COMPLETION CODE –11 : The graphics display is not initialized.) –1 : Display is not using the PMCMDI screen TYPES 0: The graphics display command has been normally terminated. 2: The specified data length is incorrect. 3: A code which cannot be used
Page 27010. READER/PUNCHER INTERFACE PMC LIBRARY B–61863E–1/06 10 READER/PUNCHER INTERFACE If two channels of reader/puncher interface are not used at the same time, either the function from 10.1 to 10.7 or the function from 10.8 to 10.14 can be used. However, it is not possible to use both function togethe
Page 271B–61863E–1/06 PMC LIBRARY 10. READER/PUNCHER INTERFACE 10.1 OPENING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f READER/PUNCHER INTERFACE [Name] pl_rsopen [Description] Opens the reader/puncher interface according to the control method and conditions of the specified channel and makes it ready fo
Page 27210. READER/PUNCHER INTERFACE PMC LIBRARY B–61863E–1/06 When an overflow of the receiving buffer is detected, output is automatically controlled by DC3 or DC1 control code. DC3 control code has even parity bit (DC3 = 93h). 10n : Data is input and output using channel 1 (DC1/DC3 automatic control) D T
Page 273B–61863E–1/06 PMC LIBRARY 10. READER/PUNCHER INTERFACE (d) Specifying the code for data output (OC) OC = 1 : ASCII code 2 : ISO code D This is ignored when OP is specified to be 1 or 2. [Output] ____ [Returns] ret Completion code (–1, 0, 1, 2, 5, 6, 20) [Remarks] For the return value, see the item o
Page 27410. READER/PUNCHER INTERFACE PMC LIBRARY B–61863E–1/06 10.2 CLOSING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f READER/PUNCHER INTERFACE [Name] pl_rsclose [Description] Closes the reader/puncher interface after it is used for data input or output. [Format] ret = pl_rsclose() ; short ret ; [Input
Page 275B–61863E–1/06 PMC LIBRARY 10. READER/PUNCHER INTERFACE 10.3 INPUTTING DATA SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f THROUGH THE READER/PUNCHER [Name] INTERFACE pl_rsrd [Description] Receives data through the reader/puncher interface. This function cannot be used when the interface has been opened
Page 27610. READER/PUNCHER INTERFACE PMC LIBRARY B–61863E–1/06 10.4 OUTPUTTING DATA SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f THROUGH THE READER/PUNCHER [Name] INTERFACE pl_rswrt [Description] Sends data through the reader/puncher interface. This function cannot be used when the interface has been opened
Page 277B–61863E–1/06 PMC LIBRARY 10. READER/PUNCHER INTERFACE 10.5 OPENING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f READER/PUNCH INTERFACE (FOR [Name] pl_fopen THE FANUC [Description] CASSETTE) Opens the file for the specified channel to make the file usable according to the control method and contr
Page 27810. READER/PUNCHER INTERFACE PMC LIBRARY B–61863E–1/06 3n : Controls directory information on the FANUC cassette using channel 1. D Specify this number to acquire file directory information (pl_fdir) or to delete the file (pl_fdel). NOTE 1 With SC/SC3/SC4 and 16i/18i/21i, two channels are used. 2 Wi
Page 279B–61863E–1/06 PMC LIBRARY 10. READER/PUNCHER INTERFACE (d) Code specification at data output (OC) OC = 1 : ASCII code 2 : ISO code D Specify 2 to use the FANUC cassette as the input/output device. [Output] ______ [Returns] ret Complete code : –1, 0, 1, 2, 5, 6, or 20 [Remarks] D For the return value
Page 28010. READER/PUNCHER INTERFACE PMC LIBRARY B–61863E–1/06 10.6 READING FILE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f DIRECTORY INFORMATION [Name] pl_fdir [Description] Reads directory information (file name and storage capacity) for the specified file number of the FANUC cassette. [Format] ret = pl_
Page 281B–61863E–1/06 PMC LIBRARY 10. READER/PUNCHER INTERFACE 10.7 DELETING THE FILE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f [Name] pl_fdel [Description] Deletes the file whose number or name is specified, in the FANUC Cassette. [Format] ret = pl_fdel(file_no,file_name) ; short ret ; short file_no ; ch
Page 28210. READER/PUNCHER INTERFACE PMC LIBRARY B–61863E–1/06 10.8 OPENING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f READER/PUNCHER INTERFACE [Name] pl_rsopen2 [Description] Opens the reader/puncher interface according to the control method and conditions of the specified channel and makes it ready f
Page 283B–61863E–1/06 PMC LIBRARY 10. READER/PUNCHER INTERFACE D When the interface is opened and closed, no control code (DC1 to DC4) are sent. The device automatically stops or resumes sending data in response to the DC3 or DC1 control code sent from the destination. Data can be entered even when the devi
Page 28410. READER/PUNCHER INTERFACE PMC LIBRARY B–61863E–1/06 (e) Specifying the code for data output (OC) OC = 1 : ASCII code 2 : ISO code D This is ignored when OP is specified to be 1 or 2. (f) Specifying the code for data input (IC) IC = 0 : ISO/ASCII code automatic distinction 1 : ISO code parity chec
Page 285B–61863E–1/06 PMC LIBRARY 10. READER/PUNCHER INTERFACE 10.9 CLOSING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f READER/PUNCHER INTERFACE [Name] pl_rsclose2 [Description] Closes the reader/puncher interface after it is used for data input or output. [Format] ret = pl_rsclose2(P1) ; short ret ; sh
Page 28610. READER/PUNCHER INTERFACE PMC LIBRARY B–61863E–1/06 10.10 INPUTTING DATA SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f THROUGH THE READER/PUNCHER [Name] INTERFACE pl_rsrd2 [Description] Receives data through the reader/puncher interface. This function cannot be used when the interface has been open
Page 287B–61863E–1/06 PMC LIBRARY 10. READER/PUNCHER INTERFACE 10.11 OUTPUTTING DATA SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f THROUGH THE READER/PUNCHER [Name] INTERFACE pl_rswrt2 [Description] Sends data through the reader/puncher interface. This function cannot be used when the interface has been opene
Page 28810. READER/PUNCHER INTERFACE PMC LIBRARY B–61863E–1/06 10.12 OPENING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f READER/PUNCHER INTERFACE (FOR [Name] pl_fopen2 THE FANUC FLOPPY [Description] CASSETTE) Opens the file according to the control method and conditions of the specified channel and make
Page 289B–61863E–1/06 PMC LIBRARY 10. READER/PUNCHER INTERFACE 3n : Controls directory information on the FANUC cassette using channel n D Specify this number to acquire file directory information (pl_fdir2) or to delete the file (pl_fdel2). NOTE 1 With SC/SC3/SC4/16i/18i/21i, two channels are used. 2 With
Page 29010. READER/PUNCHER INTERFACE PMC LIBRARY B–61863E–1/06 (d) Specifying the DC3 code (OD) OD = 0 : DC3 is assumed to 93h. 13h : DC3 is assumed to 13h. D Specify 0 to use the FANUC cassette as the input/output device. D Please do not set the value other than 0 and 13h. D It is invalid in PMC–NB/NB2/15i
Page 291B–61863E–1/06 PMC LIBRARY 10. READER/PUNCHER INTERFACE 10.13 READING FILE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f DIRECTORY INFORMATION [Name] pl_fdir2 [Description] Reads directory information (file name and storage capacity) for the specified file number of FANUC cassette. [Format] ret = pl_fd
Page 29210. READER/PUNCHER INTERFACE PMC LIBRARY B–61863E–1/06 10.14 DELETING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f FANUC FLOPPY CASSETTE FILE [Name] pl_fdel2 [Description] Deletes the file in the FANUC cassette. [Format] ret = pl_fdel2(ch_no, file_no, file_name) ; short ret ; short ch_no ; short
Page 293B–61863E–1/06 PMC LIBRARY 10. READER/PUNCHER INTERFACE 10.15 COMPLETION CODE –12 : Data cannot be output via the reader/puncher interface although five seconds or more have elapsed. TYPES For example, data cannot be output because the line is not connected correctly. –11 : Data was output although t
Page 295B–61863E–1/06 PMC LIBRARY 11. NC WINDOW LIBRARY 11.1 READING WINDOW SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A DATA FROM THE NC f f f f [Name] pl_nc_windr [Description] Function to read window data from the NC. [Format] ret = pl_nc_windr(P1) ; short ret ; short *P1 ; [Input] *P1 window library information
Page 29611. NC WINDOW LIBRARY PMC LIBRARY B–61863E–1/06 11.2 WRITING WINDOW SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f DATA FROM THE NC [Name] pl_nc_windw [Description] function to write window data from the NC. [Format] ret = pl_nc_windw(P1) ; short ret ; short *P1 ; [Input] *P1 Window library information
Page 297B–61863E–1/06 PMC LIBRARY 11. NC WINDOW LIBRARY 11.3 ENTERING SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f EXTERNAL DATA [Name] pl_exin [Description] Enters external data (external tool correction, external work number searching, etc.). When function instruction EXIN, DISP, or DISPB is being used by
Page 29811. NC WINDOW LIBRARY PMC LIBRARY B–61863E–1/06 11.4 With SC/SC3/SC4, 16i/18i/21i COMPLETION CODE –10 : Reject (low-speed) type window library processing command which was specified last, has not been completed) TYPES –1 : Reject (because other processing is being executed at the NC side, the proces
Page 299B–61863E–1/06 PMC LIBRARY 12. NC COMMAND PROGRAM (PMC-SC) 12 NC COMMAND PROGRAM (PMC-SC) 283
Page 30012. NC COMMAND PROGRAM (PMC-SC) PMC LIBRARY B–61863E–1/06 12.1 EXECUTING SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f PROCESSING TO START OUTPUTTING [Name] (DOWNLOADING) pl_nc_dwnstart THE DATA OF THE [Description] Executes the processing to start outputting (downloading) the data of NC COMMAND TO BE
Page 301B–61863E–1/06 PMC LIBRARY 12. NC COMMAND PROGRAM (PMC-SC) 12.2 OUTPUTTING SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f (DOWNLOADING) THE DATA OF THE [Name] NC COMMAND TO BE pl_nc_download REGISTERED [Description] Outputs (downloads) the data of the NC command to be registered. Character strings repre
Page 30212. NC COMMAND PROGRAM (PMC-SC) PMC LIBRARY B–61863E–1/06 12.3 EXECUTING SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f PROCESSING TO STOP OUTPUTTING [Name] (DOWNLOADING) pl_nc_dwnend THE DATA OF THE [Description] Executes processing to stop outputting (downloading) the data of the NC COMMAND TO BE NC
Page 303B–61863E–1/06 PMC LIBRARY 12. NC COMMAND PROGRAM (PMC-SC) 12.4 PREPARATORY SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f PROCESSING FOR OUTPUTTING THE [Name] DATA OF THE NC pl_nc_vrfstart COMMAND TO BE [Description] Executes preparatory processing for outputting the data of the NC CHECKED command to b
Page 30412. NC COMMAND PROGRAM (PMC-SC) PMC LIBRARY B–61863E–1/06 12.5 OUTPUTTING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f DATA OF THE NC COMMAND TO BE [Name] CHECKED pl_nc_verify [Description] Outputs the data of the NC command registered in the NC and the data of the NC command to be checked. [Form
Page 305B–61863E–1/06 PMC LIBRARY 12. NC COMMAND PROGRAM (PMC-SC) 12.6 EXECUTING SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f PROCESSING TO STOP OUTPUTTING [Name] THE DATA OF THE pl_nc_vrfend NC COMMAND TO BE [Description] Executes processing to stop outputting the data of the NC command CHECKED to be checke
Page 30612. NC COMMAND PROGRAM (PMC-SC) PMC LIBRARY B–61863E–1/06 12.7 EXECUTING SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f PROCESSING TO START OUTPUTTING [Name] THE DATA OF THE pl_nc_dncstart NC COMMAND TO BE [Description] Executes processing to start outputting the data of the NC command USED FOR to be u
Page 307B–61863E–1/06 PMC LIBRARY 12. NC COMMAND PROGRAM (PMC-SC) 12.8 OUTPUTTING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f DATA OF THE NC COMMAND TO BE [Name] USED FOR pl_nc_dnc OPERATION [Description] Outputs the data of the NC command to be used for operation. [Format] ret = pl_nc_dnc(P1, P2) ; sho
Page 30812. NC COMMAND PROGRAM (PMC-SC) PMC LIBRARY B–61863E–1/06 12.9 EXECUTING SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f PROCESSING TO STOP OUTPUTTING [Name] THE DATA OF THE pl_nc_dncend NC COMMAND TO BE [Description] Executes processing to stop outputting the data of the NC command USED FOR to be used
Page 309B–61863E–1/06 PMC LIBRARY 12. NC COMMAND PROGRAM (PMC-SC) 12.10 SEARCHING FOR A SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f SPECIFIED NC PROGRAM [Name] pl_nc_search [Description] Searches for a machining program registered in the NC. [Format] ret = pl_nc_search(P1) ; short ret ; short P1 ; [Input] P
Page 31012. NC COMMAND PROGRAM (PMC-SC) PMC LIBRARY B–61863E–1/06 12.11 DELETING ALL SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f PROGRAMS [Name] pl_nc_delall [Description] Deletes all machining programs registered in the NC. (The program being used for operation is not deleted.) [Format] ret = pl_nc_delall(
Page 311B–61863E–1/06 PMC LIBRARY 12. NC COMMAND PROGRAM (PMC-SC) 12.12 DELETING A SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f SPECIFIC PROGRAM [Name] pl_nc_delete [Description] Deletes a specified machining program which is registered in the NC. The program which is being used for operation is not deleted.
Page 31212. NC COMMAND PROGRAM (PMC-SC) PMC LIBRARY B–61863E–1/06 12.13 EXECUTING SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f PROCESSING TO START INPUTTING [Name] (UPLOADING) THE pl_nc_upstart DATA OF THE NC [Description] Executes processing to start inputting (uploading) the data of the NC COMMAND command.
Page 313B–61863E–1/06 PMC LIBRARY 12. NC COMMAND PROGRAM (PMC-SC) 12.14 INPUTTING SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f (UPLOADING) NC COMMAND DATA [Name] pl_nc_upload [Description] Inputs (uploads) the contents of a machining program registered in the NC in the form of character strings represented i
Page 31412. NC COMMAND PROGRAM (PMC-SC) PMC LIBRARY B–61863E–1/06 12.15 EXECUTING SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f PROCESSING TO STOP INPUTTING [Name] (UPLOADING) NC pl_nc_upend COMMAND DATA [Description] Executes the processing to stop uploading the NC command data. [Format] ret = pl_nc_upend()
Page 315B–61863E–1/06 PMC LIBRARY 12. NC COMMAND PROGRAM (PMC-SC) 12.16 INPUTTING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f PROGRAM MANAGEMENT DATA [Name] pl_nc_dir [Description] The management data of machining programs which have already been registered in the NC can be read. The management data of
Page 31612. NC COMMAND PROGRAM (PMC-SC) PMC LIBRARY B–61863E–1/06 12.17 EXECUTING SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f PROCESSING TO START INPUTTING [Name] THE LIST OF pl_nc_pdirstart PROGRAM [Description] Executes processing to start reading the numbers of all machining NUMBERS programs registered i
Page 317B–61863E–1/06 PMC LIBRARY 12. NC COMMAND PROGRAM (PMC-SC) 12.18 INPUTTING THE LIST SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A OF PROGRAM f f NUMBERS [Name] pl_nc_progdir [Description] Inputs the list of numbers of the machining programs registered in the NC. When the data area provided by the applicati
Page 31812. NC COMMAND PROGRAM (PMC-SC) PMC LIBRARY B–61863E–1/06 (b) Reading program numbers, comments, and the size of used memory P1 0 ’O’ 1 ’1’ Program number O0011 2 ’1’ 3 ’(’ 4 ’P’ 5 ’R’ 6 Comment statement (PROG1) ’O’ 7 ’G’ 8 ’1’ 9 ’)’ 10 ’2’ 11 ’5’ Used memory are=256 characters 12 ’6’ 13 ’O’ 14 ’1’
Page 319B–61863E–1/06 PMC LIBRARY 12. NC COMMAND PROGRAM (PMC-SC) [Returns] ret Complete code (–11, –2, –1, 0, 2) –11 : The NC has not terminated or executed the processing to start inputting the list of the NC program numbers. –2 : The NC has entered the reset state. –1 : The request to read the list of pr
Page 32012. NC COMMAND PROGRAM (PMC-SC) PMC LIBRARY B–61863E–1/06 12.19 EXECUTING SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f PROCESSING TO STOP INPUTTING [Name] THE LIST OF pl_nc_pdirend PROGRAM [Description] Informs the NC that input of the list of program numbers has NUMBERS terminated. [Format] ret = pl
Page 321B–61863E–1/06 PMC LIBRARY 12. NC COMMAND PROGRAM (PMC-SC) 12.20 PREPARING TO SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f OUTPUT (DOWNLOAD) OF NC [Name] COMMAND DATA TO pl_nc_dwnstart2 BE REGISTERED [Description] Executes preparatory processing to output (downloading) the NC command data to be regist
Page 32212. NC COMMAND PROGRAM (PMC-SC) PMC LIBRARY B–61863E–1/06 12.21 OUTPUTTING SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f (DOWNLOADING) NC COMMAND DATA TO [Name] BE REGISTERED pl_nc_download2 [Description] Outputs (downloads) NC command data to be registered. The NC command data is output using ASCII c
Page 323B–61863E–1/06 PMC LIBRARY 12. NC COMMAND PROGRAM (PMC-SC) 12.22 TERMINATING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f OUTPUT (DOWNLOAD) OF NC [Name] COMMAND DATA TO pl_nc_dwnend2 BE REGISTERED [Description] Terminates the output (download) of the NC command data to be registered. [Format] ret
Page 32412. NC COMMAND PROGRAM (PMC-SC) PMC LIBRARY B–61863E–1/06 12.23 PREPARING TO SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f OUTPUT NC COMMAND DATA TO [Name] BE CHECKED pl_nc_vrfstart2 [Description] Executes preparatory processing to output the NC command data to be verified. [Format] ret = pl_nc_vrfsta
Page 325B–61863E–1/06 PMC LIBRARY 12. NC COMMAND PROGRAM (PMC-SC) 12.24 OUTPUTTING NC SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f COMMAND DATA TO BE VERIFIED [Name] pl_nc_verify2 [Description] Outputs NC command data to be verified by comparing it with the NC command data registered in the NC. [Format] ret
Page 32612. NC COMMAND PROGRAM (PMC-SC) PMC LIBRARY B–61863E–1/06 12.25 TERMINATING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f OUTPUT OF NC COMMAND DATA TO [Name] BE VERIFIED pl_nc_vrfend2 [Description] Terminates the output of the NC command data to be verified. [Format] ret = pl_nc_vrfend2(P1); short
Page 327B–61863E–1/06 PMC LIBRARY 12. NC COMMAND PROGRAM (PMC-SC) 12.26 PREPARING TO SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f OUTPUT NC COMMAND DATA TO [Name] BE USED FOR pl_nc_dncstart2 OPERATION [Description] Executes preparatory processing to output the NC command data to be used for operation. [Forma
Page 32812. NC COMMAND PROGRAM (PMC-SC) PMC LIBRARY B–61863E–1/06 12.27 OUTPUTTING NC SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f COMMAND DATA TO BE USED FOR [Name] OPERATION pl_nc_dnc2 [Description] Outputs the NC command data to be used for operation. [Format] ret = pl_nc_dnc2(P1, P2, P3); short ret; unsi
Page 329B–61863E–1/06 PMC LIBRARY 12. NC COMMAND PROGRAM (PMC-SC) 12.28 TERMINATING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f OUTPUT OF NC COMMAND DATA TO [Name] BE USED FOR pl_nc_dncend2 OPERATION [Description] Terminates the output of the NC command data to be used for operation. [Format] ret = pl_n
Page 33012. NC COMMAND PROGRAM (PMC-SC) PMC LIBRARY B–61863E–1/06 12.29 SEARCHING FOR A SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f SPECIFIC PROGRAM [Name] pl_nc_search2 [Description] Searches for the specified machining program registered in the NC. [Format] ret = pl_nc_search2(P1, P2); short ret; unsigned
Page 331B–61863E–1/06 PMC LIBRARY 12. NC COMMAND PROGRAM (PMC-SC) 12.30 DELETING ALL SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f PROGRAMS [Name] pl_nc_delall2 [Description] Deletes all machining programs registered in the NC. (Programs being used are not deleted.) [Format] ret = pl_nc_delall2(P1); short ret
Page 33212. NC COMMAND PROGRAM (PMC-SC) PMC LIBRARY B–61863E–1/06 12.31 DELETING A SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f SPECIFIC PROGRAM [Name] pl_nc_delete2 [Description] Deletes the specified machining program registered in the NC. The specified program cannot be deleted while it is being used or i
Page 333B–61863E–1/06 PMC LIBRARY 12. NC COMMAND PROGRAM (PMC-SC) 12.32 PREPARING TO SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f INPUT (UPLOAD) NC COMMAND DATA [Name] pl_nc_upstart2 [Description] Prepares to input (upload) NC command data. [Format] ret = pl_nc_upstart2(P1, P2); short ret; unsigned short P1;
Page 33412. NC COMMAND PROGRAM (PMC-SC) PMC LIBRARY B–61863E–1/06 12.33 INPUTTING SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f (UPLOADING) NC COMMAND DATA [Name] pl_nc_upload2 [Description] Inputs (uploads) the NC command data using ASCII character strings. [Format] ret = pl_nc_upload2(P1, P2, P3); short ret
Page 335B–61863E–1/06 PMC LIBRARY 12. NC COMMAND PROGRAM (PMC-SC) 12.34 TERMINATING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f INPUT OF NC COMMAND DATA [Name] pl_nc_upend2 [Description] Terminates the upload to the NC. [Format] ret = pl_nc_upend2(P1); short ret ; unsigned short P1 ; [Input] P1 Tool pos
Page 33612. NC COMMAND PROGRAM (PMC-SC) PMC LIBRARY B–61863E–1/06 12.35 READING PROGRAM SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f MANAGEMENT DATA [Name] pl_nc_dir2 [Description] Reads management data of the machining program registered in the NC. Machining program management data includes the number of re
Page 337B–61863E–1/06 PMC LIBRARY 12. NC COMMAND PROGRAM (PMC-SC) 12.36 PREPARING TO SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f READ THE PROGRAM NUMBER [Name] LIST pl_nc_pdirstart2 [Description] Executes preparatory processing to read the program numbers of all machining programs registered in the NC. [For
Page 33812. NC COMMAND PROGRAM (PMC-SC) PMC LIBRARY B–61863E–1/06 12.37 INPUTTING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f PROGRAM NUMBER LIST [Name] pl_nc_progdir2 [Description] Inputs the program number list of the machining programs registered in the NC. Reading for all programs may be performed t
Page 339B–61863E–1/06 PMC LIBRARY 12. NC COMMAND PROGRAM (PMC-SC) (b) When program numbers, comments, and the number of used memory areas are read P2 0 ’O’ 1 ’1’ Program number O0011 2 ’1’ 3 ’(’ 4 ’P’ 5 ’R’ 6 Comment statement (PROG1) ’O’ 7 ’G’ 8 ’1’ 9 ’)’ 10 ’2’ 11 ’5’ Used memory are=256 (characters) 12 ’
Page 34012. NC COMMAND PROGRAM (PMC-SC) PMC LIBRARY B–61863E–1/06 [Returns] ret Complete code : –11, –2, –1, 0, 1, or 2 –11 : Preparation to input the NC program number list in the NC is not completed or has not been executed. –2 : The NC entered the reset status. –1 : The request to read the program number
Page 341B–61863E–1/06 PMC LIBRARY 12. NC COMMAND PROGRAM (PMC-SC) 12.38 POSTING THE END SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f OF INPUTTING THE PROGRAM NUMBER [Name] LIST pl_nc_pdirend2 [Description] Posts the end of program number list input to the NC. [Format] ret = pl_nc_pdirend2(P1); short ret ; un
Page 34213.NC COMMAND PROGRAM (PMC-NB/NB2/15i–A) PMC LIBRARY B–61863E–1/06 13 NC COMMAND PROGRAM (PMC-NB/NB2/15i–A) The PMC software can read and register NC programs. To read or register an NC program with this function, set the input/output device number to 9 (PMC) in the NC setting data. In the tape oper
Page 34313. NC COMMAND PROGRAM B–61863E–1/06 PMC LIBRARY (PMC-NB/NB2/15i–A) Completion Description Related functions code –11 The processing to start or terminate the function is not pl_nc_download, pl_nc_dwnend, executed. pl_nc_verify, pl_nc_vrend, pl_nc_dnc, pl_nc_dncend, pl_nc_upload, pl_nc_upend, pl_nc_
Page 34413.NC COMMAND PROGRAM (PMC-NB/NB2/15i–A) PMC LIBRARY B–61863E–1/06 The following program registered in the CNC has data described below on the tape depending on the bits of parameter 0 of the CNC: 0100; O200; · · · 1) When ISP, NCR, and EIA are all set to 0 Returned data (hexadecimal) A5 0A 8D 8D DF
Page 34513. NC COMMAND PROGRAM B–61863E–1/06 PMC LIBRARY (PMC-NB/NB2/15i–A) 13.1 EXECUTING SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f PROCESSING TO REGISTERING The PMC sends program data to the NC and the program is registered in (DOWNLOADING) the NC. The program number is added when pl_nc_download is issu
Page 34613.NC COMMAND PROGRAM (PMC-NB/NB2/15i–A) PMC LIBRARY B–61863E–1/06 [Example] void download() { short i, ret; unsigned short p2; char *address, *tmp; if ((ret = pl_nc_dwnstart())==0){ do{ tmp = address; p2=10; *tmp++ = ’0’; . . pl_asciso(p2, address); do{ ret = pl_nc_download(address, p2); }while(ret
Page 34713. NC COMMAND PROGRAM B–61863E–1/06 PMC LIBRARY (PMC-NB/NB2/15i–A) 13.2 OUTPUTTING SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f (DOWNLOADING) THE DATA OF THE [Name] NC COMMAND TO BE pl_nc_download REGISTERED [Description] Registers (downloads) the data of the NC program. Character strings represente
Page 34813.NC COMMAND PROGRAM (PMC-NB/NB2/15i–A) PMC LIBRARY B–61863E–1/06 13.3 EXECUTING SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f PROCESSING TO STOP OUTPUTTING [Name] (DOWNLOADING) pl_nc_dwnend THE DATA OF THE [Description] Executes to stop registering (downloading) the data of the NC NC COMMAND TO BE p
Page 34913. NC COMMAND PROGRAM B–61863E–1/06 PMC LIBRARY (PMC-NB/NB2/15i–A) 13.4 PREPARATORY SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f PROCESSING FOR OUTPUTTING THE The PMC sends program data to the NC and the program is checked with DATA OF THE NC a program registered in the NC. The program number is add
Page 35013.NC COMMAND PROGRAM (PMC-NB/NB2/15i–A) PMC LIBRARY B–61863E–1/06 [Example] void verify() { short i, ret; unsigned short p2; char *address, *tmp; if ((ret = pl_nc_vrfstart())==0){ do{ tmp = address; p2=10; *tmp++ = ’0’; . . pl_asciso(p2, address); do{ ret = pl_nc_verify(address, p2); }while(ret ==
Page 35113. NC COMMAND PROGRAM B–61863E–1/06 PMC LIBRARY (PMC-NB/NB2/15i–A) 13.5 OUTPUTTING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f DATA OF THE NC COMMAND TO BE [Name] CHECKED pl_nc_verify [Description] Outputs the data of the NC command registered in the NC and the data of the NC command to be chec
Page 35213.NC COMMAND PROGRAM (PMC-NB/NB2/15i–A) PMC LIBRARY B–61863E–1/06 13.6 EXECUTING SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f PROCESSING TO STOP OUTPUTTING [Name] THE DATA OF THE pl_nc_vrfebd NC COMMAND TO BE [Description] Executes for stop outputting the data of the NC command to be CHECKED checked
Page 35313. NC COMMAND PROGRAM B–61863E–1/06 PMC LIBRARY (PMC-NB/NB2/15i–A) 13.7 EXECUTING SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A PROCESSING TO f f START OUTPUTTING The PMC sends the tape information of the tape operation. The operation THE DATA OF THE is activated by a cycle start (setting G5.0 on or off)
Page 35413.NC COMMAND PROGRAM (PMC-NB/NB2/15i–A) PMC LIBRARY B–61863E–1/06 [Example] void dnc_exec() { short i, ret; unsigned short p2; char *address, *tmp; if ((ret = pl_nc_dncstart())==0){ do{ tmp = address; p2=10; *tmp++ = ’0’; . . pl_asciso(p2, address); do{ ret = pl_nc_dnc(address, p2); }while(ret == -
Page 35513. NC COMMAND PROGRAM B–61863E–1/06 PMC LIBRARY (PMC-NB/NB2/15i–A) 13.8 OUTPUTTING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f DATA OF THE NC COMMAND TO BE [Name] USED FOR pl_nc_dnc OPERATION [Description] Outputs the data of the NC command to be used for operation. [Format] ret = pl_nc_dnc(P1,
Page 35613.NC COMMAND PROGRAM (PMC-NB/NB2/15i–A) PMC LIBRARY B–61863E–1/06 13.9 EXECUTING SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f PROCESSING TO STOP OUTPUTTING [Name] THE DATA OF THE pl_nc_dncend NC COMMAND TO BE [Description] Executes for stop outputting the data of the NC command to be used USED FOR f
Page 35713. NC COMMAND PROGRAM B–61863E–1/06 PMC LIBRARY (PMC-NB/NB2/15i–A) 13.10 SEARCHING FOR A SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f SPECIFIED NC PROGRAM [Name] pl_nc_search [Description] Searches for a machining program registered in the NC. [Format] ret = pl_nc_search(P1) ; short ret ; short P1 ;
Page 35813.NC COMMAND PROGRAM (PMC-NB/NB2/15i–A) PMC LIBRARY B–61863E–1/06 13.11 DELETING ALL SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f PROGRAMS [Name] pl_nc_delall [Description] Deletes all machining programs registered in the NC. (The program being used for operation is not deleted.) [Format] ret = pl_n
Page 35913. NC COMMAND PROGRAM B–61863E–1/06 PMC LIBRARY (PMC-NB/NB2/15i–A) 13.12 DELETING A SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f SPECIFIC PROGRAM [Name] pl_nc_delete [Description] Deletes a specified machining program which is registered in the NC. The program which is being used for operation is no
Page 36013.NC COMMAND PROGRAM (PMC-NB/NB2/15i–A) PMC LIBRARY B–61863E–1/06 13.13 EXECUTING SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f PROCESSING TO START INPUTTING A program registered in the NC is read into the PMC. The program (UPLOADING) THE number is specified when pl_nc_upstart is issued. Processing f
Page 36113. NC COMMAND PROGRAM B–61863E–1/06 PMC LIBRARY (PMC-NB/NB2/15i–A) [Example] void upload() { short i, ret; unsigned short p2; char *address, *tmp; i = 100; if ((ret = pl_nc_upstart(i))==0){ do{ do{ ret = pl_nc_upload(address, &p2); }while(ret == -10); pl_isoasc(p2, address); tmp = address; for(i =
Page 36213.NC COMMAND PROGRAM (PMC-NB/NB2/15i–A) PMC LIBRARY B–61863E–1/06 13.14 INPUTTING SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f (UPLOADING) NC COMMAND DATA [Name] pl_nc_upload [Description] Reads the data of an NC program registered in the NC. The NC program data is represented in ASCII code. [Format
Page 36313. NC COMMAND PROGRAM B–61863E–1/06 PMC LIBRARY (PMC-NB/NB2/15i–A) 13.15 EXECUTING SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f PROCESSING TO STOP INPUTTING [Name] (UPLOADING) NC pl_nc_upend COMMAND DATA [Description] Executes the processing to stop uploading the NC command data. [Format] ret = pl_n
Page 36413.NC COMMAND PROGRAM (PMC-NB/NB2/15i–A) PMC LIBRARY B–61863E–1/06 13.16 SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A INPUTTING THE f f PROGRAM [Name] MANAGEMENT DATA pl_nc_dir [Description] The management data of machining programs which have already been registered in the NC can be read. The management
Page 36513. NC COMMAND PROGRAM B–61863E–1/06 PMC LIBRARY (PMC-NB/NB2/15i–A) [Example] void dir_inform() { struct { short p1[2]; long p2[2]; long p3[30]; }DIRINF; short ret; do { ret = pl_nc_dir((short *)&DIRINF); }while(ret != 0); printf(”%d”, &DIRINF.p1[0]); printf(”%d”, &DIRINF.p1[1]); . . 349
Page 36613.NC COMMAND PROGRAM (PMC-NB/NB2/15i–A) PMC LIBRARY B–61863E–1/06 13.17 EXECUTING SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A PROCESSING TO f f START INPUTTING The program numbers of all machining programs registered in the NC are THE LIST OF read. PROGRAM Processing flowchart NUMBERS pl_nc_pdirstart p
Page 36713. NC COMMAND PROGRAM B–61863E–1/06 PMC LIBRARY (PMC-NB/NB2/15i–A) [Example] void directory(short start_number) { char buf[256]; char * p; unsigned short len; unsigned short i; short ret; if ( pl_nc_pdirstart(01, &start_number) == 0 ) { while ( 1 ) { len = sizeof(buf); while ( (ret = pl_nc_progdir(
Page 36813.NC COMMAND PROGRAM (PMC-NB/NB2/15i–A) PMC LIBRARY B–61863E–1/06 13.18 INPUTTING THE LIST SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A OF PROGRAM f f NUMBERS [Name] pl_nc_progdir [Description] Inputs the list of numbers of the machining programs registered in the NC. When the data area provided by the
Page 36913. NC COMMAND PROGRAM B–61863E–1/06 PMC LIBRARY (PMC-NB/NB2/15i–A) 3) When NCR is set to 1 and ISP and EIA are set to 0 Returned data (hexadecimal) A5 0A DF B1 30 30 0A DF B2 30 30 28 Corresponding ASCII code % LF 0 1 0 0 LF 0 2 0 0 ( D4 C5 0A A5 T E LF % 4) When EIA is set to 1 Returned data (hexa
Page 37013.NC COMMAND PROGRAM (PMC-NB/NB2/15i–A) PMC LIBRARY B–61863E–1/06 13.19 EXECUTING SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f PROCESSING TO STOP INPUTTING [Name] THE LIST OF pl_nc_pdirend PROGRAM [Description] Terminates input of the list of program numbers into the NC. NUMBERS [Format] ret = pl_nc
Page 37113. NC COMMAND PROGRAM B–61863E–1/06 PMC LIBRARY (PMC-NB/NB2/15i–A) 13.20 SEARCHING FOR A SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f SPECIFIED NC PROGRAM (FOR [Function Name] PROGRAM NUMBER pl_nc_search_o8 8–DIGITS) [Description] It searches for a machining program registered in the NC. [Format] re
Page 37213.NC COMMAND PROGRAM (PMC-NB/NB2/15i–A) PMC LIBRARY B–61863E–1/06 13.21 DELETING A SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f SPECIFIED PROGRAM (FOR [Function Name] PROGRAM NUMBER pl_nc_delete_o8 8–DIGITS) [Description] It deletes a specified machining program which is registered in the NC. [Forma
Page 37313. NC COMMAND PROGRAM B–61863E–1/06 PMC LIBRARY (PMC-NB/NB2/15i–A) 13.22 STARTING SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f INPUTTING THE DATA OF THE NC [Function Name] COMMAND DATA pl_nc_upstart_o8 (FOR PROGRAM [Description] It starts inputting (uploading) the data of the NC command data. NUMBER
Page 37413.NC COMMAND PROGRAM (PMC-NB/NB2/15i–A) PMC LIBRARY B–61863E–1/06 13.23 STARTING SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f INPUTTING THE LIST OF NC PROGRAM [Function Name] NUMBERS (FOR pl_nc_pdirstart_o8 PROGRAM NUMBER [Description] It starts inputting the list of NC program numbers. 8–DIGITS) [D
Page 37614. MMC WINDOW LIBRARY PMC LIBRARY B–61863E–1/06 14.1 READING WINDOW SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f DATA FROM MMC [Name] pl_mmcwr [Description] Reads data of up to 32 bytes via the window between PMC and MMC-II or between PMC and MMC-III. The contents of data can be determined arbitrari
Page 377B–61863E–1/06 PMC LIBRARY 14. MMC WINDOW LIBRARY 14.2 WRITING WINDOW SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f DATA INTO MMC [Name] pl_mmcww [Description] Writes data of up to 32 bytes via the window between PMC and MMC-II or MMC-III. The contents of data can be determined arbitrarily by the PMC,
Page 37814. MMC WINDOW LIBRARY PMC LIBRARY B–61863E–1/06 14.3 READING SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f ARBITRARY DATA FROM MMC VIA THE [Name] WINDOW (MMC-III) pl_mmc3r [Description] Reads data of up to 256 bytes via the window between PMC and MMC. The contents of data can be determined arbitraril
Page 379B–61863E–1/06 PMC LIBRARY 14. MMC WINDOW LIBRARY 14.4 WRITING WINDOW SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f DATA INTO MMC (MMC-III) [Name] pl_mmc3w [Description] Writes data of up to 256 bytes via the window between PMC and MMC. The contents of data can be determined arbitrarily by the PMC or M
Page 38015. UTILITY FUNCTION PMC LIBRARY B–61863E–1/06 15 UTILITY FUNCTION 364
Page 381B–61863E–1/06 PMC LIBRARY 15. UTILITY FUNCTION 15.1 CONVERTING ASCII SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f CODE DATA TO ISO CODE DATA [Name] pl_asciso [Description] Converts ASCII code data to ISO code data. [Format] void pl_asciso(len,buffer); unsigned short len ; char *buffer ; [Input] len S
Page 38215. UTILITY FUNCTION PMC LIBRARY B–61863E–1/06 15.2 CONVERTING ISO SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f f f CODE DATA TO ASCII CODE DATA [Name] pl_isoasc [Description] Converts ISO code data to ASCII code data. [Format] void pl_isoasc(len,buffer); unsigned short len ; char *buffer ; [Input] len S
Page 38416. MATHEMATIC FUNCTIONS PMC LIBRARY B–61863E–1/06 16.1 CALCULATING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f SINE VALUE [Name] sin [Description] Calculates the sine value of “x”. [Format] #include double sin( double x ); [Input] x A floating–point value in radian to be calculated sin
Page 385B–61863E–1/06 PMC LIBRARY 16. MATHEMATIC FUNCTIONS 16.2 CALCULATING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f COSINE VALUE [Name] cos [Description] Calculates the cosine value of “x”. [Format] #include double cos( double x ); [Input] x A floating–point value in radian to be calculated
Page 38616. MATHEMATIC FUNCTIONS PMC LIBRARY B–61863E–1/06 16.3 CALCULATING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f TANGENT VALUE [Name] tan [Description] Calculates the tangent value of “x”. [Format] #include double tan( double x ); [Input] x A floating–point value in radian to be calculat
Page 387B–61863E–1/06 PMC LIBRARY 16. MATHEMATIC FUNCTIONS 16.4 CALCULATING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f ARC SINE VALUE [Name] asin [Description] Calculates the arc sine value of “x”. “x” must be in –1 through 1. The result is in –PI/2 through PI/2 radian. [Format] #include doubl
Page 38816. MATHEMATIC FUNCTIONS PMC LIBRARY B–61863E–1/06 16.5 CALCULATING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f ARC COSINE VALUE [Name] acos [Description] Calculates the arc cosine value of “x”. “x” must be in –1 through 1. The result is in 0 through PI radian. [Format] #include double
Page 389B–61863E–1/06 PMC LIBRARY 16. MATHEMATIC FUNCTIONS 16.6 CALCULATING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f ARC TANGENT VALUE [Name] atan [Description] Calculates the arc tangent value of “x”. The result is in –PI/2 through PI/2 radian. [Format] #include double atan( double x ); [In
Page 39016. MATHEMATIC FUNCTIONS PMC LIBRARY B–61863E–1/06 16.7 CALCULATING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f ARC TANGENT VALUE [Name] atan2 [Description] Calculates the arc tangent value of y/x. Both “x” and “y” are must not be 0. The result is in –PI through PI radian. [Format] #include
Page 391B–61863E–1/06 PMC LIBRARY 16. MATHEMATIC FUNCTIONS 16.8 CALCULATING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f SMALLEST INTEGER VALUE [Name] ceil [Description] Calculates the smallest integer value that is greater than or equal to “x”. [Format] #include double ceil( double x ); [Input]
Page 39216. MATHEMATIC FUNCTIONS PMC LIBRARY B–61863E–1/06 16.9 CALCULATING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f ABSOLUTE VALUE [Name] fabs [Description] Calculates the absolute value of “x”. [Format] #include double fabs( double x ); [Input] x A floating–point value to be calculated the
Page 393B–61863E–1/06 PMC LIBRARY 16. MATHEMATIC FUNCTIONS 16.10 CALCULATING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f LARGEST INTEGER VALUE [Name] floor [Description] Calculates the largest integer value that is less than or equal to “x”. [Format] #include double floor( double x ); [Input] x
Page 39416. MATHEMATIC FUNCTIONS PMC LIBRARY B–61863E–1/06 16.11 CALCULATING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f REMAINDER VALUE [Name] fmod [Description] Calculates the remainder of “x” and “y”. The remainder “z” satisfies “z = x + i*y (“i” is an integer value)” and its absolute value is smalle
Page 395B–61863E–1/06 PMC LIBRARY 16. MATHEMATIC FUNCTIONS 16.12 CALCULATING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f MANTISSA VALUE [Name] frexp [Description] Divides “value” into a mantissa part “m” and an exponential part “n” “m” relates with “n” as “value = m * 2^n” and the absolute value of “m”
Page 39616. MATHEMATIC FUNCTIONS PMC LIBRARY B–61863E–1/06 16.13 GET THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f FRACTIONAL PART AND THE INTEGER [Name] PART modf [Description] Divides “value” into a fractional part and an integer part, both parts have the same sign. [Format] #include double mod
Page 397B–61863E–1/06 PMC LIBRARY 16. MATHEMATIC FUNCTIONS 16.14 CALCULATING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f SQUARE ROOT VALUE [Name] sqrt [Description] Calculates the square root value of “x”. [Format] #include double sqrt( double x ); [Input] x A floating–point value to be calcula
Page 39816. MATHEMATIC FUNCTIONS PMC LIBRARY B–61863E–1/06 16.15 CALCULATING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f EXPONENTIAL FUNCTION [Name] exp [Description] Calculates the exponential funtion (“e” raised to “x” power) of “x”. [Format] #include double exp( double x ); [Input] x A float
Page 399B–61863E–1/06 PMC LIBRARY 16. MATHEMATIC FUNCTIONS 16.16 CALCULATING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f NATURAL (BASE–E) LOGARITHM VALUE [Name] log [Description] Calculates the natural logarithm (base–e logarithm) value of “x”. [Format] #include double log( double x ); [Input]
Page 40016. MATHEMATIC FUNCTIONS PMC LIBRARY B–61863E–1/06 16.17 CALCULATING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f BASE–10 LOGARITHM VALUE [Name] log10 [Description] Calculates the base–10 logarithm value of “x”. [Format] #include double log10( double x ); [Input] x A floating–point value
Page 401B–61863E–1/06 PMC LIBRARY 16. MATHEMATIC FUNCTIONS 16.18 CALCULATING THE SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A f f RAISED VALUE [Name] pow [Description] Calculates “x” raised to the power of “y”. [Format] #include double pow( double x , double y ); [Input] x A floating–point value to be r
Page 405APPLICATION B–61863E–1/06 PROGRAMMING GUIDE 1. DEVELOPMENT PROCEDURE 1 DEVELOPMENT PROCEDURE User application programs written in the C language (hereafter called C programs) are developed according to the procedure below. Start Determines the specifications of control operation and the parts contro
Page 4062. DETERMINING THE SPECIFICATIONS APPLICATION OF THE C PROGRAMS PROGRAMMING GUIDE B–61863E–1/06 2 DETERMINING THE SPECIFICATIONS OF THE C PROGRAMS After the specifications of control operation on the PMC are determined, the details of control performed by C programs needs to be determined. 390
Page 4072. DETERMINING APPLICATION THE SPECIFICATIONS B–61863E–1/06 PROGRAMMING GUIDE OF THE C PROGRAMS 2.1 Operation is divided into tasks according to Section 2, Part II. DIVIDING INTO TASKS 2.2 DETERMINING THE (1) Operation condition of a task The PMC system call function is used to create the operation
Page 4082. DETERMINING THE SPECIFICATIONS APPLICATION OF THE C PROGRAMS PROGRAMMING GUIDE B–61863E–1/06 2.3 DETERMINING THE RESOURCES (AREA OF ROM OR RAM) USED BY C PROGRAMS 2.3.1 Area of ROM (Program (1) PMC-SC/SC3/SC4/NB/NB2 Code Section) After a sequence program (Ladder program, symbol, comment message d
Page 4092. DETERMINING APPLICATION THE SPECIFICATIONS B–61863E–1/06 PROGRAMMING GUIDE OF THE C PROGRAMS (2) PMC C language program of 16i/18i/21i/15i–A With 16i/18i/21i/15i–A, the address of area used by C language program is 900200H. ROM Capacity of C language option 900000H TITLE DATA (512Byte) 256KB 512K
Page 4102. DETERMINING THE SPECIFICATIONS APPLICATION OF THE C PROGRAMS PROGRAMMING GUIDE B–61863E–1/06 2.3.2 In general, a C program uses about 64KB of RAM for the data areas Area of RAM below. Data areas are initialized to 0 only when the power is turned on (there is no subsequent initialization). A C pro
Page 4112. DETERMINING APPLICATION THE SPECIFICATIONS B–61863E–1/06 PROGRAMMING GUIDE OF THE C PROGRAMS When the size of the area for Ladder programs is changed from 96KB to 72KB, the area is allocated as shown below: MAX LADDER SIZE=96KB MAX LADDER SIZE=72KB NOTE 1 NOTE 1 Data area for C Data are
Page 412APPLICATION 3. CREATING A C PROGRAM PROGRAMMING GUIDE B–61863E–1/06 3 CREATING A C PROGRAM 396
Page 413APPLICATION B–61863E–1/06 PROGRAMMING GUIDE 3. CREATING A C PROGRAM 3.1 C PROGRAMS (1) PMCLIB.H must be included when the PMC library is used. The PMC library contains only far-type functions. (2) The task entry function is declared as far-type. (3) The initial values of variables are undefined. Var
Page 414APPLICATION 3. CREATING A C PROGRAM PROGRAMMING GUIDE B–61863E–1/06 3.2 The C286 standard library functions that can be used in the PMC are shown below. For function specifications, refer to “iC-86/286 Libraries C286 STANDARD Supplement”. When using any of these functions, be sure to include the LIB
Page 415APPLICATION B–61863E–1/06 PROGRAMMING GUIDE 3. CREATING A C PROGRAM CAUTION 1 Intel provides library CLIB2C.LIB. For functions shown in brackets [ ], include header files stdlib.h, stdio.h, and PMC-RC C-language library PMC2.LIB provided by FANUC. The [ ]* function can be used with the C function of
Page 416APPLICATION 3. CREATING A C PROGRAM PROGRAMMING GUIDE B–61863E–1/06 CAUTION 4 See Appendix B for information on stack usage by standard functions. 5 Screen control codes (see Section 3.2.1) and escape sequences (see Section 3.2.2) can be used when using I/O function printf to display characters on t
Page 417APPLICATION B–61863E–1/06 PROGRAMMING GUIDE 3. CREATING A C PROGRAM Escape sequence Function ESC )0 Specifies the mode for handling Kanji characters. Kanji can only be displayed in this mode. Graphic characters cannot be dis- played in this mode. ESC )3 Specifies the mode for handling graphic charac
Page 418APPLICATION 3. CREATING A C PROGRAM PROGRAMMING GUIDE B–61863E–1/06 (1) When a “–” is specified, the converted character string is output left–justified. If not specified, the character string is output right–justified. (2) Specifies the number of digits to output. At least the number of digits spec
Page 419APPLICATION B–61863E–1/06 PROGRAMMING GUIDE 3. CREATING A C PROGRAM 3.2.4 Format Specifications SC/SC3/SC4 NB/NB2 16i/18i/21i 15i–A for Scanf Functions ∆ ∆ f f (sscanf) ∆: Floating–point no supported (1) (2) (3) % [*] [numeric string] [l]d [l]o [l]x [l]u c (1) When a “*” is specified
Page 420APPLICATION 3. CREATING A C PROGRAM PROGRAMMING GUIDE B–61863E–1/06 A sample program is shown below. This program turns keep-relay K10.0 alternately on and off every 80 milliseconds. /****************************************/ /* ‘printf()’ /****************************************/ #include
Page 421APPLICATION 4. CREATION OF LINK B–61863E–1/06 PROGRAMMING GUIDE CONTROL STATEMENT 4 CREATION OF LINK CONTROL STATEMENT A user task can be executed on the PMC only after the task is registered as the link control data. The link control data can be easily created with the tool provided. The link contr
Page 4224. CREATION OF LINK APPLICATION CONTROL STATEMENT PROGRAMMING GUIDE B–61863E–1/06 4.1 [Operation environment] START UP OF THE PC-9801 series (NEC), IBM/PC-AT MS-DOS (Version 3.30 or after) LINK CONTROL Include ANSI.SYS in config.sys. STATEMENT Execute MKC.EXE in the TOOL: PC98 (NEC) or TOOL: PCAT (I
Page 423APPLICATION 4. CREATION OF LINK B–61863E–1/06 PROGRAMMING GUIDE CONTROL STATEMENT 4.2 KEY OPERATION OF (1) Data input Data are input by entering the setting values and pressing the Return THE LINK CONTROL key. However, if a setting value is input and the Cursor Shift key is STATEMENT pressed, the se
Page 4244. CREATION OF LINK APPLICATION CONTROL STATEMENT PROGRAMMING GUIDE B–61863E–1/06 4.3 The Link Control Statement creation tool has the following three screens: SETTING THE LINK D Main screen for Link Control Statement creation D Common memory definition screen CONTROL D Task information definition s
Page 425APPLICATION 4. CREATION OF LINK B–61863E–1/06 PROGRAMMING GUIDE CONTROL STATEMENT (4) DEVICE CONTROL PARAMETER The method used for controlling each device is defined as described below: [MDI KEY] 0 : When there is no key input, a return code indicating that there is no key input is sent to the user
Page 4264. CREATION OF LINK APPLICATION CONTROL STATEMENT PROGRAMMING GUIDE B–61863E–1/06 (6) CYCLE TIME (LADDER LEVEL 3) The cycle time of Ladder Level 3 is set. The cycle time can range from 8 msec to 2000 msec in units of 8 msec. Numbers which are not multiples of 8 are rounded down. (7) TASK COUNT The n
Page 427APPLICATION 4. CREATION OF LINK B–61863E–1/06 PROGRAMMING GUIDE CONTROL STATEMENT 4.3.3 When the number of registered tasks is set on the main screen of Link Control Statement creation and the TASK F3 key is pressed, the task Task Information information definition screen (Fig. 4.3.3) is displayed.
Page 428APPLICATION 5. BUILD FILE CREATION PROGRAMMING GUIDE B–61863E–1/06 5 BUILD FILE CREATION When creating a build file, the following should be kept in mind: (1) The user GDT entry range is 32 to 95. (For the C function of the Series 16i/18i/21i/15i–A, 32 to 223) (2) The task privilege is 3. The segmen
Page 429APPLICATION B–61863E–1/06 PROGRAMMING GUIDE 5. BUILD FILE CREATION Build file (Example) Below is an example that uses two tasks and common memory. -- SMPL.bld USER; -- build program id SEGMENT TASK1_CODE (DPL=3 ), -- TASK 1 TASK1_DATA (DPL=3 ), TASK2_CODE (DPL=3 ), -- TASK 2 TASK2_DATA (DPL=3 ), COM
Page 430APPLICATION 6. EXECUTION FILE CREATION PROGRAMMING GUIDE B–61863E–1/06 6 EXECUTION FILE CREATION An execution file is created from a C source file as described below: NOTE For detailed explanations on compiling, binding, and building, refer to the below manuals. “iC-86/286 Compiler User’s Guide” “In
Page 431APPLICATION B–61863E–1/06 PROGRAMMING GUIDE 6. EXECUTION FILE CREATION (2) Binding each task Binding is performed several times for each task. Because all functions in the C286 standard library are near-type, it must be bound to each task. [Bind format] BND386 &
Page 432APPLICATION 6. EXECUTION FILE CREATION PROGRAMMING GUIDE B–61863E–1/06 (4) Binds all tasks with the PMC library [Bind format] BND386 &
Page 434APPLICATION 7. LOAD MODULE TRANSFER PROGRAMMING GUIDE B–61863E–1/06 7 LOAD MODULE TRANSFER Before transferring the execution format load module to the PMC side, it must first be converted to Intel 386 hexadecimal. Use Intel’s OH386 program (stored in RLL386) for this conversion. [Format] OH386 SMPL.
Page 435APPLICATION B–61863E–1/06 PROGRAMMING GUIDE 7. LOAD MODULE TRANSFER 7.1 IN CASE OF THE 1. Convert a Hex file to a Mem file and transfer the Mem file by a MEMORY card. 16i/18i/21i/15i–A, 2. Transfer a Hex file by an RS–232C or a MEMORY card. THERE ARE FOLLOWING NOTE METHODS TO Hex file : Intel 386 he
Page 436APPLICATION 7. LOAD MODULE TRANSFER PROGRAMMING GUIDE B–61863E–1/06 7.1.2 Method to Transfer a (1) In case of transfering a Hex file by an RS–232C Hex File Set the serial port on the personal computer. PC/AT c:O> mode com1:9600,n,8,2 PC–98 a:O> speed ro 9600 b8 pn s2 none 1) Connect the serial port
Page 437APPLICATION 8. STARTING AND HALTING B–61863E–1/06 PROGRAMMING GUIDE C PROGRAM TASKS 8 STARTING AND HALTING C PROGRAM TASKS (1) lANGUAGE ORIGIN setting By pressing the soft key “SYSPRM”, the system parameter screen is displayed. [ RUN ][ EDIT ][ I/O ][ SYSPRM ][ ] Using the MAP file, check the first
Page 4388. STARTING AND HALTING APPLICATION C PROGRAM TASKS PROGRAMMING GUIDE B–61863E–1/06 (3) Halting tasks Pressing the soft key “STOP” puts the C program tasks in the halt state. [ RUN ][ EDIT ][ I/O ][ SYSPRM ][ ] D The PMC management software automatically halts the C program task when one of the foll
Page 439APPLICATION 9. C-PROGRAM MEMORY DISPLAY B–61863E–1/06 PROGRAMMING GUIDE AND DEBUG FUNCTION 9 C-PROGRAM MEMORY DISPLAY AND DEBUG FUNCTION Press the [MONIT] soft key on the basic programmer’s menu to display the basic monitor menu shown in Figure 9. It is now possible to use the following C-program me
Page 4409. C-PROGRAM MEMORY DISPLAY APPLICATION AND DEBUG FUNCTION PROGRAMMING GUIDE B–61863E–1/06 9.1 This function displays the contents of GDT (Global Descriptor Table) in order to confirm the GDT data set by a C program. This function can also GDT INFORMATION be used to dump the memory of a specified de
Page 441APPLICATION 9. C-PROGRAM MEMORY DISPLAY B–61863E–1/06 PROGRAMMING GUIDE AND DEBUG FUNCTION PMC DESCRIPTOR TABLE(GDT) MONIT RUN NO. ACCESS USE BASE LIMIT 032 RW 16 0016000AH 0000056FH 033 RW 16 0016005AH 0000023FH 034 RW 16 00160300H 00000040H 035 RW 16 00160340H 00000234H 036 ER 16 00823000H 0000005
Page 4429. C-PROGRAM MEMORY DISPLAY APPLICATION AND DEBUG FUNCTION PROGRAMMING GUIDE B–61863E–1/06 9.1.2 Explanation of Display Items NO. ACCESS USE BASE LIMIT 32 ER 16 00862340H 0000523FH Segment limit Segment base Segment type Segment attribute GDT No. (1) Segment access attribute Message Meaning RO Read-
Page 443APPLICATION 9. C-PROGRAM MEMORY DISPLAY B–61863E–1/06 PROGRAMMING GUIDE AND DEBUG FUNCTION 9.2 Segment data can be displayed and a memory dump can be made for the data area, stack area, and common memory area of each task defined in C-PROGRAM a C program. MEMORY DISPLAY Each of these areas is differ
Page 4449. C-PROGRAM MEMORY DISPLAY APPLICATION AND DEBUG FUNCTION PROGRAMMING GUIDE B–61863E–1/06 PMC USER MEMORY(TASK DATA) MONIT RUN ID NAME GDT BASE LIMIT 10 TASK-O01 039 00160050H 00010100H 11 TASK-O02 040 00160060H 00004100H 12 TASK-O03 041 00160070H 00005100H 13 TASK-O04 042 00160080H 00000160H 14 TA
Page 445APPLICATION 9. C-PROGRAM MEMORY DISPLAY B–61863E–1/06 PROGRAMMING GUIDE AND DEBUG FUNCTION 9.2.2 Explanation of Display (1) Display of the task data and stack areas Items ID NAME GDT BASE LIMIT 10 TASK-001 032 00160010H 00000100H Segment limit Segment base GDT No. Task name Task ID (2) Display of th
Page 4469. C-PROGRAM MEMORY DISPLAY APPLICATION AND DEBUG FUNCTION PROGRAMMING GUIDE B–61863E–1/06 9.3 Use the below methods to confirm that a user-created C program operates properly. DEBUG FUNCTION (1) Diagnose through external operation of the CRT display and signal states. (2) Diagnose using the task mo
Page 447APPLICATION 9. C-PROGRAM MEMORY DISPLAY B–61863E–1/06 PROGRAMMING GUIDE AND DEBUG FUNCTION 9.3.3 When using the debug function, it is necessary to set break condition Parameter Screen items on the parameter screen. On a 9-inch CRT, press the key to set the dump data area used when a break oc
Page 4489. C-PROGRAM MEMORY DISPLAY APPLICATION AND DEBUG FUNCTION PROGRAMMING GUIDE B–61863E–1/06 (c) ACCESS LENGTH Set the effective range of a break point address. 0 : (BYTE) : Set for read/write access of a byte at a specified address or for an execution address. 1 : (WORD) : Set for read/write access o
Page 449APPLICATION 9. C-PROGRAM MEMORY DISPLAY B–61863E–1/06 PROGRAMMING GUIDE AND DEBUG FUNCTION (h) NO. DUMP ADR. Use a segment address to specify the dump data address used when a break occurs. Up to eight locations can be specified (each location can be up to 32 bytes). Use a non-alphanumeric character
Page 4509. C-PROGRAM MEMORY DISPLAY APPLICATION AND DEBUG FUNCTION PROGRAMMING GUIDE B–61863E–1/06 9.3.4 When a break occurs according to the break conditions set on the Dump Data Display parameter screen, BRK blinks at the bottom-right of the PMC display screen. The break-point No. (BP1 to BP4) is displaye
Page 451APPLICATION 9. C-PROGRAM MEMORY DISPLAY B–61863E–1/06 PROGRAMMING GUIDE AND DEBUG FUNCTION 9.3.6 This example sets a break point at statement 489 (*b) of the sample Example of Using the C-program and checks the contents of variables F_DSPSAVE, F_GROPEN, and SYS. Debug Function
Page 4529. C-PROGRAM MEMORY DISPLAY APPLICATION AND DEBUG FUNCTION PROGRAMMING GUIDE B–61863E–1/06 (a) Program listing (compile listing) 1 /** 2 * 3 * Module name : demo.c 4 * 5 * Function : demonstration program 6 * 7 **/ 8 #include ”stdlib.h” 9 #include ”stdio.h” 10 #include ”pmclib.h” 470 /** 471 * 472 *
Page 453APPLICATION 9. C-PROGRAM MEMORY DISPLAY B–61863E–1/06 PROGRAMMING GUIDE AND DEBUG FUNCTION (b) Program listing in the machine language (produced at compilation) ; STATEMENT # 478 → * a1 main PROC FAR 0774 1E PUSH DS 0775 B90000 MOV CX,@@DATA$FRAME 0778 8ED9 MOV DS,CX 077A C8040000 ENTER 4H,0H @1: ;
Page 4549. C-PROGRAM MEMORY DISPLAY APPLICATION AND DEBUG FUNCTION PROGRAMMING GUIDE B–61863E–1/06 (c) MAP listing DESCRIPTOR TABLE MAP TABLE = GDT BASE = 00845000H LIMIT = 012FH TABLE INDEX SELECTOR DESCRIPTOR NAME 1 0008H ?SEGMENT.1 2 0010H ?SEGMENT.2 32 0103H ?SEGMENT.3 33 010BH ?SEGMENT.4 →*c 34 0113H ?
Page 455APPLICATION 9. C-PROGRAM MEMORY DISPLAY B–61863E–1/06 PROGRAMMING GUIDE AND DEBUG FUNCTION 9.4 OPERATION OF C LANGUAGE CONTROL SCREEN 9.4.1 On FS15i, the following C Language Control Screens are provided. General of C Language (1) Display of title, parameter and system information of C language Cont
Page 4569. C-PROGRAM MEMORY DISPLAY APPLICATION AND DEBUG FUNCTION PROGRAMMING GUIDE B–61863E–1/06 9.4.2 The following information is displayed at the first line of each C language Menu Bar control screen. (1) The title of C language control screen (2) Status of run/stop of sequence program (3) Status of PM
Page 457APPLICATION 9. C-PROGRAM MEMORY DISPLAY B–61863E–1/06 PROGRAMMING GUIDE AND DEBUG FUNCTION 9.4.3 Pressing soft–key [PMC C LANG], C language main menu screen is C Language Main Menu displayed. Screen By pressing the soft–key in the screen, a screen expressed in the menu is selected. Fig.9.4.3 C Langu
Page 4589. C-PROGRAM MEMORY DISPLAY APPLICATION AND DEBUG FUNCTION PROGRAMMING GUIDE B–61863E–1/06 9.4.4 To display the title screen, press soft–key [TITLE] in menu screen. C Language Title The following information is displayed in title screen. Screen (1) Title data D Machine tool builder name D Machine na
Page 459APPLICATION 9. C-PROGRAM MEMORY DISPLAY B–61863E–1/06 PROGRAMMING GUIDE AND DEBUG FUNCTION 9.4.5 To display the user task execution screen, press soft–key [USRDGN] in User Task Execution menu screen. Screen For details of user task execution status screen, please refer to C language programming manu
Page 4609. C-PROGRAM MEMORY DISPLAY APPLICATION AND DEBUG FUNCTION PROGRAMMING GUIDE B–61863E–1/06 9.4.6 To display the GDT information display screen, press soft–key [GDT] in GDT Information menu screen. Display Screen For details of the GDT information display screen, please refer to C language programmin
Page 461APPLICATION 9. C-PROGRAM MEMORY DISPLAY B–61863E–1/06 PROGRAMMING GUIDE AND DEBUG FUNCTION 9.4.7 To display the Memory display screen, press soft–key [USRMEM] in Memory Display menu screen. Screen For details of the Memory display screen, please refer to C language programming manual “IV 9.2 C–PROGR
Page 462APPLICATION 10. C-LANGUAGE LIBRARY PROGRAMMING GUIDE B–61863E–1/06 10 C-LANGUAGE LIBRARY The PMC C language libraries are distributed with floppy disks for the types of PMC as follows: PMC–SC C language library : A08B–9201–J701 PMC–NB C language library : A08B–9201–J703 Copy the original floppy disk
Page 463APPLICATION B–61863E–1/06 PROGRAMMING GUIDE 11. SAMPLE PROGRAM 11 SAMPLE PROGRAM A sample program is provided as a guide in assisting machine tool builders to create applications. This is a standard program used for screen display (character and graphics display). 447
Page 464APPLICATION 11. SAMPLE PROGRAM PROGRAMMING GUIDE B–61863E–1/06 11.1 The sample program consists of the following source files, compilation files, link command files, and execution load modules. FILE When changing the program, re-compiling, or re-linking, be sure to CONFIGURATION modify the program t
Page 465APPLICATION B–61863E–1/06 PROGRAMMING GUIDE 11. SAMPLE PROGRAM 11.2 EXECUTING THE (1) Transfer the load module to PMC RAM. For details on transferal, see Chapter 7. SAMPLE PROGRAM (2) Set LANGUAGE ORIGIN on the system parameters screen of the PMC programmer’s function. When the provided sample progr
Page 466APPLICATION 11. SAMPLE PROGRAM PROGRAMMING GUIDE B–61863E–1/06 11.3 The link control statement data for the sample program is as follows. CONTENTS OF LINK (1) Setting items on the link control statement creation main screen CONTROL D USER GDT ADDRESS 845000H D GDT ENTRY COUNT 5 STATEMENT DATA D COMM
Page 467APPLICATION B–61863E–1/06 PROGRAMMING GUIDE 11. SAMPLE PROGRAM 11.4 CONTENTS OF THE BUILD FILE USER; SEGMENT SEG_MDI_CODE (DPL=3 ), -- PCMDI SIGNAL TASK SEG_MDI_DATA (DPL=3 ), SEG_DEMO_CODE (DPL=3 ), -- CRT DISPLAY TASK SEG_DEMO_DATA (DPL=3 ), SEG_PMCLIB_CODE (DPL=3 ) -- PMC LIB CODE ; TABLE GDT ( R
Page 468APPLICATION 11. SAMPLE PROGRAM PROGRAMMING GUIDE B–61863E–1/06 11.5 BASIC FLOW CHART Sample program PMCMDI event waiting pl_pcmdi_wait Command to ignore pl_fkey_ign function key input Display of fixed section *1 Report of function key pl_fkey_sts request No request Function key? Request made Save gr
Page 469APPLICATION B–61863E–1/06 PROGRAMMING GUIDE 11. SAMPLE PROGRAM *1 Display of fixed section Graphic drawing graphic pl_grpstatus report Graphic Invalidate data validation/ invalidation? Validate Restoration of graphic pl_grpdspon pl_grpopen Initialization of graphic drawing drawing Initial display of
Page 470APPLICATION 11. SAMPLE PROGRAM PROGRAMMING GUIDE B–61863E–1/06 11.6 PROGRAM LISTING (1) Source file “demo.c” /** * * Module name : demo.c * * Function : demonstration program * **/ #include ”stdlib.h” #include ”stdio.h” #include ”pmclib.h” #define CRTTYPE 2 /* CRT type */ #define CRT_14 3 /* CRT 14”
Page 485A. CHINESE CHARACTER CODE, HIRAGANA B−61863E−1/06 APPENDIX CODE, AND SPECIAL CODE LIST A CHINESE CHARACTER CODE, HIRAGANA CODE, AND SPECIAL CODE LIST 469
Page 486A. CHINESE CHARACTER CODE, HIRAGANA CODE, AND SPECIAL CODE LIST APPENDIX B−61863E−1/06 470
Page 487A. CHINESE CHARACTER CODE, HIRAGANA B−61863E−1/06 APPENDIX CODE, AND SPECIAL CODE LIST 471
Page 488A. CHINESE CHARACTER CODE, HIRAGANA CODE, AND SPECIAL CODE LIST APPENDIX B−61863E−1/06 472
Page 489A. CHINESE CHARACTER CODE, HIRAGANA B−61863E−1/06 APPENDIX CODE, AND SPECIAL CODE LIST 473
Page 490A. CHINESE CHARACTER CODE, HIRAGANA CODE, AND SPECIAL CODE LIST APPENDIX B−61863E−1/06 474
Page 491A. CHINESE CHARACTER CODE, HIRAGANA B−61863E−1/06 APPENDIX CODE, AND SPECIAL CODE LIST 475
Page 492B. STACKING CONDITION FOR LIBRARY FUNCTIONS APPENDIX B–61863E–1/06 B STACKING CONDITION FOR LIBRARY FUNCTIONS 476
Page 493B. STACKING CONDITION FOR B–61863E–1/06 APPENDIX LIBRARY FUNCTIONS B.1 STACKING CONDITION FOR PMC LIBRARY FUNCTIONS Function Function name Required stack size PMC system call os_chng_pri,os_show_tim Approx. 50 bytes os_set_tim,os_sync_tim os_wait_tim,os_make_flg os_delt_flg,os_sign_flg os_wait_flg,o
Page 494B. STACKING CONDITION FOR LIBRARY FUNCTIONS APPENDIX B–61863E–1/06 Function Function name Required stack size Functions related to the reader/punch interface pl_rsopen,pl_rsclose Approx. 150 bytes pl_rsrd,pl_rswrt pl_fopen,pl_fdir,pl_fdel pl_rsopen2, pl_rsclose2 pl_rsrd2, pl_rswrt2 pl_fopen2, pl_fdi
Page 495B. STACKING CONDITION FOR B–61863E–1/06 APPENDIX LIBRARY FUNCTIONS B.2 STACKING D Intel library iC-286/CLIB2C.LIB Ver 4.5 D FANUC library PMC2.LIB and functions in [] CONDITION FOR PMC3.LIB and function in []* C286 STANDARD (1) Functions for character sorting, conversion, buffer operations, LIBRARY
Page 496C. DIFFERENCES BETWEEN THE PMC-SC AND THE PMC-N, AND HOW TO MIGRATE FROM THE PMC-N/NA TO THE PMC-SC/SC3/SC4/NB/NB2 APPENDIX B–61863E–1/06 DIFFERENCES BETWEEN THE PMCĆSC AND THE PMCĆN, AND HOW TO C MIGRATE FROM THE PMCĆN/NA TO THE PMCĆSC/SC3/SC4/NB/NB2 480
Page 497C. DIFFERENCES BETWEEN THE PMC-SC AND THE PMC-N, AND HOW TO MIGRATE FROM THE PMC-N/NA TO B–61863E–1/06 APPENDIX THE PMC-SC/SC3/SC4/NB/NB2 C.1 STATE TRANSITION OF TASKS Locked state os_chng_pri os_chng_pri os_wait_flg (plock) (punlock) ----- (pwait) (pstop) Run state Wait state Stopped state Ready st
Page 498C. DIFFERENCES BETWEEN THE PMC-SC AND THE PMC-N, AND HOW TO MIGRATE FROM THE PMC-N/NA TO THE PMC-SC/SC3/SC4/NB/NB2 APPENDIX B–61863E–1/06 C.2 To activate a task under the same condition as that with the PMC-N/NA, the procedure shown below must be followed. TASK ACTIVATION CONDITIONS (1) Activation a
Page 499C. DIFFERENCES BETWEEN THE PMC-SC AND THE PMC-N, AND HOW TO MIGRATE FROM THE PMC-N/NA TO B–61863E–1/06 APPENDIX THE PMC-SC/SC3/SC4/NB/NB2 (3) PMCMDI activation : Specify a task to wait for a PMCMDI event (pl_pcmdi_wait) using the PMC system call function. Issue the pl_pcmdi command from another task
Page 500C. DIFFERENCES BETWEEN THE PMC-SC AND THE PMC-N, AND HOW TO MIGRATE FROM THE PMC-N/NA TO THE PMC-SC/SC3/SC4/NB/NB2 APPENDIX B–61863E–1/06 C.3 The user can invoke the task management procedure using the following functions of the PMC-N/NA system call library: TASK MANAGEMENT PROCEDURE Function name D
Page 501C. DIFFERENCES BETWEEN THE PMC-SC AND THE PMC-N, AND HOW TO MIGRATE FROM THE PMC-N/NA TO B–61863E–1/06 APPENDIX THE PMC-SC/SC3/SC4/NB/NB2 C.4 TASK PRIORITIES (1) For the PMC-SC/SC3/SC4/NB/NB2, any integer from 10 to 99 can be specified for the priority of a task. (2) The task priorities can be chang
Page 502C. DIFFERENCES BETWEEN THE PMC-SC AND THE PMC-N, AND HOW TO MIGRATE FROM THE PMC-N/NA TO THE PMC-SC/SC3/SC4/NB/NB2 APPENDIX B–61863E–1/06 C.7 Following tables show the correspondence of the function between PMC–SC/SC3/SC4/NB/NB2 and PMC–N/NA. To use function, refer to CORRESPONDENCE the description
Page 503C. DIFFERENCES BETWEEN THE PMC-SC AND THE PMC-N, AND HOW TO MIGRATE FROM THE PMC-N/NA TO B–61863E–1/06 APPENDIX THE PMC-SC/SC3/SC4/NB/NB2 MDI KEYS Chapter Function for PMC–SC/ Function for PMC–N/NA SC3/SC4/NB/NB2 4.1 pl_mdikey pc_rawio 4.2 pl_keydef – 4.3 pl_keysts – 4.4 pl_fkey_ign – 4.5 pl_fkey_av
Page 504C. DIFFERENCES BETWEEN THE PMC-SC AND THE PMC-N, AND HOW TO MIGRATE FROM THE PMC-N/NA TO THE PMC-SC/SC3/SC4/NB/NB2 APPENDIX B–61863E–1/06 CRT CHARACTER DISPLAY Chapter Function for PMC–SC/ Function for PMC–N/NA SC3/SC4/NB/NB2 8.1 pl_dspclr printf 8.2 pl_dspclrl printf 8.3 pl_dspclrc printf 8.4 pl_ds
Page 505C. DIFFERENCES BETWEEN THE PMC-SC AND THE PMC-N, AND HOW TO MIGRATE FROM THE PMC-N/NA TO B–61863E–1/06 APPENDIX THE PMC-SC/SC3/SC4/NB/NB2 NC WINDOW LIBRARY Chapter Function for PMC–SC/ Function for PMC–N/NA SC3/SC4/NB/NB2 11.1 pl_nc_windr pwindr 11.2 pl_nc_windw pwindw 11.3 pl_exin – NC COMMAND PROG
Page 506D. EXAMPLES OF PROGRAMS APPENDIX B–61863E–1/06 D EXAMPLES OF PROGRAMS 490
Page 507B–61863E–1/06 APPENDIX D. EXAMPLES OF PROGRAMS D.1 TIMER D When X1000.0 is off, K10.0 is turned on and off every 80 ms (timer-wait). MANAGEMENT D When X1000.0 is on, K10.1 is turned on and off every 160 ms (loop). FUNCTION /*==============================================================*/ /* time ma
Page 508D. EXAMPLES OF PROGRAMS APPENDIX B–61863E–1/06 D.2 MEMORY D The size of structure WORK (14 bytes) is allocated from the pooled-memory area. MANAGEMENT D When K10.0 is on, stored in the memory pool from which the data table FUNCTION was allocated. D When K10.0 is off, the contents of the memory pool
Page 509B–61863E–1/06 APPENDIX D. EXAMPLES OF PROGRAMS D.3 SEMAPHOR D This program uses the semaphor to stop execution of TASK-1 from TASK-2. MANAGEMENT D TASK-1 acquires and releases the semaphor while turning K10.0 on and FUNCTION off. D TASK-2 uses an event (X1000.0 on) to acquire the semaphor. D This ca
Page 510D. EXAMPLES OF PROGRAMS APPENDIX B–61863E–1/06 D.4 EVENT GRAPH D TASK-1 turns K10.0 and K10.2 on and off, and TASK-2 turns K10.1 and K10.3 on and off. MANAGEMENT D The event graph is used to turn the keep relays on and off in the FUNCTION following order: K10.0 → K10.1 → K10.2 → K10.3. TASK-1 TASK-2
Page 511B–61863E–1/06 APPENDIX D. EXAMPLES OF PROGRAMS /*==============================================================*/ /* flag man task–1 */ /*==============================================================*/ #include #define K10_0 27264+(10*8)+0 #define K10_2 27264+(10*8)+2 #define FLAG_ID 10
Page 512D. EXAMPLES OF PROGRAMS APPENDIX B–61863E–1/06 D.5 This program uses a mailbox to pass a message pointer from TASK-2 to TASK-1 to display a message from TASK-2 on the PMCMDI screen. MAILBOX MANAGEMENT Mailbox FUNCTION Read Write 0 pointer Task-1 Task-2 pointer pointer PMCMDI screen Message MBX -1- M
Page 513B–61863E–1/06 APPENDIX D. EXAMPLES OF PROGRAMS /*==============================================================*/ /* mail man task–1 */ /*==============================================================*/ #include long tim ; unsigned long lo; unsigned long hi ; void far test_tsk1() { char *
Page 514D. EXAMPLES OF PROGRAMS APPENDIX B–61863E–1/06 D.6 The act of passing a packet in order from one task to another is called packet passing. PACKET This program passes a packet in order from TASK-1 to TASK-2 to COMMUNICATION TASK-3 with each task writing a message in the packet. FUNCTION TASK-3 return
Page 515B–61863E–1/06 APPENDIX D. EXAMPLES OF PROGRAMS /*==============================================================*/ /* pack man task–2 */ /*==============================================================*/ #include #include const char task2_data[] = {”TASK2DATA”} ; char far *in ;
Page 516E. SYSTEM ALARMS APPENDIX B–61863E–1/06 E SYSTEM ALARMS The message below indicates a system alarm and is displayed when such an alarm occurs during operation of a PMC-SC application. The cause of this alarm may originate in the application. Use the debug function to set a break point one step befor
Page 517B–61863E–1/06 APPENDIX F. FLOATING-POINT OPERATION LIBRARY F FLOATINGĆPOINT OPERATION LIBRARY 501
Page 518F. FLOATING-POINT OPERATION LIBRARY APPENDIX B–61863E–1/06 F.1 There are the following functions available in the library for performing floating-point operations. LIST OF Arithmetic operations FLOATING-POINT Addition pl_fadd() pl_fadd2() OPERATION Subtraction pl_fsub() pl_fsub2() LIBRARY Multiplica
Page 519B–61863E–1/06 APPENDIX F. FLOATING-POINT OPERATION LIBRARY F.2 Data Y has the following format. DATA FORMAT Y = long_value * 10 ^ -dec_point (* 10 ^ –dec_point indicates 10 to the –dec_point power. dec_point indicates the number of decimal places.) long_value Signed long in binary format (eight-digi
Page 520F. FLOATING-POINT OPERATION LIBRARY APPENDIX B–61863E–1/06 F.3 When using the floating point library functions in a program, always be sure to exercise caution as to whether the degree of precision is adequate. PRECISION F.3.1 The effective number of digits in data for input and output is eight deci
Page 521B–61863E–1/06 APPENDIX F. FLOATING-POINT OPERATION LIBRARY F.4 All the floating point library functions return the below completion codes. COMPLETION 0 . . Normal termination CODES 5 . . Data error * Data errors indicate input data errors, output data overflow and underflow, and division by zero. Fo
Page 522F. FLOATING-POINT OPERATION LIBRARY APPENDIX B–61863E–1/06 F.7 Floating-point library functions are all near-type functions. The segment name is CODE. For binding, rename the segment name and link. COMPILATION AND LINKING TASK1.OBJ,& PMCFLT.LIB,& OJ(TASK1,LNK NOLO NOPL EC(SMPL_TSK1) & PR(TASK1.MP1)
Page 523B–61863E–1/06 APPENDIX F. FLOATING-POINT OPERATION LIBRARY [Function name] pl_fadd [Description] Adds floating-point numbers. [Format] typedef struct { long long_value ; /* number */ char dec_point ; /* position of decimal point */ } F_FLOAT ; F_FLOAT x, y, ans ; short ret ; ret = pl_fadd( &x, &y, &
Page 524F. FLOATING-POINT OPERATION LIBRARY APPENDIX B–61863E–1/06 [Function name] pl_fsub [Description] Subtracts floating-point numbers. [Format] typedef struct { long long_value ; /* number */ char dec_point ; /* position of decimal point */ } F_FLOAT ; F_FLOAT x, y, ans ; short ret ; ret = pl_fsub( &x,
Page 525B–61863E–1/06 APPENDIX F. FLOATING-POINT OPERATION LIBRARY [Function name] pl_fmul [Description] Multiplies floating-point numbers. [Format] typedef struct { long long_value ; /* number */ char dec_point ; /* position of decimal point */ } F_FLOAT ; F_FLOAT x, y, ans ; short ret ; ret = pl_fmul( &x,
Page 526F. FLOATING-POINT OPERATION LIBRARY APPENDIX B–61863E–1/06 [Function name] pl_fdiv [Description] Divides floating-point numbers. [Format] typedef struct { long long_value ; /* number */ char dec_point ; /* position of decimal point */ } F_FLOAT ; F_FLOAT x, y, ans ; short ret ; ret = pl_fdiv( &x, &y
Page 527B–61863E–1/06 APPENDIX F. FLOATING-POINT OPERATION LIBRARY [Function name] pl_fsgr [Description] Obtains a square root [Format] typedef struct { long long_value ; /* number */ char dec_point ; /* position of decimal point */ } F_FLOAT ; F_FLOAT x, ans ; short ret ; ret = pl_fsgr( &x, &ans ) ; [Input
Page 528F. FLOATING-POINT OPERATION LIBRARY APPENDIX B–61863E–1/06 [Function name] pl_fsin [Description] Calculates a trigonometric function SIN. [Format] typedef struct { long long_value ; /* number */ char dec_point ; /* position of decimal point */ } F_FLOAT ; F_FLOAT x, ans ; short ret ; ret = pl_fsin(
Page 529B–61863E–1/06 APPENDIX F. FLOATING-POINT OPERATION LIBRARY [Function name] pl_fcos [Description] Calculates a trigonometric function COS. [Format] typedef struct { long long_value ; /* number */ char dec_point ; /* position of decimal point */ } F_FLOAT ; F_FLOAT x, ans ; short ret ; ret = pl_fcos(
Page 530F. FLOATING-POINT OPERATION LIBRARY APPENDIX B–61863E–1/06 [Function name] pl_ftan [Description] Calculates a trigonometric function TAN. [Format] typedef struct { long long_value ; /* number */ char dec_point ; /* position of decimal point */ } F_FLOAT ; F_FLOAT x, ans ; short ret ; ret = pl_ftan(
Page 531B–61863E–1/06 APPENDIX F. FLOATING-POINT OPERATION LIBRARY [Function name] pl_fasin [Description] Finds angle X from the value of sin X for a circle with a radius of 1. This function is the inverse of pl_fsin. [Format] typedef struct { long long_value ; /* number */ char dec_point ; /* position of d
Page 532F. FLOATING-POINT OPERATION LIBRARY APPENDIX B–61863E–1/06 [Function name] pl_facos [Description] Finds angle X from the value of cos X for a circle with a radius of 1. This function is the inverse of pl_fcos. [Format] typedef struct { long long_value ; /* number */ char dec_point ; /* position of d
Page 533B–61863E–1/06 APPENDIX F. FLOATING-POINT OPERATION LIBRARY [Function name] pl_fatan [Description] Finds angle X from the value of tan X for a circle with a radius of 1. This function is the inverse of pl_ftan. [Format] typedef struct { long long_value ; /* number */ char dec_point ; /* position of d
Page 534F. FLOATING-POINT OPERATION LIBRARY APPENDIX B–61863E–1/06 [Function name] pl_fadd2 [Description] Adds floating-point numbers. The number of decimal places can be specified. [Format] typedef struct { long long_value ; /* number */ char dec_point ; /* position of decimal point */ } F_FLOAT ; F_FLOAT
Page 535B–61863E–1/06 APPENDIX F. FLOATING-POINT OPERATION LIBRARY [Function name] pl_fsub2 [Description] Substracts floating-point numbers. The number of decimal places can be specified. [Format] typedef struct { long long_value ; /* number */ char dec_point ; /* position of decimal point */ } F_FLOAT ; F_
Page 536F. FLOATING-POINT OPERATION LIBRARY APPENDIX B–61863E–1/06 [Function name] pl_fmul2 [Description] Multiplies floating-point numbers. The number of decimal places can be specified. [Format] typedef struct { long long_value ; /* number */ char dec_point ; /* position of decimal point */ } F_FLOAT ; F_
Page 537B–61863E–1/06 APPENDIX F. FLOATING-POINT OPERATION LIBRARY [Function name] pl_fdiv2 [Description] Divides floating-point numbers. The number of decimal places can be specified. [Format] typedef struct { long long_value ; /* number */ char dec_point ; /* position of decimal point */ } F_FLOAT ; F_FLO
Page 538F. FLOATING-POINT OPERATION LIBRARY APPENDIX B–61863E–1/06 [Function name] pl_fsqr2 [Description] Obtains a square root. The number of decimal places can be specified. [Format] typedef struct { long long_value ; /* number */ char dec_point ; /* position of decimal point */ } F_FLOAT ; F_FLOAT x, ans
Page 539B–61863E–1/06 APPENDIX F. FLOATING-POINT OPERATION LIBRARY [Function name] pl_fsin2 [Description] Calculates a trigonometric function SIN. The number of decimal places can be specified. [Format] typedef struct { long long_value ; /* number */ char dec_point ; /* position of decimal point */ } F_FLOA
Page 540F. FLOATING-POINT OPERATION LIBRARY APPENDIX B–61863E–1/06 [Function name] pl_fcos2 [Description] Calculates a trigonometric function COS. The number of decimal places can be specified. [Format] typedef struct { long long_value ; /* number */ char dec_point ; /* position of decimal point */ } F_FLOA
Page 541B–61863E–1/06 APPENDIX F. FLOATING-POINT OPERATION LIBRARY [Function name] pl_ftan2 [Description] Calculates a trigonometric function TAN. The number of decimal places can be specified. [Format] typedef struct { long long_value ; /* number */ char dec_point ; /* position of decimal point */ } F_FLOA
Page 542F. FLOATING-POINT OPERATION LIBRARY APPENDIX B–61863E–1/06 [Function name] pl_fasin2 [Description] Finds angle X from the value of sin X for a circle with a radius of 1. This function is the inverse of pl_fsin2. The number of decimal places can be specified. [Format] typedef struct { long long_value
Page 543B–61863E–1/06 APPENDIX F. FLOATING-POINT OPERATION LIBRARY [Function name] pl_facos2 [Description] Finds angle X from the value of cos X for a circle with a radius of 1. This function is the inverse of pl_fcos2. The number of decimal places can be specified. [Format] typedef struct { long long_value
Page 544F. FLOATING-POINT OPERATION LIBRARY APPENDIX B–61863E–1/06 [Function name] pl_fatan2 [Description] Finds angle X from the value of sin X for a circle with a radius of 1. This function is the inverse of pl_ftan2. The number of decimal places can be specified. [Format] typedef struct { long long_value
Page 545G. HINT FOR MAKING LINK CONTROL STATEMENT, COMMAND FILE B–61863E–1/06 APPENDIX FOR BINDER, BUILD FILE HINT FOR MAKING LINK CONTROL STATEMENT, G COMMAND FILE FOR BINDER, BUILD FILE 529
Page 546G. HINT FOR MAKING LINK CONTROL STATEMENT, COMMAND FILE FOR BINDER, BUILD FILE APPENDIX B–61863E–1/06 G.1 This section describes the meaning of terms which is used in following section. EXPLANATION OF Link control statement TECHNICAL TERM This is a file to register the C language application to PMC
Page 547G. HINT FOR MAKING LINK CONTROL STATEMENT, COMMAND FILE B–61863E–1/06 APPENDIX FOR BINDER, BUILD FILE G.2 D USER GDT ADDRESS (Link control statement) D RANGE (Build file) SETTING OF THE a. Setting of the start address of C application code ADDRESS OF THE C Specify in Link control statement and Build
Page 548G. HINT FOR MAKING LINK CONTROL STATEMENT, COMMAND FILE FOR BINDER, BUILD FILE APPENDIX B–61863E–1/06 G.3 D SEGMENT, TABLE GDT, ALLOCATE (Build file) D GDT ENTRY COUNT, DATA SEGMENT GDT ENTRY (Link control SETTING OF THE statement) SEGMENT OF C D COMMON MEMORY COUNT, MEMORY GDT ENTRY (Link APPLICATI
Page 549G. HINT FOR MAKING LINK CONTROL STATEMENT, COMMAND FILE B–61863E–1/06 APPENDIX FOR BINDER, BUILD FILE 3) ALLOCATE=( TASK_CODE= ( GDT, declare code IDT, segment in TASK1_CODE, this part : SEG_PMCLIB_CODE ), TASK_DATA= ( declare data TASK1_DATA, segment in : this part : ) ) Specify code segment or dat
Page 550G. HINT FOR MAKING LINK CONTROL STATEMENT, COMMAND FILE FOR BINDER, BUILD FILE APPENDIX B–61863E–1/06 3) Setting of the common memory COMMON MEMORY COUNT = 1 ( 0:NOTHING / 1 8 ) On the main screen of MKC (Link control statement creation tool), specify the amount of segment for common memory. If co
Page 551G. HINT FOR MAKING LINK CONTROL STATEMENT, COMMAND FILE B–61863E–1/06 APPENDIX FOR BINDER, BUILD FILE G.4 D DEVICE CONTROL PARAMETER (Link control statement) Specify on the main screen of MKC(Link control statement creation SETTING OF THE tool). DEVICES This parameter decides a behavior of the funct
Page 552G. HINT FOR MAKING LINK CONTROL STATEMENT, COMMAND FILE FOR BINDER, BUILD FILE APPENDIX B–61863E–1/06 G.5 Setting for each task of C application. SETTING OF THE D TASK LEVEL (Link control statement) Setting for the 3rd level of LADDER program. PRIORITY OF TASK D TASK LEVEL (LADDER LEVEL 3), CYCLE TI
Page 553G. HINT FOR MAKING LINK CONTROL STATEMENT, COMMAND FILE B–61863E–1/06 APPENDIX FOR BINDER, BUILD FILE G.6 D TASK COUNT (Link control statement) On the main screen of MKC(Link control statement creation tool), SETTING OF THE specify amount of the C application task(except the 3rd level of OTHERS LADD
Page 554H. CONVERSION TOOL FROM HEX FILE TO MEM FILE (16i/18i/21i/15i–A PMC C LANGUAGE FUNCTION) APPENDIX B–61863E–1/06 CONVERSION TOOL FROM HEX FILE TO MEM FILE H (16i/18i/21i/15i–A PMC C LANGUAGE FUNCTION) 538
Page 555H. CONVERSION TOOL FROM HEX FILE TO MEM FILE (16i/18i/21i/15i–A PMC C B–61863E–1/06 APPENDIX LANGUAGE FUNCTION) H.1 This tool is to convert a Hex file of the C language program to a Mem (binary form) file which can be used by BOOT SYSTEM. GENERAL When the Mem file is made, the title for C language i
Page 556H. CONVERSION TOOL FROM HEX FILE TO MEM FILE (16i/18i/21i/15i–A PMC C LANGUAGE FUNCTION) APPENDIX B–61863E–1/06 H.2 This tool is executed in the command line on MS–DOS. USE METHOD hex2mem.exe [–r –i –o –t –d] “Input file name” “Output file name” Explanation of options –r : Processed detailed display
Page 557H. CONVERSION TOOL FROM HEX FILE TO MEM FILE (16i/18i/21i/15i–A PMC C B–61863E–1/06 APPENDIX LANGUAGE FUNCTION) (2) In case of executing and building in the “make” file 1. The “make” file when “sample.mem” is made from 2 Hex files (“sample1.hex”, “sample2.hex”). all : sample.mem #=== 2 files copy ==
Page 558H. CONVERSION TOOL FROM HEX FILE TO MEM FILE (16i/18i/21i/15i–A PMC C LANGUAGE FUNCTION) APPENDIX B–61863E–1/06 PMC SYSTEM PARAMETER (1/2) MONIT STOP COUNTER DATA TYPE = BINARY / BCD LANGUAGE EXEC RATIO = 50 % (0–99) LANGUAGE ORIGIN = 900420 H (LANGUAGE AREA= 900200H,SIZE= 1024KB) > BINARY BCD SYSTE
Page 559H. CONVERSION TOOL FROM HEX FILE TO MEM FILE (16i/18i/21i/15i–A PMC C B–61863E–1/06 APPENDIX LANGUAGE FUNCTION) H.3 TITIEL FILE (DIC_DATA.TXT) H.3.1 Content and Explanation of Each Item dic_data.txt /**************************************** ** hex2mem.exe (DICTIONARY FILE) ** *******************
Page 560H. CONVERSION TOOL FROM HEX FILE TO MEM FILE (16i/18i/21i/15i–A PMC C LANGUAGE FUNCTION) APPENDIX B–61863E–1/06 NOTE D The characters in title data is restricted only to alphanumeric capital characters. When a Chinese character, a Japanese hiragana character, a Japanese katakana character, and the l
Page 561H. CONVERSION TOOL FROM HEX FILE TO MEM FILE (16i/18i/21i/15i–A PMC C B–61863E–1/06 APPENDIX LANGUAGE FUNCTION) H.4 Start Address Error. Please change address 00900200H CONTENT OF ERROR There is the Hex data before 900200H. Action : Correct the build file and the link control statement so that the H
Page 562I. CONVERSION FROM FS15B TO FS15iA APPENDIX B–61863E–1/06 I CONVERSION FROM FS15B TO FS15iA For conversion of C language applications from PMC–NB/NB2 of FS15B to FS15iA, see the description below. For conversion from PMC–N/NA, refer to Appendix C of “C Language Programming Handbook”. 546
Page 563B–61863E–1/06 APPENDIX I. CONVERSION FROM FS15B TO FS15iA I.1 With FS15iA, C language applications operate independently of the ladder. Moreover, C language applications are made faster when ACTION FOR compared with FS15B. So, an application created assuming a timing may DIFFERENT not operate as it
Page 564I. CONVERSION FROM FS15B TO FS15iA APPENDIX B–61863E–1/06 I.2 The C language user program area for FS15iA starts at address 9002000H. Modify the link control statement and build file addresses. ACTION FOR For the locations to be modified in the file, refer to Chapter 2, “C DIFFERENT LANGUAGE APPLICA
Page 565B–61863E–1/06 APPENDIX I. CONVERSION FROM FS15B TO FS15iA I.3 When a file is created in the memory card format, title data can be added. For the data format, refer to Appendix H, “TOOL FOR CONVERTING TITLE DATA EDITING HEXADECIMAL FILES TO MEM FILES” in “C Language Programming Handbook”. 549
Page 566I. CONVERSION FROM FS15B TO FS15iA APPENDIX B–61863E–1/06 I.4 The files listed below are used for FS15B and FS15iA. The same file names are used, but there is no object code compatibility. So, use the files FILE COMPATIBILITY for FS15iA (those files that are placed in the directory named LIB.15i and
Page 567B–61863E–1/06 APPENDIX I. CONVERSION FROM FS15B TO FS15iA I.5 When the following functions are used, check the method of using the functions, and make modifications if necessary: ACTION FOR pl_keysts, pl_dspopen3, pl_rsopen, pl_fopen, pl_rsopen2, pl_fopen2, LIBRARY FUNCTION pl_sysinfrd SPECIFICATION
Page 568I. CONVERSION FROM FS15B TO FS15iA APPENDIX B–61863E–1/06 I.6 When a conversion is made from PMC–NB of FS15B, a different physical address is used by a memory access function. So, those applications that PHYSICAL ADDRESS use a physical address specification function need to be modified. CHANGE NOTE
Page 569B–61863E–1/06 APPENDIX I. CONVERSION FROM FS15B TO FS15iA I.7 The user application screen used with FS15B can be displayed without modification. To use the extended display area, however, an application SCREEN DESIGN modification is required. For the detailed specifications of the application screen
Page 571B–61863E–1/06 APPENDIX J. REFERENCE DOCUMENT J.1 KERNIGHAN, BRIAN, W/RITCHIE, DENNIS, M LIBRARY OF CONGRES CATALOGINIGN IN PUBLICATION DATA THE C PROGRAMMING LANGUAGE. SECOND EDITION J.2 “IC-86/286 COMPILER USER’S GUIDE FOR DOS SYSTEM” (C) INTEL CORPORATION. J.3 “IC-86/286 LIBRARIES SUPPLEMENT” (C)
Page 572B–61863E–1/06 Index [Symbols] Calculating the Mantissa Value, 379 Calculating the Natural (Base–E) Logarithm Value, “C:A Reference Manual Second Edition”, 555 383 “ic-86/286 Compiler User’s Guide for DOS System” Calculating the Raised Value, 385 (c) Intel Corporation., 555 Calculating the Remainder
Page 573Index B–61863E–1/06 CRT Character Display, 211 Displaying the Cursor on the CRT Screen, 221 CRT/MDI Data, 101 Dividing into Tasks, 391 Cyclic Task, 25 Drawing a Straight Line on the CRT Graphics Dis- play, 244 Drawing an Arc on the CRT Graphics Display, 245 Dump Data Display Screen, 434 [D] Data Con
Page 574B–61863E–1/06 Index Executing the Sample Program, 449 Inputting Data Through the Reader/Puncher Interface, 270 Execution by Switch to PCMDI Screen, 21 Inputting Data through the Reader/Puncher Interface, Execution File Creation, 414 259 Expanded Nonvolatile Memory, 123 Inputting the List of Program
Page 575Index B–61863E–1/06 Migration from Romable-C (for 68000) to IC-286, 485 [P] Packet Communication Function, 498 MMC Window Library, 359 Painting an Area on the CRT Graphics Display, 247 Multitask-I, 27 Parallel Processing Function, 55 Multitask-II (Complex Communication), 35 Parameter for Display Con
Page 576B–61863E–1/06 Index Reading a One Bit Long Data Item from the PMC Sending the Packet, 171 Address Area, 192, 195 Set the Current Timer Value, 145 Reading Arbitrary Data from MMC via the Window (MMC-III), 362 Setting color palette for VGA character display, 234 Reading Data from Expanded Nonvolatile
Page 577Index B–61863E–1/06 Task Control Function, 52 Titiel File (dic_data.txt), 543 Task Data Segment GDT Entry, 57 Tutorial, 14 Task Entry Address Name, 57 Task Information Definition Screen, 411 Task Level and Start Cycle of the Third Ladder Level, [U] 57 Use Method, 540 Task Level When a Task is Activa
Page 578Revision Record FANUC PMC C LANGUAGE PROGRAMMING MANUAL (B-61863E-1) 05 Apr., 1998 PMC-NB2 is added. 04 Nov., 1994 PMC-RC4 is added. 03 Aug., 1993 PMC-NB is added. 02 May., 1993 PMC-RC3 is added. D Series 15i-A is added. 01 06 D PMC-RC, PMC-RC3, and PMC-RC4 were changed into Sep., 1991 Feb., 2001 PM
Page 579EUROPEAN HEADQUARTERS GRAND-DUCHE DE LUXEMBOURG GE Fanuc Automation Europe S.A. Zone Industrielle L-6468 Echternach (+352) 727979 - 1 (+352) 727979 – 214 www.gefanuc-europe.com BELGIUM / NETHERLANDS CZECH REPUBLIC FRANCE GE Fanuc Automation Europe S.A. GE Fanuc Automation CR s.r.o. GE Fanuc Automa
Page 580Printed at GE Fanuc Automation S.A. , Luxembourg February 200
Page 581TECHNICAL REPORT (MANUAL) NO. TMN 01/077E Date 29. May. 2001 General Manager of Software Laboratory FANUC PMC C Language Function Programming Manual(Supplement) 1. Communicate this report to: O Your information only O GE Fanuc-N, GE Fanuc-E FANUC Robotics CINCINNATI MILACRON O Machine tool builder S
Page 582FANUC PMC C language function Supplemental Programming Manual TYPE OF APPLIED TECHNICAL DOCUMENTS Name FANUC PMC C LANGUAGE PROGRAMMING MANUAL Spec.No./Ed. B-61863E-1/06 SUMMARY OF CHANGE New, Add, Applicable Group Name/Outline Correct, Date Delete Basic PMC C Language Function has been May.2001 Add
Page 583FANUC PMC C language function Supplemental Programming Manual Contents 1 Outline .................................................................................................................................................. 3 2 Applied Software ...................................................
Page 5841 Outline This Manual is the application programming manual of PMC C language function for Series 16i/18i/21i-B. This manual describes limited points of C language function for Series 16i/18i/21i-B. Other detail points are described in the following manual. Manual Spec. Reference Item Number FANUC P
Page 5852 Applied Software Information described in this manual applies to the following software. Software Series Version PMC-SB7 Control Software 406G 03 or later Series 16i/18i/21i-B PMC C Language 406I 01 or later Function Software Specification Version C Language Library PMC-SC A08B-9201-J701 14.0 or l
Page 5863 Modification of PMC Library of Series 16i/18i/21i-B Modify the column of 16i/18i/21i of Functions for accessing the PMC address area in ”1 GENERAL” of ”III PMC LIBRARY” Functions for accessing the PMC address area No. Function name Description 16i/18i/21i 5.1 pl_memc Accesses the PMC address area.
Page 587Replace diagram of “5.1 ACCESSING THE PMC ADDRESS AREA” of “III PMC LIBRARY” Replace diagram of “5.2 READING A ONE BIT LONG DATA ITEM FROM THE PMC ADDRESS AREA” of ”III PMC LIBRARY” Replace diagram of “5.3 WRITING A ONE BIT LONG DATA ITEM INTO THE PMC ADDRESS AREA” of “III PMC LIBRARY” SC/SC3/ SC4 N
Page 588Modify the diagram of General in “5.PMC ADDRESS ACCESS” of “III PMC LIBRARY” Identificaton PMC address code (ID) 0 G 1 F 2 Y 3 X 4 A 5 R 6 T 7 K 8 C 9 D 12 E Modify the diagram of “6.2 READING SYMBOL AND COMMENT DATA OF THE SEQUENCE PROGRAM” of “III PMC LIBRARY” Identificaton PMC address code (ID) 0
Page 5894 Operation of C Language Control Screen of Series 16i/18i/21i-B Add “9.5 OPERATION OF C LANGUAGE CONTROL SCREEN OF SERIES 16i/18i/21i-B” of “IV APPLICATION PROGRAMMING GUIDE” after “9.4 OPERATION OF C LANGUAGE CONTROL SCREEN OF FS15iA” 9.5 OPERATION OF C LANGUAGE CONTROL SCREEN OF SERIES 16i/18i/21
Page 590Note 1. On Series 16i/18i/21i-B, C language control screen is displayed by pressing the soft- key [C LANG]. However, the alarm screen, the setting screen, RUN/STOP operation, I/O operation and so on that are related to both ladder and C language screens are in PMC control screen which is displayed b
Page 5919.5.2 Menu Bar The following information is displayed at C language control screen. (1) Title of C language control screen (2) Status of run/stop of sequence program (3) Status of PMC alarm (1) (2) (3) Fig.9.5.2 C Language Main Menu Screen Warning When “ALM” is displayed at the menu bar, select the
Page 5929.5.3 C Language Main Menu Screen Pressing the soft-key [C LANG], C language main menu screen is displayed. By pressing the soft-key in the screen, the screen expressed in the menu is selected. Fig.9.5.3 C Language Main Menu Screen TITLE FANUC PMC C language function Supplemental Programming Manual
Page 593Table 9.5.3 Relationship between displayed soft-keys and setting parameters Soft-key Parameter [TITLE] Always Displayed [USRDGN] [TITLE]->[SYSPRM] 1.”EDIT ENABLE” to “YES” (K901.6 to 1) and [CLEAR] “ALLOW PMC STOP” to “YES” (K902.2 to 1) [DEBUG] or 2.”PROGRAMMER ENABLE” to “YES” (K900.1 to 1) [TITLE
Page 5949.5.4 C Language Title Screen To display the title screen, press the soft-key [TITLE] in the C language main menu screen. The following information is displayed in the title screen. Title data for C Language program • Machine tool builder name • Machine name • CNC and PMC type name • PMC program No.
Page 595Fig.9.5.4 C Language Title Screen TITLE FANUC PMC C language function Supplemental Programming Manual DRAW.NO. 01 01.05.29 Maruyama New registration B-61863E-1/06-1 EDIT DATE DESIG. DESCRIPTION 14/23
Page 5969.5.5 C Language Title Editor Screen To edit the title data in the editor screen, press the soft-key [EDIT] in the C language title screen. Fig.9.5.5(a) C Language Title Editor Screen The following items can be edited in the title editor screen of C language. • Machine tool builder name • Machine na
Page 597Operation of title editor screen ! Entering of Title Data (1) Move the cursor to the desired title data item. Use the cursor keys [↑], [↓], [→], [←] to move the cursor. (2) Press the address key and numeric keys to enter the title data, and press the key. ! Deleting of Title Data (1) Move th
Page 5989.5.6 C Language System Parameter Editor Screen To edit the system parameter, press the soft-key [SYSPRM] in the C language title screen. If ladder and C language program is running, the message “PROGRAM MUST BE STOPPED TO EDIT. OK?” is displayed and you have to confirm if program may be stopped or
Page 599Operation of C language system parameter editor screen (1) Move the cursor to the desired data item. (2) Press the [INPUT] soft key after keying in the data. (3) Pressing [ORIGIN] soft key automatically sets the Language Origin. (4) To save the edited data, write the C Language program to the flash
Page 6009.5.8 C Language GDT Information Display Screen To display the GDT information display screen, press the soft-key [GDT] in the C language main menu screen. For the details of the GDT information display screen, please refer to the C language programming manual “IV 9.1 GDT INFORMATION DISPLAY”. Fig.9
Page 6019.5.9 C Language Memory Display Screen To display the memory display screen, press the soft-key [USRMEM] in the C language main menu screen. For the details of the memory display screen, please refer to the C language programming manual “IV 9.2 C-PROGRAM MEMORY DISPLAY”. Fig.9.5.9 Memory Display Scr
Page 6029.5.10 C Language Debug Function Screen To display the debug function screen, press the soft-key [DEBUG] in the C language main menu screen. For the details of the debug function screen, please refer to the C language programming manual “IV 9.3 DEBUG FUNCTION”. Fig.9.5.10 C Language Debug Function S
Page 6039.5.11 C Language Clear Function This is a function to clear all C Language programs. To execute the clear function, press the soft-key [CLEAR] in the C Language Title Screen. If ladder and C language program is running, the message “PROGRAM MUST BE STOPPED TO EDIT. OK?” is displayed and you have to
Page 604Note To execute the clear function, set the setting parameter as follows. 1.”EDIT ENABLE” to “YES” (K901.6 to 1) and “ALLOW PMC STOP” to “YES” (K902.2 to 1) or 2.”PROGRAMMER ENABLE” to ”YES” (K900.1 to 1) 5 Conversion from Series 16i/18i/21i-AA to Series 16i/18i/21i-BB Add “J. CONVERSION FROM SERIES
Page 605TECHNICAL REPORT (MANUAL) NO. TMN 01/121 Date 10. Sep. 2001 General Manager of Software Laboratory FANUC PMC C Language Function Programming Manual(Supplement) 1. Communicate this report to: O Your information only O GE Fanuc-N, GE Fanuc-E FANUC Robotics CINCINNATI MILACRON O Machine tool builder Sa
Page 606FANUC PMC C language function Supplemental Programming Manual TYPE OF APPLIED TECHNICAL DOCUMENTS Name FANUC PMC C LANGUAGE PROGRAMMING MANUAL Spec.No./Ed. B-61863E-1/06 SUMMARY OF CHANGE New, Add, Applicable Group Name/Outline Correct, Date Delete Basic PMC C Language Debug Function has Sep.2001 Ad
Page 607FANUC PMC C language function Supplemental Programming Manual Contents 1 Outline .................................................................................................................................................. 3 2 Applied Software ...................................................
Page 6081 Outline The following function of PMC C language function for FANUC Series 15i-MODEL A has been added. • Debug function This document is a supplemental manual concerning above additional function. Other detail points are described in the following manual. Manual Spec. Number Reference Item FANUC P
Page 6093 C Language Debug Function Add (5) in “9.4.1 General of C Language Control Screen" of ”IV APPLICATION PROGRAMMING GUIDE” (5) Display of the debug information of C language program. Replace diagram in “9.4.1 General of C Language Control Screen” of ”IV APPLICATION PROGRAMMING GUIDE” SYSTE M P MC P M
Page 610Replace diagram in “9.4.2 Menu Bar” of ”IV APPLICATION PROGRAMMING GUIDE” 1 2 3 TITLE FANUC PMC C language function Supplemental Programming Manual DRAW.NO. 01 01.09.06 Matsukawa New registration B-61863E-1/06-2 EDIT DATE DESIG. DESCRIPTION 5/9
Page 611Replace diagram in “9.4.3 C Language Main Menu Screen” of ”IV APPLICATION PROGRAMMING GUIDE” Pressing soft–key [PMC C LANG], C language main menu screen is displayed. By pressing the soft–key in the screen, a screen expressed in the menu is selected. Fig.9.4.3 C Language main menu screen Warning GDT
Page 612Add “9.4.8 C Language Debug Function Screen” of ”IV APPLICATION PROGRAMMING GUIDE” 9.4.8 C Language Debug Function Screen To display the debug function screen, press the soft-key [DEBUG] in the C language main menu screen. For the details of the debug function screen, please refer to the C language
Page 613Fig.9.4.8(b) C Language Debug Function Dump Data Screen TITLE FANUC PMC C language function Supplemental Programming Manual DRAW.NO. 01 01.09.06 Matsukawa New registration B-61863E-1/06-2 EDIT DATE DESIG. DESCRIPTION 8/9
Page 614Replace diagram in “9.3.2 Screen Display and Operations” of of ”IV APPLICATION PROGRAMMING GUIDE” Press the [DEBUG] soft key to display the parameter screen for the debug function. When a break (execution interrupt) occurs due to a break condition, press the [D.DUMP] soft key on the parameter screen
Page 615FANUC PMC C language function Supplemental Programming Manual Type of applied technical documents Name FANUC PMC C LANGUAGE PROGRAMMING MANUAL Spec. No. /Ed. B-61863E-1/06 Summary of Change New, Add, Group Name/Outline Applied Date Correct, Delete Basic Function Optional PMC C language nonvolatile m
Page 616FANUC PMC C language function Supplemental Programming Manual Contents 1 SUMMARY ..................................................................................................................... 3 2 APPLIED SOFTWARE ................................................................................
Page 6171 SUMMARY The following functions have been added to PMC C language function for Series 16i/18i/21i-B. • PMC C language nonvolatile memory expansion (256KB) This document is a supplemental manual concerning the additional function above. Other specifications and operations about PMC C language funct
Page 6182 APPLIED SOFTWARE The new features will be applied to the following software. - CNC System software Software Specification No. Edition Series 16i/160i/160is-TB A02B-0281-H501#B1HA 13 or later. Series 18i/180i/180is-TB A02B-0283-H501#BEHA 13 or later. Series 21i/210i/210is-TB A02B-0285-H501#DEHA 13
Page 6193 EXPANDED NONVOLATILE MEMORY Add the following “NOTE” to “II PMC CONTROL SOFTWARE, 3.4 EXPANDED NONVOLATILE MEMORY”: NOTE) Note the following points when specifying the option of expanded nonvolatile memory in which data size exceeds 64KB. (1) A memory area whose data size exceeds 64KB can not be a