News CNCnetPDM About us Support  
         
  

GENERAL | GENERAL

General Description

Top Page


General Description

      1. Library files
      2. Calling convention of Win32 API
      3. Multi-thread
      4. Language for development
      5. Alignment of structure member
      6. Header file
      7. When you use the array of the 'user definition type' with Visual Basic 6.0
      8. Number of axes at Data window
      9. Program number 8 digits (Series 15i, 16/18)
      10. Difference of the function specifications (Series 15 and other CNCs (Series 16/18/21/0, Power Mate))
      11. Difference of the function specifications (Series 15-B, Series 15i)
      12. Difference of the function specifications (FS30i and other CNCs)
      13. Advanced mode(32 axes) and traditional mode(8 axes) for FS30i
      14. Difference of the HSSB version and the Ethernet version
      15. Specifying the folder and file name for FS30i.

  • Library files
    FWLIB32.DLL : CNC/PMC Data window control library
    FWLIBE1.DLL : Processing library for TCP/IP (*1)
    FWLIB150.DLL : Processing library of HSSB for 15-B
    FWLIB15i.DLL : Processing library of HSSB for 15i
    FWLIB160.DLL : Processing library of HSSB for 16/18/21
    FWLIB16W.DLL : Processing library of HSSB for 16i/18i-W
    FWLIB0i.DLL : Processing library of HSSB for 0i-A
    FWLIB0iB.DLL : Processing library of HSSB for 0i-B
    FWLIBPM.DLL : Processing library of HSSB for Power Mate-D/H
    FWLIBPMi.DLL : Processing library of HSSB for Power Mate i-D/H
    FWLIB30i.DLL : Processing library of HSSB for 30i/31i/32i
    FWLIB32.LIB : Import library
    FWLIB32.H : C/C++ header file for CNC/PMC data window functions and structures (*2)(*3)(*4)
    FWLIB32.BAS : Visual Basic header file for CNC/PMC data window functions and structures (*2)(*3)(*4)

    (*1)Processing library for TCP/IP can be used with 0i-B/C, 160i/180i/210i, 150i, Power Mate i-D/H, and FS300i/310i/320i.

    (*2)The header file is different in each CNC model.

    (*3)The header file for each CNC model can be used by both of HSSB and TCP/IP.

    (*4)The header file for TCP/IP is common for the HSSB and the Ethernet version. This file can be used to all CNC models by defining the constant.

  • Calling convention of Win32 API

    This manual describes the interface of 32 bit Data window library. Each function of 32 bit Data window library follows the calling convention of Win32 API. So, each function of this library can be called from 32 bit application development tools, such as Visual C++ or Visual Basic.

  • Multi-thread

    Win32 supports multi-thread. Each function in this library can be called from the multiple threads at a time. The access to the single system resource, such as CNC/PMC's internal memory, at a time is exclusively controlled by this library.

  • Language for development

    CNC/PMC Data window library is tested by using the following development language.

    • Visual C++ 6.0
    • Visual Basic 6.0

    Besides, 32 bit Data window library is developed with using Microsoft's development tools. The validity of using this library with other vendor's development tools has not been confirmed.

  • Alignment of structure member

    This library is designed to use the 4 byte structure member alignment, for the Win32 environment.

    In 4 byte alignment, variables whose size are longer than 4 byte are aligned at the address of multiple of 4. For example, at the following structure,

        struct {
            short   a1;     /* 2 bytes */
            long    a2;     /* 4 bytes */
        };
    

    there is 2 byte gap between variable a1 and a2. And the size of structure is raised to multiple of 4.

    By introducing 4 byte alignment, the size of structures and offset of its members are different from those of 2 byte alignment. Therefore, the application program which uses the size of structures and offset of its members by calculating according to the information described on "FANUC MMC-IV OPERATOR'S MANUAL" will not work correctly. The size of structures should be obtained by using sizeof() operator.

    In the header file, FWLIB32.H, the alignment at each structure is specified as 4 byte compulsorily by using "pragma pack(4)". In case that the structures which are required as the application interface with 32 bit data window library have to be re-defined at user source program, specify "pragma pack(4)" or compiler option "/Zp4".

  • Header file

    32 bit Data window library is configured by specifying "dllexport" to each function. To use the functions of this library at C or C++ language, "dllimport" must be specified to each function. The header file, FWLIB32.H, provides this attribute.

    As the link error should occur while making the application unless it includes this header file, it is required that the header file is included in the application program.

  • When you use the array of the 'user definition type' with Visual Basic 6.0

    When you use the array of the 'user definition type' with Visual Basic 6.0, you should be define the following new 'user definition type'.

    Ex) cnc_rdprogdir3 function

    Type MyPrgDir3
        DirBuf(0 To 9) As PRGDIR3
    End Type' In case that the number is 10.
    
    Example
            The following program reads all registration information of NC program, and outputs the program number list.
            Type MyPrgDir3
                DirBuf(0 To 99) As PRGDIR3
            End Type'
            Dim ret As Integer
            Dim prg As MyPrgDir3
            Dim i As Integer
            Dim num As Integer
            Dim top As Long
            Dim dir3 As String
            Open "C:\\temp\\sample.dat" For Output As #1
            top = 0
            Do
                num = 100
                ret = cnc_rdprogdir3(h, 0, top, num, prg)
                If ret = EW_NUMBER Then
                    Exit Do
                ElseIf ret <> 0 Then
                    dir3 = "ERROR: " + Format(ret, "###0")
                    Print #1, dir3
                    Exit Do
                End If
                For i = 0 To num - 1
                    dir3 = "O" + Format(prg.DirBuf(i).lNumber, "######0")
                    Print #1, dir3
                Next
                top = prg.DirBuf(num - 1).lNumber + 1
            Loop While (num >= 100)
            Close #1
    

    When you specified the following, the function do not work correctly(the acquired data was wrong or application error occurred etc.).

    Dim prg(0 To 9) As PRGDIR3
    ret = cnc_rdprogdir3(h, 0, top, num, prg)
    
  • Number of axes at Data window
    Maximum controlled axes
    maximum number of axes for Data window interface
    Current controlled axes
    number of axes controlled by CNC system currently

    Maximum controlled axes is defined as 'MAX_AXIS' in the header file. It differs at each CNC system, so, define the following constant by using the '-D' option which is specified on compiling.

    • In case of header file for TCP/IP
      The header file for TCP/IP can be used to all CNC models(both of HSSB and TCP/IP) by the following -D option.
      Please define "HSSB_LIB" when you use this header file for HSSB.
      System Option(-D)
      FS16/18/21, 0i-B, 0i-C, 16i/18i-W, Power Mate i(8 axes) (none)
      FS30i/31i/32i(32 axes) FS30D
      FS15-B/15i Multi axes(24 axes) M_AXIS2
      FS15-B Multi axes(15 axes) M_AXIS1
      FS15-B(10 axes) FS15BD
      FS15i(10 axes) FS15D
      FS0i-A(4 axes) FS0ID
      Power Mate(6 axes) PMD

      note) In case of FS15, please define "FS15BD"(For FS15-B) or "FS15D"(For FS15i) by the series.

      #if defined (FS30D)
      #define MAX_AXIS        32
      #elif defined (M_AXIS2)
      #define MAX_AXIS        24
      #elif defined(M_AXIS1)
      #define MAX_AXIS        15
      #elif defined (FS15BD)
      #define MAX_AXIS        10
      #elif defined (FS15D)
      #define MAX_AXIS        10
      #elif defined (FS0ID)
      #define MAX_AXIS        4
      #elif defined (PMD)
      #define MAX_AXIS        6
      #else
      #define MAX_AXIS        8
      #endif
      

     

    • In case of header file for Series 30i/31i/32i
      System Option(-D)
      Standard (32 axes) (node)
      #define MAX_AXIS        32
      

     

    • In case of header file for Series 15-B
      System Option(-D)
      Standard (10 axes) (none)
      Multi axes (15 axes) M_AXIS1
      Multi axes (24 axes) M_AXIS2
      #if defined(M_AXIS2)
      #define MAX_AXIS        24
      #elif defined(M_AXIS1)
      #define MAX_AXIS        15
      #else
      #define MAX_AXIS        10
      #endif
      

     

    • In case of header file for Series 15i
      System Option(-D)
      Standard (10 axes) (none)
      Multi axes (24 axes) M_AXIS2
      #if defined(M_AXIS2)
      #define MAX_AXIS        24
      #else
      #define MAX_AXIS        10
      #endif
      

     

    • In case of header file for Series 16/18/21, 0i-B, 16i/18i-W, Power Mate i
      System Option(-D)
      Standard (8 axes) (none)
      #define MAX_AXIS        8
      

     

    • In case of header file of HSSB for Series 0i-A
      System Option(-D)
      Standard (4 axes) (none)
      #define MAX_AXIS        4
      

     

    • In case of header file of HSSB for Power Mate
      System Option(-D)
      Standard (6 axes) (none)
      #define MAX_AXIS        6
      

    In case of Visual Basic, define that in VB menu "[Tool] -> [Option] -> [Detail Setting] -> [Conditional compile argument]".

    'Current controlled axis' can be got by 'Read CNC system information (cnc_sysinfo)' function.

  • Program number 8 digits (Series 15i, 16/18)

    In case of program number 8 digits, the argument and the member of the structure which are related to program number of Data window function, is changed from "short" to "long".

    In case of C/C++ language, define character constant "ONO8D" at compiling by option "-D" to switch library for program number 8 digits.

    System Option(-D)
    Program number 4 digits (None)
    Program number 8 digits ONO8D

    In case of Visual Basic, define "ONO8D=1" in VB menu "[Tool] -> [Option] -> [Detail Setting] -> [Conditional compile argument]" to switch library for program number 8 digits. If "ONO8D" is not defined or "ONO8D=0" is defined, it becomes for program number 4 digits.

    The window function compiled for the program number 8 digits operates normally when CNC side is program number 4 digits. Conversely, if the window function for the program number 4 digits is used when CNC side is the program number 8 digits, it becomes an error(EW_FUNC).

  • Difference of the function specifications (Series 15 and other CNCs (Series 16/18/21/0, Power Mate))

    If you make an application for Series 15i, you must specify the compiling option, which is "FS15D".

    In case of C/C++ language, define character constant "FS15D" at compiling by option. In case of Visual Basic, define "FS15D=1" in VB menu " [Tool] -> [Option] -> [Detail Setting] -> [Conditional compile argument] ".

    And, there are some differences of the specifications between Series 15i and others (Series 16/18/21/0, Power Mate) about library function. The major differences are as follows.

    • Data size for all axes

      In some function, when you read/write data for all axes, data size that must be allocated is different as follows.

      Series 16/18/21/0, Power Mate : Size for current controlled axes
      Series 15i : Size for maximum controlled axes

      The following functions are related to this subject.

      Brief description Function name
      Read absolute axis position cnc_absolute, cnc_absolute2
      Read machine axis position cnc_machine
      Read relative axis position cnc_relative, cnc_relative2
      Read distance to go cnc_distance
      Read skip position cnc_skip
      Read servo delay value cnc_srvdelay
      Read acceleration/deceleration delay value cnc_accdecdly
      Set origin/preset relative axis position cnc_wrrelpos
      Preset work coordinate cnc_prstwkcd
      Read work zero offset value cnc_rdzofs
      Write work zero offset value cnc_wrzofs
      Read parameter cnc_rdparam
      Write parameter cnc_wrparam
      Read setting data cnc_rdset
      Write setting data cnc_wrset
      Read diagnosis data cnc_diagnoss
    • Program number digits

      In case of Series 15i, the number of the program number digits is always 8.

      So, it is necessary to switch API to the one for the program number 8 digits in case of Series 15i. Refer to "Program number 8 digits" in order to know how to switch API. The following functions are related to this subject.

      Brief description Function name
      Read all dynamic data cnc_rddynamic
      Search specified program cnc_search
      Delete specified program cnc_delete
      Read program directory(2) cnc_rdprogdir2
      Read program number under execution cnc_rdprgnum
    • Tool number digits

      In case of Series 15i, the number of the tool number digits is always 8.

      In case of Series 15i, the functions for the tool number 4 digits are not supported in the following table. Use the functions for the tool number 8 digits.

      Brief description For tool number 4 digits For tool number 8 digits
      Read tool life management data (tool group number) cnc_rdgrpid cnc_rdgrpid2
      Read tool life management data (tool length number-1) cnc_rd1length cnc_rd1tlifedat2
      Read tool life management data (cutter compensation number-1) cnc_rd1radius
      Read tool life management data (tool information-1) cnc_t1info
      Read tool life management data (tool data1) cnc_rd1tlifedata
      Write tool life management data (tool data1) cnc_wr1tlifedata cnc_wr1tlifedat2
    • Real parameter / Real diagnosis

      Real parameter and real diagnosis data are added for Series 15i.

      To support the real data, the specifications of Series 15i are different from those of others about the following functions. See the specifications of each function for details.

      Brief description Function name
      Read parameter cnc_rdparam, cnc_rdparar
      Write parameter cnc_wrparam, cnc_wrparas
      Read parameter information cnc_rdparainfo
      Read setting data cnc_rdset, cnc_rdsetr
      Write setting data cnc_wrset, cnc_wrsets
      Read setting data information cnc_rdsetinfo
      Read diagnosis data cnc_diagnoss, cnc_diagnosr
      Read diagnosis data information cnc_rddiaginfo
    • Alarm status

      In case of Series 15i, unlike others, the alarm status is "long", not "short".

      In case of Series 15i, you can use the following functions for short status. However, you cannot read all of alarm status by using these functions. You use the functions for long status as far as you can.

      Brief description For short status For long status
      Read all dynamic data cnc_rddynamic cnc_rddynamic2
      Read alarm status cnc_alarm cnc_alarm2

      The meaning of alarm status of Series 15i is different from that of others. Be careful when you use the following functions.

      Brief description Function name
      Read all dynamic data cnc_rddynamic, cnc_rddynamic2
      Read operation history data cnc_rdophistry, cnc_rdophistry2
      Read alarm history data cnc_rdalmhistry, cnc_rdalmhistry2
      Read alarm status cnc_alarm, cnc_alarm2
      Read alarm information cnc_rdalminfo
      Read alarm message cnc_rdalmmsg
    • Structure

      In the following functions, the structures, which are passed to the functions, are different between Series 15i and others.

      Brief description Function name
      Read CNC status information cnc_statinfo
      Read alarm information (*Note) cnc_rdalminfo
      Read operator's message cnc_rdopmsg
      Read output signal image of software operator's panel cnc_rdopnlsgnl
      Write output signal of software operator's panel cnc_wropnlsgnl

      (*Note) In case that Series 15i has multi axes function (maximum controlled axes = 24) only

    • Available functions

      The functions that you can use for the following propose are different between Series 15i and others.

      Propose Series 16/18/21, Power Mate Series 15
      Read operation history data cnc_rdophistry cnc_rdophistry2
      Read number of alarm history data cnc_rdalmhistry cnc_rdalmhistry2
      Read waveform diagnosis parameter cnc_rdwaveprm cnc_rdwaveprm2
      Write waveform diagnosis parameter cnc_wrwaveprm cnc_wrwaveprm2
      Read modal data cnc_modal cnc_rdgcode, cnc_rdcommand

      The following functions are available for Series 15i only.

      • Function related to 3-dimensional handle feed
      • Function related to high-speed and high-precision machining
      • Function related to fixture offset
      • Search sequence number for program restart (2) (cnc_rstrseqsrch2)
      • Read block restart information (cnc_rdbrstrinfo)
      • Function related to internal position compensation data
      • Read/Write CNC timer data (cnc_rdtimer, cnc_wrtimer)

      The following functions are not supported for Series 15i.

      • Function related to P code macro variable
      • Function related to M code group data
      • Function related to interference check data
      • Function related to work coordinate shift value (T series)
      • Function related to B axis control
      • Read/Write tool life management data (group optional number, rest counter)
      • Function related to external operator's message history data
      • Read data for spindle adjustment (synchronous control mode) (cnc_rdposerrs2, cnc_rdsynerrsy)
      • Function related to PUNCH PRESS/LASER
  • Difference of the function specifications (Series 15-B, Series 15i)

    Please note that there are some differences of the specifications between Series 15-B and Series 15i about library function. The major differences are as follows.

  • Program number 8 digits

    The specification of program number is different between Series 15-B and Series 15i.

    Series 15-B : program number 4 digits
    Series 15i : program number 8 digits

    So, it is necessary to switch API to the one for the program number 8 digits in case of Series 15i. Refer to Program number 8 digits (for Series 15i, 16/18) in order to know how to switch API.

    The following functions are related to this subject.

    Brief description Function name
    Read all dynamic data cnc_rddynamic2
    Start uploading NC program cnc_upstart
    Search specified program cnc_search
    Delete specified program cnc_delete
    Read program directory cnc_rdprogdir
    Read program directory(2) cnc_rdprogdir2
    Read program number under execution cnc_rdprgnum

     

  • Tool number 8 digits

    The specification of tool number is different between Series 15-B and Series 15i.

    Series 15-B : tool number 4 digits
    Series 15i : tool number 8 digits

    The follwing functions cannot be used at Series 15i. The functions which are substituted for these functions are mentioned later.

    Brief description Function name
    Read tool life management data(tool group number) cnc_rdgrpid
    Read tool life management data(tool length number-1) cnc_rd1length
    Read tool life management data(cutter compensation num.-1) cnc_rd1radius
    Read tool life management data(tool information-1) cnc_t1info
    Read tool life management data(tool data1) cnc_rd1tlifedata
    Write tool life management data(tool data1) cnc_wr1tlifedata

     

  • Real parameter/ Real diagnosis

    Real parameter and real diagnosis data are added for Series 15i. The structures including these data are changed in order to read and write them.

    Brief description Function name
    Read parameter cnc_rdparam
    Write parameter cnc_wrparam
    Read parameter(area specified) cnc_rdparar
    Write parameter(area specified) cnc_wrparas
    Read parameter information cnc_rdparainfo
    Read setting data cnc_rdset
    Write setting data cnc_wrset
    Read setting data(area specified) cnc_rdsetr
    Write setting data(area specified) cnc_wrsets
    Read setting data information cnc_rdsetinfo
    Read diagnosis data cnc_diagnoss
    Read diagnosis data(area specified) cnc_diagnosr
    Read diagnosis data information cnc_rddiaginfo

    The following list shows whether the function for Series 15-B can be used for Series 15i, or not. Some functions except in this list have the difference of the specifications between Series 15-B and the Series 15i. See the specifications of each function for details.

  • CNC: Function related to controlled axis/spindle
    Function name(15-B) Brief description in case of Series 15i
    cnc_rddynamic Read all dynamic data It is necessary for the application program to switch API to the one which can deal with the program number 8 digits. This function cannot read all alarm status of Series 150i. So, you should better use cnc_rddynamic2.

     

  • CNC: Function related to CNC program
    Function name(15-B) Brief description in case of Series 15i
    cnc_dncstart Start downloading DNC program These functions are not supported on Series 15i.
    cnc_dnc Download DNC program
    cnc_cdnc Download DNC program(conditional)
    cnc_dncend End of downloading DNC program
    cnc_rdmdipntr Read execution pointer for MDI operation
    cnc_wrmdipntr Write execution pointer for MDI operation
    cnc_upstart Start uploading NC program It is necessary for the application program to switch API to the one which can deal with the program number 8 digits.
    cnc_search Search specified program
    cnc_delete Delete specified program
    cnc_rdprogdir Read program directory
    cnc_rdprogdir2 Read program directory(2)
    cnc_rdprgnum Read program number under execution

     

  • CNC: Function related to CNC file data
    Function name(15-B) Brief description in case of Series 15i
    cnc_rdparam Read parameter The structures including the data are changed in order to read and write the real parameter.
    cnc_wrparam Write parameter
    cnc_rdparar Read parameter(area specified)
    cnc_wrparas Write parameter(area specified)
    cnc_rdparainfo Read parameter information
    cnc_rdset Read setting data
    cnc_wrset Write setting data
    cnc_rdsetr Read setting data(area specified)
    cnc_wrsets Write setting data(area specified)
    cnc_rdsetinfo Read setting data information
    cnc_rdhpccset Read setting data for HPCC These functions are not supported on Series 15i. Read/write parameter function (cnc_rdparam, cnc_wrparam, cnc_rdparar, and cnc_wrparas) can be substituted for these functions.
    cnc_wrhpccset Write setting data for HPCC
    cnc_rdhpcctupr Read tuning data(parameter input) for HPCC
    cnc_wrhpcctupr Write tuning data(parameter input) for HPCC
    cnc_rdhpcctuac Read tuning data(acc./dec. input) for HPCC
    cnc_wrhpcctuac Write tuning data(acc./dec. input) for HPCC

     

  • CNC: Function related to tool life management data
    Function name(15-B) Brief description in case of Series 15i
    cnc_rdgrpid Read tool group number This function is not supported on Series 15i. Use "cnc_rdgrpid2".
    cnc_rd1length Read tool length number-1 These functions are not supported on Series 15i. Use "cnc_rd1tlifedat2" instead of these function.
    cnc_rd1radius Read cutter compensation number-1
    cnc_t1info Read tool information-1
    cnc_rd1tlifedata Read tool data1 This function is not supported on Series 15i. Use "cnc_rd1tlifedat2".
    cnc_wr1tlifedata Write tool data1 This function is not supported on Series 15i. Use "cnc_wr1tlifedat2".

     

  • CNC: Function related to history data
    Function name(15-B) Brief description in case of Series 15i
    cnc_rdophistry Read operation history data This function is not supported on Series 15i. Use "cnc_rdophistry2".
    cnc_rdalmhistry Read alarm history data This function is not supported on Series 15i. Use "cnc_rdalmhistry2".

     

  • CNC: Function related to Servo/spindle
    Function name(15-B) Brief description in case of Series 15i
    cnc_rdwaveprm Read waveform diagnosis parameter This function is not supported on Series 15i. Use "cnc_rdwaveprm2".
    cnc_wrwaveprm Write waveform diagnosis parameter This function is not supported on Series 15i. Use "cnc_wrwaveprm2".

     

  • CNC: Function related to Others
    Function name(15-B) Brief description in case of Series 15i
    cnc_sysconfig Read CNC configuration information This function is not supported on Series 15i. Use "cnc_rdsyssoft".
    cnc_rdmdlconfig Read module configuration of CNC system This function is not supported on Series 15i. Use "cnc_rdmdlconfig2".
    cnc_alarm Read alarm status This function cannot read all alarm status of Series 15i. So, you should better use "cnc_alarm2".
    cnc_modal Read modal data This function is not supported on Series 15i. Use "cnc_rdgcode" and "cnc_rdcommand" instead of this function.
    cnc_diagnoss Read diagnosis data The structures including the data are changed in order to read and write the real diagnosis data.
    cnc_diagnosr Read diagnosis data(area specified)
    cnc_rddiaginfo Read diagnosis data information

     

  • PMC: Function related to PMC
    Function name(15-B) Brief description in case of Series 15i
    pmc_rdmsg Read message from PMC to MMC These functions are not supported on Series 15i.
    pmc_wrmsg Write message from MMC to PMC
    pmc_crdmsg Read message from PMC to MMC (conditional)
    pmc_cwrmsg Write message from MMC to PMC (conditional)
  •  

  • Difference of the function specifications (FS30i and other CNCs)

    Please note that there are some differences of the specifications between the library except Series 30i and Series 30i about library function. The major differences are as follows.

  • Data size at all axes specification

    In some function, when you read/write data for all axes, data size that must be allocated is different as follows.

    the library except Series 30i : number of the actual control axis.
    the library for Series 30i : number of maximum axes in interface.

    The number of maximum axes is defined in the header file as MAX_AXIS(=32).

    The following functions are related to this subject.

    Brief description Function name
    Read absolute axis position cnc_absolute, cnc_absolute2
    Read machine axis position cnc_machine
    Read relative axis position cnc_relative, cnc_relative2
    Read distance to go cnc_distance
    Read skip position cnc_skip
    Read servo delay value cnc_srvdelay
    Read acceleration/deceleration delay value cnc_accdecdly
    Set origin/preset relative axis position cnc_wrrelpos
    Preset work coordinate cnc_prstwkcd
    Read work zero offset value cnc_rdzofs
    Write work zero offset value cnc_wrzofs
    Read parameter cnc_rdparam
    Write parameter cnc_wrparam
    Read setting data cnc_rdset
    Write setting data cnc_wrset
    Read diagnosis data cnc_diagnoss

     

  • Data size for spindle functions

    In Series 30i, the maximum spindle number has been extended to 8 from 4. So, data size of function related to the spindle that must be allocated is different as follows.

    The number of maximum spindles is defined in the header file as MAX_SPINDLES(=8).

    The following functions are related to this subject.

    Brief description Function name
    Read load information of serial spindle cnc_rdspload
    Read maximum r.p.m. ratio of serial spindle cnc_rdspmaxrpm
    Read gear ratio of serial spindle cnc_rdspgear
    Read actual spindle speed(S) (2) cnc_acts2
    Read operation mode for spindle setting cnc_rdopmode
    Read position deflection S for spindle adjustment cnc_rdposerrs
    Read spindle alarm for spindle monitor cnc_rdspdlalm
    Read control input signal for spindle monitor cnc_rdctrldi
    Read control output signal for spindle monitor cnc_rdctrldo

     

  • Function related to CNC program

    The management of the program came to be managed by the file name and the hierarchical directory. So, the function specification was changed completely.

  • Real type parameter/Real type diagnosis data

    In Series 30i, the real type parameter and the real type diagnosis data are added. The structures including these data are changed in order to read and write them.

    The following functions are related to this subject.

    Brief description Function name
    Read parameter cnc_rdparam
    Write parameter cnc_wrparam
    Read parameter(area specified) cnc_rdparar
    Write parameter(area specified) cnc_wrparas
    Read parameter information cnc_rdparainfo
    Read setting data cnc_rdset
    Write setting data cnc_wrset
    Read setting data(area specified) cnc_rdsetr
    Write setting data(area specified) cnc_wrsets
    Read setting data information cnc_rdsetinfo
    Read diagnosis data cnc_diagnoss
    Read diagnosis data(area specified) cnc_diagnosr
    Read diagnosis data information cnc_rddiaginfo

     

  • CNC alarm

    In Series 30i, the alarm status become the 32 bits. All the alarm status of Series 30i cannot be read though the cnc_alarm function is supported. Use the "cnc_alarm2".

    The content of the alarm status is also different from FOCAS1.

    And the area where axis information in structure used by the cnc_rdalminfo is stored is expanded from "short" into "long".

  • Modal/Command

    All the modal/command information of Series 30i cannot be read though the cnc_modal function is supported. Use the "cnc_rdgocde" and "cnc_rdcommand".

    The specification of "block after next block(=2)" cannot be specified for the block of the reading object on the cnc_modal.

    In Series 30i, the command value(mainly I,J and K) is extended to the 12 digits. So, the data which overflows when the value of 12 digits is converted into the integer in four bytes is rounded. And the number of places of decimals is set. So, the number of places of decimals might be set besides F code.

    The number of places of decimals might become negative value, so, the number of places of decimals is changed to "8 bits with sign" from "3 bits without sign".

 

  • Advanced mode(32 axes) and traditional mode(8 axes) for FS300i

    The original mode (advanced mode) and the compatible mode (traditional mode) is switched by the cnc_setlibopt. The default is advanced mode.

    The specification of each mode is as follows.

    Item Advanced mode traditional mode
    Number of maximum controlled axes 32 8
    Number of maximum controlled spindles 8 4
    Read/Write of all axis specification. The size of the allocated buffer is always the size of the maximum controlled axes. The size of the allocated buffer is the size of the current controlled axes. (It is similar to FS16i.)
    Real type of parameter and diagnosis data 8 bytes with sign The conversion to 4 bytes integer.
    Alarm status 32 bits 16 bits

    The number of axes shows the number of buffers used to access to the data of axis.

    In the following cases, the traditional mode can not be used.

    • When the number of current controlled axes in the system exceeds 8.
    • When the number of controlled spindles in the system exceeds 4.

    The differences of the data structures between the advanced mode and the traditional mode are as follows.

    • Parameter/Diagnosis

      In traditional mode, the real type parameter and the real type diagnosis data are converted into two word integer type by which a minimum setting unit is assumed to be the first digit.

        Example) In case of 1.230 : data=1230, number of places of decimals=3
      

      In advanced mode, the function of library is expanded the part of the specification along with the support of parameter/diagnosis data of FS30i.(Part in bold line) In traditional mode, this extended part is never input and output.

      cnc_rdparar, cnc_wrparas "From the explanation of "type in the IODBPSD structure""
      type : Attribute of parameter which was read is stored.
      0 : bit type
      1 : byte type
      2 : word type
      3 : 2-word type
      4 : real type
      cnc_diagnosr "From the explanation of "type in the ODBDGN structure""
      type : Attribute of diagnosis which was read is stored.
      0 : byte type
      1 : word type
      2 : 2-word type
      3 : but type(8 bit)
      4 : bit type(1 bit)
      5 : real type
      cnc_rdparainfo "From the explanation of "prm_type in the ODBPARAIF structure""
      info[N].prm_type : Attribute of parameter. The following attributes are set.
      bit 0,1 : type attribute
      0 : bit type
      1 : byte type
      2 : word type
      3 : 2-word type or real type
        :
      :
       
      bit 12 : in case that type attribute = 3
      0 : except real type
      1 : real type
      cnc_rddiaginfo "From the explanation of "diag_type in the ODBDIAGIF structure""
      info[N].diag_type : Attribute of diagnosis data. The following attributes are set.
      bit 0,1 : type attribute(It is effective when bit 3 = 0)
      0 : bit type (8 bit)
      1 : byte type
      2 : word type
      3 : 2-word type or real type
        :
      :
       
      bit 12 : in case that type attribute = 3
      0 : except real type
      1 : real type

       

    • Alarm status

      In order to get every alarm by using 16 bits alarm status, in the traditional mode, when a alarm which is shown by the upper word (from bit 16 to 31) in the 32 bits alarm status of cnc_alarm2 function occurs, bit 14 in the 16 bit alarm status of cnc_alarm function is turned on. In the advanced mode, bit 14 is reserved.

      #00 : Parameter switch on (SW)
      #01 : Power off parameter set (PW)
          :  
          :  
      #13 : Syncronized error (SN)
      #14 : Others(#16 to #31)  
      #15 : External alarm message (EX)

      Then, when 14 is passed to the alarm type parameter of cnc_rdalminfo function, all alarm information from bit 16 to 32 can be retrieved.

  • Difference of the HSSB version and the Ethernet version
    • 4 status (EW_SOCKET, EW_PROTOCOL, EW_ALARM, EW_STOP) are added to the return status of the functions.
      &nbsp
    • The following functions of the HSSB are not supported. Use the function in the right side of the following table.
      Brief description HSSB Ethernet
      Allocate library handle cnc_allclibhndl, cnc_allclibhndl2 cnc_allclibhndl3
      Start downloading NC program cnc_dwnstart cnc_dwnstart3
      Download NC program cnc_download, cnc_cdownload cnc_download3
      End of downloading NC program cnc_dwnend cnc_dwnend3
      Start downloading DNC program cnc_dncstart cnc_dncstart2
      Download DNC program cnc_dnc, cnc_cdnc cnc_dnc2
      End of downloading DNC program cnc_dncend cnc_dncend2
      Start uploading NC program cnc_upstart cnc_upstart3
      Upload NC program cnc_upload, cnc_cupload cnc_upload3
      End of uploading NC program cnc_upend cnc_upend3
    • The following functions are not supported in the Ethernet.
      • Function related to Data Server, DNC1, DNC2, OSI-Ethernet
      • Function related to servo learning data
      • Message translation with LADDER program (pmc_rdmsg, pmc_wrmsg)


    • NC's BOOT/IPL function (backup/restore SRAM, exchanging system software, etc.) is not supported by the Ethernet version.
      &nbsp
    • Cannot access to the loader control board (5th path) by the Ethernet version. (except FS30i)
      &nbsp There is a limitation about maximun number of applications which can access to one CNC at the same time. See "Communication with Ethernet Board" for details.
  • Specifying the folder and file name for FS30i.

    In FS30i, the folder name specify by "Drive Name + Folder Name".

    And, the file name specify "Drive Name + folder Name + File Name".


    In case of folder name, place "/"(slash) at the end of string. If there is no "/", it is regarded as the string for file.

    The format is as follows.

    • //Drive Name/Filder Name 1/Folder Name 2/.../Folder Name n/File Name

    Ex.1) The "USER/PATH1" folder in CNC memory.

    • //CNC_MEM/USER/PATH1/

     

    Ex.2) The "PART1.PRG" file in "NCDATA/MACHINE1" folder in Data server.

    • //DATA_SV/NCDATA/MACHINE1/PART1.PRG

     

    The Drive name can be acquired by cnc_rdpdf_drive function.

 


