D.I.P. CDN366 User manual

Manual is about: CDN36X Series DeviceNet Gateway CDN366 – 1 isolated RS232 channel CDN367 – 1 isolated RS422/RS485 channel

Summary of CDN366

  • Page 1

    Cdn36x series devicenet gateway user manual cdn366 – 1 isolated rs232 channel cdn367 – 1 isolated rs422/rs485 channel.

  • Page 2

    Cdn36x user manual revision 1.30 table of contents chapter 1 – overview ......................................................................................................................................4 chapter 2 – installation ......................................................................

  • Page 3

    Cdn36x user manual revision 1.30 serial transmit object..............................................................................................................................51 chapter 6 – rsnetworx ™ configuration example.....................................................................52...

  • Page 4

    Cdn36x user manual revision 1.30 chapter 1 – overview this document describes how to install, configure, and operate the cdn36x series of serial to devicenet gateways. The following products are covered in this user manual: part number fw rev. Serial channel cdn366 2.04 or higher rs232 full duplex c...

  • Page 5

    Cdn36x user manual revision 1.30 chapter 2 – installation this chapter describes how to install and connect the cdn36x gateway to a devicenet network and your serial device. Mounting mount on a horizontal or vertical surface. While the rtv encapsulation protects its circuitry, the cdn36x serial chan...

  • Page 6

    Cdn36x user manual revision 1.30 wiring the cdn36x requires two connections – one to the devicenet network (male 5-pin micro connector) and one to the target serial device (male db9 connector). Follow all applicable electrical codes in your area when mounting and wiring any electrical device. All po...

  • Page 7

    Cdn36x user manual revision 1.30 cdn367 (2-wire rs485 configuration) pin signal description 1 rxa rs485 differential data i/o signal. 2 rxb rs485 differential data i/o signal. 3 tr internal 120 Ω terminating resistor, connected between pins 1 and 3. Connect pin 2 to pin 3 to terminate data signals. ...

  • Page 8

    Cdn36x user manual revision 1.30 cdnx66 2 3 5 rxd txd gnd 1 2 3 4 5 drain vdc+ vdc- can h can l rxd txd gnd 2 3 5 rs232 serial device rs232 interface, hw flow control 7 8 rts cts rts cts 7 8 cdnx67 1 2 3 datab dataa tr 1 2 3 4 5 drain vdc+ vdc- can h can l datab dataa rs485 serial device simple rs48...

  • Page 9

    Cdn36x user manual revision 1.30 chapter 3 – theory of operation this chapter describes how the cdn36x gateway operates. You should have a working knowledge of devicenet and asynchronous serial communications before continuing. The open devicenet vendors association ( www.Odva.Com ) is a good source...

  • Page 10

    Cdn36x user manual revision 1.30 devicenet object model the devicenet specification defines an object model that consists of objects and attributes. An object is a predefined software process, and an object attribute is a data value used or created by that process. An object can have multiple instan...

  • Page 11

    Cdn36x user manual revision 1.30 input file inputs devicenet i/o response input data receive message packet outputs output file devicenet i/o command output data transmit message packet devicenet master cdn36x serial device gateway application program devicenet network the first 2 output data bytes ...

  • Page 12

    Cdn36x user manual revision 1.30 devicenet master mapping of devicenet i/o command and i/o response data devicenet master outputs devicenet i/o command message data output bytes tx toggle byte rx ack byte sto inst 1 tx data sto inst 2 tx data sto inst 3 tx data sto inst 4 tx data sto inst 5 tx data ...

  • Page 13

    Cdn36x user manual revision 1.30 serial channel interface the cdn36x serial channel consists of an asynchronous serial transmitter and receiver. The serial interface is configured and controlled by the serial stream object, serial receive object, and serial transmit object. Serial stream object the ...

  • Page 14

    Cdn36x user manual revision 1.30 serial receive object the serial receive object processes the message packet bytes, converting them into an input data value that is returned to the devicenet master in an i/o response message. The message packet bytes can be converted into a short_string data type (...

  • Page 15

    Cdn36x user manual revision 1.30 example 1 serial receive object instances 1, 4, 5, 7 are configured to use portions of a received message packet. 1) serial stream object configured to capture a 15 byte message packet (length mode, packet length = 15). 0x30 0x31 0x32 0x33 0x34 0x35 0x36 0x37 0x38 0x...

  • Page 16

    Cdn36x user manual revision 1.30 example 2 serial receive object instances 1 & 2 are configured to process two different ascii message strings. Each instance uses unique pre-string and post-string values to identify its message string in the message packet. Instance 1 message string = ‘value = xxx u...

  • Page 17

    Cdn36x user manual revision 1.30 serial transmit object the serial transmit object receives an output data value from the devicenet master in the i/o command message. The object converts the output data into a serial message packet to transmit out the serial channel. The output data format can be a ...

  • Page 18

    Cdn36x user manual revision 1.30 example 1 serial transmit object instances 1 & 2 configured to transmit two different serial messages. 1) serial transmit object instance 1 configured to convert a short_string data output value into message bytes. Devicenet output bytes = [ 0x04 0x30 0x31 0x32 0x33 ...

  • Page 19

    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 t...

  • Page 20

    Cdn36x user manual revision 1.30 the precision attribute is only used for transmitted messages. It defines the number of digits (1 to 6) after the decimal point for a floating-point number. The gateway will automatically add trailing zeros to the converted number if needed. Precision is only used fo...

  • Page 21

    Cdn36x user manual revision 1.30 example 1 – data type = short_string, data size = 9 received ascii data is ‘12345678’. The serial receive object instance coverts this to 9 bytes of receive data, [0x08, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38] or [0x08, ‘12345678’]. The first byte defines the...

  • Page 22

    Cdn36x user manual revision 1.30 serial receive example the following example shows how the cdn36x gateway captures a serial message packet, processes the packet, converts the data into a number, and returns it as a devicenet input value. The gateway’s serial stream object is configured for the list...

  • Page 23

    Cdn36x user manual revision 1.30 serial receive process stx ‘temp = 64 c’ cr etx i/o response message devicenet master cdn36x gateway serial device i/o command message 1) serial device transmits message. Serial data (ascii) t e m p = 6 4 c serial data (hex) 0x02 0x54 0x45 0x4d 0x50 0x20 0x3d 0x20 0x...

  • Page 24

    Cdn36x user manual revision 1.30 serial transmit example the following example shows how the cdn36x gateway receives devicenet output data, converts the data into an ascii string, then builds and transmits a serial message using the converted string. The gateway receives an i/o command message from ...

  • Page 25

    Cdn36x user manual revision 1.30 synchronization there are four independent processes operating in a cdn36x gateway application. The first process is the exchange of input and output data between the user application program and the devicenet master. The second process is the exchange of input and o...

  • Page 26

    Cdn36x user manual revision 1.30 the receive acknowledge bits are bit-mapped into the second byte of the devicenet i/o command message. Serial receive object instance 1 receive acknowledge bit maps to bit 0, instance 2 maps to bit 1, etc. The receive toggle bits are bit-mapped into the second byte o...

  • Page 28

    Cdn36x user manual revision 1.30 chapter 4 – gateway configuration this chapter describes how to configure and operate the cdn36x gateway. You configure the gateway by reading and writing attribute values over its devicenet interface. There are a variety of devicenet configuration tools available. S...

  • Page 29

    Cdn36x user manual revision 1.30 power up gateway connect the gateway to a devicenet network to power up the gateway. Devicenet status leds the cdn36x gateway has two bi-color status leds (net and mod) that indicate operational status. During power-up, the leds cycle through a sequence of alternatin...

  • Page 30

    Cdn36x user manual revision 1.30 register eds file if using a devicenet configuration tool that supports electronic data sheet (eds) files, you should now register the gateway’s eds file with the software. The latest eds file versions can be downloaded from www.Mksinst.Com. Select the eds file that ...

  • Page 31

    Cdn36x user manual revision 1.30 configure serial channel the serial stream object attributes control the physical layer settings for the cdn36x serial channel. These settings apply to all serial transmit and receive operations. The attributes also configure the reception of message packets. Before ...

  • Page 32

    Cdn36x user manual revision 1.30 flow control – selects the method of flow control used across the serial interface. None means there is no flow control over the serial data exchange. The transmitting device can overflow the receiving device’s buffer. Xon/xoff is a software flow control option. Rece...

  • Page 33

    Cdn36x user manual revision 1.30 and 0x03 (etx). You must use the rsnetworx ™ class instance editor (set attribute single command) to write a short_string attribute value. Packet timeout –required for timeout mode. Defines the timeout period between received bytes that indicates the end of a message...

  • Page 34

    Cdn36x user manual revision 1.30 serial receive object settings there are eight identical serial receive object instance attribute sets that can be configured in the cdn36x gateway. This section describes how to configure a single serial receive object instance. Repeat this step for each desired ins...

  • Page 35

    Cdn36x user manual revision 1.30 pre-string attribute defines the byte string for the pre-string field. Data size attribute defines the number of bytes expected in the data field. Post-string attribute defines the byte string for the post-string field. When use pre-string bit is set, the instance se...

  • Page 36

    Cdn36x user manual revision 1.30 the data size attributes for all 8 serial receive object instances must sum to a total less than or equal to 128 bytes, regardless of whether an instance is enabled or not. Set unused instances’ data type attributes to usint or sint, which have 1-byte data size. Widt...

  • Page 37

    Cdn36x user manual revision 1.30 serial transmit object settings there are eight identical serial transmit object instance attribute sets that can be configured in the cdn36x gateway. This section describes how to configure a single serial transmit object instance. Repeat this step for each desired ...

  • Page 38

    Cdn36x user manual revision 1.30 string1 attribute defines the byte string for the string1 before and string1 after fields. Data size attribute defines the number of bytes expected in the data field. String2 attribute defines the byte string for the string2 before and string2 after fields. While the...

  • Page 39

    Cdn36x user manual revision 1.30 equal to 128 bytes, regardless of whether an instance is enabled or not. Set unused instances’ data type attributes to usint or sint, which have a 1-byte data size. Width – required for sint, int, usint, uint, real data types. Defines the number of ascii bytes (1-16)...

  • Page 40

    Cdn36x user manual revision 1.30 configure devicenet master scanlist you must calculate the number of input and output bytes required by your cdn36x configuration before you can add the gateway to the devicenet master scan list. You need to configure the devicenet master to send the specific number ...

  • Page 41

    Cdn36x user manual revision 1.30 i/o produce size the i/o produce size is the size (in bytes) of the i/o response message data field that is sent from the cdn36x to the devicenet master. I/o response data: [tx ack bits 1-8][rx toggle bits 1-8][rx data instance 1] … [rx data instance 8] the first byt...

  • Page 42

    Cdn36x user manual revision 1.30 chapter 5 – devicenet specifications this chapter describes the cdn36x gateway devicenet specifications. Devicenet message types the cdn36x is a group 2 slave device that supports the following message types. Can identifier group 2 message type 10xxxxxx111 duplicate ...

  • Page 43

    Cdn36x user manual revision 1.30 identity object the identity object is required on all devicenet devices. It provides product identification of and general information. Identity object class code 01 (0x01) class attribute access name type value 1 get revision uint 1 2 get max object instance uint 1...

  • Page 44

    Cdn36x user manual revision 1.30 router object the message router object provides a messaging connection point through which a client may address a service to any object class or instance residing in the cdn36x device. Router object class code 02 (0x02) class attribute access name type value 1 get r...

  • Page 45

    Cdn36x user manual revision 1.30 devicenet object the devicenet object contains information about the cdn36x devicenet interface configuration. Devicenet object class code 03 (0x03) class attribute access name type value 1 get revision uint 2 instance attribute access name type value 1 get/set mac i...

  • Page 46

    Cdn36x user manual revision 1.30 assembly object the assembly object instances bind attributes of multiple objects to allow data to or from each object to be sent or received over a single connection. Assembly object class code 04 (0x04) class attribute access name type value 1 get revision uint 2 2...

  • Page 47

    Cdn36x user manual revision 1.30 connection object the connection object instances manage the characteristics of each communication connection. The cdn36x is a group 2 only slave device that supports 1 explicit message connection and 1 i/o message connection. Connection object class code 05 (0x05) c...

  • Page 48

    Cdn36x user manual revision 1.30 16 get consumed path struct of null for explicit message struct for i/o message log. Seg., class usint 0x20 class number usint 0x04 log. Seg., instance usint 0x24 instance number usint 0x02 log. Seg., attribute usint 0x30 attribute number usint 0x03 17 get production...

  • Page 49

    Cdn36x user manual revision 1.30 serial stream object the serial stream object configures the cdn36x serial channel. Serial stream object class code 64 (0x40) class attribute access name type value 1 get revision uint 1 2 get max object instance uint 1 6 get max class identifier uint 7 7 get max ins...

  • Page 50

    Cdn36x user manual revision 1.30 serial receive object the serial receive object instances receive and process serial messages, and send the converted data to devicenet master in the i/o response message. Serial receive object class code 65 (0x41) class attribute access name type value 1 get revisio...

  • Page 51

    Cdn36x user manual revision 1.30 serial transmit object the serial transmit object instances receive data from devicenet master in the i/o command message, convert it and transmit the resulting message out the serial channel. Serial transmit object class code 66 (0x42) class attribute access name ty...

  • Page 52

    Cdn36x user manual revision 1.30 chapter 6 – rsnetworx ™ configuration example this chapter shows how to set up configure a cdn366 gateway using the rockwell software rsnetworx ™ software and your gateway’s electronic data sheet (eds) file. The system configuration uses an allen-bradley 1770-kfd dev...

  • Page 53

    Cdn36x user manual revision 1.30 configure devicenet interface follow instructions in chapter 4 to set the gateway’s rotary switches to 125kbps baud rate and mac id to 03. Connect the gateway to the devicenet network to power it up. During power- up, the net and mod leds cycle through a sequence of ...

  • Page 54

    Cdn36x user manual revision 1.30 2) the following text box should pop up, showing the networks connected to your computer. 3) click on the 1770-kfd-1 + to show all connected devicenet devices. The gateway is at mac id 03, verifying its devicenet connection. It is an unrecognized device until the gat...

  • Page 55

    Cdn36x user manual revision 1.30 4) click cancel to close browse for network window. Select the eds wizard… operation from the tools menu. Click next> to continue. 5) select the register an eds file(s) option and click next>. Mks instruments, inc. D.I.P. Products group 55.

  • Page 56

    Cdn36x user manual revision 1.30 6) select register a single file option. Browse for your gateway’s eds file. You can download the latest eds and icon files from the www.Mksinst.Com website. Click next> when you have the correct path and eds file name in the named: box. 7) the next screen shows the ...

  • Page 57

    Cdn36x user manual revision 1.30 8) the next screen allows you to customize the gateway’s icon for rsnetworx. Click on change icon… 9) the change icon screen pops up. Click browse to enter path for cdn366 icon file. You can download the icon file from www.Mksinst.Com. Mks instruments, inc. D.I.P. Pr...

  • Page 58

    Cdn36x user manual revision 1.30 10) enter the path to cdn366 icon file in the file name: box. Click open to continue. 11) the cdn366 icon should have changed to the proper icon. Click next to continue. Mks instruments, inc. D.I.P. Products group 58.

  • Page 59

    Cdn36x user manual revision 1.30 12) the final step is to finish eds file registration. Click next> to complete the registration process. Click finish to close the eds wizard window. Mks instruments, inc. D.I.P. Products group 59.

  • Page 60

    Cdn36x user manual revision 1.30 13) repeat steps 1, 2, and 3 to browse the devicenet network. Rsnetworx should now recognize the device at mac id 03 as a cdn366 gateway, and display the cdn366 icon. Click cancel when finished. Mks instruments, inc. D.I.P. Products group 60

  • Page 61

    Cdn36x user manual revision 1.30 configure serial channel once the gateway is connected to devicenet and communicating with rsnetworx, you can configure its serial channel. Make sure the gateway is not in the devicenet master scanlist before changing any attribute values. The serial stream object at...

  • Page 62

    Cdn36x user manual revision 1.30 3) rsnetworx displays the following text box while it uploads the network configuration. 4) the following screen displays the online nodes. Mks instruments, inc. D.I.P. Products group 62.

  • Page 63

    Cdn36x user manual revision 1.30 5) left-click on the cdn366 icon to select it. Right-click and select properties from the pop-up menu. You can also double-click on the cdn366 icon to open its properties box. 6) rsnetworx displaces the following text box while is reads cdn366 eds file. Mks instrumen...

  • Page 64

    Cdn36x user manual revision 1.30 7) the cdn366 properties box is displayed. 7) select the parameters tab. You will be prompted for the parameters source. Select the upload button to upload cdn366 parameters from the actual device. All the cdn366 parameters are now shown in the properties window. Mks...

  • Page 65

    Cdn36x user manual revision 1.30 the cdn36x gateway has three object types. The serial stream object is used to configure the serial channel physical interface. This object will be configured in this section. The serial receive object and serial transmit object are in the next sections. Mks instrume...

  • Page 66

    Cdn36x user manual revision 1.30 8) select the serial stream object from the groups pull-down menu to view this object’s parameters. You may now edit the serial stream object attributes in this window. Note that the pre-delimiter list and post-delimiter list attributes are not listed. These attribut...

  • Page 67

    Cdn36x user manual revision 1.30 select the set_attribute_single service code to write an attribute value, and the get_attribute_single service code to read an attribute value. Check values in decimal box to enter class, instance, attribute, and data values in decimal. The pre-delimiter list address...

  • Page 68

    Cdn36x user manual revision 1.30 delimiter mode – click on … to open selection box. Click on check box to select the desired option. The delimiter mode uses bits 0, 1, 2 of the byte. Ignore the remaining bits 3 through 7. Timeout – click on current value to change. Enter the desired timeout in milli...

  • Page 69

    Cdn36x user manual revision 1.30 configure serial receive object instances there are eight identical serial receive object instance parameter sets that can be configured in the cdn366 gateway. The following describes how to configure serial receive object instance 1. Program the other instances usin...

  • Page 70

    Cdn36x user manual revision 1.30 select the set_attribute_single service code to write an attribute value, and the get_attribute_single service code to read an attribute value. Check values in decimal box to enter class, instance, attribute, and data values in decimal. The pre-string address is clas...

  • Page 71

    Cdn36x user manual revision 1.30 data type – click on current value to change. Enter decimal number of desired data type. Data size – click on current value to change. Enter the desired short_string data size in bytes (2-128). Do not enter a data size for integer or real number data types. Width – c...

  • Page 72

    Cdn36x user manual revision 1.30 configure serial transmit object instances there are eight identical serial transmit object instance parameter sets that can be configured in the cdn366 gateway. The following describes how to configure serial transmit object instance 1. Program the other instances f...

  • Page 73

    Cdn36x user manual revision 1.30 select the set_attribute_single service code to write an attribute value, and the get_attribute_single service code to read an attribute value. Check values in decimal box to enter class, instance, attribute, and data values in decimal. The string1 address is class 6...

  • Page 74

    Cdn36x user manual revision 1.30 data type – click on current value to change. Enter decimal number of desired data type. Data size – click on current value to change. Enter the desired short_string data size in bytes (2-128). Do not enter a data size for integer or real number data types. Width – c...

  • Page 75

    Cdn36x user manual revision 1.30 configure devicenet master scanlist after all the object instances have been configured, the devicenet master can be configured for polled i/o or change-of-state i/o messaging with the gateway. The following example shows how to configure a polled i/o connection. 1) ...

  • Page 76

    Cdn36x user manual revision 1.30 4) select the scanlist tab. Rsnetworx prompts you for the scanner configuration. Click upload to upload current 1747-sdn configuration from the node. Rsnetworx displays the upload progress. 5) the next window shows the available devices: that can be added to the 1747...

  • Page 77

    Cdn36x user manual revision 1.30 6) select the automap on add checkbox if you want rsnetworx to automatically map the cdn366 input and output bytes into the 1747-sdn memory. 7) select the cdn366 under available devices: and click the > button to transfer to scanlist. Mks instruments, inc. D.I.P. Pro...

  • Page 78

    Cdn36x user manual revision 1.30 8) rsnetworx warns that the cdn366 does not contain any i/o data. Click ok to continue. 8) click on the edit i/o parameters button. Use the ∧ and ∨ buttons to set rx size: to the calculated i/o consume size value and the tx size: to the calculated i/o produce size va...

  • Page 79

    Cdn36x user manual revision 1.30 10) rsnetworx prompts if you want to download the changes to the 1747-sdn. Click yes. 11) select the input tab to view the automapped cdn366 input bytes. Mks instruments, inc. D.I.P. Products group 79.

  • Page 80

    Cdn36x user manual revision 1.30 12) click the advanced… button to view current input mapping detail. Change the mapping to suit your application. Click apply mapping button after you make changes. Click yes at the rsnetworx prompt to download any changes to the 1747-sdn. Click close to continue. 13...

  • Page 81

    Cdn36x user manual revision 1.30 14) click the advanced… button to view current input mapping detail. Change the mapping to suit your application. Click apply mapping button after you make changes. Click yes at the rsnetworx prompt to download any changes to the 1747-sdn. Click close to continue. Mk...

  • Page 82

    Cdn36x user manual revision 1.30 chapter 7 – configuration examples this chapter contains four example gateway configurations. Example 1 – receiving data read upc labels into a plc using a serial barcode scanner, a cdn366 gateway, and a devicenet scanner (master). The barcode scanner rs232 channel i...

  • Page 83

    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 ret...

  • Page 84

    Cdn36x user manual revision 1.30 example 2 – receiving delimited data using the same configuration as example 1, the scanned upc labels are printed in one of two formats: [ model xxx a ] and [ sn: xxxxx ]. The first format is a model number, and ‘xxx’ are 3 ascii characters that represent a number f...

  • Page 85

    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 ...

  • Page 86

    Cdn36x user manual revision 1.30 example 3 – transmitting data print an ascii string from a plc to a serial printer, using a cdn366 gateway and a devicenet scanner (master). The text message string can be from 1 to 64 characters long, including any ascii control characters. The serial printer rs232 ...

  • Page 87

    Cdn36x user manual revision 1.30 make sure serial transmit object instances 2-8 are disabled, since only instance 1 is used in this application. The gateway expects to receive 67 output bytes from the devicenet scanner in the i/o command message. The i/o produce size is 67, with the data organized a...

  • Page 88

    Cdn36x user manual revision 1.30 example 4 – transmitting delimited data using the same configuration as example 3, the cdn366 gateway is configured to print two specific text messages. For one message, the gateway converts two integer variables and inserts it into the text. The second message conta...

  • Page 89

    Cdn36x user manual revision 1.30 serial transmit object instance 2 is configured to transmit the last part of message #1 (‘xxx f’, , ). 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...

  • Page 90

    Cdn36x user manual revision 1.30 mks instruments, inc. D.I.P. Products group 90 chapter 8 – troubleshooting problem possible cause devicenet configuration program does not recognize gateway. • register gateway eds file with configuration program. Devicenet configuration program does not recognize ga...

  • Page 91

    Cdn36x user manual revision 1.30 appendix a – product specifications devicenet interface power requirements: 11 - 28 vdc @ 50 ma loss of ground: yes reverse polarity: -30 vdc signal levels: iso11898 serial channel isolation: 500 volts esd protection: +/- 10 kv overload protection: +/- 30 volts short...

  • Page 92

    Cdn36x user manual revision 1.30 appendix b – devicenet template class instance attribute default setting unit comments mks instruments, inc. D.I.P. Products group 92.

  • Page 93

    Cdn36x user manual revision 1.30 mks instruments, inc. D.I.P. Products group 93 appendix c – ascii character codes non-printable characters printable characters hex dec char name kybd hex dec char hex dec char hex dec char 0x00 0 nul null ctrl @ 0x20 32 space 0x40 64 @ 0x60 96 ` 0x01 1 soh start of ...