CDN36X User Manual
revision 1.30
Serial Receive Object
Instance 1 is configured to process the 11-character model number UPC
label message packet. The
Receive Mode
is set to
Use Pre-String
,
Use Data
, and
Use Post-
String
fields. The
Pre-String
attribute is set to ‘MODEL ‘, and
Post-String
is set to ‘ A’. These
two strings are used to filter for the model-number message packet. The model number range is
1 to 100, so the
Data Type
is set for USINT with a
Width
of 3, and
Conversion
is set to decimal.
The
Data Size
is 1 byte for USINT.
Serial Receive Object Instance 1 Configuration (Class Code 65 or 0x41)
Attribute
Data
Class / Instance / Attribute / Data
Description
6. Receive Mode
7
0x41 0x01 0x06 0x07
use Data, Pre-String, Post-String fields
7. Pre-String
0x06, ‘MODEL ‘
0x41 0x01 0x07 0x06 0x4D 0x4F 0x44 0x45
0x4C 0x20
Short_String length = 6, ‘MODEL ‘
8. Post-String
0x02, ‘ A’
0x41 0x01 0x08 0x02 0x20 0x41
Short_String length = 2, ‘ A’
9. Data Type
198
0x41 0x01 0x09 0xC6
USINT (8-bit unsigned integer)
11. Width
3
0x41 0x01 0x0B 0x03
3 ASCII bytes to be converted
13. Conversion
‘D’
0x41 0x01 0x0D 0x44
ASCII bytes represent decimal number
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
Serial Receive Object
Instance 2 is configured to process the 9-character serial number UPC
label message packet. The
Receive Mode
is set to
Use Pre-String
and
Use Data
fields. The
Pre-
String
attribute is set to ‘SN: ‘. This string is used to filter for the serial-number message packet.
The serial number range is 1 to 60000, so the
Data Type
is set for UINT with a
Width
of 5, and
Conversion
is set to decimal. The
Data Size
is 2 bytes for UINT.
Serial Receive Object Instance 2 Configuration (Class Code 65 or 0x41)
Attribute
Data
Class / Instance / Attribute / Data
Description
6. Receive Mode
3
0x41 0x02 0x06 0x03
use Data, Pre-String fields
7. Pre-String
0x04, ‘SN: ‘
0x41 0x02 0x07 0x04 0x53 0x4E 0x3A 0x20 Short_String length = 4, ‘SN: ‘
9. Data Type
199
0x41 0x02 0x09 0xC7
UINT (16-bit unsigned integer)
11. Width
5
0x41 0x02 0x0B 0x05
5 ASCII bytes to be converted
13. Conversion
‘D’
0x41 0x02 0x0D 0x44
ASCII bytes represent decimal number
15. Data in I/O Response
1
0x41 0x02 0x0F 0x01
Enable data in I/O response
16. Enabled
1
0x41 0x02 0x10 0x01
Instance 2 enabled
Make sure
Serial Receive Object
instances 3-8 are disabled, since only Instances 1 and 2 are used
in this application. The gateway returns 5 input bytes to the DeviceNet scanner in the I/O
Response Message. The
I/O Produce Size
is 5, with the data organized as follows:
[ Transmit Acknowledge bits ] [ Receive Toggle bits ] [ Instance 1 USINT data ] [ Instance 2 UINT data ]
1
byte
1
byte
1
byte
2
bytes
The gateway is now configured to receive the barcode message packets, convert the embedded
number into either an 8-bit or 16-bit unsigned integer number depending upon the scanned label
type, and return it as input bytes to the DeviceNet scanner.
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
85