Top Page

Privacy notice

This website uses cookies. By continuing to use it you agree to our privacy policy. 

https://www.inventcom.net/fanuc-focas-library/general/general
Fanuc Focas Library | General | Fwlib32
FOCAS 1/2 FANUC Open CNC FOCAS1 / FOCAS2 CNC/PMC Data window library... [read more]
Fwlib32
Fanuc Focas Library | General | Unsol_res
When you use the PMC address for the control parameter(Response method) Top Page When you use the PMC address for the control... [read more]
Unsol_res
Fanuc Focas Library | General | Unsol_sim2
When you use the Macro variable for the control parameter(Simple method)(30i/31i/32i only) Top Page When you use the Macro... [read more]
Unsol_sim2
Fanuc Focas Library | General | Unsol_sim1
When you use the PMC address for the control parameter(Simple method)(30i/31i/32i only) Top Page When you use the PMC address for... [read more]
Unsol_sim1
Fanuc Focas Library | General | Protect
FOCAS1/Ethernet NC data protection Top Page NC data protection (160i/180i/210i/0i-B/0i-C/Power Mate i Only) A past... [read more]
Protect
Fanuc Focas Library | General | Overview
Outline Top Page Outline CNC/PMC Data Window Library is used for exchanging data and information between a personal computer and the CNC/PMC... [read more]
Overview
Fanuc Focas Library | General | Errcode
Return Status of Data Window... [read more]
Errcode
Fanuc Focas Library | General | Log
Communication Log Function... [read more]
Log
Fanuc Focas Library | General | Dnc1
Communication with Ethernet Board Ethernet version is realized by the socket communication (TCP/IP communication) with FANUC Ethernet Board, or FANUC Fast Ethernet Board. And in... [read more]
Dnc1
Fanuc Focas Library | General | Handle
Library handle Top Page Library handle At the library for HSSB, to establish the communication with the HSSB Board on CNC side, it is necessary... [read more]
Handle
Fanuc Focas Library | General | Update
FOCAS1/2 Ethernet HSSB Update History Top Page Update History of FOCAS1/2 Library... [read more]
Update
Fanuc Focas Library | General | flist_All
CNC: Function Reference related to library handle, node... [read more]
flist_All
Fanuc Focas Library | General | HSSB
Coexistence with... [read more]
HSSB
Fanuc Focas Library | General | Unsolic
FOCAS1/Ethernet Fast Ethernet Unsolicited Messaging Function Top Page Fast Ethernet Unsolicited Messaging Function... [read more]
Unsolic
Modified: 2019-03-17