Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeContact

The text of a manual · part 36 of 38

DL06 Micro PLC User Manual, Volume 2 of 2, pages 350 to 359

Pages 350 to 359 of 370

The original document is the PDF (6.0 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 Direct Logic DL06

Page 350

Appendix J: European Union Directives (CE)

Items Specific to the DL06 • The rating between all circuits in this product are rated as basic insulation only, as appropriate for single fault conditions.

1 • There is no isolation offered between the PLC and the analog inputs of this product. 2 • It is the responsibility of the system designer to earth one side of all control and power circuits, and to earth the braid of screened cables. • This equipment must be properly installed while adhering to the guidelines of the in house PLC 3 installation manual DA–EU–M, and the installation standards IEC 1000–5–1, IEC 1000–5–2 and IEC 1131–4. 4 • It is a requirement that all PLC equipment must be housed in a protective steel enclosure, which limits access to operators by a lock and power breaker. If access is required by operators or untrained personnel, the equipment must be installed inside an internal cover or secondary enclosure. A 5 warning label must be used on the front door of the installation cabinet as follows: Warning: Exposed terminals and hazardous voltages inside. H • It should be noted that the safety requirements of the machinery directive standard EN60204–1 state that all equipment power circuits must be wired through isolation transformers or isolating power supplies, and that one side of all AC or DC control circuits must be earthed. 7 • Both power input connections to the PLC must be separately fused using 3 amp T type anti–surge fuses, and a transient suppressor fitted to limit supply overvoltages. 10 • If the user is made aware by notice in the documentation that if the equipment is used in a manner not specified by the manufacturer the protection provided by the equipment may be impaired. 9 10 J 12 13 14 A B C D DL06 Micro PLC User Manual, 3rd Edition Rev. A

J-9

Page 351

INTRODUCTION TO SERIAL COMMUNICATIONS

ENDIX A PPENDIX

K

In this Appendix Introduction to Serial Communications . . . . . . . . . . . . . . . . . . . . . .K–2

Page 352

Appendix K: Introduction to Serial Communications

Introduction to Serial Communications

Wiring standard Communications protocol Communications parameters

Each of these will be discussed in more detail as they apply to DirectLOGIC PLCs.

Wiring Standards

K–2

1 Signal GND

GND RXD

0V

3

RXD

RXD

4

TXD

TXD

TXD

TXD

RXD

CTS PORT1 6P6C Phone Jack

RTS

RTS

Port 1 Connections

CTS

Port 2 Connections

OR Loop Back

10

Signal GND

1

15

Point-to-point DTE Device

11

6

There are three different wiring standards that can be used with DirectLOGIC PLCs: RS-232C, RS-422 and RS-485. RS-232C is a point-to-point wiring standard with a practical wiring distance of 15 meters, or 50 feet, maximum. This means that only two devices can communicate on an RS-232C network, a single master device and a single slave device, and the total cable length cannot exceed 50 feet. Belden® 8102, or equivalent, is recommended for RS-232C networks.

5

1 2 3 4 E 6 7 H 9 10 K 12 13 14 A B C D

DirectLOGIC® PLCs have two built-in serial communiction ports which can be used to communicate to other PLCs or to other serial devices. In order to fully understand the capabilities and limitations of the serial ports, a brief introduction to serial communications is in order. There are three major components to any serial communications setup:

RTS CTS

RS-422 is a multi-point wiring standard with a practical wiring distance 0f 1000 meters, or 3280 feet, maximum total length. The RS-422 wiring standard does not specify a network topology, but in practice, a daisy-chain topology with the master at one end is the only way to ensure network reliablility. Belden 8102, or equivalent is recommended for RS-422 networks. Use a terminating resistor equal in value to the characteristic impedance of the cable being used (100 액 for Belden 8102). RXD+ RXD– TXD+ TXD– Signal GND

The recommended cable for RS422 is Belden 8102 or equivalent.

DL06 Micro PLC User Manual, 3rd Edition Rev. A

9 TXD+ 10 TXD– 13 RXD+ 6 RXD– 11 RTS+ 12 RTS– 14 CTS+ 15 CTS– 7 0V

Termination Resistor at both ends of network PORT 2 Master

Page 353

Appendix K: Introduction to Serial Communications RS-485 is a multi-point wiring standard with a practical wiring distance of 4000 feet maximum. This wiring standard provides for the possibility of up to 32 masters communicating to up to 32 slaves all within the maximum distance of 4000 feet. Note that while the RS-485 wiring standard provides for multiple masters on the same network, the DirectLOGIC PLCs do not support multiple masters on a single network. The RS-485 wiring standard does not specify a network topology, but in practice, a daisy-chain topology with the master at one end is the only way to ensure network reliablility. Belden 9841, or equivalent is recommended for RS-485 networks. Use a terminating resistor equal in value to the characteristic impedance of the cable being used (120 액 for Belden 9841).

1 2 3 4 E 6 7 H 9 10 Communications Protocols K A communications protocol is the ‘language’ the devices on a network use to communicate with each other. All the devices on the network must use the same communications protocol in order to be able to communicate with each other. The protocols avalable in the 12 DirectLOGIC PLCs are listed in the following table. Communications Protocols 13 Protocol Master Slave Port 1* Port 2 RS-232C RS-422 RS-485** 14 Direct A * Port 1 supports slave only and is only RS-232C with fixed communications parameters of 9600 B baud, 8 data bits, 1 start bit, 1 stop bit, odd parity and station address 1. It is an asynchronous, halfduplex DTE port and auto-selects between K-Sequence, DirectNET and MODBUS RTU protocols. ** RS-485 is available on Port 2 for MODBUS RTU protocol only. C K-Sequence protocol is not available for use by a master DL06 PLC. Therefore, it cannot be used for networking between PLCs. Its primary use in the DL06 PLC is as a slave to D DirectSOFT programming software and to an operator interface. Termination Resistor

TXD+ / RXD+

TXD+ / RXD+

TXD+ / RXD+

TXD– / RXD–

Signal GND

TXD– / RXD–

Signal GND

Signal GND

Connect shield to signal ground

RXD–

1

11

11

6

RXD–

6

1

0V

0V

RTS+

TXD+

RXD+

RTS+

TXD+

RTS–

CTS+

RXD+

Cable: Use Belden 9841 or equivalent

CTS–

15

10

5

10

5

15

TXD–

TXD–

DL06 CPU Port 2

No Yes Yes Out

RTS–

CTS+

CTS–

K-Sequence NET MODBUS RTU ASCII

TXD– / RXD–

DL06 CPU Port 2

Yes Yes Yes In

Yes Yes Yes No

Yes Yes Yes Yes

Yes Yes Yes Yes

Yes Yes Yes Yes

DL06 Micro PLC User Manual, 3rd Edition Rev. A

No No Yes No

K–3

Page 354

Appendix K: Introduction to Serial Communications

1 2 3 4 E 6 7 H 9 10 K 12 13 14 A B C D K–4

DirectNET protocol is available for use by a master or by a slave DL06 PLC. This, and the fact that it is ‘native’ protocol, makes it ideal for PLC-to-PLC communication over a pointto-point to multipoint network usijg the RX and WX instructions. MODBUS RTU protocol is a very common industry standard protocol, and can be used by a master or slave DL06 to communicate with a wide variety of industrial devices which support this protocol. ASCII is another very common industry standard protocol, and is commonly used where alpha-numeric character data is to be transferred. Manyh input devices, such as, barcode readers and electronis scales use ASCII protocol, and many output devices accept ASCII commands, as well. It doesn’t matter which wiring standard or protocol is used, there are several communications parameters to select for each device before they will be able to communicate. These parameters include: Baud Rate Data Bits Parity Stop Bits Station Address

Flow Control Echo Suppression Timeouts Delay Times Format

All of these parameters may not be necessary, or available, for your application. The parameters used will depend on the protocol being used and whether the device is a master or slave. NOTE: The point to remember is that when there is the same parameter available in the master and in the slave (i.e. Baud Rate, Parity, Stop Bits, etc), the settings must match.

DL06 Micro PLC User Manual, 3rd Edition Rev. A

Page 355

Appendix K: Introduction to Serial Communications Communications Port 2

DL06 Port Specifications Communications Port 1 Connects to HPP, DirectSOFT 5, operator interfaces, etc. 6-pin, RS232C Communication speed (baud): 9600 (fixed) Parity: odd (fixed) Port 1 Station Address: 1 (fixed) 8 data bits 1 start, 1 stop bit Asynchronous, half-duplex, DTE Protocol (auto-select): K-sequence (slave only), DirectNET (slave only), MODBUS (slave only)

Connects to HPP, DirectSOFT 5, operator interfaces, etc. 15-pin, multifunction port, RS232C, RS422, RS485 (RS485 with 2-wire is only available for MODBUS and Non-sequence). Communication speed (baud): 300, 600, 1200, 2400, 4800, 9600, 19200, 38400 Parity: odd (default), even, none Port 2 Station Address: 1 (default) 8 data bits 1 start, 1 stop bit Asynchronous, half-duplex, DTE Protocols can be pre-selected: K-sequence (slave only), DirectNET (master/slave), MODBUS (master/slave), non-sequence/print/ASCII in/out

DL06 Port Pinouts Port 2 Pin Descriptions Port 1 Pin Descriptions 1 2 3 4 5 6

0V Power (-) connection (GND) 5V Power (+) connection RXD Receive data (RS-232C) TXD Transmit data (RS-232C) 5V Power (+) connection 0V Power (-) connection (GND)

1 5V Power (+) connection 2 TXD Transmit data (RS-232C) 3 RXD Receive data (RS-232C) 4 RTS Ready to send (RS-232C) 5 CTS Clear to send (RS232C) 6 RXD- Receive data (-) (RS-422/485) 7 0V Power (-) connection (GND) 8 0V Power (-) connection (GND) 9 TXD+ Transmit data (+) (RS-422/485) 10 TXD- Transmit data (-) (RS-422/485) 11 RTS+ Ready to send (+) (RS-422/485) 12 RTS- Ready to send (-) (RS-422/485) 13 RXD+ Receive data (+) (RS-422/485) 14 CTS+ Clear to send (+) (RS-422/485) 15 CTS- Clear to send (-) (RS-422/485)

Note that the default configuration for port 2 is: Auto-detect among K-Sequence, DirectNET, and MODBUS RTU protocols Timeout = Base Timeout x 1 (800 ms) RTS on delay time = 0 ms RTS off delay time = 0 ms Station Number = 1 Baud rate = 19200 Stop bits = 1 Parity = odd Format = Hex

1 2 3 4 E 6 7 H 9 10 K 12 13 14 A B C D

Echo Suppression = RS-422/485 (4-wire) or RS-232C

DL06 Micro PLC User Manual, 3rd Edition Rev. A

K–5

Page 356

Appendix K: Introduction to Serial Communications

Port Setup Using DirectSOFT 5 or Ladder Logic Instructions

1 2 3 4 E 6 7 H 9 10 K 12 13 14 A B C D K–6

Port 2 on the DL06 can be configured for communicatiojns using the various protocols which have been previously mentioned. Also, the communications parameters can be configured to match the parameters in the other device(s) with which the PLC will be communicating. The port may be configured using the DirectSOFT 5 PLC programming software, or by using ladder logic within the PLC program. It is important to note that the settings for port 2 are never saved to disk with DirectSOFT 5, so if you are using port 2 in other than it’s default configuration (see page K-6) it is a good idea to include the port setup in the ladder program, typically on a first scan bit, or in an initialization subroutine. To setup port 2 using DirectSOFT 5 the PLC must be turned on and connected to DirectSOFT 5. If the PLC Setup toolbar is displayed, either select the Port 2 button or select PLC > Setup > Setup Sec. Comm Port... from the menu bar located at the top of the programming window. A dialog box like the one below will appear. Make the appropriate settings and write them to the PLC.

In order to setup port 2 in your relay ladder logic the appropriate values must be written to V7655 (Word 1), V7656 (Word 2) and V7650 (Word 3, for ASCII only) to specify the settings for the port. Then write the ‘setup complete’ flag (K0500) to V7657 (Word 3) to request the CPU to accept the port settings. Once the CPU sees the ‘setup complete’ flag in V7657 it will test the port settings which have selected for validity, and then change the value in V7657 according to the results of this test. If the port settings are valid, the CPU will change the value in V7657 to 0A00 (‘A’ for Accepted). If there was an error in the port settings, the CPU will change the value in V7657 to 0E00 (‘E’ for Error). NOTE: This is a Helpful Hint. Rather than build the setup words manually from the tables, use DirectSOFT 5 to setup the port as desired then use a Dataview to view the setup words as BCD/HEX. Then simply use these numbers in the setup code.

The data that is written to the port setup words has two formats. The format that is used depends on whether K-Sequence, DirectNET, MODBUS RTU (method 1) or ASCII (method 2) is selected.

DL06 Micro PLC User Manual, 3rd Edition Rev. A

Page 357

Appendix K: Introduction to Serial Communications

Port 2 Setup for RLL Using K-Sequence, DirectNET or MODBUS RTU V7655 (Word 1)

RTS On-delay

Timeout (% of timeout)

0yyy 0ttt mmmm mxx yyy 000 = 0ms 001 = 2ms 010 = 5ms 011 = 10ms 100 = 20ms 101 = 50ms 110 = 100ms 111 = 500ms

V7656 (Word 2) K-Sequence, DirectNET & MODBUS RTU pps0 ebbb xaaa aaaa

Protocol

RTS Off-delay ttt 000 = 100% 001 = 120% 010 = 150% 011 = 200% 100 = 500% 101 = 1000% 110 = 2000% 111 = 5000% mmmmm 10000 = K-Sequence 01000 = DirectNET 00100 = MODBUS RTU xxx 000 = 0ms 001 = 2ms 010 = 5ms 011 = 10ms 100 = 20ms 101 = 50ms 110 = 100ms 111 = 500ms

Parity

Stop Bits

Echo Suppression

Baud Rate pp 00 = None 10 = Odd 11 = Even s 0 = 1 bit 1 = 2 bits e 0 = 232 or 422 1 = 485, 2 wire bbb 000 = 300 001 = 600 010 = 1200 011 = 2400 100 = 4800 101 = 9600 110 = 19200 111 = 38400

V7656 (Word 2) cont’d

Protocol

Secondary Address

K-Sequence, DirectNET & MODBUS RTU

(DirectNET)

xaaaaaaa (DirectNET)

pps0 ebbb xaaa aaaa x

_aaaaaaa (K-Seq. & MODBUS RTU) K-Sequence: 1-90 DirectNET: 1-90 MODBUS: 1-247

0 = Hex 1 = ASCII

DL06 Micro PLC User Manual, 3rd Edition Rev. A

1 2 3 4 E 6 7 H 9 10 K 12 13 14 A B C D

K–7

Page 358

Appendix K: Introduction to Serial Communications

1 2 3 4 E 6 7 H 9 10 K 12 13 14 A B C D K–8

To setup port 2 for for MODBUS protocol for the following: RTS On-delay of 10ms, Base timeout x1, RTS Off-delay of 5ms, Odd parity, 1 Stop bit, echo suppression for RS232C/RS422, 19,200 baud, Station Number 23 you would use the relay ladder logic shown below. SP0

LD K3022

OUT V7655

LD K8617

OUT V7656

Port 2 Setup for RLL Using ASCII Word 1

RTS On-delay

Timeout (in% of std. timeout)

0yyy 0ttt mmmm mxx yyy 000 = 0ms 001 = 2ms 010 = 5ms 011 = 10ms 100 = 20ms 101 = 50ms 110 = 100ms 111 = 500ms ttt 000 = 100% 001 = 120% 010 = 150% 011 = 200% 100 = 500% 101 = 1000% 110 = 2000% 111 = 5000%

Word 2

Parity

Stop Bits

Echo Suppression (valid for DL06 only)

Baud Rate

K-Sequence, DirectNET & MODBUS RTU pps0 ebbb xaaa aaaa pp s e bbb

00 = None

0 = 1 bit

0 = RS-232C, RS-422 or RS-485 (4 wire)

000 = 300

10 = Odd 11 = Even

1 = 2 bits

1 = RS-485 (2 wire)

001 = 600 010 = 1200 011 = 2400 100 = 4800 101 = 9600 110 = 19200 111 = 38400

DL05/06: V7655

DL05/06: V7656

DL06 Micro PLC User Manual, 3rd Edition Rev. A

Protocol

RTS Off-delay mmmmm 00010 = Non-Sequence xxx 000 = 0ms 001 = 2ms 010 = 5ms 011 = 10ms 100 = 20ms 101 = 50ms 110 = 100ms 111 = 500ms

Page 359

Appendix K: Introduction to Serial Communications

Word 2 cont’d

Protocol Mode

DL05/06: V7656

01110000 = No flow control 01110001 = Xon/Xoff flow control 01110010 = RTS flow control 01110011 = Xon/Xoff and RTS flow control

1 2 3 Word 3 V-memory address for data 4 E To setup port 2 for for Non-sequence (ASCII) communications with the following: RTS On6 delay of 10ms, Base timeout x1, RTS Off-delay of 5ms, Odd parity, 1 Stop bit, echo suppression for RS232-C/RS422, 19,200 baud, 8 data bits, V-memory buffer starting at V2000 and no flow control you would use the relay ladder logic shown below. 7 H 9 10 K 12 13 14 A B C D DL05/06: V7656

Hex value of the V-memory location to temporaily store the ASCII data coming into the PLC. Set this parameter to an unused V-memory location which has enough consecutive memory locations free to store the longest string that will come into the PLC.

SP0

LD

K3012

OUT

V7655

LD

K8670

OUT

V7656

LDA

O2000

OUT

V7650

DL06 Micro PLC User Manual, 3rd Edition Rev. A

K–9