Home

W5-JDC4 User Manual 1 - Western Reserve Controls

image

Contents

1. 30 6 4 2 Handshake Mode sss eee diete an e RE tete Sega 30 6 2 ARRAY DATA BLOCK DATA TYPE 55 8 2 2 2 2 0 2 2010 61 008050005050000000000000000000000000000000000 3l 6 2 1 Immediate Mode es e RE ERR e P RE E OE E ER AREE ae gis dies 31 6 2 22 31 6 3 S TRING DATA TYPE ASSEMBLIES oo edente eee EE 31 6 31 Immediate Mode ts epe Or i etie io et btt 31 6 3 2 e e adn ta ci E RR 31 7 THEORY 9 OPERATION seo 33 7 1 THE TRANSMIT RECORD ALGORITHM AA A 33 7 1 1 Basic Theory of 7 2 THE RECEIVE RECORD ALGORITHM 7 2 1 Basic Theory Of operation s dete eei conia oed dente space 8 DEVICENET PROFILE OBJECTS AND 2 2 96 8 1 WSJDCADEVICENET PROFILE 36 8 2 IDENTITY OBJ
2. TABLE 8 11 CLASS 113 71 TRANSMIT RECORD OBJECT INSTANCE ATTRIBUTES TABLE 8 12 CLASS 114 72 RECEIVE RECORD OBJECT INSTANCE ATTRIBUTES Western Reserve Controls W5 JDC4 User s Manual Revision 1 02 1 Overview The W5 JDC4 is a panel mounted DeviceNet to serial link communications gateway that provides a flexible DeviceNet interface to as many as four different channels of ASCII devices A wide variety of serial ASCII devices can be easily connected with independent setups for each channel The W5 JDC4 does not interpret the data being transmitted across it and so the transferred messages may contain data of any nature or definition This allows you to use the same gateway for many different serial protocols Using the W5 JDC4 you may communicate with the connected peripheral devices in the same fashion as the other DeviceNet products in the system Data may be read written using either I O or explicit messaging Typically real time data is read and written as by the DeviceNet Master via Polled Change of State or Cyclic I O and parameters are read and written with the Explicit Messaging technique However you may also read and write serial data via explicit messages To read and write the serial ASCII devices connected to the serial ports you read and or write to all 4 channels simultaneously You can use either an Message or Explicit Message W5 JDC4 is defin
3. TABLE 6 3 HANDSHAKE MODE CONSUME SHORT TABLE 6 4 HANDSHAKE MODE PRODUCE SHORT TABLE 6 5 IMMEDIATE MODE CONSUME DATA BLOCK eere TABLE 6 6 IMMEDIATE MODE PRODUCE DATA TABLE 6 7 HANDSHAKE MODE CONSUME DATA BLOCK TABLE 6 8 HANDSHAKE MODE PRODUCE DATA BLOCK TABLE 6 9 IMMEDIATE MODE CONSUME STRINQG sees TABLE 6 10 IMMEDIATE MODE PRODUCE STRING sese TABLE 6 11 HANDSHAKE MODE CONSUME STRING TABLE 6 12 HANDSHAKE MODE PRODUCE STRING TABLEE 8 LDEVICENET OBIECTS eine RERUM SEC EI A dea Ae E Re e ee an eee TABLE 8 2 IDENTITY OBJECT CLASS ATTRIBUTES INSTANCE sessi entente nennen tenete terne nennen TABLE 8 3 IDENTITY OBJECT INSTANCE ATTRIBUTES INSTANCE 1 TABLE 8 4 IDENTITY OBJECT COMMON SERVICES TABLE 8 5 CEASS 3 CLASS ATTRIB TES deseen ec eerie pe d hil dea Eee EE Pese denas TABLE 8 6 CLASS 3 INSTANCE ATTRIBUTES etd er t tee ce eee ci a Ceci de te er ere A TABLE 8 7 INSTANCE 101 CONSUME DATA ASCII TRANSMIT STRING TABLE 8 8 INSTANCE 102 PRODUCE DATA ASCII RECEIVE STRING TABLE 6 9 CHANNEE 2 DISAB ED reete HERRERA RENE RE TER HR eee ERES ae TABLE 8 10 CLASS 112 7045 SERIAL PORT OBJECT INSTANCE
4. 8 9 3 6 Pad Character This attribute is get Set This attribute is stored in non volatile memory The pad character is the character used to pad the string the maximum received length when the received string is shorter than this length Legal values are 0 255 8 9 3 7 Maximum Number of received characters This attribute is Get Set This attribute is stored in non volatile memory This attribute defines the maximum number of received characters of the received data parameter Once the n th character is inserted into the received data string the new data bit will be set The non delimited record status bit will be set on the change to this record 8 9 3 8 Start Delimiter Character This attribute is Get Set This attribute is stored in non volatile memory This attribute defines the start delimiter used in the Receive Record Formatting algorithm 8 9 3 9 Stop Delimiter Character This attribute is Get Set This attribute is stored in non volatile memory This attribute defines the stop delimiter used in the Receive Record Formatting algorithm 8 9 3 10 Start Delimiter Mode This attribute is Get Set This attribute is stored in non volatile memory Controls the start of the string Characters received before the start character are dropped Characters received after are placed into the string until the new data flag is set Valid selections are NO DELIMITER 0 always acquiring characters INCLUDE DELIMITER 1 include the c
5. Attribute Access DeviceNet Val UINT ODVA Vendor Number for this 9 WRG product 2 Get Device UINT ODVA Communications Device Type Adapter rond UINT Unique Product Code Number 730 20 STRUCT of Revision of this device y Revision Revision gt 6 See 5 Get Status WORD Summary status of device DeviceNet Spec Get SENAI UDINT Unique Device Serial Number Valles Number Device Product SHORT STRING ASCII Name of product W5 JDC4 The interval in second that the 10 Get Set Heartbeat device generates a heartbeat Interval message A value of 0 disables heartbeat generation The Build Number is a WRC Build Specific Metric that helps maintain 101 Get UDINT firmware revision control It is Number ef unique to the specific build of firmware 37 Western Reserve Controls W5 JDC4 User s Manual Revision 1 02 Table 8 4 Identity Object Common Services device Returns the contents of the Set Attribute Single Modifies an attribute value 8 3 DeviceNet Object Class 3 The behavior of the DeviceNet object does not deviate and will have no extensions to the basic DeviceNet specification Table 8 5 Class 3 Class Attributes Attribute Access DeviceNet Description of f Val The current value assigned to Revision UINT Revision of this object this is two 2 38 Western Reserve Controls W5 JDC4 User s Manual Revision 1 02 The following instance attribute
6. 1 male and 1 female 4 DB9 RS 232 Connectors male DTE 2 standard DeviceNet module and network status LED s 8 serial transmit and receive LED s Powered from DeviceNet 11 25 Vdc network power ASCII string length up to 128 bytes Serial port baud rate up to 115 2k baud Western Reserve Controls W5 JDC4 User s Manual Revision 1 02 1 2 Typical Applications e Weigh scales e Barcode readers and scanners e Display panels e Robots e Drives e Motion controllers e Operator stations HMI e Magnetic code readers 1 3 Basic Operation The W5 JDC4 operates as the DeviceNet front end to the serial device s The DeviceNet Master can receive and send data to and from the W5 JDC4 via the methods described in this section It sends the data to the device and likewise accepts responses from the device which are passed back to the DeviceNet system as required The W5 JDC4 has one DeviceNet address All DeviceNet messages to the W5 JDC4 itself to read write its internal data are sent to this address DeviceNet messages to and from the serial device can be sent to the W5 JDC4 DeviceNet assembly objects using either I O or explicit messaging This allows you to define the specific operation of each W5 JDC4 These objects include all the set up required for the serial communications link The following chart and section defines the various messaging methods used for typical data types at your serial device and a brief explan
7. Also if this attribute is set to zero the port will not appear in the consume assembly including the ports header 8 8 3 6 Transmit End Delimiter This attribute is get Set and is stored in non volatile memory End delimiter used if the data is set to 0 and the transmit mode is not set to no delimiter See the Transmit delimiter mode selection for details on the operation of this parameter 8 8 3 7 Transmit Delimiter Mode This attribute is Get Set This attribute is stored in non volatile memory The transmit delimiter mode determines the handling of the transmit delimiter in case the data length is set to zero If the Delimiter mode is set to NO DELIMITER 0 the delimiter is ignored If the data is set to EXCLUDE DELIMITER 2 then the serial port will transmit up until the first delimiter character is encountered If this option is set to INCLUDE DELIMITER 1 then the serial port will also transmit the delimiter with the data 8 8 3 8 Handshaking Mode This attribute is Get Set This attribute is NOT stored in non volatile memory Handshaking mode is not designated non volatile because this parameter does not make sense using an implicit connection program must set this parameter through the explicit connection if this feature is wanted 46 Western Reserve Controls W5 JDC4 User s Manual Revision 1 02 8 8 3 9 Swap Mode This attribute is Get Set This attribute is stored in non volatile memory Swap mode arranges
8. receive the new data The W5 JDC4 s Produce Object does not change format Table 5 2 W5 JDC4 Consume Assembly Object with Handshake Mode Byte 0 Byte 1 Byte 2 Byte 3 Bytes 4 X X 54 New Data Record The Master monitors this new data flag and when the Master is ready to receive new serial data it Sets a new number in the new record number byte of the next poll command message Note that this applies only to data being sent from the W5 JDC4 to the Master The operation proceeds as follows 1 The W5 JDCA receives a new data string 2 The W5 JDCA sets the New Data Flag in the Status byte of its next produce message 3 The Master sends out messages to the W5 JDC4 in the normal fashion If the Master is not ready to receive new data the New Record Data byte remains constant 4 When the Master is ready to receive the new data string it changes the New Record Data byte to any value different than what it had been sending 5 The W5 JDC4 will send the new data upon receipt of a record from the Master in which the New Record Data byte has been changed 6 If the W5 JDCA receives an updated New Record Data byte and has no new it will set the Handshake Error bit in its Produce Status byte In Immediate Mode this handshaking is not active and the W5 JDC4 sends new data as soon as it is received from the ASCII device It is the Masters responsibility to be ready to accept and process the new data string when it is presented 27
9. 3wire communications cable See your ASCII device s User Manual for details on the proper connections The RX and TX designators are referenced with respect to the W5 JDC4 Table 4 3 RS232 Connector Signals DB9 Pin 4 RE S232 Designator Signal Ground Note The RS232 max distance spec is 50 feet 15m 14 Western Reserve Controls W5 JDC4 User s Manual Revision 1 02 4 4 Rotary Switches There 2 10 position rotary switches for device address MaclD and 1 10 position rotary switch for DeviceNet baud rate Table 4 4 Baud Rate Switch RATE 250k baud 1 3 9 Use values stored in non volatile memory Table 4 5 DeviceNet Address Switches MSB LSB A 3 MEME M _ _ s 1 stored gt 6 non volatile memory 4 5 DeviceNet Configuration DeviceNet specifications provide for a maximum network distances for the main trunk line and drop lines depending upon the baud rate used on the network See Table 4 6 15 Western Reserve Controls W5 JDC4 User s Manual Revision 1 02 Table 4 6 Maximum Network Cable Lengths Trunk Line Length Drop Length Note Thick cable only Thin cable is 100m max at any baud rate 4 5 1 Network Termination A DeviceNet system must be terminated at each end of the trunk line The host controller and the last W5 JDC4 or other DeviceNet device on the network must always be terminated to eliminate reflections even if only two nodes are present The DeviceNet spe
10. Explicit Messages eei e tee dee e RYE SE ERR ER 4 1 4 MAJOR OPTION SELECTIONS erit EN ERREUR ERU VERE NR ER AVETE ERE NUEVE EGET EVE ERI ERE INSERERE E 4 1 4 1 Maximum Transmit and Receive Characters Parameters eese eene tette tenentes 4 1 4 2 Master Slave Handshake vs Immediate Option eee eese eese eete teinte 4 M PH 5 2 1 HOW TO INSTALL AND ESTABLISH DEVICENET COMMUNICATIONS 2 2 DEFAULT SETTINGS eee ee rr ee Oe E He E ERR EE 2 3 HOW TO INSTALL A SERIAL NETWORRK eene 2 4 HOW TO READ SERIAL DEVICE DATA FROM THE W5 JDC4 2 4 1 Example Assembly for Serial Receive 2 4 2 The Receive Max Character Length eese esistente tette tette tette tette tette tette tette 2 5 HOW TO WRITE SERIAL OUTPUT DATA TO THE W5 JDCA cccccccscssssesessescssessescssescsecssescsscssescsecscsecaesecsecaesecaecsesecaeens 9 2 5 1 Example Assembly for Serial Transmit eee eese tetto ene 9 2 5 2 The Transmit Max Character Length usen ERROR RE 9 DXuOVJ adi AXLEDOPERXATION certet treten eee a dey teretes erue dg 4 2l DeviceNet LEDs He Un IEEE RH AAA RE ERE UI 42 2 Serial Poft EEDS sete cn REN CN
11. Format of data 1 Short String USINT Format NV 2 String Indicates whether to pad the invalid data region after the M Pad Mode 5 Get delimiter with the 0 Disabled Enabled USINT 1 Enabled pad character or to use variable length I O responses 47 Western Reserve Controls Get Set NV Get Set NV NV Pad Character Max Number of Rx Chars Start Delimiter Char Get Set Stop ind Get Set bd Get Set Char Start Delimiter Mode Stop Delimiter Mode Get Set NV Swap Mode Immediate Handshake Mode The value to use to pad the invalid data portion of the poll response Maximum number of characters the gateway expects to receive into its port from the serial device Character which identifies the beginning of the data string from the device when the length is specified as 0 Character which identifies the end of the data string from the I O device when the length is specified as 0 Selects whether or not the beginning delimiter is included in the data string Selects whether or not the end delimiter is included in the data string If enabled the position of the bytes in the serial messages will be swapped every 2 or 4 bytes Defines if the received string is sent immediately to master in poll mode or after a I O handshake ACK 48 Any valid standard I O character 0 127 0 255 Any valid standard I O character 0 127 0
12. ORG Ne PER E TITRE ENSE UNE eue 4 3 SERIAL PORT CONNECTOR 4A ROTARY SWITCHES eee ettet eerie eee etate Ue Pee ere eret 4 5 DEVICENET CONFIGURATION 4 5 1 Network Termination 4 5 2 DeviceNet Connection Wiring 5 SOFTWARE CONFIGURATION AND SET UP eere ee eee teen enne toten ta tanen enne 18 S L DEVICE PARAMETERS ineat e o ONE EE UE 52 8 he be Os 5 3 RECEIVING SERIAL DATA FROM THE ASCII DEVICE cccscsssssessssessssessescssescsessescsscsssecsscscsecassecsecessecaesecnecaesecaeaesesaes E 5 3 2 Setting up the Receive Character Buffer Length esses tette tenete tette tene tenente eene 5 3 3 Settingup and Using Pad Mode ee enint ERO T ee ente denies 5 3 4 Setting Up and Using the Swap Bytes Mode 5 3 5 Setting Up and Using Delimiter Operation eese estet tenete tette tenete enne 2 9 0 Receive String Data ER I ERN NA RUNE DERE RUE 5 3 7 Setting Up the Scanner Receive Size sranie ti t EEEE RE E E 5 3 8 Explicit Messages to Receive the Serial Data String 5 3 9 Status Byte Description eese 5 4 TR
13. Set In the case of the produce assembly the access rule of attribute 3 is Get Only 8 4 1 Instance 101 Consume Assembly Object Description Table 8 7 Instance 101 Consume Data ASCII Transmit String e Character Description WhenUsed New Data Integer value changed to indicate OK to send Master Slave Handshake Moda Numb f new data 0 Initialized State Number of bytes to transmit 0 indicates transmit delimited mode in which the device Length transmits up to and including the transmit suing tee delimiter character Number of bytes to transmit 0 indicates Length transmit delimited mode in which the device String MSB transmits up to and including the transmit Short_String delimiter character 4 a 6 o wc i HERE ASCII Character ___ er AL e s Ee Stine ee ee ee 2 End of Text Character Include End Delimiter yt 1 2 3 4 5 40 Western Reserve Controls W5 JDC4 User s Manual Revision 1 02 8 4 2 Instance 102 Produce Assembly Object Description Table 8 8 Instance 102 Produce Data ASCII Receive String Byte Character Description WhenUsed Record Number Integer value 0 255 0 Initialized State 1 Status Status Error Value 2 Length Length of valid data in bytes String LSB Length Length of valid data in bytes String MSB Short String ASCII Character ASCII Character i ees vay ONNMENM Always p
14. Transmit Record Object Instance Services eese estet tette tette tette retenti 47 8 9 RECEIVE RECORD OBJECT CLASS 114 72 ug tette tette ttt tette ttes 47 8 9 1 Receive Record Object Class Attributes iint n 47 6 9 2 Receive Record Object Class Services ise seas e RR SUN ERE RESO RENE ANE ABE 47 6 9 3 Receive Record Object Instance Attributes eese esses tette tenete tette tenente eene 47 6 9 4 Receive Record Object Instance Services eese ettet tette tentent tenente retenti teen enne 51 8 10 COMMON DEVICENET SERVICES essere 51 TABLE OF FIGURES FIGURE 1 1 W S JDCA s eet Aves dm e e E TE P e d a rte d ie eo avian de e ede ede 1 FIGURE 4 1 W5 JDC4 OUTLINE DRAWING 2 2 202 0 0000001 00000000000000000000000000000000000000 FIGURE 4 2 W5 JDC4 OUTLINE DRAWING RIGHT SIDE VIEW FIGURE 4 3 DEVIGENET CONNECT ORS re tite i EUER rer eerie dee eiectus RR ER FIGURE 5 1 RECEIVE ARRAY DATA FORMAT 4 1 2 0 1 0000 enne enne tnnt taste sts taste ehe testo the Ae to tastes tes totae tes setas tasas psa c FIGURE 5 2 RECEIVE SHORT STRING DATA FORMAT FIGURE 5 3 RECEIVE STRING DATA FORMAT scere nnne entres FIGURE 7 1 TRANSMIT RECORD ALGORITHM FUNCTIONAL FLOWCHART FIGURE 7 2 RE
15. Western Reserve Controls W5 JDC4 User s Manual Revision 1 02 5 4 10 Explicit Messages to Transmit Serial Data String You can use Class 113 Instance ch Attributes 2 and 3 to set up the serial data string and send it to your ASCII device via the Explicit Messaging technique Attribute 3 will hold the data you wish to send Attribute 2 holds the record number of the data string in Attribute 3 Changing the record will cause the data in Attribute 3 to be transmitted immediately from the W5 JDC4 to the ASCII device 5 5 Setting up DeviceNet Communications The W5 JDC4 supports 4 modes of data transfer of the serial buffer They are e Polled I O e Change of State I O e Cyclic O e Explicit Message 5 5 1 Polled I O The polled connection is the only manner in which you can send serial output data to the I O and therefore to your I O device The DeviceNet Master initiates the polled connection transfer The Master sends the W5 JDC4 its serial output buffer along with a Record Number and length byte The W5 JDC4 monitors the Record Number and if the Record Number changes then the W5 JDC4 transmits the data buffer on its serial link If the Record Number does not change then the device does not transmit the data buffer After the device has transmitted its data out to the serial link the W5JDC4 then takes information that is stored in its current serial input buffer and sends this data to the DeviceNet Master It sends all characte
16. data is presented in chunks of defined sizes and bounds The Receive Record algorithm formats the 33 Western Reserve Controls W5 JDC4 User s Manual Revision 1 02 streaming data into a data block It uses user defined events on the receive serial link to determine where this data block starts and ends It then uses a status byte to notify the controlling W5 JDC4 when new data is available The W5 JDC4 then increments the record number and the new data presented The Receive Record Algorithm creates a DeviceNet object and presents the data in an ordered fashion to the DeviceNet I O connection The Receive Record object may be reached over DeviceNet in Class 114 If you are going to be using explicit messaging to communicate with the device we recommend that you access the data from this point Status Serial Byte Even im Detection Object System Auto Inc Record Number Received Data Back Data Switch Data Switch Buffer Figure 7 2 Receive Record Algorithm Functional Flowchart The Receive Record Algorithm is diagramed above The serial stream originates from the serial port object Class 112 It is looked at a byte at a time by the event detection system If the event detection system detects a beginning event the beginning delimiter is received or disabled it opens the first data switch allowing the serial data to accumulate in the back buffer Once an end event is received the End delimiter is received or the back b
17. in this case the W5 JDCA to automatically determine the baudrate that is operational on the network to which the W5 JDCA is connected and to adjust its DeviceNet speed to match The W5 JDCA is shipped with autobaud as its default baudrate If you wish to change the baudrate to a fixed speed you can set it in two different places 1 The first is in the DeviceNet object Class 3 This is where most configuration tools will look to change the baudrate 2 Because autobaud is not supported by the standard DeviceNet Object the W5 JDC4 provides a parameter to allow the autobaud selection These values can be set and retrieved by using the standard Set and Get services 29 Western Reserve Controls W5 JDC4 User s Manual Revision 1 02 6 Assembly Object Formats The produce respond to master s request and consume receive a master s request assembly object formats vary according to 2 specific parameter options the Data Type and the Handshaking Immediate Mode operation For this to work correctly in many PLC s with a DeviceNet scanner the outgoing poll message must be constructed in a buffer and when complete should then be copied whole to the scanner s file Making the header portion always 4 bytes facilitates this This makes mapping the device into a scanners memory always on either 16 or 32 bit boundaries If using a more direct mode it is advisable to construct the whole message leaving the Transaction ID alone then chang
18. on our website WRC web site If your configuration tool does not support the EDS device profiles the set up of a DeviceNet device requires a little more understanding of DeviceNet and its operation This section is designed to fully describe the features of the W5 JDC4 and to help you set them up Note Refer to Section 2 2 above for a list of the default settings for all the configurable parameters 5 1 Device Parameters The operation of each of the 4 serial channels is identical in function and independent in operation from each other 5 2 Setting Up the Serial Link The first two Parameters in each channel group allow you to define the serial link communications options You must set up each channel individually to match the baud rate and framing characteristics of the particular serial device connected to the W5 JDC4 5 3 Receiving Serial Data from the ASCII Device 5 3 1 Overview The W5 JDC4 receives a number of characters and transmits these to the DeviceNet Master via e poll COS Cyclic e Explicit Message The received character string is captured when e the specific number of bytes defined Receive Character Buffer Length is received or e the defined End of String Terminator character is detected When either of these events occur the W5 JDC4 stores the received message string into its internal buffer and will then transmit Produce it onto DeviceNet at the next poll request or appropriate opportunity Note Instan
19. the W5 JDC4 These are shown below Which one you pick depends on your application and will modify the format of the data field See Section 5 3 6 above Receive String Data Type for details 5 4 7 Transmitting Serial Data The length of the string set determines the use of a delimiter in transmitting data to a serial device from the W5 JDC4 If the string length is zero or the data type is type Array The W5 JDC4 receives data sent from the DeviceNet Master and uses the delimiter to determine how much data to send to the serial device The W5 JDC4 will compute the length and then store this as the new length in the string attribute This will not show up if the data type is array you will just see the string truncated and the length will be in the background If a delimiter is contained within the string then All characters up to and including the defined delimiter are stored If no delimiter is contained within the string then W5 JDC4 will store all the data received If the string length gt 0 or the data type is String or Short String The W5 JDCA receives data sent from the DeviceNet Master ignoring any embedded terminator It will store the number of characters defined in Max Number of Transmit Chars or the total sent by the Master whichever is less Now the W5 JDC4 will send the data immediately if Handshake Mode parameter Class 113 Instance ch Attribute 8 is set to 1 See below You can always cause this
20. the data into little endian form along 2 3 or 4 byte selectable boundaries The maximum transmit length should be a multiple of the swap mode size setting Swap mode is used to put data into human readable form for ease of use 8 8 3 10 Status There is no status associated with this object You may wish to use the TX FIFO status information from the serial port object Class 114 Instance ch Attribute 14 ch channel 1 2 3 or 4 8 8 4 Transmit Record Object Instance Services Service Description of Service OEnx Yes Yes Get Attribute Single Returns the contents of the specified attribute 10nx No Yes Set Attribute Single Modifies an attribute value 8 9 Receive Record Object Class 114 72 nex 8 9 1 Receive Record Object Class Attributes There are no class attributes for the Transmit Record Object 8 9 2 Receive Record Object Class Services There are no Class services for the Transmit Record Object Any service directed at the transmit record object will return the DeviceNet error code SERVICE NOT SUPPORTED 8 9 3 Receive Record Object Instance Attributes Table 8 12 Class 114 7244 Receive Record Object Instance Attributes Parameter Default Default Te Parameter Description Hardware Instance of the Interface serial port object 4 4 USINT Instance that we listen to Rx Record Record number 2 Get Set assigned to the last 0 255 USINT Number received data string data RR Array FU Data 4 SEVSEN
21. then the W5 JDC4 will fill the Poll Response data with the Pad Char up to the defined size f Pad Mode 0 then the W5 JDC4 will send only the data up to and including the delimiter 4 f no delimiter is received then The W5 JDCA will receive up to Max Number of Receive Chars and then send this string to DeviceNet with an overflow error t will continue to receive and send strings of size Max Number of Receive Chars along with the overflow error until a delimiter is received This could continue indefinitely if your I O device does not transmit the specified delimiter 20 Western Reserve Controls W5 JDC4 User s Manual Revision 1 02 5 3 5 Setting Up and Using Delimiter Operation When receiving data strings from your serial device the W5 JDC4 can take advantage of both Start and Stop End delimiters The Start Delimiter is the start of string indicator and the End Delimiter is the end of string indicator This allows you further control over exactly which characters are sent to the Master When you select Start Delimiter operation you define a character that prompts the W5 JDC4 to start storing the incoming data string All characters up to this Start Delimiter after the previous message was completed are ignored Once the Start Delimiter is received all characters are stored until either the End Delimiter is received or the Max Receive Char Length is reached Once the End Delimiter is reached the data string is captu
22. 255 Any valid standard I O character 0 127 0 255 0 No Delimiter 1 Exclude Delimiter 2 Include Delimiter 0 No Delimiter 1 Exclude Delimiter 2 Include Delimiter 0 Disabled 1 16 bit Swap Enabled 2 24 bit Swap Enabled 3 32 bit Swap Enabled 0 Set New Data Status Bit and wait for I O to increment record number 1 Automatically increment the record number and show the new data when an end event is received W5 JDC4 User s Manual Revision 1 02 20 chars Carriage return Carriage return No Delimiter Include Disabled Auto Increment Western Reserve Controls W5 JDC4 User s Manual Timeout Delay eee seein 1 02 1 02 Bit 7 New Data Available Bit 6 Record State Conflict Bit 5 Non Delimited Record Bit 4 Data In RX Status ze FIFO No Status Bit 3 Data In TX FIFO Bit 2 Parity Error in current record Bit 1 Rx FIFO overflow Bit 0 Tx FIFO Overflow Timeout in millisecond from the last received character until the 4 algorithm times out Delay in ms Disabled and set the new data bit A value of zero disables this feature EDS Editor Data Data entry point for EDS editors to Get Set allow the NULL separating of the string length for the user Data entry point for EDS editors to Get Set ROW me Data el he No Data separating of the transmit string string length for the user Will not complain on a set of the record number when n
23. ANSMITTING SERIAL DATA TO THE ASCII DEVICE Western Reserve Controls W5 JDC4 User s Manual Revision 1 02 RI MNA E 5 4 2 Setting up the Transmit Character Buffer Length eese tette teret teretes 5 4 3 Setting Up and Using the Transmit Delimiter esee tette tenete teret tenete tenente entente 5 4 4 Setting up and using the TX Byte Swap Mode tete tenete 5 4 5 Transmitting from the Master to the W5 JD tette tenente tenete tentent teet entente nens 246 Transmit Siring Data Type edere e RS a n a ber dede eei 597 Transmitting Serial Datas is eee a RUE HERBERT ERG eoe cea 5 4 6 Setting Up the Scanner I O Transmit Size coio i eese teret tette tette tette tette eterne eterne enne 5 4 9 Master Slave Handshake vs Immediate 5 4 10 Explicit Messages to Transmit Serial Data tette 5 5 SETTING UP DEVICENET 2 5 I Polled e 5 5 2 Cyclic Change of State I O 5 5 3 Setting up the DeviceNet I O Connections 5 5 4 Setting up the Connection Timer EPR 525 9 Setting up the DeviceNet Baudrate e ERR RENE NOU RERO A RIT Et Nr ore 6 1 SHORT STRING DATA TYPE ASSEMBLIES ccccccsssssssssessssessescssescssescesesscssesessesesseaseecsscassecaseecsecassecaecaesecaesesnesaesecaeceesesaes 30 6 1 Immediate Mode eet
24. CEIVE RECORD ALGORITHM FUNCTIONAL FLOWCHART eee ener nen nenne nnns nennen nnns Western Reserve Controls W5 JDC4 User s Manual Revision 1 02 LIST OF TABLES TABLE 1 1 lO MESSAGE TYPES ee sled en eee 3 TABLE 2 1 INSTANCES OF THE SERIAL CHANNELS nnen nsore a E EE E E EE EE ara E S 5 TABLE 2 2 DEFAULT INPUT SERIAL RECEIVE ASSEMBLY FORMAT 8 TABLE 2 3 DEFAULT OUTPUT SERIAL TRANSMIT ASSEMBLY FORMAT TABLE 4 1 MODULE STATUS LED LABELED MS sisse eene ennt entree TABLE 4 2 NETWORK STATUS LED LABELED NS TABLE 4 3 RS232 CONNECTOR SIGNALS ci edat sedate hate lote Gok Weed edt decas TABLE 4 4 BAUD RATE SWITCH RATE 22 40000 20 0000 tenerse tnnt nete tenete tete i tete sensa TABLE 4 5 DEVICENET ADDRESS SWITCHES isses enitn tnnt tentent tntn entree nentes tese TABLE 4 6 MAXIMUM NETWORK CABLE LENGTHS TABLE 5 1 SERIAL STATUS BYTE in ete e ete e e BA Bann be e ette ae e RR OE eee Ee TABLE 5 2 W5 JDC4 CONSUME ASSEMBLY OBJECT WITH HANDSHAKE MODE TABLE 6 1 IMMEDIATE MODE CONSUME SHORT STRING sess tentent inerte tenen intrent nns TABLE 6 2 IMMEDIATE MODE PRODUCE SHORT
25. DB9 M male 9 pin D sub Amp p n 745182 2 or equivalent Status Indicators Transmit Active green LED Receive Active green LED Network Isolation 500V Max Power 3 75 watts 340 mA 11 Vdc 150 mA 25 Vdc unregulated power supply DIN rail mount EN 50022 Length 6 00 152 4 mm Width 4 00 101 6 mm Height 2 08 52 7 mm Humidity 0 9596 RH non condensing 11 Western Reserve Controls W5 JDC4 User s Manual Revision 1 02 4 Hardware Installation and Set Up 4 1 Overview The W5 JDC4 consists of an IP20 aluminum panel mounted enclosure W5 JDC4 contains two LED s to indicate the status of the device and the status of the network The device be connected to the main DeviceNet trunk line or to a drop line via a Spin female plug style connector It also has eight 8 green LED s to indicate the presence of activity on the four 4 sets of RS 232 transmit and receive lines All power for the W5 JDC4 is derived from the DeviceNet power OTXI DeviceNet Port 1 DB 9 Female M L RX2 O 50 Part 2 B 9 SD O 3 738 RATE Part 3 B 9 4175 O MT mM O Part 4 08 9 DeviceNet UEM Figure 4 1 W5 JDC4 Outline Drawing Top View 6 56 12 Western Reserve Controls W5 JDC4 User s Manual Revision 1 02 Figure 4 2 W5 JDC4 Outline Drawing Right Side View 4 2 LED Operation 4 2 1 De
26. ECT CLASS 1 ete ee a te de Ou devis 37 S 3 DEVICENET OBJEGT CLASS 3 4 dirette aiitem er er ni an e er rede 38 84 55 EE eC Pe E REY ERE ERE ERE UE 40 6 4 1 Instance 101 Consume Assembly Object Description eese entente teen enne 40 6 4 2 Instance 102 Produce Assembly Object Description eese tette teen nete 41 6 4 3 Disabling channels o re e eee tee e al deed te eene ettet e edd 85 CONNECTION GLASS 5 OBJECT en EET RE ER RUE ERA EYE PARE HERE 8 6 ACKNOWLEDGE CLASS 43 OBJECT n RR ER Y GNE e ERR EE V TUYO ETE FUA 8 7 SERIAL PORT OBJECT CLASS 112 70 6 7 1 Serial Port Class Attributes 6 7 2 Serial Port Class Services 6 7 3 Serial Port Instance Attributes 6 7 4 Instance Services ii 8 8 TRANSMIT RECORD OBJECT CLASS 113 71 44 6 8 1 Transmit Record Object Class Attributes R N 44 8 8 2 Transmit Record Object Class SeFvVIGes usse RERO 44 6 8 3 Transmit Record Object Instance Attributes eese eee tenete teneret tenete tereti tenete tenente eene nens 45 Western Reserve Controls W5 JDC4 User s Manual Revision 1 02 6 8 4
27. W5 JDC4 Revision 1 02 4 Channel DeviceNet Serial Gateway User s Manual Western Reserve Controls Western Reserve Controls W5 JDC4 User s Manual Revision 1 02 Although every effort has been made to insure the accuracy of this document all information is subject to change without notice Western Reserve Controls Inc assumes no liability for any errors or omissions in this document or for direct indirect incidental or consequential damage resulting from the use of this document Document PUB 32 0 Rev 1 02 March 2003 Copyright 2003 Western Reserve Controls Western Reserve Controls 1485 Exeter Rd Akron Ohio 44306 http Awww wrcakron com DeviceNet is a trademark of the Open DeviceNet Vendor Association ODVA All other trademarks are property of their respective companies Western Reserve Controls W5 JDC4 User s Manual Revision 1 02 TABLE OF CONTENTS DOVER VIEW i 5555 Y 1 TD BEATURES Ree e eR RUE GR IRE NU BSS EOS ERE RERO WEE e EE ure 2 T2 TYPICAE APPLICATIONS eet eii eee o o e Gal ee er tte e e eR EE CHER VE ee de eene du 3 1 3 BASIC OPERATION ectetuer tei me e e re Ee e nde eed 3 1 34 Polled YOn use IRR oru RE RE 3 1 3 2 Cyclic Input Messa tE sic e RR MERE QUERER REGIE cau ERR HERR A 3 1 3 3 Chatige of State OF CO S ea i ii eee ber io tet eiae qe ie ie Pee Sta 4 LSA
28. ation follows Table 1 1 Message Types 1 3 1 Polled I O The DeviceNet Master uses the W5 JDC4 s predefined polled IO connection to send serial input and output data to the W5 JDC4 When a poll is received and the record has changed since the last poll was sent the W5 JDC4 sends the associated transmit data out the serial port to the remote ASCII device When the W5 JDC4 receives serial data from a device on the serial link the poll response data to the Master contains up to 50 bytes of received data 1 3 2 Cyclic Input Message Cyclic I O is the function by which a slave device sends its input data to the master at a specific Western Reserve Controls W5 JDC4 User s Manual Revision 1 02 time period without the host explicitly requesting it When the specified time interval defined by you elapses the most recent input data from the serial port are transmitted to the master This data is the same format as a poll response 1 3 3 Change of State or C O S C O S I O is the function by which a slave device sends its input data to the master when defined input data changes without the host explicitly requesting it In the case of the W5 JDC4 this occurs when the delimiter character is asynchronously received from the serial device when the defined number of characters is received or when the internal buffer is filled This data is the same format as a poll response 1 3 4 Explicit Messages Explicit messages are typically use
29. ays a 1 oe lastChar ASClChaacer Always Terminator 7 End otTextCharacr IncludeEndDelimiter Any Pad character present if characters received Pad Mode Enabled is less than Max Receive Chars value Any Pad character present if characters received Pad Mode Enabled is less than Max Receive Chars value Max Rx Any Pad character present if characters received Pad M E E is less than Max Receive Chars value ad Mode Enabled 8 4 3 Disabling channels Channels are disabled by setting the channel s Transmit Max Characters Class 113 Instance ch Attribute 5 and Receive Max Characters Class 114 Instance ch Attribute 7 parameters to zero This will eliminate the channel s header and data from the produce assembly and must be eliminated from the scanner s message to the JDCA 8 4 3 1 Example of Channel Disabling If 113 2 5 0 and 114 2 7 0 then the order of both consume and produce is Table 8 9 Channel 2 disabled Channel 1 Header amp Data Channel 3 Header amp Data Channel 4 Header amp Data 41 Western Reserve Controls W5 JDC4 User s Manual Revision 1 02 8 5 Connection Class 5 Object This object is implemented as per ODVA DeviceNet Specification Volume1 Revision 2 Errata 5 8 6 Acknowledge Class 43 Object This object is implemented as per ODVA DeviceNet Specification Volume1 Revision 2 Errata 5 8 7 Serial Port Object Class 112 70 hex There are 4 ins
30. ce ch channel number 1 2 3 or 4 5 3 2 Setting up the Receive Character Buffer Length The receive character buffer length is the number of characters that the W5 JDC4 can receive from your I O device into its buffer at one time The length of the data string sent to the DeviceNet Master is less than or equal to this size plus 4 for the header size If the W5 JDC4 receives more characters that this number it will internally generate an overflow and 18 Western Reserve Controls W5 JDC4 User s Manual Revision 1 02 force the data into the W5JDC4 DeviceNet transmit buffer to be sent to the Master The subsequent received characters will then be received into the buffer and handled as the start of next incoming message string The overflow bit in the status byte will be set as well Caution Incoming characters could be missed in the process of handling a string longer than the defined max length This value can be set and retrieved by using the standard set and get services on Class 114 instance ch attribute 7 5 3 3 Setting up and Using Pad Mode Pad Mode operation is the method used by the W5 JDC4 that adds extra characters to the end of its received data string after the delimiter character from the external I O device before sending the string to the DeviceNet scanner Master as an I O Response The quantity added is such that the data string returned to the scanner is always a constant length and that length is the number speci
31. ch Transmit Data Parser Record Record Enabled Number Figure 7 1 Transmit Record Algorithm Functional Flowchart As diagramed above the serial data is set and then parsed if the serial data length is set to zero The serial data parse then sets the length on the serial data If Record is disabled the data is immediately added to the serial port s transmit queue Also whenever the record number is changed the serial transmit data is sent to the serial port object The delimit parse determines the length of the string by searching the string for a delimiter character The algorithm can be configured to ignore include or exclude the character 7 2 The Receive Record Algorithm The receive record algorithm was developed in order to enable the receipt of data from a remote serial device and the subsequent transmission of data over a DeviceNet I O connection Receive Record Algorithm controls when data is acquired and when that acquired data is presented to the connection This Section will help you understand the algorithm in order to efficiently utilize all of the capabilities of the W5 JDC4 to make your job easier 7 2 1 Basic Theory of operation The Basic function of the W5 JDC4 is to address the problem of receiving and transmitting serial data over DeviceNet Serial data is a data stream in which data is presented to a device one byte at a time and does not have a beginning or an end DeviceNet however is not stream oriented
32. cifications for the terminating resistor are e 121 ohm e 1 metal film e 1 4 Watt IMPORTANT Per the DeviceNet spec do not terminate devices on drop lines NOTE If you feel you are having DeviceNet communications errors check your network terminations With power removed from the network measure the dc resistance with an ohmmeter It should measure 60 ohms If it measures 121 ohms add another 121 ohm terminating resistor If it measures 40 ohms then you have 3 terminators and must remove one 4 5 2 DeviceNet Connection Wiring W5 JDC4 uses two 2 5pin standard micro style DeviceNet connector one of which has male pins and one of which has female sockets These connectors are physically connected internally to the device 16 Western Reserve Controls W5 JDC4 User s Manual Revision 1 02 ginil Foaki 1 lane 2 V 3 V 4 whiu 5 LAM L Figure 4 3 DeviceNet Connectors 17 Western Reserve Controls W5 JDC4 User s Manual Revision 1 02 5 SOFTWARE Configuration and Set Up The W5 JDC4 is an easy device to set up and configure Using features like the EDS sheets for configuration can expedite the process if you use a network configuration tool that supports them They provide a graphical interface to the device s parameters and allow the addition of helpful text descriptions in setting up your device The current EDS file is available
33. d byte represents the state of the object These states include FIFO is empty FIFO has data without error FIFO has overflowed FIFO has data with error These status messages will only be relayed when the status of the object instance changes If the path is null no object will be notified On the W5 JDC4 This value is hard coded to NULL and is get only 8 7 4 Instance Services The instance supports the standard Get Set and Reset services along with 2 service specific services Getc 4b ne and Pute 4C ney 8 7 4 1 GetC 4B hex GetC takes no arguments t returns 1 character out of the Receive FIFO If there are no characters in the receive FIFO GetC will return the general error code No Stored Attribute Data 18 4 You should not call this function if another Application Object that sends serial Data is using the Serial Port On the W5 JDCA the service should be considered in use if the Max Receive Serial Character Parameter on the Receive Formatting Object is set to a non zero value 8 7 4 2 PutC 4C hex PutC takes a short string data type as an argument It adds this string into the transmit FIFO of the port 8 8 Transmit Record Object Class 113 71 nex 8 8 1 Transmit Record Object Class Attributes There are no class attributes for the Transmit Record Object 8 8 2 Transmit Record Object Class Services There are no Class services for the Transmit Record Object Any service directed at the tran
34. d data The data is always little endian low byte precedes high order byte and the others are all one byte in length the W5 JDC4 Note that the get service has no data The get service gets data from an attribute of a class or class instance The service number of this 51 Western Reserve Controls W5 JDC4 User s Manual Revision 1 02 request is 14 H The class instance and attribute are all defined by which variable you want to get The response from a get command takes on the form service value The value will be little endian and can be of variable length and bounds based on the definition of the attribute The service will be reported as the get service with the highest bit set to indicate a response The set service sets data from an attribute of a class or class instance The service number of this request is 16 10 4 The class instance and attribute are all defined by which variable you want to set The value is little endian and the size is defined by the attribute that you are setting The response from a set command only echoes the service The service will be reported as the set service with the highest bit set to indicate a response An error response will have the service set to 9444 This response will be followed by a two byte error code defining the type of fault For a detailed list of error codes connect to the ODVA web site at www odva org 52
35. d to read and write configuration data This data allows the W5 JDC4 to change its internal operating parameters such as baudrate and parity In addition the user can use explicit messages to read and write the serial port data 1 4 Major Option Selections W5 JDC4 has several different qperating modes Some of these are available only in certain combinations These option selections are described here briefly and in more detail later 1 4 1 Maximum Transmit and Receive Characters Parameters These parameters are both defaulted from the factory 20 for each channel For any channel setting both parameters to zero will cause the W5 JDC4 to fully eliminate the channel s header and data from the consume and produce assembly See Section 8 4 3 for details 1 4 2 Master Slave Handshake vs Immediate Option If DeviceNet Master Slave Handshake Mode is selected the DeviceNet Master can inhibit the W5 JDC4 from sending new ASCII data until the Master is ready to receive and process the new data This option is used only with a Poll I O or Explicit Message W5 JDC4 will indicate to the Master that new data is available by setting the New Data Flag in the Status byte of the Produce message When the Master is ready to receive new serial data it Sets a new number in the new record number byte of the next poll command message Note that this applies only to data being sent from the W5 JDC4 to the Master In Immediate Mode this handsha
36. data to be transmitted by incrementing the record counter 5 4 8 Setting Up the Scanner Transmit Size The W5 JDC4 automatically calculates the number of bytes it will receive from the DeviceNet Master Its value is determined by a combination of the incoming data and the options you have selected The Consume size in the DeviceNet Object defines the size of the DeviceNet message to be sent to the W5 JDC4 from the Master and should be set as the Output size your Scanner s set up IMPORTANT You must set your scanner s Output value to this number of bytes 26 Western Reserve Controls W5 JDC4 User s Manual Revision 1 02 5 4 9 Master Slave Handshake vs Immediate Mode If DeviceNet Master Slave Handshake Mode is selected the DeviceNet Master can inhibit the W5 JDC4 from sending new ASCII data across DeviceNet to the Master until the Master is ready to receive and process the new data This option is only with a Poll I O or Explicit Message In this mode there two data required for the complete transaction e A New Data Available Flag is set by the W5 JDC4 in the status byte o This informs the Master that the W5 JDC4 has received a new data string and is waiting for the OK to send it See Table 5 1 additional Ready for New Data byte is pre pended to the message the Master sends to the W5 JDC4 The W5 JDC4 s Consume Object o This New Data byte is used to indicate to the W5 JDC4 that the Master is ready to
37. e Receive End Delimiter Gateway Send Produce on DeviceNet to Master Receive String Data Type Pad Mode Pad Character Receive Swap Mode DeviceNet Handshake Mode Serial Data Actual Received Data Size Receive Record Number Serial Port Transmit to ASCII Device Max Number of Transmit Chars Transmit End Delimiter Mode Transmit End Delimiter Character Gateway Receive Consume on DeviceNet from Master Transmit String Data Type Transmit Swap Mode Record Header Mode string Explicit Messages from EDS Editor Default Operation 732 9600 baud Default Operation 20 Not enabled Colon Enabled and include with data string Carriage return Default Operation Short string data with preceding 1 byte length Enabled 1 null character 0 Off Off 0 0 Default Operation 20 Include delimiter with Include Carriage return Short String data with 1 preceding length byte Off Active record header bytes precede data Default Operation Western Reserve Controls W5 JDC4 User s Manual Revision 1 02 Actual Serial Data String to Send to ASCII Device Transmit Serial Data Size 0 Transmit Record Number 0 2 3 How to Install a Serial Network 1 The communication between your serial device s and the W5 JDC4 is RS232 3 wire network Connect an appropriate cable to your device Connect the other end of the cable to the W5 JDC4 using the 9pin DB9 connector See Section 4 3 Turn on power to t
38. e 3 Table 6 8 Handshake Mode Produce Data block String String String String R R Status eserved eserved byte 1 byte 2 byte 3 byte N 6 3 String Data Type Assemblies 6 3 1 Immediate Mode Table 6 9 Immediate Mode Consume String Reserved TID LSB of MSB of String String String String Length byte 1 byte 2 byte 3 byte N Table 6 10 Immediate Mode Produce String LSB of MSB of String String String String tat byte 1 byte 2 byte 3 byte N 6 3 2 Handshake Mode Table 6 11 Handshake Mode Consume String Received TID LSB of MSB of String String String String TID Length Length byte 1 byte 2 byte 3 byte N 31 Western Reserve Controls W5 JDC4 User s Manual Revision 1 02 Table 6 12 Handshake Mode Produce String 32 Western Reserve Controls W5 JDC4 User s Manual Revision 1 02 7 Theory of Operation 7 1 The Transmit Record Algorithm 7 1 1 Basic Theory of operation The Transmit record object addresses several issues of utilizing a DeviceNet network device in the process of communicating via a serial data stream The device takes a block of data passed by the and transmits this data out over the DeviceNet link This data be protected via a record counter for allowing a DeviceNet I O connection to allow a device to control the transmission of this data from the W5 JDC4 by changing it The data flow and algorithm are shown below for reference Serial Delimit Data Swit
39. e the Record Number when ready to have it sent by the W5 JDC4 For the tables below e TID Record Number 0 255 e Status definition per Table 5 1 6 1 Short String Data Type Assemblies 6 1 1 Immediate Mode Table 6 1 Immediate Mode Consume Short String String String String String R d TID R Length Reserved TD Reserved Length byte 1 byte 2 byte 3 byte N Table 6 2 Immediate Mode Produce Short String String String String String TID Stat R Length status Reserved Length byte 1 byte 2 byte 3 byte N 6 1 2 Handshake Mode Table 6 3 Handshake Mode Consume Short String Received String String String String TID R Length B WEN byte 1 byte 2 bytes3 Table 6 4 Handshake Mode Produce Short String String String String String TID tat R Length TD status Reserved Length byte 1 byte 2 byte 3 byte N 30 Western Reserve Controls W5 JDC4 User s Manual Revision 1 02 6 2 Array Data Block Data Type Assemblies 6 2 1 Immediate Mode Table 6 5 Immediate Mode Consume Data block String String String String R R Reserved eserved eserved byte 1 byte 2 byte 3 byte N Table 6 6 Immediate Mode Produce Data block String String String String R Status Reserved eserved byte 1 byte 2 byte 3 byte N 6 2 2 Handshake Mode Table 6 7 Handshake Mode Consume Data block Receive String String String String TID R R E EN cserved Reserved byte 2 byt
40. ed as a Communications Adapter device on the DeviceNet system It has four 9 pin D sub connectors for connection to the RS232 interface port on your devices and two 5pin micro connectors for connections to the DeviceNet network W5 JDC4 has one assigned DeviceNet address which is set by two 10 position rotary switches on the unit There is also one rotary switch for the DeviceNet baud rate Other W5 JDC4 parameters are software configurable Each W5 JDCA has 2 standard green red DeviceNet LED s for module status and network status and two green LED s for each serial port to indicate RS232 transmit and receive activity W5 JDC4 4 port DoviceNet ASCII Gateway Figure 1 1 W5 JDC4 Western Reserve Controls W5 JDC4 User s Manual Revision 1 02 1 1 Features The W5 JDC4 has the following features Translates messages and data between DeviceNet and a serial peripheral device Up to 4 serial devices can be connected simultaneously ODVA Group 2 Only Slave ODVA Conformance tested to DeviceNet Spec 2 0 Defined as a DeviceNet Communications Device Profile 12 Autobaud operation Messaging of Serial Data e Poll e COS e Cyclic Explicit Messaging e Serial data e Configuration data Pad mode option Byte swapping option Master Slave handshake option Individual software configurable parameters for each serial port DeviceNet address and baud rate selection via DIP switches Panel mount 2 micro DeviceNet connectors
41. ed in Section 5 3 6 Attribute 7 defines the size in bytes of the DeviceNet message to be sent by the W5 JDC4 to the Master Attribute 2 holds the record number of the data string in Attribute 3 5 3 9 Status Byte Description The status byte is an OR d bitfield of a number of status and exceptions 22 Western Reserve Controls W5 JDC4 User s Manual Revision 1 02 Table 5 1 Serial Status Byte Bit 20 Overflow 5 3 9 1 TX FIFO Overflow The transmit queue has overflowed resulting in a loss of data The transmit I O is full of data waiting to be transmitted Some of the data added has been lost When space becomes available in the TX this bit will be reset 5 3 9 2 Rx FIFO Overflow The receive queue has overflowed resulting in a loss of data The receive is full of data waiting to be processed The data has been lost When space becomes available in the RX I O this bit will be reset 5 3 9 3 Parity Error If this bit is set then a parity error occurred while processing the current record 5 3 9 4 Data in TX FIFO If this bit is set there is data in the transmit FIFO 5 3 9 5 Data in RX FIFO If this bit is set there is data in the receive FIFO 5 3 9 6 Non Delimited Record This bit signifies the currently displayed record was not the result of encountering a delimiter This bit does not necessarily specify an error It is up to the application to determine what the source of the err
42. ength information is never sent to the ASCII device Therefore if the Short String or String data type is used the W5 JDC4 uses this information internally and does not send it to the ASCII device 21 Western Reserve Controls W5 JDC4 User s Manual Revision 1 02 Data Byte 1 Data Byte 2 al Data Byte N Figure 5 1 Receive Array Data Format Length Byte Data Byte 1 Data Byte 2 pede c Data Byte N Figure 5 2 Receive Short String Data Format Len Byte 0 Len Byte 1 Data Byte 1 Data Byte 2 Data Byte Figure 5 3 Receive String Data Format 5 3 7 Setting Up the Scanner Receive Size The W5 JDC4 automatically calculates the number of bytes it will send the DeviceNet Master Its value is determined by a combination of the incoming data and the options you have selected The Produce size in the DeviceNet Object reflects the size of the DeviceNet message to be sent by the W5 JDC4 to the Master IMPORTANT If you are using a Scanner that must receive a constant message length such as an xxxx DNB scanner you must set its input value to this number of bytes 5 3 8 Explicit Messages to Receive the Serial Data String Class 114 Instance ch Attribute 2 3 7 and 14 contain the record number data size and status of the most recent incoming serial data string You can use the data to read your device s ASCII data via the Explicit Messaging technique Attribute 3 holds the most recent received data As explain
43. erflow The COS connection is mutually exclusive with 28 Western Reserve Controls W5 JDC4 User s Manual Revision 1 02 the cyclic connection but can coexist with the polled connection The COS connection operation is very useful in conserving bandwidth and provides the Master with the most current data as fast or faster than a poll connection The COS connection automatically turns on the COS mechanism when the connection is created 5 5 3 Setting up the DeviceNet I O Connections It is useful to first set up your serial Ink before setting up your connection To set up the communications with your network configuration tool it is often necessary to know the connection input and output sizes Instructions for setting up your serial connection are provided above See the sections on receive and transmit sizes If you are using a network configuration tool with some type of scanner or scanning software you must direct your scanner to set up the connections for you This often requires some information about the device such as input and output sizes The input and output sizes are computed from the transmit size and the receive sizes These sizes are defined in the transmit and receive objects of your device The transmit size of the poll connection is computed by adding 4 to the Transmit Buffer Size on the W5 JDC4 The Transmit size for the change of state and cyclic connections are set to 0 because these connections do not initiate a transmiss
44. es in the serial Enabled 2 24 bit Swap Disabled NV messages will be swapped every 2 3 Enabled or 4 bytes 3 32 bit Swap Enabled Data entry point for EDS editors to allow ERa Fator 100 Get Set the separating of T Dia ot mne NULL ransmit string the string length for the user 45 Western Reserve Controls W5 JDC4 User s Manual Revision 1 02 Data entry point for EDS Editor EDS editors to allow Length of the Size Get Set the separating of transmit string No Data the string length for the user 8 8 3 1 Hardware Interface Instance This is the instance of the serial port object that this object gets its data from On the W5 JDC4 this is attribute is get only and defined as its own attribute number 8 8 3 2 Transmit Record Number This is the transmit record number Changing this number causes a transmit of the data stored in attribute 3 according to the delimiter parsing rules 8 8 3 3 Transmit Data This is the data you wish to send to the remote serial device 8 8 3 4 Data String Type This is the data type 8 8 3 5 Maximum Transmit String Length This attribute is stored in non volatile memory This attribute has get and set access This attribute defines the maximum length allowed for a transmit string This attribute is used in computing the location and size of the port in assembly objects If this attribute is set to 0 the object is considered disabled and no processing associated with this object occurs
45. fied in the receive_character_length parameter See Section 8 9 3 5 plus 4 bytes for header The quantity of pad characters sent can vary from message to message depending upon the size of the incoming string 5 3 3 1 Pad Mode Selection Pad mode is included with our device for compatibility with Scanners that cannot receive variable length I O messages Notable examples include many Allen Bradley s scanners at the time of this printing For such scanners Pad mode must be ON a value of 1 Turning Pad mode ON will not harm scanners that do support variable length receive messages The default value for Pad Mode is ON If your scanner does support variable I O messaging lengths you may turn the Pad Mode option OFF a value of 0 to conserve some network bandwidth Using pad mode will also make received data easier to parse since the data position in memory will be pre determined The selection of Pad Mode is valid only for the DeviceNet message that the W5 JDC4 produces It has no effect on DeviceNet messages sent from the Scanner to the W5 JDC4 To select or deselect pad mode use Class 114 Instance ch Attribute 5 5 3 3 2 Pad Mode Character The W5 JDC4 allows you to specify the character that pad mode uses to pad the received serial data This can be set to any valid I O value 0 127 in 7 bit modes 0 255 in 8 bit modes To change pad character use Class 114 Instance ch Attribute 6 19 Western Reserve Controls W5 JDC4 User s Man
46. haracter in the string and EXCLUDE_DELIMITER 2 do not include the received delimiter in the string 8 9 3 11 Stop Delimiter Mode This attribute is Get Set This attribute is stored in non volatile memory Controls the end of the string Once the stop character is received the new data flag is set Valid selections are NO DELIMITER 0 do not use delimiters to set the string INCLUDE DELIMITER 50 Western Reserve Controls W5 JDC4 User s Manual Revision 1 02 1 include the character in the string and EXCLUDE_DELIMITER 2 cb not include the received delimiter in the string 8 9 3 12 Swap Mode This attribute is Get Set This attribute is stored in non volatile memory Swap mode arranges the data into little endian form along 2 3 or 4 byte selectable boundaries The maximum transmit length should be a multiple of the swap mode size setting Swap mode is used to put data into human readable form for ease of use 8 9 3 13 Status May be read to determine status of transmit or receive records 8 9 3 14 Timeout Delay This attribute is Get Set This attribute is stored in non volatile memory The Timeout Delay is a new addition to the WRC block formatting algorithm This attribute allows implementers to define a timeout delay If the unit does not receive a character before this timer expires the unit will then indicate that new data is available The unit will restart this timer every time a character is received and p
47. has changed science the last power cycle 0 Switch has not changed 1 Switch has changed science the last power cycle 0 63 settable 64 99 settable 0 hardware 125K 1 hardware 250K 2 hardware 500K 3 9 software selectable 0 Do not AutoBaud 1 Automatically Detect baudrate MaclD hardware MaclD software the Size in bytes Size in Bytes This indicates if the switch has been changed science the This is only settable if the MacID Baudrate switch is in the software settable range else this will represent the hardware set options The hardware set options will be stored in non volatile storage The baudrate will represent the actual baudrate of the network in this case The autobaud algorithm will operate only if it s attribute value is set to 1 If the baudrate attribute attribute 2 is set autobaud attribute 100 will be disabled If the autobaud attribute is set to zero 39 Western Reserve Controls W5 JDC4 User s Manual Revision 1 02 on the next power cycle the unit will use the baudrate specified by the baudrate attribute attribute 2 f the switches are set to values 02 on power up the baudrate attribute will be set to the selected baudrate and the autobaud attribute will be set to disabled If the switches are set to 3 9 the values set in non volatile memory will be used 8 4 Assembly Object Class 4 The assembly objects are static meaning only attribute 3 of the instances is Get
48. he serial device and the W5 JDC4 Set up the ASCII buffer sizes on the W5 JDC4 The defaults are 20 and 20 If more than 20 bytes are required for the transmit or receive buffers set the appropriate parameters in your configuration file to the buffer size you need for your ASCII data NOTE This will modify the IO message size You will need to reconfigure the poll C O S cyclic transmit and receive data sizes if you modify the ASCII buffer size from the default value In many configuration tools this will un map the data in your scanner s scan table They must be remapped in order to be able to process the data in your PLC or PC software These values are displayed in Table 8 11 and Table 8 12 2 4 How to Read Serial Device Data from the W5 JDC4 1 2 Connect to the W5 JDC4 from your DeviceNet Configuration Manager tool Connect the serial side of the W5 JDC4 to your computer s serial port or another serial device Go to the device configuration screen in the Configuration Manager Set the baudrate and framing format of the serial port to the baudrate and framing format of the serial device that you are using Put the Configuration tool in to monitor mode Direct the device that you are communicating with to send data For example if you are connected to a computer terminal program type a message into the terminal When you hit enter the module will update the data with the message that you typed and increment the record nu
49. ion 1 02 8 DeviceNet Profile Objects and Services This section along with the DeviceNet specification Volumes 1 and 2 Errata 5 completely describes the public operation of the device Factory self test and factory configuration options are not described in this manual 8 1 W5 JDC4 DeviceNet Profile This section describes the DeviceNet Objects present in the I O The I O conforms to Type 12 Communications Adapter Device Table 8 1 DeviceNet Objects DeviceNet Object of Instances Class Identity 4 Message Router 22 MGE OM J 3 12 Assembly Consume Assembly Produce Assembly 3 Explicit Msg COS Cyclic 112 70 4 113 71 114 72 36 Western Reserve Controls W5 JDC4 User s Manual Revision 1 02 8 2 Identity Object Class 1 Instances 0 and 1 exist in the W5 JDC4 Table 8 2 Identity Object Class Attributes Instance 0 Attribute Access DeviceNet 2 Rule Data Type ONONE 1 1 Get Revsio UINT Revision of this object T Maximum instance number of an Instance object currently Max Class Attribute ID number of the last class Get Attribute ID UINT attribute of the class definition implemented in the device Max Instance Attribute ID number of the last 7 Get Attributes ID UINT instance attribute of the class definition implemented in the device Table 8 3 Identity Object Instance Attributes Instance 1
50. ion on the serial link The receive size of all three connections is computed by adding the 4 bytes of the header to the receive buffer size Important Remember to re map the data if necessary after you set the sizes because many configuration tools will automatically un map your data when you change the connection sizes If you are not using such a software package it is probably not necessary to set up the transmit and receive sizes 5 5 4 Setting up the Connection Timer EPR EPR stands for Expected Packet Rate This is the value that the W5 JDC4 sets the connection timer to for the cyclic and polled connection This is also the value it uses in the connections to calculate the time the device should wait before signaling a timeout If you have a scanner or scanning software you must configure it with the EPR that you want the W5 JDC4 to be scanned with The scanner will then configure the EPR in the W5 JDC4 at the beginning of communications Consult your scanner s manuals on how to configure the EPR the EPR is sometimes referred to as the scan rate Note If you need to set up the EPR it can be done manually by performing a set Service 1044 on the connection class Class 5 attribute 9 The polled connection uses instance 2 where as the COS and cyclic connections use instance 4 This must be done after allocating the connection 5 5 5 Setting up the DeviceNet Baudrate Autobaud is the mechanism that allows the DeviceNet device
51. king is not active and the W5 JDC4 sends new data as soon as it is received from the ASCII device Default See Section 5 4 9 for details Western Reserve Controls W5 JDC4 User s Manual Revision 1 02 2 Quick Start To quickly install your W5 JDC4 in your DeviceNet system follow the instructions below For more details see Section 4 Where the nstance ch notation is used ch is the serial channel Table 2 1 Instances of the Serial Channels 1 Class Instance Serial Channel 704112 7154113 7254114 70 112 7154113 725 114 70112 71 4113 72114 705 112 71113 72114 2 1 How to Install and Establish DeviceNet Communications 1 10 Connect your DeviceNet network cable to a 5 pin female or male micro style connector according to DeviceNet cable wiring specifications Make sure that the DeviceNet network is properly terminated The W5 JDC4 Node Address MacID is set to 63 at the factory Make sure no other device on the network is set to 63 or change the W5 JDC4 address to one that is not currently used See Section 4 4 for MacID rotary switch settings W5 JDC4 baud rate is set to Autobaud operation at the factory No baud rate setting is required If a fixed baudrate is needed set the baudrate rotary switch to the required baudrate See Section 4 4 for actual settings Make sure that there is power on the DeviceNet network and plug the cable into the W5 JDC4 W5 JDC4 will
52. laced into the buffer that does not trigger the new data bit The new data bit may be acted on immediately if the device s handshake mode is set to Immediate A change in record that was caused by a timeout of a buffer overflow will set the non delimited record bit 8 9 4 Receive Record Object Instance Services Returns the contents of the Y A on Get Attribute Single Specified attribute Set_Attribute_Single Modifies an attribute value 8 10 Common DeviceNet Services DeviceNet is divided into logical functional blocks called objects which provide services that allow for control over the hardware and routines that those objects contain To allow for multiple similar functions the objects are built of multiple instances that the services of the objects act upon A class service acts upon the entire object allowing one service to be enacted on all of the instances This saves time effort and network bandwidth The common services are a common set of services that have been provided in most or all of the objects to allow for common functionality in creating deleting getting setting and resetting the variables of the different classes and instances We will describe two of the services here get and set The get and set services have a common format for specifying what object instance attribute and service that the command is specifying In order of first to last DeviceNet specifies service class instance attribute an
53. mber The default assembly format of the poll message is shown below Western Reserve Controls W5 JDC4 User s Manual Revision 1 02 2 4 1 Example Assembly for Serial Receive Table 2 2 shows the produced assembly for 20 characters of ASCII data default with padding enabled Table 2 2 Default Input Serial Receive Assembly Format Record Number Status Reserved Length ASCII Data Channel 1 Byte 24 Byte25 Byte26 Byte27 Byte28to47 Record Number Status Reserved Length ASCII Data Channel 2 Byte 48 Byte49 Byte50 Byte51 Byte52to 71 Record Number Status Reserved Length ASCII Data Channel 3 Byte 72 Byte 73 Byte 74 Byte 75 Byte 76 to 95 Record Number Status Reserved Length ASCII Data Channel 4 Note The default data type is Short String which includes one length byte 2 4 2 The Receive Max Character Length The parameter is found in the Receive Record Object Class 114 Instance ch Attribute 7 Changing this parameter to zero 0 will eliminate only the data the header will still be produced and sent to the master Western Reserve Controls W5 JDC4 User s Manual Revision 1 02 2 5 How to Write Serial Output Data to the W5 JDC4 1 Do steps 1 6 of Section 2 4 above 2 Each channel has a factory default of 20 characters maximum If more is needed see section 8 9 3 7 and 8 8 3 5 for details Enter the serial data that you wish to send in the transmit data parameter See Section 8 8 3 3 Change the Length
54. of the data in the length byte to reflect the length you wish to send Change the Record Number The W5 JDC4 will generate the characters that you typed in on the computer screen The assembly formats of these messages are configurable and are covered in Section 6 2 5 1 Example Assembly for Serial Transmit Table 2 3 shows the produced assembly for 20 characters of ASCII data default with padding enabled Table 2 3 Default Output Serial Transmit Assembly Format Byte 0 Byte 1 Byte 2 Byte 3 Bytes 4 to 23 Reserved umber Reserved Length ASCII Data Channel 1 Byte 24 Byte 25 Byte 26 Byte 27 isis 10 Reserved Reserved Length ASCII Data Channel 2 Byte 48 Byte 49 Byte50 Byte 51 de Ey 19 Reserved Reserved Length ASCII Data Channel 3 Byte 72 Byte 73 Byte74 Byte75 pice to Reserved macora Numba Reserved Length ASCII Data Channel 4 Note The default data type is Short_String which includes one length byte Note If using a delimiter you must use the actual length of the string including the delimiter for the data size whether or not it fills the entire data block 2 5 2 The Transmit Max Character Length The parameter is found in the Transmit Record Object Class 113 Instance ch Attribute 5 Changing this parameter to zero 0 will eliminate only the data the header will still be consumed and should be sent by the master Western Reserve Controls W5 JDC4 User s Manual Revisi
55. on 1 02 3 General Specifications 0000 RS232 or RS485 interface and DeviceNet network Device Profile Identity Object Message Router Object DeviceNet Object Assembly Object 2 instances Connection Object Acknowledge Object Serial Object vendor specific 4 instances Transmit Serial Object vendor specific 4 instances Receive Serial Object vendor specific 4 instances Product Code 730 2DA re Vendor ID 9 Western Reserve Controls Inc DeviceNet Conformance Designed to conform to the ODVA DeviceNet Specification Volume and Il Version 2 0 DeviceNet Communications Predefined Master Slave Connection Set Group 2 Only Server DeviceNet Baud rate selection 125k 250k and 500k baud and autobaud switch selectable Address selection Address number 0 to 63 switch selectable default 63 Cable Connection W5 JDC4 2 5contact standard DeviceNet micro connectors one male one female DeviceNet Cable 5 contact standard DeviceNet micro connectors Status Indicators Module Status green red bi color LED Network Status green red bi color LED Serial port Baud rate 1200 2400 4800 9600 19 2k 38 4k 57 6k 115 2k baud software selectable Parity Odd even none software selectable Data bits 7 or 8 software selectable 10 Western Reserve Controls W5 JDC4 User s Manual Revision 1 02 Serial port connection W5 JDC4
56. or is This bit along with the length specifier creates an easy source to determine what caused the currently shown record If this bit is not set a delimiter encountered in the parsed ASCII data caused the record change If this bit is set you must compare the length byte to the maximum length If the Maximum length is equal to the length of the buffer then the record was caused by a fill event If the length is not equal to the maximum length parameter then the record was caused by a timeout event 5 3 9 7 Handshake Error This error will occur only in Master Slave Handshake Mode It indicates that the Master has requested a new data record from the W5 JDC4 but the W5 JDC4 has not indicated new data is available to be sent 23 Western Reserve Controls W5 JDC4 User s Manual Revision 1 02 5 3 9 8 New Data This bit is used only when the Master Slave Handshake option is active When the W5 JDC4 receives a new data string into its serial port it sets this flag in its DeviceNet response message The bit will remain set for 2 produce messages after the Master requests the new data It then will be reset 24 Western Reserve Controls W5 JDC4 User s Manual Revision 1 02 5 4 Transmitting Serial Data to the ASCII Device 5 4 1 Overview The W5 JDC4 transmits a number of characters from the DeviceNet Master to your serial device via e Messaging e Explicit Messaging The received character string is transmitted when e The specific n
57. ot in Length of the Gaal handshake mode transmit string No Rata Otherwise the behavior is the same 8 9 3 1 Hardware Interface Instance This is the instance of the serial port object that this object gets it s data from On the W5 JDC4 this is attribute is get only and defined as its own attribute number EDS Editor Size EDS Editor Receive Record Number 8 9 3 2 Receive Record Number This attribute is Get Set This attribute is not stored in non volatile memory The Record number when changed will cause new data to be put in to the received data attribute The record number will change automatically on the set of the new data bit if the Handshake mode is set to Auto increment 1 When the received record number is changed either by the algorithm or by the PLC the new data bit will be reset You may not se the new data bit toggle if the Handshake mode is set to auto increment 49 Western Reserve Controls W5 JDC4 User s Manual Revision 1 02 8 9 3 3 Received Data This is the data received from the remote device This attribute has get only access 8 9 3 4 Received Data Format This attribute defines the format of the received data Please see the description of the choices on the transmit record object for behavior and allowable values 8 9 3 5 Pad Mode Pad mode is factory defaulted to 1 to allow the assembly objects to properly line up data In the W5 JDC4 this parameter is get set See Attribute 5 in Table 8 12
58. ough pad mode This is a function where characters are appended to the end of the serial data in order to fill out the poll response The default for pad mode is ON and the default for the pad character is 0 NULL 34 Western Reserve Controls W5 JDC4 User s Manual Revision 1 02 Note Turn pad mode ON if you receive errors indicating that the I O data response is too short W5 JDC4 also supports byte reordering to support non string data type l O s The DeviceNet network data ordering scheme is little endian meaning that the low byte of a multi byte messages transmitted first This means that if you are using an I O that is using a 16 bit or larger word size and you map the 1 data directly into this space without string support your data bytes will show up swapped The W5 JDC4 implements byte reordering swapping in order to ease use these PLC s The swapping mechanism re orders the I O data so that is appears correctly on l O s that use Little endian byte order and greater than 8 bit word sizes To Implement byte swapping determine the number of bytes in your data size Subtract 1 from this number and set the Receive Record object s byte swapping attribute to this value Now you must set the length of your message size to a multiple of 1 this value or the W5 JDC4 will not be able to swap the bytes correctly The data will now be ordered properly in your W5 JDC4 35 Western Reserve Controls W5 JDC4 User s Manual Revis
59. owed causing the loss of received data 3 RX Parity Error The Next Character in the Receive FIFO has a parity error associated with it 4 TX FIFO has data 5 RX FIFO has data 8 7 3 2 Flow Control Status This Parameter is reserved 8 7 3 3 Flow Control Type This Parameter is reserved for future expansion 8 7 3 4 Serial Character Framing Format This attribute defines the framing format of the character It includes Data Bits Parity Selection And Stop Bits 8 7 3 5 Serial Baud Rate This Attribute defines the baudrate of the associated serial port 8 7 3 6 Notify TX path This attribute defines the endpoint for the transmit FIFO service The transmit FIFO service expects the path defined to accept 3 bytes of data The first 2 bytes represent the instance of the reporting object The third byte represents the state of the object These states include 0 FIFO is Empty 1 FIFO has data 2 FIFO has overflowed These status messages will only be relayed when the status of the object instance changes If the path is null no object will be notified On the W5 JDC4 This value is hard coded to NULL and is get only 43 Western Reserve Controls W5 JDC4 User s Manual Revision 1 02 8 7 3 7 Notify RX path This attribute defines the endpoint for the transmit FIFO service The transmit FIFO service expects the path defined to accept 3 bytes of data The first 2 bytes represent the instance of the reporting object The thir
60. red and prepared to send to the DeviceNet Master If either delimiter is used you also can elect whether or not to include those characters in the string sent to the Master 5 3 6 Receive String Data Type This is the format of the data array short string or string you will send to the DeviceNet Master These are shown below Which one you pick depends on your application and will modify the format of the data field This is the format of the data you will send to the W5 JDC4 array short string or string These shown below Which one you pick depends on your application and will modify the format of the data field The Array data type does not have a length associated with it It is equivalent to specifying a length of zero using a string or short string data type The Short String data type is the default data type of the device This will suffice for most applications The Short String data type has only one byte of length and the rest of the data bytes are appended after the length The String data type has two bytes of length The String data type is useful in talking to some PLC s or other devices that have a data file specifically made to handle this data type The length is little endian low byte high byte and the high order byte should always be set to zero The W5 JDC4 will only receive up to 128 bytes of information so the extra byte although required for this data type is always O Note This data l
61. rs up to and including the received delimiter padding the remaining bytes if the serial string is smaller than the maximum receive bytes for that channel When the W5 JDC4 receives a new message either with a delimiter or with an overflow condition without a delimiter the device then increments the receive record updates the length byte and copies the new information from the last receive delimiter into the buffer If an overflow occurs the W5 JDC4 indicates so in its receive status bit The receive status byte also reflects parity errors in the device 5 5 2 Cyclic and Change of State I O The Cyclic connection initiates a transmission every time the connection timer expires This is explained below in the Section 5 5 4 The cyclic connection can only send data from the W5 JDC4 If you need to transmit on the I O link you will need to use the polled connection to do so The polled and cyclic connections are not exclusive so both can exist at the same time The manner in which cyclic connection reports its data is the same as the polled connection The cyclic connections transmit buffer is the same as the polled connections transmit buffer so overflows and received delimiters act the same over any connection The Change of State COS connection is the same as the cyclic connection except that as well as triggering communications on the expiration of the timer the COS connection also initiates a transfer on a receive of the delimiter or an ov
62. s are implemented in the DeviceNet object on the W5 JDC4 Table 8 6 Class 3 Instance Attributes DeviceNet Description of Data Type Attribute USINT Mac ld of the device Baud rate that the Baud rate USINT device participates in BOOL bus activities with Number of times can went to the bus off state This is a bit field of the currently allocated UST Group 2 Connection Set BOOL BOOL USINT This indicates if the switch has been USINT Autobaud BOOL changed science the last power cycle m Get UINT uid Access Rule Get Set NV Get Set NV Attribute o Defines how a device processes a bus off interrupt Get Set Bus Interrupt Bus Counter Allocation Choice Byte Get MACID Switch Changed Baudrate Switch Changed last power cycle Macld Switch value The actual value of the MacID switch Baudrate Switch Value The actual value of the Baud Rate BCD switch Use the autobaud algorithm to determine the network Baudrate Size of the Consume Assembly associated with the poll and COS connections Size of the produce assembly associated with the poll and COS connections Consume Assembly Size 2 3 4 1 1 1 5 7 0 0 0 1 Produce Assembly Size Get Semantics of Value 0 63 0 Hold in bus off condition 1 reset the bus off condition and continue operating on the network if possible 0 Switch has not changed 1 Switch
63. smit record object will return the DeviceNet error code SERVICE NOT SUPPORTED 44 Western Reserve Controls W5 JDC4 User s Manual Revision 1 02 8 8 3 Transmit Record Object Instance Attributes Table 8 11 Class 113 7144 Transmit Record Object Instance Attributes Parameter Default Default e Hardware Interface 1 m Serial port number Seriar ponse USINT 3 4 Number Number Instance Record number TX Record assigned to the 2 Get Set data string to be 0 255 USINT sent to the serial device Get Set sast trdrimitted N a None USINT serial data 0 Array rn Format of data 1 Short String Array USINT 2 String Maximum number of characters the Number of 5 E 1782 l O expects to 0 128 20 chars USINT receive into its I O Tx Chars port from the serial device Character which identifies the end of Any valid Transmit oon the data string from standard I O Carriage End Dhex USINT Delimiter the I O device when character return the length is 0 127 0 255 specified as 0 USINT USINT USINT Short String Selects if the Tx 0 No Delimiter Transmit GevSev delimiter is used 1 Exclude the Delimiter 7 included or delimiter Include excluded in the 2 Include The resultant data string delimiter Defines if the received string is D N 5 Get Set sent immediately in 0 2 Disabled No hand poll mode or after a 1 Enabled shake change in the Tx Record Number If enabled the 0 Disabled 1 16 bit Swap position of the byt
64. tances of the Serial Port Object on the W5 JDC4 Each Instance of the Serial Port Object corresponds to a physical port on the W5 JDC4 board 8 7 1 Serial Port Class Attributes There are no Class Attributes associated with the serial port object 8 7 2 Serial Port Class Services There are no serial port services associated with this device 8 7 3 Serial Port Instance Attributes Reserved Reserved Serial Character Framing Format Table 8 10 Class 112 7044 Serial Port Object Instance Attributes Default Default n Bit 0 Tx FIFO overflow Serial port Bit 1 Rx FIFO overflow status Bit 2 Rx parity error OK BYTE Bit 3 Tx FIFO has data Bit 4 Rx FIFO has data Get Set Flow Get Set Character USINT framing 4 19 yo Get Set communicati 9600 3 USINT NV baud ons speed 7 Object to notify when receive NULL events happen Object to EPATH Serial Baud Rate Notify Rx Path EPATH 2 lt Notify TX EPATH 42 Western Reserve Controls W5 JDC4 User s Manual notify when transmit events happen 8 7 3 1 Status The Status of the Serial Port is an Array of bits that correspond to the current status of the serial object FIFO and or the next character in the serial object buffer There are currently 5 defined bits 1 TX FIFO overflow The Transmit FIFO has overflowed causing the loss of Transmitted data Send less data 2 RX FIFO overflow The Receive FIFO has overfl
65. to set the delimiter to a value outside of the valid range for your data bits Note A data bit size setting of 7 will only allow you a delimiter range of 0 127 dec 00 7Fhex If you do not have a valid delimiter or the delimiter is never received the device will only update the output buffer on detection of an overflow condition These values can be set and retrieved by using the standard set and get services on Class 113 Instance ch Attributes 6 and 7 5 4 4 Setting up and using the TX Byte Swap Mode This option may be helpful if the W5 JDC4 is connected to a DeviceNet scanner that organizes the data string characters into data type elements that are larger than 1 byte each An example is many Allen Bradley PLC s such as the SLC500 In such cases the bytes d the data in the Master s memory organization can be reversed from the order in which they are sent or received on the DeviceNet and the serial link to the ASCII device This may cause problems in some cases See Section 5 3 4 above Setting Up and Using the Swap Bytes Mode 25 Western Reserve Controls W5 JDC4 User s Manual Revision 1 02 5 4 5 Transmitting from the Master to the W5 JDC4 You can transmit data to the W5 JDC4 from the Master using 2 methods Poll I O or Explicit Messages Both require understanding and setting up some parameters 5 4 6 Transmit String Data Type This is the format of the data you will send from the Master array short string or string to
66. ual Revision 1 02 5 3 4 Setting Up and Using the Swap Bytes Mode This option may be helpful if the W5 JDC4 is connected to a DeviceNet scanner that organizes the data string characters into data type elements that are larger than 1 byte each An example is many Allen Bradley PLC s such as the SLC500 In such cases the bytes of the data in the Master s memory organization can be reversed from the order in which they are sent or received on the DeviceNet and the serial link to the ASCII device This may cause problems in some cases Thus the message received or desired ABCDEFGH string may appear in memory as BADCFEHG for 2 byte 16 bit word organization and DCBAHGFE for 4byte 32 bit word organization 5 3 4 1 Transmit Byte Swapping If Class 113 Instance ch Attribute 9 is non zero the bytes from the Master will be swapped by the W5 JDC4 before transmitting the string to the ASCII device 5 3 4 2 Receive Byte Swapping If Class 114 Instance ch Attribute 12 is non zero the W5 JDC4 will re order the bytes received from your ASCII device before sending the string to the Master 5 3 4 3 Rules for Usage 1 This feature is set for both transmit and receive independently 2 The Byte Swapping works better if the string length is an even multiple of the byte swap size 3 If a delimiter is received then All characters up to and including the defined delimiter are sent to the DeviceNet Master f Pad Mode 1
67. uffer is full the event detection system will close the data switch and set a new data status When the new data status is set if the device is set up in auto increment mode the object will automatically increment the record number and clear the new data bit In this situation the user will not be allowed to set the Receive Record Number and it will not be included in the poll request assembly The W5 JDC4 now includes functionality to allow you to specify the data type of the string The string may be set to the DeviceNet data types of STRING SHORT STRING or ARRAY The difference between the data types is how the length of the string is reported The STRING data type has a two byte indicator for length This data type may be used to directly map your data into an A B controller that supports the string data file The SHORT STRING data type is the classic data type from the W5 JDC4 revisions 5 and under This data type has a 1 byte length and data space savings The ARRAY data type does not have a length field and may be used if you do not need to know the length of your received data The W5 JDC4 also supports scanners that are not fully DeviceNet compliant and do not support short poll responses These short poll responses save bandwidth on the DeviceNet network but many scanners do not support this functionality and will not allow communication with a device that responds in this manner The W5 JDC4 supports this non compliant behavior thr
68. umber of bytes defined Transmit Character Buffer Length is received or e The defined End of String Terminator character is detected When either of these events occurs the W5 JDC4 stores the DeviceNet string data into its internal buffer and will then transmit it out its serial port In order to transmit data to your serial device the data must first be sent to the W5 JDC4 and then the W5 JDC4 must send the data to the serial device The options for transmitting from the Master to the W5 JDCA are discussed first Note Instance ch channel number 1 2 3 or 4 5 4 2 Setting up the Transmit Character Buffer Length The Transmit character buffer length is the number of characters that the W5 JDC4 can receive in its transmit buffer from the DeviceNet system This size contributes to the Consume Size This size can be found in Class 113 Instance ch Attribute 5 5 4 3 Setting Up and Using the Transmit Delimiter The transmit delimiter is a end of string character which is used by the W5 JDC4 to determine how many bytes to transmit over the serial link to your W5 JDC4 device This Transmit Delimiter will be used if the Transmit Buffer Length equals 0 If the buffer length is not 0 the W5 JDC4 will ignore the transmit delimiter The W5 JDCA will transmit up to and including the delimiter when the above condition is met The transmit delimiter can be set to any valid character that can be received over the link Be very careful not
69. undergo its initialization sequence flashing both LED s red and green After approximately 5 seconds the Module Status LED labeled MS will flash green The Network Status LED labeled NS will remain off This condition occurs while the W5JDC4 is attempting to synchronize to the network baudrate The Module Status LED MS will go on solid after the Device successfully determines the network baudrate This requires devices on the network attempting to communicate with each other The Network Status LED labeled NS will begin to flash green If it turns solid red check for a duplicate on the network It will remain off until the W5 JDC4 receives a valid DeviceNet message from which it will set its baud rate W5 JDC4 is now operating on the network You may now map the W5 JDC4 into your scanner The data format may be found in Sections 8 4 1 and 8 4 2 Once the Master recognizes the unit on the link and allocates the connection initiates communications The Network Status LED will be solid green The device is now being actively scanned Western Reserve Controls 2 2 Default Settings W5 JDC4 User s Manual Revision 1 02 The following list shows the default set up for the parameters of each channel Serial Port Serial Character Framing Serial Port Comm Speed Serial Port Receive from ASCII Device Max Number of Receive Chars Receive Record Start Mode Receive Start Delimiter Receive Record End Mod
70. viceNet LEDs The W5 JDC4 has two LEDs that provide visual status information to the user about the product and the DeviceNet network See Tables 51 and 52 that follow below for how to interpret LED status indications Table 4 1 Module Status LED labeled MS OFF There is no power through DeviceNet Device Operational W5 JDC4 is operating normally Flashing Green Device in Standby W5 JDC4 needs commissioning e g attempting autobaud Unrecoverable Fault W5 JDC4 may need replaced Flashing Red Recoverable fault Flashing Red Green Device Self Testing W5 JDCA is in self test mode 13 Western Reserve Controls W5 JDC4 User s Manual Revision 1 02 Table 4 2 Network Status LED labeled NS OFF No Power Not on line W5 JDC4 has no power or has not completed the Dup_MAC_ID test Flashing Green W5 JDC4 is on line but is not allocated to a Master Flashing Red One or more I O connections are timed out Critical link failure W5 JDC4 has detected an error that makes it incapable of communicating on the link Bus off or Duplicate MAC ID 4 2 2 Serial Port LEDs The W5 JDC4 has two 2 RS 232 activity LEDs for each of the 4 channels one for transmit TX and one for receive RX These LEDs are electrically tied to the serial data lines and will illuminate when there is data signals active on the respective data lines and the W5 JDC4 has power 4 3 Serial Port Connector The ASCII devices are connected to the W5JDC4 via a

Download Pdf Manuals

image

Related Search

Related Contents

取扱説明書[HH-LC218L] (1.11 MB/PDF)  COM SIKOSTART 3RW22 - Service, Support    OWNER`S MANUAL  45A Colle Contact Polystyène  Medisana HGN User Guide  NORMAS DE USO NORMAS DE USO 2.3 4.1 4.3 4.2 2.2 1.1 1.2a  オールインワン・クラウド・システム HP CloudSystem 概要のご紹介  

Copyright © All rights reserved.
Failed to retrieve file