Show Modbus Command

This command displays information about the MODBUS/TCP configuration and status.

Show Modbus [ -con ] [ -rio ] [ -signals ]

Prerequisites

None

Parameters

A maximum of one switch can be specified. If no switch is specified, -signals is assumed.

-con

An optional switch keyword that indicates that connection information is to be displayed.

-rio

An optional switch keyword that indicates that the status of slave RIO boards is to be displayed.

-signals

An optional switch keyword that indicates that the status of the MODBUS/TCP scanner is to be displayed.

Remarks

This command displays different information depending on the switch keyword value.

-con

Shows statistics for standard MODBUS/TCP connections. It does not show details for RIO mode boards.

The display begins with a header containing the following fields:

Field

Description

Remote opened

The total number of connections initiated by a remote client to a local server.

Local opened

The total number of connections initiated locally. This count includes listeners.

Closed

The total number of connections closed.

Errors

The total number of connections closed due to errors.

The header is followed by one line for each current and recent connection. Each line contains the following fields:

Field

Description

ID

The internal connection ID that counts up, starting at 1 for each connection.

IP Address

The remote IP address for the connection, or 0.0.0.0 if there is no remote connection.

Type

The connection type keyword:
   listen - A TCP/IP listener, waiting for a connection.
   server - A local server, connected to a remote client.
   client - A local client, connected to a remote server.
   auto - A local client that includes a scanner for DIO.

State

A keyword showing the state of the connection:
   closed - The connection is closed or unused.
   error - A client has received an error.
   listen - A server is listening for a connection.
   recv_d - Connected, waiting for message data.
   recv_h - Connected, waiting for message header.
   send - Connected, ready to send data.
   sout - Connected, server writing to a serial port.
   wait - Client connected and waiting for data.

Sent

Total number of requests or responses sent on this connection.

Received

Number of requests or responses received on this connection.

-rio

Shows only connections to Precise RIO boards that are configured to execute the RIO communications protocol. it does not show connections to RIO boards or other boards that are utilizing the standard MODBUS/TCP protocol.

The display consists of one line for each RIO board.   Each line contains the following fields:

Field

Description

Index

The RIO board index number.

IP Address

The remote IP address for the connection.

Unit

The RIO unit number, determined by the DIP switches or jumpers on the RIO board.

Send

The state of the sender connection. If an error occurred, a standard negative error number. If no error occurred, a keyword from below:
  closed - The connection is closed or unused.
  recv_d - Connected, waiting for message data.
  recv_h - Connected, waiting for message header.
  send - Connected, ready to send data.
  sout - Connected, server writing to a serial port.
  wait - Client connected and waiting for data.

Send Count

Total number of requests or responses sent on this connection.

Receive

The state of the receiver connection.  If an error occurred, a standard negative error number.  If no error occurred, a keyword from below:
   closed - The connection is closed or unused.
   recv_d - Connected, waiting for message data.
   recv_h - Connected, waiting for message header.

Received Count

Number of requests or responses received on the connection.

-signals

Shows the configuration and statistics for standard MODBUS/TCP devices that are being scanned by the built-in MODBUS/TCP Master Scanner. It does not show RIO mode boards.

The display consists of a block of lines for each device configured by DataID 583. The information defined by DataID 583 is displayed. Each block contains the fields described below:

Field

Description

MODBUS/TCP

The device index number.

Error

A standard GPL error code and message. If no error, this line is omitted.

IP Address

The remote IP address for the connection.

Signal map

The GPL signal numbers mapped to this scanner, followed by the remote MODBUS/TCP addresses being referenced. The suffix :B, :C, or :H may be appended to the address to indicate the access type.

Send

The number of output requests sent by the scanner.

Receive

The number of input responses sent by the scanner.

Error

The number of errors detected by the scanner, except for timeouts.

Timeout

The number of timeout errors detected by the scanner.

Examples

GPL: show modbus -con
Remote opened: 0, Local opened: 1, Closed: 0, Errors 0
ID IP address Type State Sent Received
1 0.0.0.0 listen listen 0 0

See Also

Console Commands |Set Modbus Command