CDN36X User Manual
revision 1.30
The parity bit is used to detect single-bit errors in the transmission. The parity bit is
automatically calculated and inserted by the transmitter. The receiver calculates the parity of an
incoming byte, and compares it to the parity bit sent by the transmitter. If the two bit values do
not match, then at least one serial bit value was corrupted during transmission.
Flow control allows the receiving device to regulate the rate of incoming data. Hardware flow
control uses RTS/CTS signals between the devices to control the rate of transmission. Software
flow control uses serial characters XON/OFF to control the rate. Flow control helps protect
against lost data, if the receiving device cannot store incoming data fast enough, or if the
receiving device's buffer is full and cannot accept more data until it processes existing data.
Data Conversion
The CDN36X gateway can either pass through received serial message bytes to your application,
or pre-process an ASCII string into a numerical value. The gateway can transmit a string of
message bytes sent by the application, or it can convert a numerical value into an ASCII string to
be transmitted. Using the gateway’s data conversion feature offloads this cumbersome task from
your application program, especially if it is a PLC ladder-logic application. It also reduces the
required number of DeviceNet input and output bytes, since converted values instead of entire
message strings are transferred over DeviceNet.
The gateway conversion process supports the following data types:
Data Type
Data Size
Value Range
SINT
signed 8-bit integer
1
-128 to 127
INT
signed 16-bit integer
2
-32768 to 32767
USINT unsigned 8-bit integer
1
0 to 255
UINT
unsigned 16-bit integer
2
0 to 65535
REAL 32-bit floating point
4
+1.175E-38 to +3.4028E+38
Short_String (byte array)
2 to 128
string of bytes, 1
st
byte defines length
The
Serial Transmit Object
and
Serial Receive Object
Instances’ attributes configure the
conversion process for transmitted and received messages. The
Data Type
attribute selects the
desired data type for an instance’s
Receive Data
or
Transmit Data
value. The
Data Size
attribute
represents the number of bytes used by the selected data type. You must select the maximum
data size expected for your application if using the Short_String data type. The Short_String
byte array format is a length byte followed by data bytes, so you must add one to the expected
number of bytes. The table above defines the data size for all other data types.
The CDN36X gateway supports a maximum of 128 bytes for the 8
Serial Transmit Object
Instances’
Transmit Data
values and 128 for the 8
Serial Receive Object
Instances’
Receive Data
values, regardless of whether an instance is enabled or not. Configure all unused instances to
USINT or SINT
Data
Type
, because it has a 1 byte
Data Size
.
The
Width
attribute defines the number of ASCII bytes (1 to 16) used to represent a real or
integer number. For received messages,
Width
defines the number of ASCII bytes that will be
converted into a number. For transmitted messages,
Width
defines how many ASCII bytes will
be generated to represent the number. The
Width
value must include ASCII sign (+/-), exponent
(E), and decimal point (.) characters.
Width
is not used for Short_String data types.
MKS Instruments, Inc.
D.I.P. Products Group
19