Top Page


Unsolicited Messaging Function

    1. Outline of unsolicited messaging function
    2. Setting to use the unsolicited messaging
    3. Control data and Message transfer mechanism for the unsolicited messaging
    4. Ethernet functions for the unsolicited messaging function
    5. Making method of application which uses the unsolicited messaging function
    6. Notification of using with Windows Vista Business



  1. Outline of unsolicited messaging function

    In the 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/35i, 0i-D/F and PMi-A.

    This function is supported at the following ethernet function.

  2. 16i/18i/21i, 0i-B/C/D/F, Power Mate i (Not supported at Ethernet board/Embedded Ethernet)
    Fast Ethernet board
  3. 30i/31i/32i/35i, PMi-A
    Fast Ethernet board
    Embedded Ethernet
  4. 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
      D4F1/01(M) or later
      D6F1/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
      * In case of using for Embedded Ethernet.
      G002/23.0 or later
      G002/23.0 or later
      G012/23.0 or later
      G022/23.0 or later
      G032/23.0 or later
      G003/6.0 or later
      G013/6.0 or later
      G023/6.0 or later
      G033/6.0 or later
      31i
      G101/19.9 or later
      G111/19.9 or later
      G121/19.9 or later
      G131/19.9 or later
      * In case of using for Embedded Ethernet.
      G101/23.0 or later
      G111/23.0 or later
      G121/23.0 or later
      G131/23.0 or later
      G103/6.0 or later
      G113/6.0 or later
      G123/6.0 or later
      G133/6.0 or later
      32i
      G201/19.9 or later
      * In case of using for Embedded Ethernet.
      G201/23.0 or later
      G203/6.0 or later
      PMi-A
      88H0/1.0 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-B)
      656W/01 or later(0i-C)
      658W/01 or later(0i-D)
      658B/01 or later(0i-F)
      6569/19 or later(30i/31i/32i)
      658K/05 or later(PMi-A)

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

      656F/11 or later(30i/31i/32i)
      656F/12 or later(In case of using for Embedded Ethernet of 30i/31i/32i)

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

      656E/11 or later(In case of using for Embedded Ethernet of 30i/31i/32i)
      658M/04 or later(In case of using for Embedded Ethernet of PMi-A)

    - CNC side(Graphic Function 1 for 15") : to be registered onto F-ROM of CNC.

      60VB/01.8 or later(In case of using for Embedded Ethernet of 30i/31i/32i)

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

      Fwlib32.dll :
      FOCAS1/Ethernet Libraries(A02B-0207-K732) 1.7 or later(16i/18i/21i,Power Mate i)
      FOCAS1/Ethernet Libraries(A02B-0207-K732) 1.8 or later(0i)
      FOCAS1/2 Libraries(A02B-0207-K737) 2.5 or later(30i/31i/32i/35i, 0i-D)
      FOCAS1/2 Libraries(A02B-0207-K737) 3.9 or later(PMi-A)
      CNC Application Development Kit(A08B-9010-J5555#ZZ12) 1.1 or later(0i-F)
      Fwlibe1.dll :
      FOCAS1/Ethernet Libraries(A02B-0207-K732) 1.7 or later(16i/18i/21i,Power Mate i)
      FOCAS1/Ethernet Libraries(A02B-0207-K732) 1.8 or later(0i)
      FOCAS1/2 Libraries(A02B-0207-K737) 2.5 or later(30i/31i/32i/35i, 0i-D)
      FOCAS1/2 Libraries(A02B-0207-K737) 3.9 or later(PMi-A)
      CNC Application Development Kit(A08B-9010-J5555#ZZ12) 1.1 or later(0i-F)

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

      UMsgServ.exe :
      FOCAS1/Ethernet Libraries(A02B-0207-K732) 1.7 or later
      FOCAS1/2 Libraries(A02B-0207-K737) 2.5 or later(30i/31i/32i/35i, 0i-D, PMi-A)
      CNC Application Development Kit(A08B-9010-J5555#ZZ12) 1.1 or later(0i-F)

    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
      It 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 16i/18i/21i, 0i-B/C, and Power Mate i.
      - Transmission parameter
      It 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 16i/18i/21i, 0i-B/C, 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.

  5. Control data and Message transfer mechanism for the unsolicited messaging
  6. 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.)

  7. 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.

  8. Notification of using with Windows Vista Business

    In Windows Vista, the CNC unsolicited message can not be received when the application for message receiving is executed as "Run as administrator".


Top Page