CDN36X User Manual
revision 1.30
Serial Transmit Object
Instance 2 is configured to transmit the last part of Message #1 (‘xxx F’,
<CR>, <LF>). It receives an integer value from the DeviceNet scanner, converts it to 3 ASCII
characters, builds a message packet, and transmits it. The
Transmit Mode
is
Use Data
and
Use
String1 After Data
.
String1
is [‘ F‘, <CR>, <LF>]. The
Data Type
is INT, to cover the –50 to
400 range. The
Width
is 3, and the
Conversion
is set for decimal with no leading zeros.
Serial Transmit Object Instance 2 Configuration (Class Code 66 or 0x42)
Attribute
Data
Class / Instance / Attribute / Data
Description
6. Transmit Mode
9
0x42 0x02 0x06 0x09
Use Data, String1 After
7. String1
0x04 ‘ F‘ CR LF
0x42 0x02 0x07 0x04 0x20 0x46 0x0D 0x0A Short String length = 4, ‘ F‘ <CR> <LF>
9. Data Type
195
0x42 0x02 0x09 0xC3
INT (16-bit signed integer)
11. Width
3
0x42 0x02 0x0B 0x03
convert to 3 ASCII bytes
13. Conversion
1
0x42 0x02 0x0D 0x01
represent integer in decimal
15. Data in I/O Command
1
0x42 0x02 0x0F 0x01
enable data in I/O command
Se
rial Transmit Object
Instance 3 is configured to transmit Message #2. It receives no data from
the DeviceNet scanner, but is instead triggered by the
Transmit Toggle
bit. Set the
Data Type
to
USINT, to minimize the
Data Size
to 1 byte, and
Width
to 1. The
Transmit Mode
is set to
Use
String1 Before
. String1 is [‘ALARM’, CR, LF].
Serial Transmit Object Instance 3 Configuration (Class Code 66 or 0x42)
Attribute
Data
Class / Instance / Attribute / Data
Description
6. Transmit Mode
2
0x42 0x03 0x06 0x02
Use String1 Before
7. String1
0x07, ‘ALARM‘, CR,
LF
0x42 0x03 0x07 0x41 0x4C 0x41 0x52 0x4D
0x0D 0x0A
Short String length = 7, ‘ALARM‘
<CR> <LF>
9. Data Type
198
0x42 0x03 0x09 0xC6
USINT (8-bit unsigned integer)
11. Width
1
0x42 0x03 0x0B 0x01
convert to 1 ASCII bytes
15. Data in I/O Command
1
0x42 0x03 0x0F 0x01
Enable data in I/O command
Make sure the Serial Transmit Object instances 4-8 are disabled, since only Instances 1-3 are
used in this application. The gateway expects to receive 7 output bytes from the DeviceNet
scanner in the I/O Command Message. The I/O Produce Size is 7, with the data organized as
follows:
[ TX Toggle bits 000000xx ] [ RX Acknowledge bits ] [ Inst 1 data ] [ Inst 2 data ] [ Inst 3 data ]
1 byte
1 byte
2 bytes
2 bytes 1 byte
The application should send Instance 1 and Instance 2 data bytes at the same time, so that the
values can be converted and transmitted sequentially to build Message #1. Instance 1 will build
its message packet first and load it into the transmit buffer. Instance 2 will build its message
next and load it into the transmit buffer. The result is the transmission of the entire Message #1
string, complete with temperature values in C and F. Because the gateway does not support a
NULL data byte, the scanner must still send a data value to Instance 3. The Instance does not
use the byte, but instead is triggered by its
Transmit Toggle
bit to send Message #2.
Transmit synchronization must be used. The application toggles Instance 1 and 2
Transmit
Toggle
bits in the I/O Command Message when it sends new temperature values, and monitors
Instance 1 and 2
Transmit Acknowledge
bits to tell when the message has been sent. The
application toggles Instance 3
Transmit Toggle
bit to transmit Message #2, and monitors the
Instance 2
Transmit Acknowledge
bit to tell when the message has been sent.
MKS Instruments, Inc.
D.I.P. Products Group
89