The text of a manual · part 1 of 8
DN120 DeviceNet Gateway User's Manual, pages 1 to 9
Pages 1 to 9 of 71
The original document is the PDF (1.4 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 Microscan DN-120
Page 1
MICROSCAN.
DN120 DeviceNet Gateway User’s Manual
MICROSCAN.
PN 83-210010 Rev B
Page 2
DN120 DeviceNet Gateway User’s Manual Table of Contents CHAPTER 1 – OVERVIEW ..................................................................................................................................... 4 CHAPTER 2 – INSTALLATION ............................................................................................................................. 5 MOUNTING ............................................................................................................................................................... 5 WIRING ..................................................................................................................................................................... 6 DeviceNet Interface............................................................................................................................................. 6 Serial Channel Interface ..................................................................................................................................... 6 Wiring Examples ................................................................................................................................................. 7 CHAPTER 3 – THEORY OF OPERATION ........................................................................................................... 8 GATEWAY OPERATION ............................................................................................................................................. 8 DeviceNet Object Model ..................................................................................................................................... 8 DeviceNet Interface............................................................................................................................................. 9 Serial Channel Interface ................................................................................................................................... 10 Asynchronous Serial Communication .............................................................................................................................11 Status Information ...........................................................................................................................................................11 Receiving Messages ........................................................................................................................................................12 Stream Mode ..............................................................................................................................................................12 Block Mode................................................................................................................................................................12 Returning Received Data............................................................................................................................................13 Padding Message Data ...............................................................................................................................................13 Re-sending Received Data .........................................................................................................................................14 Transmitting Messages ....................................................................................................................................................15 Synchronization...............................................................................................................................................................15 Receive Sequence Number.........................................................................................................................................15 Transmit Sequence Number .......................................................................................................................................15 Synchronous Handshake Protocol ..............................................................................................................................16
CHAPTER 4 – GATEWAY CONFIGURATION ................................................................................................. 18 CONFIGURE DEVICENET INTERFACE....................................................................................................................... 18 DeviceNet Baud Rate Switch ............................................................................................................................. 18 MAC ID Switches .............................................................................................................................................. 18 Serial Channel Baud Rate / Option Switch ....................................................................................................... 19 POWER UP GATEWAY ............................................................................................................................................. 19 DeviceNet Status LEDs ..................................................................................................................................... 19 Serial Channel Status LEDs .............................................................................................................................. 20 Register EDS File.............................................................................................................................................. 20 CONFIGURE SERIAL CHANNEL ................................................................................................................................ 21 CONFIGURE DEVICENET MASTER SCAN LIST ......................................................................................................... 26 Poll Consume Size............................................................................................................................................. 26 Poll Produce Size .............................................................................................................................................. 26 CHAPTER 5 – DEVICENET SPECIFICATIONS................................................................................................ 27 DEVICENET MESSAGE TYPES ................................................................................................................................. 27 DEVICENET CLASS SERVICES ................................................................................................................................. 27 DEVICENET OBJECT CLASSES................................................................................................................................. 27 IDENTITY OBJECT ............................................................................................................................................. 28 ROUTER OBJECT ................................................................................................................................................ 29 DEVICENET OBJECT.......................................................................................................................................... 30 ASSEMBLY OBJECT........................................................................................................................................... 31 CONNECTION OBJECT ...................................................................................................................................... 32 SERIAL STREAM OBJECT................................................................................................................................. 34 CHAPTER 6 – RSNETWORX CONFIGURATION EXAMPLE .................................................................... 36 CONFIGURE DEVICENET INTERFACE....................................................................................................................... 37
Microscan Systems, Inc.
2
Page 3
DN120 DeviceNet Gateway User’s Manual CONNECT & REGISTER EDS FILE ........................................................................................................................... 37 CONFIGURE SERIAL CHANNEL ................................................................................................................................ 45 CONFIGURE DEVICENET MASTER SCAN LIST ......................................................................................................... 52 CHAPTER 7 – CONFIGURATION EXAMPLES ................................................................................................ 59 EXAMPLE 1 – RECEIVING FIXED-LENGTH DATA .................................................................................................... 59 Barcode Scanner ............................................................................................................................................... 59 DN120 Gateway ................................................................................................................................................ 59 EXAMPLE 2 – RECEIVING PRE-DELIMITED DATA ................................................................................................... 61 Barcode Scanner ............................................................................................................................................... 61 DN120 Gateway ................................................................................................................................................ 61 EXAMPLE 3 – RECEIVING POST-DELIMITED DATA ................................................................................................. 63 Barcode Scanner ............................................................................................................................................... 63 DN120 Gateway ................................................................................................................................................ 63 EXAMPLE 4 – TRANSMITTING FIXED-LENGTH DATA .............................................................................................. 65 Bar Code Scanner ............................................................................................................................................. 65 DN120 Gateway ................................................................................................................................................ 65 EXAMPLE 5 – TRANSMITTING VARIABLE-LENGTH DATA ....................................................................................... 67 Bar Code Scanner ............................................................................................................................................. 67 DN120 Gateway ................................................................................................................................................ 67 CHAPTER 8 – TROUBLESHOOTING................................................................................................................. 68 APPENDIX A – PRODUCT SPECIFICATIONS.................................................................................................. 69 DEVICENET INTERFACE .......................................................................................................................................... 69 SERIAL CHANNEL ................................................................................................................................................... 69 ENVIRONMENTAL ................................................................................................................................................... 69 APPENDIX B – DEVICENET TEMPLATE ......................................................................................................... 70 APPENDIX C – ASCII CHARACTER CODES.................................................................................................... 71
Microscan Systems, Inc.
3
Page 4
DN120 DeviceNet Gateway User’s Manual
Chapter 1 – Overview This document describes how to install, configure, and operate the DN120 series of serial to DeviceNet gateways. The following products are covered in this user manual: Part Number DN120
Serial Channel RS232 full duplex
The DN120 gateways allow you to easily interface a wide variety of serial devices to any DeviceNet industrial control network. Each gateway contains the feature-packed D.I.P. DeviceNet core. Standard DN120 products are tightly packaged and sealed in a rugged industrial case. Board-level and customized gateways are also available upon request. Serial Status LEDs (RX, TX)
Isolated Serial Channel (male DB9 connector)
Serial Baud Rate Rotary Switch
Mounting Holes DN120
DeviceNet MAC ID Rotary Switches
DeviceNet Status LEDs (NET, MOD) DeviceNet Baud Rate Rotary Switch
DeviceNet Channel (male 5-pin micro connector)
Product Features • • • • • • • • • • • • •
500V isolated serial channel RS232 with RTS/CTS flow control XON/XOFF software flow control 300, 600, 1200, 2400, 4800, 9600, 19200 bps serial data rates Configurable parity 64 byte transmit and receive FIFO buffers Powered from DeviceNet 24VDC Loss-of-ground protection circuitry DeviceNet slave mode supports POLL and EXPLICIT messages Rotary switches set DeviceNet baud rate and MAC ID Rotary switch sets serial data rate 4 bi-color status LEDs Encapsulated circuit board in compact industrial case
Microscan Systems, Inc.
4
Page 5
DN120 DeviceNet Gateway User’s Manual
Chapter 2 – Installation This chapter describes how to install and connect the DN120 gateway to a DeviceNet network and your serial device. Mounting Mount on a horizontal or vertical surface. While the RTV encapsulation protects its circuitry, the DN120 serial channel connector is not rated for NEMA4 / IP65 environments. Mount the gateway in a suitable location or enclosure for your application. The gateway will generate up to 1.4W of heat, so provide sufficient clearance and airflow to maintain 0°C to 70°C operating temperature range. Use two screws (not provided) in the 0.19 inch mounting holes shown below to fasten the DN120 to the mounting surface. 1.25
All dimensions are inches
0.65
0.45 3.80 4.30 3.30 0.50 0.12 Mtg. Holes (2) 0.19 DIA.
1.225
1.225
0.725 0.625 DIA. On Case Wall
0.70 0.542 1.10
Microscan Systems, Inc.
5
Page 6
DN120 DeviceNet Gateway User’s Manual Wiring The DN120 requires two connections – one to the DeviceNet network (male 5-pin micro connector) and one to the target serial device (male DB9 connector). Follow all applicable electrical codes in your area when mounting and wiring any electrical device. All power is received from the DeviceNet network. The DN120 draws up to 50mA from the 24VDC power supply. Select your DeviceNet cables and power supply so that it can provide sufficient current for all networked devices at their peak operating power. DeviceNet Interface Male 5-Pin Micro Connector DRAIN
V+
CAN_L VPIN 1 2 3 4 5
CAN_H SIGNAL DRAIN V+ VCAN_H CAN_L
COLOR NONE RED BLACK WHITE BLUE
DESCRIPTION Cable shield or drain wire. DeviceNet 24VDC(+) power. DeviceNet 24VDC(-) power. Communication signal. Communication signal.
Serial Channel Interface Male DB9 Serial Connector
1
2
6
3
7
4
8
5
9
DN120 (RS232) PIN 1 2 3 4 5 6 7 8 9
SIGNAL NC RXD TXD NC GND NC RTS CTS NC
Microscan Systems, Inc.
DESCRIPTION No Connect. Do not connect any wires to NC pins. Receive Data. RS232 input signal. Transmit Data. RS232 output signal. No Connect. Ground. Common for RS232 signals. No Connect. Request To Send. RS232 output signal. Clear To Send. RS232 input signal. No Connect.
6
Page 7
DN120 DeviceNet Gateway User’s Manual Wiring Examples The following are typical DN120 gateway wiring configurations. Your RS232 or RS422/485 interface may vary. Refer to your device’s documentation for the required data and control signals. Simple RS232 Interface
RS232 Serial Device
2 RXD 3 TXD 5 GND
RXD 2 TXD 3 GND 5
DN120
1 2 3 4 5
DRAIN VDC+ VDCCAN H CAN L
DN120
1 2 3 4 5
DRAIN VDC+ VDCCAN H CAN L
RS232 Interface, HW Flow Control
RS232 Serial Device
2 3 5 7 8
RXD TXD GND RTS CTS
Microscan Systems, Inc.
RXD TXD GND RTS CTS
2 3 5 7 8
7
Page 8
DN120 DeviceNet Gateway User’s Manual
Chapter 3 – Theory of Operation This chapter describes how the DN120 gateway operates. You should have a working knowledge of DeviceNet and asynchronous serial communications before continuing. The Open DeviceNet Vendors Association (www.odva.com) is a good source for general DeviceNet information. Refer to your serial device documentation for its protocol information. Gateway Operation The DN120 gateway receives asynchronous serial messages over its serial channel and returns the received bytes as input data to the DeviceNet master. The gateway transmits bytes sent as output data from the DeviceNet master out its serial channel. The following diagram shows the major gateway components.
DeviceNet Poll Command output data
DC:DC Power Conversion • 24VDC DeviceNet power input • VDC for Core & DeviceNet channel • isolated VDC for serial channel
5-pin male micro connector
Male DB9 connector Gateway Core • microcontroller • RAM • Flash ROM
DeviceNet Poll Response input data
DeviceNet Channel • 24VDC power • communications
DeviceNet Object or Rotary Switches Configures the DeviceNet interface baud rate and MAC ID address.
serial messages
Serial Channel • communications • flow control
Serial Stream Object
Configures the serial channel. Receives and transmits serial messages. Controls optional synchronization.
DeviceNet Object Model The DeviceNet Specification defines an Object Model that consists of Objects and Attributes. An Object is a predefined software process, and an Object Attribute is a data value used or generated by that process. An Object Instance is one occurrence of an Object, operating on its unique set of Attribute values. The DN120 gateway has six different Object Classes, or types. Five are standard objects defined by the DeviceNet Specification (Identity, Router, DeviceNet, Assembly, Connection). One is a device-specific object defined for the DN120 gateway (Serial Stream). The Serial Stream Object configures and controls the serial channel. It receives and packages serial data into DeviceNet input bytes, and transmits DeviceNet output bytes as serial data. Chapter 5 contains detailed information on each DeviceNet object class, instance, and their associated attributes. Microscan Systems, Inc.
8
Page 9
DN120 DeviceNet Gateway User’s Manual DeviceNet Interface The DN120 gateway operates as a DeviceNet slave. It supports Explicit Messages and Polled I/O Messages of the predefined master/slave connection set. The Explicit Unconnected Message Manager (UCMM) is not supported. There are four independent processes operating in a DN120 gateway application. The first process is the exchange of input and output data between the user application program and the DeviceNet master. The second process is the exchange of input and output data between the gateway and DeviceNet master, using Polled I/O messaging. The third process is receiving serial messages and converting it to input data. The fourth process is converting output data and transmitting it as serial messages. The DeviceNet Polled I/O Message process consists of the DeviceNet master sending output data to the DN120 in the form of a Poll Command message, and the DN120 returning input data to the DeviceNet master in a Poll Response message. The output and input data bytes are typically mapped into data files inside the DeviceNet master. These data files are exchanged with the user application program. The application processes the received input data from the gateway and writes new output data to the DeviceNet master, which sends them to the gateway. The Polled I/O data exchange typically occurs at a faster rate than the serial transmit and receive operation, because the DeviceNet baud rate is much greater than the serial channel baud rate. The DN120 has transmit and receive buffers to handle the slower serial processes. The gateway also provides synchronization features to ensure delivery of received messages to the application program, and transmission of application messages out the serial channel. Input File
Inputs DeviceNet Poll Response input data
Receive Message Packet
Outputs Output File DeviceNet Poll Command output data DeviceNet Master
Transmit Message Packet
Serial Device
Application Program DN120 Gateway
DeviceNet network
Microscan Systems, Inc.
9