Section 3: CPU Configuration
3.2 Configuration Parameters
3.2.10 COM1 and COM2 Parameters
These parameters configure the operating characteristics of the CPU serial ports. COM1 and COM2 have the same set of configuration parameters. The protocol (Port Mode) determines the parameters that can be set for each port.
Port Parameters
Port Mode The protocol to execute on the serial port. Determines the list of parameters displayed on the Port tab. Only the parameters required by the selected protocol are displayed.
Choices:
▪ RTU Slave mode: Reserved for the use of the Modbus RTU Slave protocol. This mode also permits connection to the port by an SNP master, such as the WinLoader utility or the programming software.
▪ Message mode: The port is open for user logic access. This mode enables C language blocks to perform serial port I/O operations via the C Runtime Library functions.(CPE100/CPE115 does not support this feature)
▪ Available: The port is not to be used by the PLC firmware. (The CPE302/CPE305 does not support this selection.)
▪ SNP Slave: Reserved for the exclusive use of the SNP slave. This mode permits connection to the port by an SNP master, such as the WinLoader utility or the programming software.(CPE100/CPE115 does not support this feature)
▪ Serial I/O: Enables you to perform general-purpose serial communications by using COMMREQ functions.
Default: RTU Slave.
Note: If both serial ports are configured for any protocol other than RTU Slave or SNP Slave, the RUN/STOP Switch should not be disabled without first making sure that there is a way to stop the CPU, or take control of the CPU through another device such as the Ethernet module. The Serial I/O protocol is only active when the CPU is in RUN Mode. If the CPU can be set to STOP Mode, it will switch the protocol from Serial I/O to the STOP Mode protocol (default is RTU Slave). If an SNP Master, such as the programming software in Serial mode, begins communicating on a port, the RTU protocol automatically switches to SNP Slave. As long as the CPU can be stopped, the protocol of the port can be auto-switched to one that enables serial programmer connection. Refer to STOP Mode protocols.
If an Ethernet port is available, you can communicate with the CPU by connecting PME software via the Ethernet port.
Station Address (RTU Slave only) ID for the RTU Slave.
Valid range: 1 through 247.
Default: 1.
Note: You should avoid using station address 1 for any other Modbus slave in a PACSystems control system because the default station address for the CPU is 1. The CPU uses the default address in two situations:
1. If you power up without a configuration, the default station address of 1 is used.
2. When the Port Mode parameter is set to Message Mode, and Modbus becomes the protocol in STOP Mode, the station address defaults to 1.
In either of these situations, if you have a slave configured with a station address of 1, confusion may result when the CPU responds to requests intended for that slave.
Note: The least significant bit of the first byte must be 0. For example, in a station address of 090019010001, 9 is the first byte.
Data Rate (All Port Modes, except Available.) Data rate (bits per second) for the port.
Choices: 1200 Baud, 2400 Baud, 4800 Baud, 9600 Baud, 19.2k Baud, 38.4k Baud, 57.6k Baud, 115.2k Baud.
Default: 19.2k Baud.
Data Bits (Available only when Port Mode is set to Message mode or Serial I/O.) The number of bits in a word for serial communication. SNP uses 8-bit words.
Choices: 7, 8.
Default: 8.
Flow Control (RTU slave, Message Mode, or Serial I/O.) Type of flow control to be used on the port.
Choices:
▪ For Serial I/O Port Mode: None, Hardware, Software (XON/XOFF).
▪ For all other Port Modes: None, Hardware.
Default: None.
Note: The Hardware flow-control is RTS/CTS crossed.
Parity (All Port Modes, except Available.) The parity used in serial communication. Can be changed if required for communication over modems or with a different SNP master device.
Choices: None, Odd, Even.
Default: Odd.
Stop bits (Available only when Port Mode is set to Message Mode, SNP Slave or Serial I/O.) The number of stop bits for serial communication. SNP uses 1 stop bit.
Choices: 1, 2.
Default: 1.
Physical Interface
(All port modes except Available.) The type of physical interface that this protocol is communicating over.
Choices:
▪ 2-wire: There is only a single path for receive and transmit communications. The receiver is disabled while transmitting.
▪ 4-wire: There is a separate path for receive and transmit communications and the transmit line is driven only while transmitting.
▪ 4-wire Transmitter on: There is a separate path for receive and transmit communications and the transmit line is driven continuously. Note that this choice is not appropriate for SNP multi-drop communications, since only one device on the multi-drop line can be transmitting at a given time.
Default: 4-wire Transmitter On.
Turn Around Delay Time (ms)
(Available only when Port Mode is set to SNP Slave.) The Turn Around Delay Time is the minimum time interval required between the reception of a message and the next transmission. In 2-wire mode, this interval is required for switching the direction of data transmission on the communication line.
Valid range: 0 through 2550ms, in increments of 10 ms.
Default: 0.
Timeout(s) (Available only when Port Mode is set to SNP Slave.) The maximum time that the slave will wait to receive a message from the master. If a message is not received within this timeout interval, the slave will assume that communications have been disrupted, and then it will wait for a new attach message from the master.
Valid range: 0 through 60 seconds.
Default: 10.
SNP ID (Available only when Port Mode is set to SNP Slave.) The port ID to be used for SNP communications. In SNP multi-drop communications, this ID is used to identify the intended receiver of a message. This parameter can be left blank if communication is point to point. To change the SNP ID, click the values field and enter the new ID. The SNP ID is up to seven characters long and can contain the alphanumeric characters (A through Z, 0 through 9) or the underline (_).
Specify STOP
Yes: The STOP Mode parameters appear and you can select the STOP Mode. If you set the STOP Mode to the same protocol as the RUN Mode, then the other STOP Mode parameters are read-only and are set to the same values as for the RUN Mode.
Default: No.
STOP Mode (Available only when Specify STOP Mode is set to Yes.)
The STOP Mode protocol to execute on the serial port. If you set the STOP Mode to the same protocol as for the RUN Mode, then the other STOP Mode parameters are read-only and are set to the same values as for the RUN Mode.
Choices and defaults are determined by the Port Mode setting.
■ SNP Slave: Reserved for the exclusive use of the SNP slave.
■ RTU Slave: Reserved for the exclusive use of the Modbus RTU Slave protocol.
If the STOP Mode protocol is different from the Port mode protocol, you can set parameters for the STOP Mode protocol.
If you do not select a STOP Mode protocol, the default protocol with default parameter settings is used.
Port (RUN) Mode STOP Mode
RTU Slave Choices: SNP Slave, RTU Slave Default: RTU Slave.
Message Mode Choices: SNP Slave, RTU Slave Default: RTU Slave.
Available Available
(Not supported on CPE302/CPE305) SNP Slave SNP Slave
Serial I/O Choices: SNP Slave, RTU Slave Default: RTU Slave.
Note: Setting the Port Mode to RTU Slave and the STOP Mode to SNP Slave may cause loss of programmer connection and delayed reconnection when the controller transitions from STOP to RUN Mode. To avoid this behavior, select SNP Slave for the Port Mode and do not specify a STOP Mode. For additional details, see RTU Slave/SNP Slave Operation with Programmer Attached.
Turn Around Delay Time (ms)
(Available only when STOP Mode is set to SNP Slave.) The Turn Around Delay Time is the minimum time interval required between the reception of a message and the next transmission. In 2-wire mode, this interval is required for switching the direction of data transmission on the communication line.
Valid range: 0 through 2550ms, in increments of 10 ms.
Default:
▪ When the STOP Mode is different from the Port Mode: 0ms.
▪ When the STOP Mode is the same as the Port Mode: the value is read-only and is set to the same value as the Turn-Around Delay Time for the Port Mode.
Timeout(s) (Available only when STOP Mode is set to SNP Slave.) The maximum time that the slave will wait to receive a message from the master. If a message is not received within this timeout interval, the slave will assume that communications have been disrupted, and then it will wait for a new attach message from the master.
Valid range: 0 through 60 seconds.
Default:
▪ When the STOP Mode is different from the Port Mode: 10 seconds.
▪ When the STOP Mode is the same as the Port Mode: the value is read-only and is set to the same value as the Timeout for the Port Mode.
SNP ID (Available only when STOP Mode is set to SNP Slave.) The port ID to be used for SNP communications. In SNP multi-drop communications, this ID is used to identify the intended receiver of a message. This parameter can be left blank if communication is point to point. To change the SNP ID, click the values field and enter the new ID. The SNP ID is up to seven characters long and can contain the alphanumeric characters (A through Z, 0 through 9) or the underline (_).
Default:
▪ When the STOP Mode is different from the Port Mode: the default is blank.
▪ When the STOP Mode is the same as the Port Mode: the value is read-only and is set to the same value as the SNP ID for the Port Mode.
Station Address (Available only when STOP Mode is set to RTU slave.) ID for the RTU Slave.
Valid range: 1 through 247.
Default:
▪ When the STOP Mode is different from the Port Mode: 1.
▪ When the STOP Mode is the same as the Port Mode: the value is read-only and is set to the same value as the Station Address for the Port Mode.