CDN36X User Manual
revision 1.30
The next step is to configure the CDN366 gateway to return the ASCII barcode data to the
DeviceNet scanner. Because the content of the ASCII bytes is not known, the entire byte string
will be converted into a Short_String data type. With only one data variable to return, one
Serial
Receive Object
Instance is configured. The
Data Type
is Short_String, with a
Data Size
of 13
(maximum number of expected barcode data bytes is 12, plus the length byte). The
Receive
Mode
is Use Data Field.
Serial Receive Object Instance 1 Configuration (Class Code 65 or 0x41)
Attribute
Data
Class / Instance / Attribute / Data
Description
6. Receive Mode
1
0x41 0x01 0x06 0x01
Use Data Field
9. Data Type
218
0x41 0x01 0x09 0xDA
Short_String
10. Data Size
13
0x41 0x01 0x0A 0x0D
1 length byte, 12 data bytes
15. Data in I/O Response
1
0x41 0x01 0x0F 0x01
Enable data in I/O response
16. Enabled
1
0x41 0x01 0x10 0x01
Instance 1 enabled
Make sure
Serial Receive Object
instances 2-8 are disabled, since only Instance 1 is used in this
application. The gateway will return 15 input bytes to the DeviceNet scanner in the I/O
Response Message. The
I/O Produce Size
is 15, with the data organized as follows:
[ Transmit Acknowledge bits ] [ Receive Toggle bits ] [ Instance 1 Short_String data ]
1
byte
1
byte
13
bytes
The gateway will always return 13 bytes in the I/O Response Message, even if the scanned
barcode data contains fewer bytes. The application should check the Short_String length byte to
determine the number of valid data bytes being returned in a particular I/O Response Message.
Receive synchronization may also be used by enabling the
Sync Enabled
attribute. The
I/O
Produce Size
can be verified by reading the
Serial Stream Object’s
I/O Produce Size
attribute
(class 64, instance 1, attribute 20).
MKS Instruments, Inc.
D.I.P. Products Group
83