Fanuc Power Mate i Additional Manual Page 2

Additional Manual
FANUC Power Mate i – MODEL D/H
C Language Executor
The function for access to the memory card
1. SPECIFICATION
The application program can access a memory card which is inserted in the card slot equipped
on the main board of the Power Mate as a disk device.
To read/write a memory card, execute the following procedures.
(1) Insert a memory card into the slot.
(2) Mount the memory card as a disk device by the application program.
(Call "aux_file_mount" function.)
(3) Open files by using "fopen", "fcreate" function, etc. with drive name
"B:".
(4) Read/write contents of the memory card by using "fgets", "fprintf",
"fread", "fwrite", etc.
(5) Close the files by using "fclose" function.
(6) Unmount the memory card. (Call "aux_file_unmount" function.)
(7) Remove the memory card from the slot.
Logical format of a memory card that this library can handle is MS-DOS format used on the
generic MS-DOS Personal computers. C library doesn't support formatting function of a memory
card. It can read/write only formatted memory cards. Format memory cards by using a personal
computer with PC card slots or the boot software of the Power Mate.
[Note]
* The drive name to access a memory card is "B:". It is fixed.
* The C application program can't access the memory card while the other
software (CNC software, etc.) is accessing it.
* The C application program may fail to access the memory card just after
insertion the memory card (for a few minutes). ("aux_file_mount" function
returns "EAUTHREJ".) The CNC program causes this problem because it always
polling the card slot to detect card insertion. In this case, the appli-
cation program must retry to access.
EDIT
DATE DISIGNE
DESCRIPTION
TITLE
DRAW
FANUC Power Mate i - MODEL D/H
C Language Executor
The function for access to the memory card
A-76520E
SHEET
1/7
APPROV.
FANUC LTD
030217
01
New design

Contents Summary of Fanuc Power Mate i Additional Manual

  • Page 1TECHNICAL REPORT (MANUAL) NO. TMN 03/018E Date: Feb.26.2003 General Manager of Software Development Center FANUC Power Mate i – MODEL D/H C Language Executor The function for access to the memory card 1. Communicate this report to: ○ Your information ○ GE Fanuc-N, GE Fanuc-E FANUC Robotics MILACRON
  • Page 2FANUC Power Mate i – MODEL D/H C Language Executor The function for access to the memory card 1. SPECIFICATION The application program can access a memory card which is inserted in the card slot equipped on the main board of the Power Mate as a disk device. To read/write a memory card, execute the f
  • Page 32. EXPLANATION FOR ADDED FUNCTIONS 2.1 Lists of Functions -------------------------------------------------------------------------------------------------------------- Name Function -------------------------------------------------------------------------------------------------------------- 1. aux
  • Page 4------------------------------------------------------------------------------ 1. Mount memory card. ------------------------------------------------------------------------------ [Name] aux_file_mount [Syntax] #include int aux_file_mount( unsigned char drive ) ; [Argum
  • Page 5[Example] The following program reads character by character from "TESTFILE.DAT" in the memory card and writes them to the stdout. #include #include int example( void ) { FILE *fp ; signed char ch ; int ret ; unsigned int stat ; ret = aux_file_mount( 'B' ) ; if ( ret ) return (
  • Page 6------------------------------------------------------------------------------ 2. Unmount memory card. ------------------------------------------------------------------------------ [Name] aux_file_unmount [Syntax] #include int aux_file_unmount( unsigned char drive ) ;
  • Page 7------------------------------------------------------------------------------ 3. Get memory card information. ------------------------------------------------------------------------------ [Name] aux_file_memcinfo [Syntax] #include int aux_file_memcinfo( unsigned int *
  • Page 83. SUPPORTED MEMORY CARD The usable memory cards at this function are only the memory cards which surport the data input and data output of the Power Mate. Please refer to the following specifications for detail of the supported memory cards. 「Power Mate i-MODEL D/H MAINTENANCE MANUAL(B-63175EN) APP