www.schneider-electric.com
Table of Contents
Safety Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . About the Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter 1 DeviceNet Slave Device Driver . . . . . . . . . . . . . . . . . . .
System Structure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Target Machine Serial Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Cable Diagrams. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Supported Device Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Consecutive Equipment Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . Environment Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . I/O Manager Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Driver Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Device Address Configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5 7 9
10 11 15 17 19 20 21 22 24
Safety Information
Important Information
NOTICE Read these instructions carefully, and look at the equipment to become familiar with the device before trying to install, operate, or maintain it. The following special messages may appear throughout this documentation or on the equipment to warn of potential hazards or to call attention to information that clarifies or simplifies a procedure. The addition of this symbol to a Danger or Warning safety label indicates that an electrical hazard exists, which will result in personal injury if the instructions are not followed. This is the safety alert symbol. It is used to alert you to potential personal injury hazards. Obey all safety messages that follow this symbol to avoid possible injury or death.
DANGER
DANGER indicates an imminently hazardous situation, which, if not avoided, will result in death or serious injury.
WARNING
WARNING indicates a potentially hazardous situation, which, if not avoided, can result in death, serious injury, or equipment damage.
CAUTION
CAUTION indicates a potentially hazardous situation, which, if not avoided, can result in injury or equipment damage.
PLEASE NOTE Electrical equipment should be installed, operated, serviced, and maintained only by qualified personnel. No responsibility is assumed by Schneider Electric for any consequences arising out of the use of this material. A qualified person is one who has skills and knowledge related to the construction and operation of electrical equipment and the installation, and has received safety training to recognize and avoid the hazards involved. 2009 Schneider Electric. All Rights Reserved.
At a Glance
Document Scope This manual describes the device driver communication settings in the VijeoDesigner screen editing software. Vijeo-Designer enables you to design Magelis target machines that communicate with PLCs, drives, field devices, and other equipment. For more information about Vijeo-Designer and Magelis target machines, please refer to Vijeo-Designer user documentation. Validity Note The data and illustrations found in this book are not binding. We reserve the right to modify our products in line with our policy of continuous product development. The information in this document is subject to change without notice and should not be construed as a commitment by Schneider Electric. Documentation Conventions Target Machine: Human-Machine Interface (HMI) that runs user applications designed in Vijeo-Designer screen editing software. A target machine is also known as a terminal.
WARNING
LOSS OF CONTROL The designer of any control scheme must consider the potential failure modes of control paths and, for certain critical control functions, provide a means to achieve a safe state during and after a path failure. Examples of critical control functions are emergency stop and overtravel stop. Separate or redundant control paths must be provided for critical control functions. System control paths may include communication links. Consideration must be given to the implications of unanticipated transmission delays or failures of the link.* Each implementation of a Magelis XBTGT, HMISTO, HMISTU, XBTGH, XBTGK, XBTGC, iPC, and XBTGTW must be individually and thoroughly tested for proper operation before being placed into service. Failure to follow these instructions can result in death, serious injury, or equipment damage. * For additional information, refer to NEMA ICS 1.1 (latest edition), Safety Guidelines for the Application, Installation, and Maintenance of Solid State Control. User Comments We welcome your comments about this document. You can reach us by e-mail at techcomm@schneider-electric.com.
1
Subject of this Chapter This chapter explains the DeviceNet Slave Device Driver. What's in this Chapter? This chapter contains the following topics:
Topic System Structure Target Machine Serial Interface Cable Diagrams Supported Device Addresses Consecutive Equipment Addresses Environment Setup I/O Manager Configuration Driver Configuration Device Address Configuration Page 10 11 15 18 20 21 22 23 25
System Structure
Overview The following table describes the basic system setup for connecting the target machine to a DeviceNet network. To view a cable connection diagram for a particular communication format, see Cable Diagrams. Connection
Series Any DeviceNet Master Link I/F DeviceNet Slave Unit Comm. Format DeviceNet Diagram Cable Diagram 1
10
Magelis XBTGK, XBTGC2000, and XBTGT2000 Series or higher All XBTGK and XBTGT2000 Series and higher target machines have two COM ports: COM1 and COM2. The XBTGC2000 Series has one COM port: COM1. XBTGH2000 Series (Junction Box) has one COM port: COM1. COM1 is a 9-pin SUBD male connector and COM2 is an RJ45 socket. The following tables illustrate the pin layout for these target machines.
11
RS-232C
Pin Number Symbol 1 2 3 4 5 6 7 8 9 CD RD(RXD) SD(TXD) ER(DTR) GND DR(DSR) RS(RTS) CS(CTS) CI(RI) Description Carrier Detect Receive Data Transmit Data Data Terminal Ready Common Ground Data Set Ready Request to Send Send Possible Called status display or +5V 5% output 0.25A
RS-422
Pin Number Symbol 1 2 3 4 5 6 7 8 9 RDA RDB SDA ERA GND CSB SDB CSA ERB Description Receive Data A Receive Data B Send Data A Data Terminal Ready A Common Ground Send Possible B Send Data B Send Possible A Data Terminal Ready B
Note: When making your own connections, attach a loop back between pins 6 (CSB) and 9 (ERB), and between 4 (ERA) and 8 (CSA). To simplify the wiring, you can use the COM Port Conversion Adapter (Schneider Electric: XBTZGCOM) and Terminal Block Conversion Adapter (Schneider Electric: XBTZG949). These accessories allow access to the RS422 signal lines using screw terminals. For information on the signals of the screw terminals, see the user manual for the XBTZG949.
12
WARNING
LOSS OF CONTROL When making your own connections, use shielded RJ45 connectors. The shielded connector provides isolation against noise and provides a secure physical connection in the RJ45 socket. Using an improper RJ45 plug could lead to loose cable connections resulting in loss of control. Failure to follow these instructions can result in death, serious injury, or equipment damage. COM2 supports RS-422/485 signals only.
Pin Number Symbol 1 2 3 4 5 6 7 8 GND Common Ground D1(+) D0(-) Send Data (Positive Signal) Send Data (Negative Signal) Description
Magelis XBTGT1000, XBTGT1005, HMISTO, and HMISTU Series XBTGT1000, XBTGT1005, HMISTO, and HMISTU Series machines come with one COM port which uses an RJ45 connector. The RJ45 socket closest to the power connector is the COM1 port. This COM port can act as either an RS-232C or RS422/485 interface.
13
WARNING
LOSS OF CONTROL When making your own connections, use shielded RJ45 connectors. The shielded connector provides isolation against noise and provides a secure physical connection in the RJ45 socket. Using an improper RJ45 plug could lead to loose cable connections resulting in loss of control. Failure to follow these instructions can result in death, serious injury, or equipment damage. RS-232C.
Pin Number Symbol 1 2 3 4 5 6 7 8 GND Common Ground RD(RXD) SD(TXD) Description Receive Data Transmit Data
RS-232C.
Pin Number Symbol 1 2 3 4 5 6 7 8 GND Common Ground D1(+) D0(-) Send Data (Positive Signal) Send Data (Negative Signal) Description
14
Cable Diagrams
Schneider Electric recommends using the following diagrammed connections. When creating your own cables, to identify which pins to connect on the target machine, see Target Machine Serial Interface. Note: Ensure that the equipment is properly grounded as indicated in the user manual and follows all applicable country standards. When signal lines overlap as shown below, it indicates a twisted pair.
15
Diagram 1 - DeviceNet To connect the target machine and the PLC, use the recommended cables and accessories.
Target Machine XBTGK Series (DeviceNet Slave Unit) or XBTGT2000 Series or higher (DeviceNet Slave Unit) Cable / Adapter a DeviceNet Connector and DeviceNet Cable Comments
DANGER
ELECTRIC SHOCK Isolate local ground connection for each component of interconnected equipment. There is a risk of electric shock when connecting a PLC cable to a target machine, as the two may be at different electrical potentials, even if both are separately connected to ground. Failure to follow these instructions can result in death or serious injury.
WARNING
LOSS OF CONTROL To reduce communication interference as a result of electromagnetic interference, use shielded twisted-pair cables. Connect the cable shields, then connect the cable to a single-point ground on the HMI side. Failure to follow these instructions can result in death, serious injury, or equipment damage.
Note: The first and last stations on the network should be terminated with 121 ohm 1/4 Watt resistors.
16
Shield
4 CAN_H 3 SHIELD
17
WARNING
UNINTENDED EQUIPMENT OPERATION Design your system to avoid conflicting write processes between the target machine and PLC program. Values on the PLC and target machine will be incorrect if: The target machine and PLC program attempt to simultaneously write to the same register. PLC programs or other devices write 16-bit word values to registers being accessed in a bitwise manner. Failure to follow these instructions can result in death, serious injury, or equipment damage. The following tables list the device address ranges you can enter from the Device Address keypad. For actual device address ranges supported by the PLC, refer to the corresponding PLC manual. I/O I/O is process data that is exchanged between the DeviceNet Slave Unit (target machine) and the DeviceNet master (PLC). This data is continuously updated and is available to the application.
Device Input
*1*3 * 2*3
16 bit L/H*4
32 bit L/H*4
Output
*1 Read-modify-write. When you write to one of these bit addresses, the target machine reads the entire word address, sets the defined bit, then returns the new value to the PLC. If the ladder program writes data to this word address during the bit read/write process, the resulting data may be incorrect. *2 Read-only. *3 Range shown is the maximum range supported by the DeviceNet Slave (target machine). Actual maximum depends on the input and output area allocated to the slave (target machine) by the DeviceNet Master (PLC).
18
Example Configuration XBTGT/XBTGK target machine configured with 32 Words Input and Output. Rockwell SLC 5/05 with 1747-SDN module maps the target machines Inputs to address %I:2.32 and Outputs to %Q:2.16.
DeviceNet Master (PLC) I/O Layout I:2.0 I:2.1 : : I:2.32 I:2.34 : I:2.63 I:2.64 : O:2.0 O:2.1 : : O:2.16 O:2.17 : O:2.47 O:2.48 : Target Machine I/Q Memory Area I000 I001 : : I031 I032 : : : : Q000 Q001 : : Q031 Q032 : : : :
Not Used
Not Used
*4 16-bit and 32-bit data, High and Low, refer to data as defined in the following examples.
19
WARNING
UNINTENDED EQUIPMENT OPERATION Read and understand the instructions in this section to ensure data is properly transferred. If you do not follow these instructions, incorrect data could be written to the PLC and the target machine, which could result in unintended system operation. Failure to follow these instructions can result in death, serious injury, or equipment damage. The DeviceNet Slave interface module transfers all 128 bytes of data (both input and output) back and forth from the target machine and the PLC and stores it in memory.
20
Environment Setup
Overview The following table lists the default communication settings for the target machine and the range of possible settings for the DeviceNet PLC equipment. After the PLC is configured, the settings of the target machine must match that of the PLC. For details on setting up the PLC, refer to the corresponding PLC manual. For details on the target machine configuration, see Driver Configuration.
Target Machine Settings MAC Address Driver Baud Rate Input Size Output Size 0 Auto 0 0
PLC Settings 0 - 63 125, 250, 500, Auto (Kb/s) 0 - 128 words 0 - 128 words
21
22
Driver Configuration
Overview
WARNING
UNINTENDED EQUIPMENT OPERATION Read and understand the instructions in this section to ensure data is properly transferred. If you do not follow these instructions, incorrect data could be written to the PLC and the target machine, which could result in unintended system operation. Failure to follow these instructions can result in death, serious injury, or equipment damage. To configure the communication settings of the driver in the target machine, use the Driver Configuration dialog box. Make sure the settings match those of the PLC. For an overview of the driver settings, see Environment Setup. Note: For information on how to display the [Driver Configuration] dialog box, see the online help.
23
Screen Description
Area Manufacturer Driver MAC Address MAC Address Baud Rate Input Size Output Size Description Displays the name of the equipment manufacturer. Displays the driver used to connect the target machine to the equipment. Defines the address of the target machines DeviceNet Slave interface module. Defines the address of the target machines DeviceNet Slave interface module. Select 125, 250, 500 or Auto. Select the rate at which data is transferred between the target machine slave and the PLC master. Defines the number of words input to the PLC master. Range from 0 128 words. Defines the number of words output from the PLC master. Range from 0 - 128 words.
24
WARNING
UNINTENDED EQUIPMENT OPERATION Read and understand the instructions in this section to ensure data is properly transferred. If you do not follow these instructions, incorrect data could be written to the PLC and the target machine, which could result in unintended system operation. Failure to follow these instructions can result in death, serious injury, or equipment damage. To set up a PLC variable in the Variable List, use the Device Address Keypad from the variable properties. See Supported Device Addresses. Note: For information on how to display the Device Address Keypad, see the online help. Screen example of Device Address Keypad
25
Screen Description
Description Lists the PLC devices. Enter the device address number here. When mapping an integer, float, or string variable to a PLC device, you can enter only even addresses. When mapping a discrete variable to a PLC device, you can enter both odd or even addresses. In the Address field, click the ellipsis [...] to display the [Address Selector] keypad, which assists you in entering a valid device address.
Bit
Available when mapping discrete variables to a PLC device. Lists the available bits (0.7).
26