News CNCnetPDM About us Support  
         
  

UNSOLIC | GENERAL

FOCAS1/Ethernet Fast Ethernet Unsolicited Messaging Function

Top Page


Fast Ethernet Unsolicited Messaging Function

  1. Outline of unsolicited messaging function

    In the Fast Ethernet unsolicited messaging function, the Message can be voluntarily notified from CNC to the personal computer according to the instruction of the ladder program or the NC program Note1). So, in the PC application, the state of CNC can be observed without the polling process. Arbitrary data of PMC or Macro variables Note1) can be transmitted as the Message. In the PC application, the polling process to inquire the state of CNC regularly becomes unnecessary by using this function.

    The unsolicited messaging issues the window message to the PC application internally and notifies the Message. So, Visual C++ is necessary for making the application.

    Note1) NC program and Macro variable can be used only by 30i/31i/32i.

  2. Setting to use the unsolicited messaging

    The following items are necessary to use the unsolicited messaging function.

    - CNC control software : to be registered onto FROM of CNC.

    16i
    B0F4/12(M) or later
    B0F4/07(T) or later
    B0H1/17(M) or later
    B1H1/17(T) or later
    18i
    BDF4/12(M) or later
    BEF4/07(T) or later
    BDH1/17(M) or later
    BEH1/17(T) or later
    21i
    DDF4/12(M) or later
    DEF4/07(T) or later
    DDH1/17(M) or later
    DEH1/17(T) or later
    0i
    D4A1/01(M) or later
    D6A1/01(T) or later
    PMi
    88E0/21 or later
    88F2/04 or later
    88F1/12 or later
    30i
    G002/19.9 or later
    G012/19.9 or later
    G022/19.9 or later
    G032/19.9 or later
    31i
    G101/19.9 or later
    G111/19.9 or later
    G121/19.9 or later
    G131/19.9 or later
    32i
    G201/19.9 or later

    - CNC side(Fast Ethernet firmware) : to be registered onto F-ROM of CNC.

      6567/06 or later(16i/18i/21i,Power Mate i)6567/07 or later(0i)6569/19 or later(30i/31i/32i)

    - CNC side(Net control application software) : to be registered onto F-ROM of CNC.

      656F/11 or later(30i/31i/32i)

    - PC side(Ethernet library) : to be copied onto a suitable folder of the PC. (System32 etc.).

    Fwlib32.dll :
    FANUC Open CNC FOCAS1/Ethernet Libraries(A02B-0207-K732) 1.7 or later(16i/18i/21i,Power Mate i)
    FANUC Open CNC FOCAS1/Ethernet Libraries(A02B-0207-K732) 1.8 or later(0i)
    FANUC Open CNC FOCAS1/2 Libraries(A02B-0207-K737) 2.5 or later(30i/31i/32i)
    Fwlibe1.dll :
    FANUC Open CNC FOCAS1/Ethernet Libraries(A02B-0207-K732) 1.7 or later(16i/18i/21i,Power Mate i)
    FANUC Open CNC FOCAS1/Ethernet Libraries(A02B-0207-K732) 1.8 or later(0i)
    FANUC Open CNC FOCAS1/2 Libraries(A02B-0207-K737) 2.5 or later(30i/31i/32i)

    - PC side(Unsolicited messaging server) : to be installed into the PC.

      UMsgServ.exe :FANUC Open CNC FOCAS1/Ethernet Libraries(A02B-0207-K732) 1.7 or laterFANUC Open CNC FOCAS1/2 Libraries(A02B-0207-K737) 2.5 or later(30i/31i/32i)

    Install method of Unsolicited messaging server

      1. Copy the UMsgServ.exe onto the suitable folder.
      2. Input the following command from the command prompt.
        > UMsgServ.exe -Install [Enter]

        By the above operation, the Unsolicited messaging server will be started automatically. after the next reboot of the PC.

    Uninstall method of Unsolicited messaging server

      1. Right-click the icon of the "Unsolicited Messaging Server" on the system tray, select "Exit" from the menu. The Unsolicited messaging server terminates.
      2. Input the following command from the command prompt.> UMsgServ.exe -Remove [Enter]
      3. Delete UMsgServ.exe from the installed folder.

    Setting method of data for Unsolicited messaging server

      1. Right-click the icon of the "Unsolicited Messaging Server" on the system tray, select "Setting" from the menu. Following dialog screen for setting will be displayed.

      2. Set necessary information for each item.
        Port Number :
        Specify the port number for the Unsolicited messaging server. (standard value is 8196)
        Timeout(sec):
        Specify the timeout time to detect an abnormal communication with CNC. (standard value is 30)
        Maximum CNC Number :
        Specify the maximum number of CNCs which can be observed at the same time by the Unsolicited messaging server.(standard value is 32)
      3. The function of each button is as follows.
        [Standard] :
        resets the setting to the above standard value.
        [ OK ] :
        saves the setting value and closes this screen.
        The setting value will be effective after the restart of the Unsolicited messaging server.
        [ Cancel ] :
        closes this screen without saving the set value.

    The following setting is necessary to CNC beforehand, to use the unsolicited messaging function.

      - IP address :IP address of destination PC.- Port number :TCP/UDP port number of destination PC.(Note:The unsolicited messaging function uses TCP and UDP of the same port number.)- Control parameter FIt is PMC address or macro variable number to demand the data transmission by the ladder or the NC program.Only PMC address ("R","E") can be set for Series 160i/180i/210i, 0i, and Power Mate i.- Transmission parameter FIt is the PMC address and size or the macro number and numbers which becomes the content of the message.Only PMC address can be set for Series 160i/180i/210i, 0i, and Power Mate i.- PMC address :R address for ladder program to demand data transmission- Reading address of PMC data :R address for ladder program to demand data transmission- Retry number :Number of transmission retry to observe communication board transmits data.- Timeout time :imeout time to observe communication board transmits data.- The interval time of the existence signal :The interval time of the existence signals which are transmitted while communication board operates.- others :Please refer to the specification of function for details.

    These data can be set from the PC application using cnc_wrunsolicprm() or cnc_wrunsolicprm2().

    When you set these data in CNC, these data is saved in S-RAM area of CNC.

  3. Control data and Message transfer mechanism for the unsolicited messaging
  4. Ethernet functions for the unsolicited messaging function

    In the PC side application, the following functions are provided to receive the Message from CNC. (The function specification is described later.)

        -
    cnc_wrunsolicprm
        Sets the unsolicited messaging parameters-
    cnc_wrunsolicprm2
        Sets the unsolicited messaging parameters(2)-
    cnc_rdunsolicprm
        Gets the unsolicited messaging parameters-
    cnc_rdunsolicprm2
        Gets the unsolicited messaging parameters(2)-
    cnc_unsolicstart
        Initiates the unsolicited messaging session-
    cnc_unsolicstop
        Terminates the unsolicited messaging session-
    cnc_rdunsolicmsg
        Reads the unsolicited messaging data-
    cnc_rdunsolicmsg2
      Reads the unsolicited messaging data(2)
  5. Making method of application which uses the unsolicited messaging function
    1. Set the parameter for the unsolicited messaging to CNC.

      The parameter for the unsolicited messaging function is set to CNC SRAM area using cnc_wrunsolicprm(). The parameter can be read by cnc_rdunsolicprm(), if necessary.

    2. Notify the completion of preparing the unsolicited messaging to CNC.

      The completion of preparing the unsolicited messaging is notified to CNC using cnc_unsolicstart(). After this call, CNC part can send the Message.

    3. Add the function to process the unsolicited messaging.
           // Example of ON_MESSAGE
           #define WM_MYMESSAGE (WM_APP + 1)
           BEGIN_MESSAGE_MAP( CMyWnd, CMyParentWndClass )
               //{{AFX_MSG_MAP( CMyWnd
               ON_MESSAGE( WM_MYMESSAGE, OnMyMessage )
               //}}AFX_MSG_MAP
           END_MESSAGE_MAP( )
           LRESULT CMyWnd::OnMyMessage(WPARAM wParam, LPARAM lParam)
           {
               LRESULT result;
               // Process the Message from CNC using cnc_rdunsolicmsg(), etc.
               return result;
           }
      

      The arguments of the OnMyMessage() function are as follows.

      wParam
      = -3 : The socket communication error occurred.
      = -2 : The unsolicited message server has stopped.
      = -1 : The CNC power was turned off.
      = 0 : The Message from CNC arrived. (normal process)
      = 1 : The CNC power was turned on.
      lParam
      = "Handle for the Message data reading" : in case of wParam = 0 This value can be used as the argument for cnc_rdunsolicmsg().
      = 0 : Other than wParam = 0

      Note)

      In case of "wParam = -3" :
      The "Handle for the Message data reading" on the CNC side becomes invalid, so call cnc_unsolicstart() again. When the problem is not solved, investigate CNC power supply, Ethernet cable and I/F board.
      In case of "wParam = -2" :
      The window message cannot be received at the application. So, both the restart of the application and the Unsolicited messaging server is necessary.
      In case of "wparam = -1" :
      The application should wait for the wParam to become "1". And it is necessary to execute the acquisition of the library handle again.

      And the OnMyMessage() function can set "RES_CODE" of the PMC data for unsolicited messaging control by setting the return value in "result" when wParam=0. The value of "result" which can be set by the application is as follows.result = 0x00, 0x10..0x1F, 0x30..0x3F

    4. Read the unsolicited messaging data.

      The transmitted message data at above OnMyMessage() routine is read by using cnc_rdunsolicmsg().

    5. Notify the termination of receiving the unsolicited messaging to CNC.

      The termination of receiving the unsolicited message from CNC is notified by cnc_unsolicstop() when the PC application finishes.


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/unsolic
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 | General
General Description Top Page General Description Library files... [read more]
General
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
Modified: 2018-06-10