RS‑232 tab

RS‑232 Configuration

This setting controls which process will be associated with the RS‑232 port. The following values are defined:

TCP Serial Server

The device will listen for an incoming TCP connection from a remote client. The port number of the listening connection is specified in the RS‑232 Service Port setting. Data received on the TCP connection will be forwarded to the RS‑232 port, and data received on the RS‑232 port will be forwarded to this TCP connection.

TCP Serial Client

The device will maintain a TCP client connection with a remote server. The IP address and port number of the remote server are configured in the settings RS‑232 TCP Serial Client IP Address and RS‑232 TCP Serial Client Port. Data received on the RS‑232 port will be forwarded to this TCP connection, and data received on the TCP connection will be forwarded to the RS‑232 port. The device will attempt to open a connection with the remote server and if the connection fails to open, the device will continue to retry at an interval of 60 seconds. If data arrives on the RS‑232 port when no TCP connection exists, the device will buffer the data (up to 1500 bytes) and immediately attempt to open a connection to deliver the data. If the remote server closes the connection due to error, the device will make a best effort to save any data that was in process and re-queue it to be sent on the next successfully-opened TCP connection.

PakBus

This port uses the PakBus protocol.

MODBUS/TCP gateway

The device will listen for incoming Modbus/TCP connections from a remote client. The port number of the listening connection is specified in the RS‑232 Service Port setting. The device will convert incoming Modbus/TCP frames to Modbus/RTU and forward them to the RS‑232 port. The device will wait for a response from the Modbus/RTU device and forward the response back to the remote Modbus/TCP client over the established TCP connection.

Disabled

This port will not be used.

RS‑232 Service Port

This setting is used when the RS‑232 Configuration is set to Serial Server or MODBUS/TCP gateway. To communicate with a TCP/IP server, the client application must open a socket to that server. The socket of a specific server is uniquely identified by an IP address of the host where the server is running and a port number associated with the server application on that host. This entry is where the port number of the server is set. Ensure that the client application is set to use the same port number as configured here. Most MODBUS/TCP applications use port 502 (range 1 to 65535).

RS‑232 Baud Rate

This setting specifies the baud rate of the RS‑232 port. The connected device must be set to communicate at the same baud rate.

RS‑232 RTS

The NL241 asserts the RTS and DTR lines when doing RS‑232 communications. This setting allows the user to disable the RTS line if needed so that it will not be asserted. Some hardware will not function if the RTS line is asserted, but typically it is not necessary to change this setting from its default (enable).

RS‑232 TCP Timeout (seconds)

This setting determines how fast the device will time out on the open TCP connection. For Serial Server and MODBUS/TCP gateway configurations, the device will close the TCP connection if no activity is detected for the timeout period. For the TCP Client configuration, the device will close the TCP client connection if no activity is detected and then immediately open another connection with the remote server. This behavior helps to ensure that the connection is functional as the device does not know the frequency or nature of the expected data. Set to 0 for no timeout (not recommended) (range 0 to 999 seconds).

RS‑232 Always On

This setting controls whether the device is allowed to shut down the RS‑232 port when it is not in use in order to conserve power. Typically, it is not necessary to change this setting from its default (Auto).

Auto

Based on the RS‑232 port configuration, the device will decide which of the following two modes is more likely to be desired and will operate in the according manner. If the port is configured to TCP Serial Client, the device will choose RS‑232 Always On. Otherwise, the device will choose Power Down Port When Inactive, and it will allow the RS‑232 port to power down when not in use in order to conserve power.

Always On

The device will not power down the RS‑232 port. The port will remain active always. As a result, the processor cannot enter its lowest power state. Keeping the port Always On may be necessary because when the RS‑232 port is powered down, there is a wake-up latency and the first few bytes that come in on the port will be missed. If this behavior is unacceptable, set this setting to Always On to keep the RS‑232 port always on.

Power Down Port when Inactive

The device will power down RS‑232 when the port is inactive. If the device is configured for Serial Server mode, the inactivity timeout is 40 seconds. If configured for PakBus, the device can use the PakBus protocol link-state to do a more intelligent and effective inactivity timeout. If communications are received on the port after it has been powered down, there is a wake-up latency and the first few bytes will be missed. PakBus has a built-in mechanism to deal with this, but if the device is not configured for PakBus communications, the user must decide if the application can accept this behavior. If this behavior is unacceptable, set this setting to Always On. The power savings that the device is able to achieve by powering down the RS‑232 port are significant as the processor is also able to go to a deeper sleep mode. In an idle state with Low Power Mode enabled, an additional ~0.12W savings are observed by setting RS‑232 Always On to Power Down Port when Inactive.

RS‑232 PakBus Beacon Interval

This setting, in units of seconds, governs the rate at which the NL241 will broadcast PakBus messages on the RS‑232 port in order to discover any new PakBus neighboring nodes. It will also govern the default verification interval if the value of the RS -232 PakBus Verify Interval setting for the associated port is 0.

RS‑232 PakBus Verify Interval

This setting specifies the interval, in units of seconds, that will be reported as the link verification interval in the PakBus hello-transaction messages. It will indirectly govern the rate at which the NL241 will attempt to start a hello transaction with a neighbor if no other communications has taken place within the interval.

Neighbors Allowed RS‑232

This setting specifies the explicit list of PakBus node addresses that the NL241 will accept as neighbors on the RS‑232 port. If the list is empty (the default value), any node will be accepted as a neighbor. This setting will not affect the acceptance of a neighbor if that neighbor address is greater than 3999. The formal syntax for this setting follows:

neighbor : = { "(" range-begin "," range-end ")" }.
range-begin : = pakbus-address. ;
range-end : = pakbus-address.
pakbus-address : = number. ; 0 < number < 4000

Example: (129,129) (1084,1084)

In the example above, nodes 129 and 1084 are assigned as neighbors to the NL241.

RS‑232 Modbus Timeout

This setting determines how long, in milliseconds, the MODBUS/TCP to MODBUS/RTU gateway will wait for an answer from the MODBUS server (formerly called slave) device(s) attached to the RS‑232 port. If no answer is received within the timeout period, the MODBUS/TCP server will reply to the MODBUS/TCP client with error code 0x0B (Target Device Failed to Respond).

RS‑232 TCP Serial Client IP Address

This setting specifies the IP address of the outgoing TCP Serial Client connection that the device should maintain. If the connection fails, the device will retry until the connection succeeds. No entry specifies that no client connection will be made.

RS‑232 TCP Serial Client Port

This setting specifies the TCP port of the outgoing TCP Serial Client connection (range 1 to 65535).