Class: EIPC

EIPC

Provides methods for managing connections to EtherNet/IP servers.


Example
var eipc = $wat.load('eipc')[0];

Methods


createPCCCClient( [host] [, port] [, name])

Creates an object that can be used to interface with an EtherNet/IP server using PCCC. If no host is supplied, one must be assigned to host before attempting to open the connection.

Parameters:
Name Type Argument Default Description
host string <optional>
""

The name/IP address of the server to connect to

port number <optional>
0

The port at the server that the tag client should connect to. This is not a TCP port, but an EtherNet/IP port identifying an object (e.g. for a PLC, the port typically corresponds to the slot number of a logic module).

name string <optional>
""

If specified, the object will be accessible as a property of of this object using the supplied name.

Since:
  • 1.0 (WAT 2.2)
Returns:
Type
eipc.PCCCClient

createTagClient( [host] [, port] [, name])

Creates an object that can be used to manipulate server tags using EtherNet/IP. If no host is supplied, one must be assigned to host before attempting to open the connection.

Parameters:
Name Type Argument Default Description
host string <optional>
""

The name/IP address of the server to connect to

port number <optional>
0

The port at the server that the tag client should connect to. This is not a TCP port, but an EtherNet/IP port identifying an object (e.g. for a PLC, the port typically corresponds to the slot number of a logic module).

name string <optional>
""

If specified, the object will be accessible as a property of of this object using the supplied name.

Since:
  • 1.0 (WAT 2.2)
Returns:
Type
eipc.TagClient

destroy(obj)

Delete a previously created client.

Parameters:
Name Type Description
obj eipc.TagClient | eipc.PCCCClient

The client to delete.

Since:
  • 1.0 (WAT 2.2)