CTRTU Protocol
See also: Help for Serial Protocols
Overview
The CTRTU serial downloadable protocol is for communication between a Control Techniques device and an OCS. This is a Master/Slave protocol.
Cscape Configuration
To configure OCS for the CTRTU protocol, select the Protocol Configuration from the Program menu in Cscape software. Select the appropriate protocol type on the desired port. To make sure that the Software is able to configure the equipment for the correct protocol, ensure CTRTU.dll file is in the Protocols directory of the current working/open Cscape.
Configuring CTRTU Device
Following are the steps for configuring CTRTU with Cscape application.
Open Program > Protocol Config and perform the following configurations:
Step 1: Select CTRTU from the drop-down list.
Step 2: On Network Config dialog user can configure following network parameters/status registers.
-
Configure Baud Rate, Parity, Stop Bits, Handshake, Protocol (CTRTU), RS-232/485, Retries and Timeout. The default communications settings are: 19200 baud, No parity, 8 data bits, 2 stop bits, No handshaking and RS485 communications mode.
-
Configure the update Scan type as automatic or manual according to process requirements.
-
Configure the (optional/recommended) network status register.
Step 3: Device Settings: Click Devices button to configure Slave device as follows:
-
Configure slave device name and Target Node Id (1-253)
-
If option for Swap Words on 32-bit Data is checked, the high and low 16-bit values of 32-bit Data are swapped when transferred between the target and OCS.
Setting up OCS with CTRTU Protocol using Pass through connection with CTNet
In Device Settings:
Select Access Node Via CTNet Network
-
Network Bridge Node ID = Node address for unit connected via serial CTRTU
-
Network Bridge Port ID = Slot number where SMS module is located (3 is nearest the power connector)
-
Target Node ID = CTNet Address of Target Node (1-253)
Setting up Unidrive SP drives for CTNet
SMS Applications Module can be loaded into Ports 1, 2 or 3 (3 is nearest the power connector)
If SMS is located at port 3 then the module uses Parameter Menu 17 (Slot 2 = Parameter Menu 16 and Slot 1 = Parameter Menu 15)
17.23 is the CTNet node address (0 to 255 Valid node address from 1 to 255. Setting the node address to 0 disables the CTNet interface.)
17.24 is the CTNet Baud rate (0 to 2 0 = 5.0 Mbit/s 1 = 2.5 Mbit/s 2 = 1.25 Mbit/s)
17.36 is the CTNet status:
-3 = Network reconfig issued
-2 = Initialisation failure, (check node address and data rate)
-1 = Network Reconfig has been detected
0 = Token accepted but not receiving any messages
>0 = Number of CTNet messages per second
Select Stop on Error or Retry on Error as per process requirement.
NOTE: For details on Unidrive Parameters list and updates, please see www.controltechniques.com.
Step 4: Click Scan List button to configure Data Mapping.
To transfer data between the OCS and remote target, a Scan List must be created that defines each transaction. Each mapping entry (transaction) contains the source and destination registers, the number of consecutive registers transferred, the direction of the transfer and trigger for transfer (optional).
Enter the desired parameter address in the Device Register field or use ">" button to view parameter range details.
The 32 bit Parameter mapping is handled differently than it is for 16 bit parameters.
32-bit access allows two local (OCS) 16-bit registers to be treated as a single 32-bit value. For example, if the value in either 16-bit register is modified, both registers are written to the device.
For Unidrive SP 32-bit parameters (20.21 to 20.40). If using Polled Read Write Update Type then the maximum length should not be greater than 1 per Scan List index entry.
Network Communication Errors
In order to access the Network statistics, user must assign the “Network status register” in network configuration. The table below gives the details of statistics.
Number | Statistics | Location | Description |
---|---|---|---|
|
|
|
|
1 |
Update interval exceeded count |
%Rx |
This register explains number of times that the actual transaction scan time to complete all transactions exceeded specified update interval. Generally used as an indicator that an excessive number of triggered transfers or failed communication retries are occurring that is lengthening the expected transaction scan time.
If the Update interval is set to zero (update as fast as possible), this 32-bit register alternately specifies the actual transaction scan time in mSec resolution. |
2 |
No response count |
%R(x+2) |
This register explains number of times that a device(s) did not respond to a transaction. This includes ALL failed transaction, not just those after the retry count is exceeded. |
3 |
Corrupt Response Count |
%R(x+4) |
This register explains number of times that a device(s) returned an invalid or failed response to a transaction. This includes ALL failed.
Transaction, not just those after the retry count is exceeded. |
4 |
Valid Response Count |
%R(x+6) |
This register explains total number of valid responses. |
NOTE: %Rx: 32-bit network status register configured in Network configuration. For example: %R500(501).
Device Communication Errors
Error | Error Number | Description |
---|---|---|
INVALID_BLOCK |
-203 |
Invalid size for data type. |
NO_RESPONSE_FROM_PLC |
-204 |
Timeout while waiting for remote node response. |
INVALID_RESPONSE_FROM_PLC |
-205 |
Corrupted response from remote node. |
INVALID_INITIALISATION |
-207 |
Internal Error - Unable to open port. |
Connection Details
Illustrations below show the various end-of-cable connectors required:
25-Pin D-Type Male | 10-Pin Weidmuller
Cage Clamp |
8-Pin RJ 45 Plug | 9-Pin DB Male |
CN1 | CN1 | MJ1/MJ2 | Port 1 |
RS485 Connection - CTRTU
Port 1 — DB9 (Female at OCS end)
MJ1/MJ2 — RJ45 (Female at OCS end)
CN1 — 10-Pin Weidmuller Cage Clamp (Female at OCS end)
CN1 — DB25 (Female at OCS end)
NOTES:
-
Do not connect to unlisted pins.
-
Recommended Cable: Beldon 9503, twisted multipair, screened.
-
Connect the screens together at the shield / earth pin of the PLC.
RS422 Connection
Port 1 — DB9 (Female at OCS end)
MJ1/MJ2 — RJ45 (Female at OCS end)
CN1 — 10-Pin Weidmuller Cage Clamp (Female at OCS end)
CN1 — DB25 (Female at OCS end)
NOTES:
-
Do not connect to unlisted pins.
-
Recommended Cable: Beldon 9503, twisted multipair, screened.
-
Connect the screens together at the shield / earth pin of the PLC.