
DN120 DeviceNet Gateway User’s Manual
Microscan Systems, Inc.
59
Chapter 7 – Configuration Examples
This chapter contains four example gateway configurations.
Example 1 – Receiving Fixed-Length Data
Read UPC labels into a PLC using a serial barcode scanner, a DN120 gateway, and a DeviceNet
scanner (master). The barcode scanner RS232 channel is connected to a DN120 serial channel.
The DN120 DeviceNet channel is connected to the PLC DeviceNet scanner. The DeviceNet
network is powered by an external 24VDC power supply.
Barcode Scanner
The barcode scanner’s RS232 channel is set for 9600 bps, 8 data bits, no parity, and 1 stop bit.
When it reads a UPC label, it transmits a 5-byte serial message, which consists of the 5 ASCII
characters printed on the UPC label.
DN120 Gateway
The receive mode will be
Stream Mode
, since there is no defined Delimiter for the start of a
message or the end of a message. All received data bytes will be returned as DeviceNet input
bytes. The
Maximum Receive Size
is 5, because the Barcode Scanner messages have a fixed
length of 5 bytes. The data bytes will be returned as a Short_String. The gateway will only
return the data bytes once in a Poll Response Message.
The
Serial Stream Object
can now be configured. The following shows the
Serial Stream Object
attribute settings for this application. The 3rd column lists the address string if using
Set_Attribute_Single commands to write the attribute values.
Serial Stream Object
Configuration (Class Code 64 or 0x40)
Attribute
Data
Class / Instance / Attribute / Data
Description
6. Baud Rate
0
0x40 0x01 0x06 0x00
0 = 9600 bps
7. Parity
0
0x40 0x01 0x07 0x00
0 = no parity
10. Flow Control
2
0x40 0x01 0x0A 0x02
2 = CTS / RTS
13. Max Receive Size
5
0x40 0x01 0x0D 0x05
Fixed message size of 5 bytes
14. Data Format
00000001
0x40 0x01 0x0E 0x01
String Format = Short_String
15. Block Mode
00000000
0x40 0x01 0x0F 0x00
The gateway will return 6 bytes of Receive Data, because the Maximum Receive Size is set to 5
and the data format is Short String (add 1 for length byte). The Status and Receive Sequence
Number bytes are not enabled. The Poll Produce Size can now be calculated for this DN120
configuration.
PLC & DeviceNet Scanner
Power
Supply
CDN066
Gateway
DeviceNet network
UPC labels
Barcode Scanner
RS232