EEIP.NET Libreria Open Source Ethernet IP

Da qualiwiki.

I sorgenti sono nella cartella: \\Lucaufficio2\eth ip\EEIP.NET-master (OK KEYENCE)

Il protocollo lato .net è MASTER

Per facilitare le cose bisognerebbe avere il file .eds del dispositivo con il quale si vuole comunicare (SLAVE)

- Bisogna configurare l'indirizzo IP (la porta con keyence e sherlock è quella di default:44818)

- Nel file .eds bisogna andare al fondo(vedi sotto) dove saranno presenti n connessioni (dipende dal dispositivo)

[Connection Manager]

       Connection1 =
               0x04030002,                 $ trigger & transport
                                           $  0-15  = supported transport classes (class 1)
                                           $  16    = cyclic (1 = supported)
                                           $  17    = change of state (1 = supported)
                                           $  18    = on demand (0 = not supported)
                                           $  19-23 = reserved (must be zero)
                                           $  24-27 = exclusive owner
                                           $  28-30 = reserved (must be zero)
                                           $  31    = client 0 (don't care for classes 0 and 1)
               0x44640405,                 $ connection parameters
                                           $  0     = O=>T fixed (1 = supported)
                                           $  1     = O=>T variable (0 = not supported)
                                           $  2     = T=>O fixed (1 = supported)
                                           $  3     = T=>O variable (0 = not supported)
                                           $  4-7   = reserved (must be zero)
                                           $  8-11  = O=>T header (4 byte run/idle)
                                           $  12-15 = T=>O header (no header)
                                           $  16-19 = O=>T connection type (point-to-point)
                                           $  20-23 = T=>O connection type (multicast, point-to-point)
                                           $  24-27 = O=>T priority (scheduled)
                                           $  28-31 = T=>O priority (scheduled)
               Param100,Param2,Assem101,   $ O=>T RPI,Size,Format
               Param100,Param1,Assem100,   $ T=>O RPI,Size,Format
               ,,                          $ config part 1 (not used)
               ,,                          $ config part 2 (not used)
               "Class1",                   $ connection name
               "",                         $ Help string
               "20 04 24 01 2C 65 2C 64";  $ inputs only path
       Connection2 =
               0x02030002,                 $ trigger & transport
                                           $  0-15  = supported transport classes (class 1)
                                           $  16    = cyclic (1 = supported)
                                           $  17    = change of state (1 = supported)
                                           $  18    = on demand (0 = not supported)
                                           $  19-23 = reserved (must be zero)
                                           $  24-27 = input only
                                           $  28-30 = reserved (must be zero)
                                           $  31    = client 0 (don't care for classes 0 and 1)
               0x44640305,                 $ connection parameters
                                           $  0     = O=>T fixed (1 = supported)
                                           $  1     = O=>T variable (0 = not supported)
                                           $  2     = T=>O fixed (1 = supported)
                                           $  3     = T=>O variable (0 = not supported)
                                           $  4-7   = reserved (must be zero)
                                           $  8-11  = O=>T header (0 byte heartbeat)
                                           $  12-15 = T=>O header (no header)
                                           $  16-19 = O=>T connection type (point-to-point)
                                           $  20-23 = T=>O connection type (multicast,point-to-point)
                                           $  24-27 = O=>T priority (scheduled)
                                           $  28-31 = T=>O priority (scheduled)
               Param100,0,,                $ O=>T RPI,Size,Format
               Param100,Param1,Assem100,   $ T=>O RPI,Size,Format
               ,,                          $ config part 1 (not used)
               ,,                          $ config part 2 (not used)
               "Class1 (Input-Only)",      $ connection name
               "",                         $ Help string
               "20 04 24 01 2C FE 2C 64";  $ inputs only path

[Port]

       Port1 =
               TCP,
               "Ethernet Port",
               "20 F5 24 01",  ------------> la porta di connessione
               1;

[Capacity]

       MaxIOConnections = 32;
       MaxMsgConnections = 32;
       MaxConsumersPerMcast = 32;
       TSpec1 = TxRx, 2, 400;
       TSpec2 = TxRx, 496, 400;
       TSpec3 = TxRx, 1436, 400;

-Prendiamo in esame la connessione 1, questo è quello che ha logica sono riuscito a collegare tra il file .eds e le variabile della classe .net

Connection1 =

               0x04030002,                 $ trigger & transport
                                           $  0-15  = supported transport classes (class 1)
                                           $  16    = cyclic (1 = supported)
                                           $  17    = change of state (1 = supported)
                                           $  18    = on demand (0 = not supported)
                                           $  19-23 = reserved (must be zero)
                                           $  24-27 = exclusive owner
                                           $  28-30 = reserved (must be zero)
                                           $  31    = client 0 (don't care for classes 0 and 1)
               0x44640405,                 $ connection parameters
                                           $  0     = O=>T fixed (1 = supported) ---------------------------> eeipClient.O_T_VariableLength = false;
                                           $  1     = O=>T variable (0 = not supported)
                                           $  2     = T=>O fixed (1 = supported) ---------------------------> eeipClient.T_O_VariableLength = false;
                                           $  3     = T=>O variable (0 = not supported)
                                           $  4-7   = reserved (must be zero)
                                           $  8-11  = O=>T header (4 byte run/idle) ---------------------------> eeipClient.O_T_RealTimeFormat = Sres.Net.EEIP.RealTimeFormat.Header32Bit;
                                           $  12-15 = T=>O header (no header) ---------------------------> eeipClient.T_O_RealTimeFormat = Sres.Net.EEIP.RealTimeFormat.ZeroLength;
                                           $  16-19 = O=>T connection type (point-to-point) ---------------------------> eeipClient.O_T_ConnectionType = Sres.Net.EEIP.ConnectionType.Point_to_Point;
                                           $  20-23 = T=>O connection type (multicast, point-to-point) ---------------------------> eeipClient.T_O_ConnectionType = Sres.Net.EEIP.ConnectionType.Multicast;
                                           $  24-27 = O=>T priority (scheduled) ---------------------------> eeipClient.O_T_Priority = Sres.Net.EEIP.Priority.Scheduled;
                                           $  28-31 = T=>O priority (scheduled) ---------------------------> eeipClient.T_O_Priority = Sres.Net.EEIP.Priority.Scheduled;
               Param100,Param2,Assem101,   $ O=>T RPI,Size,Format
               Param100,Param1,Assem100,   $ T=>O RPI,Size,Format
               ,,                          $ config part 1 (not used)
               ,,                          $ config part 2 (not used)
               "Class1",                   $ connection name
               "",                         $ Help string
               "20 04 24 01 2C 65 2C 64";  $ inputs only path --------------> eeipClient.O_T_InstanceID = 0x65; (output)  eeipClient.T_O_InstanceID = 0x64; (input)

- Se dopo aver fatto questo non si bomba la connessione funziona.


Nella cartella: \\Lucaufficio2\eth ip\V2.3 (ODVA)

è presente un software che ti aiuta a scoprire InstanceID se non si ha il file .eds


Cattura11111.JPG

Nella parti gialle inserire IP e i valori, nel campo INSTANCE bisogna inserire l'id instance e cliccare su Send Request, quando si azzecca l'id nella label in alto viene verde, in tutti gli altri casi è gialla.