The text of a manual · part 22 of 60
DL205 PLC User Manual, Volume 1 of 2, pages 211 to 220
Pages 211 to 220 of 598
The original document is the PDF (12 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the AutomationDirect D2-04TD1, AutomationDirect D2-08TD2, AutomationDirect D2-16ND3-2, AutomationDirect D2-32ND3, Konnect-It D2-04TD1, Koyo D2-04TD1, Konnect-It D2-08TD2, Koyo D2-08TD2, and 5 more models
Page 211
Chapter 4: System Design and Configuration
Network Modbus RTU Master Operation (DL260 only)
1 2 3 4 Master 5 6 Slave #1 Slave #2 Slave #3 7 8 Modbus RTU Protocol 9 Modbus Function Codes Supported 10 The Modbus function code determines whether the access is a read or a write, and whether to access a single data point or a group of them. The DL260 supports the Modbus function 11 codes described below. Modbus Function Code Function DL205 Data Types Available 12 13 14 A B C D section describes how the DL260 can communicate on a Modbus RTU network as a 230 This master using the MRX and MWX read/write instructions. These instructions allow you to 240 enter native Modbus addressing in your ladder logic program with no need to perform octalconversions. Modbus is a single-master, multiple-slave network. The master is the 250-1 to-decimal only member network that can initiate requests on the network. This section teaches you 260 how to designofthetherequired ladder logic for network master operation.
01
Read a group of coils
02
Read a group of inputs
05
Set / Reset a single coil (slave only)
Y, C, T, CT
15
Set / Reset a group of coils
Y, C, T, CT
03, 04
Y, C, T, CT X, SP
Read a value from one or more registers
V
06
Write a value into a single register (slave only)
V
07
Read Exception Status
V
08
Diagnostics
V
16
Write a value into a group of registers
V
DL205 User Manual, 4th Edition, Rev. D
4-45
Page 212
Chapter 4: System Design and Configuration
1 2
3 4 5 6 7 8 9 10 11 12 13 14 A B C D
Modbus Port Configuration In DirectSOFT, choose the PLC menu, then Setup, then “Secondary Comm Port.” 230
• Port: From the port number list box at the top, choose “Port 2.”
240
• Click the check box to the left of “MODBUS” (use AUX 56 on the HPP, and select “MBUS”), and then you’ll see the dialog box below.
250-1 260
• Amount of time the port will wait after it sends a message to get a response before logging an error.
• On Delay Time: The amount of time between raising the RTS line and sending the data. • Off Delay Time: The amount of time between resetting the RTS line after sending the data. • Number: For making the CPU port a Modbus master, choose “1.” The possible range for Modbus slave numbers is from 1 to 247. Each slave must have a unique number. At powerup, the port is automatically a slave, unless and until the DL06 executes ladder logic MWX/MRX network instructions which use the port as a master. Thereafter, the port reverts back to slave mode until ladder logic uses the port again. • Rate: The available baud rates include 300, 600, 900, 2400, 4800, 9600, 19200, and 38400 baud. Choose a higher baud rate initially, reverting to lower baud rates if you experience data errors or noise problems on the network. Important: You must configure the baud rates of all devices on the network to the same value. Refer to the appropriate product manual for details. • Bits: Choose 1 or 2 stop bits for use in the protocol. • Choose none, even, or odd parity for error checking. • Suppression: Select the appropriate radio button based on the wiring configuration used on port 2.
Then click the button indicated to send the Port configuration to the CPU, and click Close.
4-46
DL205 User Manual, 4th Edition, Rev. D
Page 213
Chapter 4: System Design and Configuration
RS–485 Network (Modbus Only)
1 2 3 4 5 6 7 8 9 10 11 RS–232 Network Normally, the RS–232 signals are used for shorter distances (15 meters maximum), for 12 communications between two devices. Port 2 Pin Descriptions (DL260 only) 1 13 2 3 14 4 5 6 A 7 8 B 9 10 11 C 12 CPU Port 2 ASCII Device 13 D 14 signals are for longer distances (1000 meters maximum), and for multi-drop networks. 230 RS–485 Use termination resistors at both ends of RS–485 network wiring, matching the impedance 240 rating of the cable (between 100 and 500 ohms). 250-1 260 Termination Resistor
TXD+ / RXD+
TXD+ / RXD+
TXD+ / RXD+
TXD– / RXD–
Signal GND
Signal GND
Signal GND
RXD–
6
6
11
1
1
7
0V
0V
RTS+
TXD+
TXD– / RXD–
TXD– / RXD–
RXD+
11
7
RTS+
TXD+
RTS–
RXD–
RTS–
RXD+
CTS+
CTS–
15
5
CTS+
Cable: Use AutomationDirect L19954 (Belden 9842) or equivalent
10
TXD–
DL260 CPU Port 2
RXD TXD CTS RTS
Signal GND TXD
RXD
RTS
CTS
CTS–
10
15
TXD–
DL260 CPU Port 2
6
GND
5
1
2
7
11
3
4 5
10
15
15
5V TXD2 RXD2 RTS2 CTS2 RXD2– 0V 0V TXD2+ TXD2 – RTS2 + RTS2 – RXD2 + CTS2 + CTS2 –
5 VDC Transmit Data (RS-232) Receive Data (RS-232) Ready to Send (RS–232) Clear to Send (RS–232) Receive Data – (RS–422/RS-485) Logic Ground Logic Ground Transmit Data + (RS–422/RS–485) Transmit Data – (RS–422/RS–485) Request to Send + (RS–422/RS–485) Request to Send – (RS–422/RS–485) Receive Data + (RS–422/RS–485) Clear to Send + (RS422/RS–485) Clear to Send – (RS–422/RS–485)
DL205 User Manual, 4th Edition, Rev. D
4-47
Page 214
Chapter 4: System Design and Configuration
1
2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D 4-48
Modbus Read from Network (MRX) 230 240 250-1 260
The Modbus Read from Network (MRX) instruction is used by the DL260 network master to read a block of data from a connected slave device and to write the data into V–memory addresses within the master. The instruction allows the user to specify the Modbus Function Code, slave station address, starting master and slave memory addresses, number of elements to transfer, Modbus data format and the Exception Response Buffer.
• Port Number: must be DL260 Port 2 (K2) • Slave Address: specify a slave station address (1–247) • Code: the MRX instruction supports the following Modbus function codes: 01 – Read a group of coils 02 – Read a group of inputs 03 – Read holding registers 04 – Read input registers 07 – Read Exception status • Slave Memory Address: specifies the starting slave memory address of the data to be read. See the table on the following page. • Master Memory Address: specifies the starting memory address in the master where the data will be placed. See the table on the following page. • of Elements: specifies how many coils, input, holding registers or input registers will be read. See the table on the following page. • Modbus Data Format: specifies Modbus 584/984 or 484 data format to be used. • Response Buffer: specifies the master memory address where the Exception Response will be placed. See the table on the following page.
DL205 User Manual, 4th Edition, Rev. D
Page 215
Chapter 4: System Design and Configuration
MRX Slave Memory Address MRX Slave Address Ranges Function Code
Modbus Data Format
01 – Read Coil 01 – Read Coil 02 – Read Input Status
484 Mode 584/984 Mode 484 Mode
02 – Read Input Status
584/984 Mode
03 – Read Holding Register
484 Mode
03 – Read Holding Register
584/984
04 – Read Input Register
484 Mode
04 – Read Input Register
584/984 Mode
07 – Read Exception Status
484 and 584/984 Mode
Slave Address Range(s) 1–999 1–65535 1001–1999 10001–19999 (5 digit) or 100001–165535 (6 digit) 4001–4999 40001–49999 (5 digit) or 4000001–465535 (6 digit) 3001–3999 30001–39999 (5 digit) or 3000001–365535 (6 digit) N/A
MRX Master Memory Addresses MRX Master Memory Address Ranges Operand Data Type
DL260 Range
Inputs⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠ Outputs⸠ ⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠ Control Relays⸠ ⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠ Stage Bits⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠ Timer Bits⸠ ⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠ Counter Bits⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠ Special Relays⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠ V–memory⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠ Global Inputs⸠ ⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠ Global Outputs⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠
X Y C S T CT SP V GX GY
0–1777 0–1777 0–3777 0–1777 0–377 0–377 0–777 All 0–3777 0–3777
MRX Number of Elements Number of Elements Operand Data Type
DL260 Range
V–memory⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠ Constant⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠
V K
All (see page 3-56) Bits:1–2000 Registers: 1-125
MRX Exception Response Buffer Exception Response Buffer Operand Data Type V–memory⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠
DL260 Range V
All (see page 3-56)
DL205 User Manual, 4th Edition, Rev. D
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D 4-49
Page 216
Chapter 4: System Design and Configuration
1
2
3 4 5 6 7 8 9 10 11 12 13 14 A B C D 4-50
Modbus Write to Network (MWX) 230 240 250-1 260
The Modbus Write to Network (MWX) instruction is used to write a block of data from the network master (DL260) memory to Modbus memory addresses within a slave device on the network. The instruction allows the user to specify the Modbus Function Code, slave station address, starting master and slave memory addresses, number of elements to transfer, Modbus data format and the Exception Response Buffer. •
Port Number: must be DL260 Port 2 (K2). • Slave Address: specify a slave station address (0–247). • Code: the MWX instruction supports the following Modbus function codes: 05 – Force Single coil 06 – Preset Single Register 08 – Diagnostics 15 – Force Multiple Coils 16 – Preset Multiple Registers • Slave Memory Address: specifies the starting slave memory address where the data will be written. • Master Memory Address: specifies the starting address of the data in the master that is to written to the slave. • of Elements: specifies how many consecutive coils or registers will be written to. This field is only active when either function code 15 or 16 is selected. • Modbus Data Format: specifies Modbus 584/984 or 484 data format to be used. • Response Buffer: specifies the master memory address where the Exception Response will be placed.
DL205 User Manual, 4th Edition, Rev. D
Page 217
Chapter 4: System Design and Configuration
MWX Slave Memory Address MWX Slave Address Ranges Function Code
Modbus Data Format
05 – Force Single Coil 05 – Force Single Coil 06 – Preset Single Register
484 Mode 584/984 Mode 484 Mode
06 – Preset Single Register
584/984 Mode
15 – Force Multiple Coils 15 – Force Multiple Coils 16 – Preset Multiple Registers
484 584/984 Mode 484 Mode
16 – Preset Multiple Registers
584/984 Mode
Slave Address Range(s) 1–999 1–65535 4001–4999 40001–49999 (5 digit) or 400001–465535 (6 digit) 1–999 1–65535 4001–4999 40001–49999 (5 digit) or 4000001– 465535 (6 digit)
MWX Master Memory Addresses MRX Master Memory Address Ranges Operand Data Type
DL260 Range
Inputs⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠ Outputs⸠ ⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠ Control Relays⸠ ⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠ Stage Bits⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠ Timer Bits⸠ ⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠ Counter Bits⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠ Special Relays⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠ V–memory⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠ Global Inputs⸠ ⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠ Global Outputs⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠
X Y C S T CT SP V GX GY
0–1777 0–1777 0–3777 0–1777 0–377 0–377 0–777 All (see page 3-56) 0–3777 0–3777
MWX Number of Elements Number of Elements Operand Data Type V–memory ⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠ Constant ⸠ ⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠
DL260 Range V K
All (see page 3-56) Bits: 1–2000 Registers: 1-125
MWX Exception Response Buffer Exception Response Buffer Operand Data Type V–memory ⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠⸠
DL260 Range V
All (see page 3-56)
DL205 User Manual, 4th Edition, Rev. D
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D 4-51
Page 218
Chapter 4: System Design and Configuration
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D 4-52
MRX/MWX Example in DirectSOFT DL260 port 2 has two Special Relay contacts associated with it (see Appendix D for comm port special relays). One indicates “Port busy”(SP116), and the other indicates ”Port Communication Error”(SP117). The “Port Busy” bit is on while the PLC communicates with the slave. When the bit is off, the program can initiate the next network request. The “Port Communication Error” bit turns on when the PLC has detected an error and use of this bit is optional. When used, it should be ahead of any network instruction boxes since the error bit is reset when an MRX or MWX instruction is executed. Typically, network communications will last longer than one CPU scan. The program must wait for the communications to finish before starting the next transaction. The “Port Communication Error” bit turns on when the PLC has detected an error. Use of this bit is optional. When used, it should be ahead of any network instruction boxes since the error bit is reset when an RX or WX instruction is executed.
Multiple Read and Write Interlocks SP116 will execute every time it attempts to poll the network. You should see this counting up as you enable the MWX and MRX instructions. Some things that would prevent this: 1) Com Port RTS and CTS not jumpered. 2) Port not set up for Modbus RTU. 3) Problem in logic that is not allowing the MWX or MRX to enable.
CNT 1
Port 2 busy bit
Number of times that the PLC has tried to poll network
_FirstScan
CTO K9999
SP116
SP0
SP117 will come on when: 1) The slave device sends an "Exception Response." If this occurs, look at the V-memory location associated with that instruction and consult the MODICON Modbus manual for details. 2) Cabling problem. Consult wiring diagram in user manual and verify. 3) Setting for communications are not matching. For example: Baud rates, parities, stop bits all must match. 4) Polling a slave address number that doesn't exist. Under good conditions, SP116 will be counting up and SP117 will not. You will get an occasional error in many field environments that introduce electrical/RF noise into the application. Each application will dictate what allowable "percentage" of error is acceptable. Anything below 10% typically does not affect the throughput very much. Port 2 error bit
2
SP117
_FirstScan
SP0
DL205 User Manual, 4th Edition, Rev. D
CNT Number of times that the PLC has errored
CT1
K9999
Page 219
Chapter 4: System Design and Configuration If you are using multiple reads and writes in the RLL program, you need to interlock the routines to make sure all the routines are executed. If you don’t use the interlocks, then the CPU will only execute the first routine. This is because each port can only handle one transaction at a time. In the example, rungs 3 and 4 show that C100 will get set after the RX instruction has been executed. When the port has finished the communication task, the second routine is executed and C100 is reset. If you’re using RLLPLUS Stage Programming, you can put each routine in a separate program stage to ensure proper execution and switch from stage to stage allowing only one of them to be active at a time.
This rung does a Modbus write to the first holding register 40001 of slave address number one. It writes the values over that reside in V2000. This particular function code only writes to one register. Use function code 16 to write to multiple registers. Only one Network Instruction (WX, RX, MWX, MRX) can be enabled in one scan. That is the reason for the interlock bits. For using many network instructions on the same port, use the Shift Register instruction.
Port 2 Busy bit 3
SP116
Instruction Interlock bit
C100
MWX
Port Number: K2 Slave Address: K1 Function Code: 06 - Preset Single Register Start Slave Memory Address: 40001 Start Master Memory Address: V2000 Number of Elements: n/a Modbus Data Type: 584/984 Mode Exception Response Buffer: V400
Instruction interlock bit C100
( SET )
This rung does a Modbus read from the first 32 coils of slave address number one. It will place the values into 32 bits of the master starting at C0.
Port 2 Busy bit 4
SP116
Instruction Interlock bit
C100
MRX
Port Number: K2 Slave Address: K1 Function Code: 01 - Read Coil Status Start Slave Memory Address: 1 Start Master Memory Address: C0 Number of Elements: 32 Modbus Data Type: 584/984 Mode Exception Response Buffer: V400
Instruction interlock bit C100
( RST )
DL205 User Manual, 4th Edition, Rev. D
1 2 3 4 5 6 7 8 9 10 11 12 13 14 A B C D
4-53
Page 220
Chapter 4: System Design and Configuration
Non–Sequence Protocol (ASCII In/Out and PRINT)
1 Configure the DL260 Port 2 for Non-Sequence Configuring port 2 on the DL260 for Non–Sequence allows the CPU to use port 2 to 2 either read or write raw ASCII strings using the ASCII instructions. See the ASCII In/Out instructions and the PRINT instruction in chapter 5. 3 In DirectSOFT, choose the PLC menu, then “Setup Secondary Comm Port.”
• Port: From the port number list box at the top, choose “Port 2.” 4 • Protocol: Click the check box to the left of “Non–Sequence.” 5 6 7 8 9 10 11 12 • Amount of time the port will wait after it sends a message to get a response before logging an error. 13 •R TS On Delay Time: The amount of time between raising the RTS line and sending the data. • R TS Off Delay Time: The amount of time between resetting the RTS line after sending the data. 14 •D ata Bits: Select either 7–bits or 8–bits to match the number of data bits specified for the connected devices. A •B aud Rate: The available baud rates include 300, 600, 900, 2400, 4800, 9600, 19200, and 38400 baud. Choose a higher baud rate initially, reverting to lower baud rates if you experience data errors or noise problems on the network. Important: You must configure the baud rates of all devices on B the network to the same value. Refer to the appropriate product manual for details. • S top Bits: Choose 1 or 2 stop bits to match the number of stop bits specified for the connected C devices. •P arity: Choose none, even, or odd parity for error checking. Be sure to match the parity specified D for the connected devices. 230 240
250-1 260
• Address: Starting V-memory address for ASCII In data storage.
4-54
DL205 User Manual, 4th Edition, Rev. D