Sample -- Let's start with a sample!

This is a simple sample to explain the Neth Communication Performer. Use only TCP socket(RFC793). We will install the Neth Communication Performer on a Windows PC and a equipment with a Linux. The arrangement of equipments is redundant configuration. However, it is also possible to rewrite the Neth Scenario to configure a Windows PC alone or a equipment with Linux alone. The fixtures to be controled in this example are patorites, but other equipments (such as motors that use an steady rotation) are also possible.


      --Windows(1) PC----                                     *         *
      |  -------------  |                                    * *       * *
      |  (2)Controler|  |                                   *   *     *   *
      |  |application|  |                                  *     *   *     *
      |  |on Windows |  |                                  |  R  |   |  Y  |
      |  -------------  |                                  |     |   |     |
      |      A   |      |                                  -------   -------
      |      |(3)|      |                                     A         A
      |      |   V      |                                     |         |
      |  ------------   |                                     |         |
      |  | (4)       |  |                                     |         |
      |  | Windows   |  |                                     |         |
      |  | Service   |  |                                     |         |
      |  ------------   |                                     |   (11)  |
      -------A---|-------                                     |----|  |-|
             |   |                                                 |  |
             |(5)|                                                 |  |
      -------|---V-------          ------------------------------  |  |
      |  -------------  |          | -------------              |  |  |
      |  | (6)       |-------------->|(8)        |  (9)Wakamatsu|  |  |
      |  |Daemon     |  |   (7)    | |LANTRONIX  |     Original |  |  |
      |  |on Raspbian|<--------------|XPort      |  |--Circuit-----------|
      |  -------------  |          | -------------  |  Board    |        |
      -Raspberry Pi------          |----------------|------------        |
                                                    |   (10)Outlet Box   |
                                                    |--------------------|


          
  • (1) We use a WindowsPC(10Pro). Windows is a registered trademark of Microsoft Corporation in the United States.
  • (2) Install your own application for controler on a WindowsPC. When making your own application, the program language used and the layout of the screen can be anything, but be sure to implement a TCP client socket(RFC793). In addition, as you may already know, there are many search contents and many books on specifications, examples, and how to handle TCP/IP.
  • (3) The loopback interface is used on the TCP/IP, and do Inter-process communication(IPC) in the identical equipment.
  • (4) We will run the Neth Comunication Performer for Windows Service on the WindowsPC. In this case, it will rely signals between the controler of (2) and the daemon of (5). The scenario for rely signals is written in the Neth Scenario notes as a scenario.
  • (5) Communicate by TCP/IP.
  • (6) Run the Neth Comunication Performer as a daemon on Raspberry Pi(3 ModelB+). In this case, this relays signals between Windows Service in (4) and the equipment in (8). The program for relaying signals is described in the Neth Scenario as a scenario. Raspberry Pi is a registered trademark of Raspberry Pi Foundation.
  • (7) The specifications for communicating the equipment are introduced in the [LANTRONIX 家庭でできるネットワーク遠隔制御(CQ出版].
  • (8) LANTRONIX XPort is a registered trademark of Lantronix, Inc.
  • (9) [LANTRONIX 家庭でできるネットワーク遠隔制御(CQ出版] also introduces how to attach the outlet to the LANTRONIX XPort. Wakamatsu Original Circuit Board used to attach the outlet is made by WAKAMATSU TSUSHO CO.,LTD in Akihabara Japan.
  • (10) Must be caution that the processing of outlet and handle the power source are carried out in accordance with the electrician-related laws of each country.
  • (11) Connect patorites. R is red and yellow is Y.

           (1) Controler application on Windows
           (2) WindowsService
           (3) Daemon on Raspbian
           (4) LANTRONIX XPort

          -------          -------          -------          ------- 
          | (1) |          | (2) |          | (3) |          | (4) | 
          -------          -------          -------          ------- 
             |                |                |                |
             |                |     [(3)-Start]|                |
             |                |            --->|                |      *
             |                |              -----              |     * *
             |                |              |[Accept]          |    *   *
             |                |              -----              |    |Off|
             |                |                |     [Open]     |    -----
             |     [(2)-Start]|                |--------------->|      |
             |            --->|                |                |      ・
             |              -----              |                |      |
             |              |[Accept]          |                |      ・
             |              -----              |                |      |
             |                |     [Open]     |                |      ・
             |                |--------------->|                |      |
  [(1)-Start]|                |                |                |      ・
         --->|     [Open]     |                |                |      |
             |--------------->|                |                |      ・
             |                |                |                |      |
     ----Shown in the video from here--------------------------------- ・
             |                |                |                |      |
         [1] |                |                |                |      ・
         --->|     [1-Req]    |                |                |      |
             |--------------->|    [1-Req]     |                |      ・
             |                |--------------->|     [1-Req]    |      |
             |                |                |--------------->|      ・
             |                |                |<---------------|      |
             |                |<---------------|     [1-Res]    |      ・
             |<---------------|    [1-Res]     |                |      |
             |    [1-Res]     |                |                |      ・
         [2] |                |                |                |      |
         --->|    [2-Req]     |                |                |      ・
             |--------------->|    [2-Req]     |                |      |
             |                |--------------->|     [2-Req]    |      ・
             |                |                |--------------->|      |
             |                |                |<---------------|      ・
             |                |<---------------|     [2-Res]    |      |
             |<---------------|    [2-Res]     |                |      ・
             |    [2-Res]     |                |                |      |
         [3] |                |                |                |      v
         --->|    [3-Req]     |                |                |      
             |--------------->|    [3-Req]     |                |      *
             |                |--------------->|     [3-Req]    |     * *
             |                |                |--------------->|    *   *
             |                |                |                |--->|On |
             |                |                |<---------------|    -----
             |                |<---------------|     [3-Res]    |      |
             |<---------------|    [3-Res]     |                |      ・
             |    [3-Res]     |                |                |      |
             |                |                |                |      ・
             |                |                |                |      |
         [1] |                |                |                |      v
         --->|    [1-Req]     |                |                |      
             |--------------->|    [1-Req]     |                |      *
             |                |--------------->|     [1-Req]    |     * *
             |                |                |--------------->|    *   *
             |                |                |                |--->|Off|
             |                |                |<---------------|    -----
             |                |<---------------|     [1-Res]    |      |
             |<---------------|    [1-Res]     |                |      ・
             |    [1-Res]     |                |                |      |
     ----Shown in the video so far------------------------------------ |
             |                |                |                |      ・
             |                |                |                |      |
  [(1)-Close]|                |                |                |      ・
         --->|    [Close]     |                |                |      |
             |--------------->|                |                |      ・
             |                |                |                |      |
             |     [(2)-Close]|                |                |      ・
             |            --->|                |                |      |
             |                |    [Close]     |                |      ・
             |                |--------------->|                |      |
             |              -----              |                |      ・
             |              |[Close]           |                |      |
             |              -----              |                |      ・
             |                |                |                |      |
             |                |     [(3)-Close]|                |      ・
             |                |            --->|                |      |
             |                |                |     [Close]    |      ・
             |                |                |--------------->|      |
             |                |              -----              |      ・
             |                |              |[Close]           |      |
             |                |              -----              |      ・
             |                |                |                |      |
             |                |                |                |      ・


      [1] A operator Send a command to initialize Xport. It is also used to turn off patorites.
      [2] A operator Send a command to Xport. (2) and (3) relays the command.
      [3] A operator Send a command to Xport to turn on  patorites.
          A Owner of this system can also make the Neth Scenario that check the Res at [2] in 
          (2) or (3) and send the Req from (2) or (3) to [3].
          After initializing at [1], you can turn it on and off repeatedly by repeating 
          [2]-->[3]-->[1].

          

Copyright © 2006-2021, THWORKS