Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeContact

The text of a manual · part 14 of 22

1747-SDN DeviceNet Scanner Module User Manual: 8 - DeviceNet Explicit Messaging

Pages 93 to 102 of 160, from 1747-SDN DeviceNet Scanner Module User Manual

The original document is the PDF (3.9 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the Allen-Bradley 1747-SDN

Page 93

Chapter

8

DeviceNet Explicit Messaging

DeviceNet Explicit Message Instruction Overview

The DeviceNet Explicit Message (DEM) instruction allows generic Common Industrial Protocol (CIP) commands to be initiated to devices, such as drives, communicating on DeviceNet networks. This instruction requires RSLogix 500 software, version 7.10 or later, for programming. The DEM instruction utilizes the explicit message capability built into the 1747-SDN DeviceNet scanner module. While not adding any additional capability over what already exists in the scanner module, the DEM instruction greatly simplifies the programming, configuration, monitoring, and troubleshooting of explicit messages on the DeviceNet network. Unlike I/O configured in the scanner module’s scanlist, which is updated on a continual basis, explicit messages allow data to be sent and received on an as-needed basis, minimizing network traffic. For instance, you may only want to write configuration parameters to a drive once at machine start-up time. The DEM instruction can be used with any SLC 5/03, SLC 5/04, or SLC 5/05 processor that is at OS firmware level Series C, FRN 10 or later. The DEM instruction uses an integer control block for storing the instruction parameters and a configuration setup screen, similar to the MSG instruction. The CIP commands consist of a Service Code; the object Class, Instance, and Attribute; and Send and Receive Data (if required for the selected Service Code). The setup dialog provides a list of standard CIP Services to select from, including: • Read Assembly. • Write Assembly. • Read Parameter. • Write Parameter. • Generic Get Attribute Single. • Generic Set Attribute Single. In addition, a Custom setting lets you enter any Service Code. Send data and receive data are stored in separate data table files.

93

Publication 1747-UM655B-EN-P - June 2007

Page 94

94

DeviceNet Explicit Messaging

DeviceNet Explicit Message (DEM)

This is an output instruction that lets you initiate unconnected CIP Generic messages via a 1747-SDN module installed in the local chassis. These messages can be initiated to any node on the same DeviceNet network as the 1747-SDN module, as long as the node is in the scanner’s scanlist. The scanner can be in either Idle mode or Run mode. Each module can process only one DEM instruction at a time. The instruction is similar in operation to a standard MSG instruction.

DEM Instruction Parameters Enter the following parameters when programming this instruction: • Control Block is an integer file address that you select. It is a block of words, containing the status bits and other data associated with the DEM instruction. It also contains the Send and Receive data. • Control Block Length is a display-only field that indicates how many integer file words are being used by the control block. For the DEM instruction, the length is always 70 words.

DEM Instruction Setup Screen Parameters The following sections provide parameters for the DEM instruction setup screens.

Parameters for This Controller on the General Tab • 1747-SDN Slot This pull-down menu lists all of the local slots that contain DeviceNet scanner (1747-SDN) modules within the I/O Configuration. Select the slot number of the particular module that this explicit message will be initiated through. • Size in Send Data (Bytes) This field defines how many bytes of data are sent along with this explicit message command. If unsure of how much data will be sent, you may select up to the maximum size of 52 bytes when defining the instruction, and then reduce the size later based on experience.

Publication 1747-UM655B-EN-P - June 2007

Page 95

DeviceNet Explicit Messaging

95

Parameters for Target Device on the General Tab • Message Timeout(x1 sec) The amount of time in seconds that the processor will wait for a reply from the scanner to the explicit message command. Range is 0, 2…255. Like the Message Timeout in a standard MSG instruction, a value of 0 disables the Message Timeout and a value of 1 second gets bumped to 2 seconds upon instruction execution. If the built-in Message Timeout is disabled, user-programmed timeout logic must be included to avoid a message lockup in the case where a reply is lost. • DeviceNet Addr (dec) The target DeviceNet node address. Valid range is 0…63. If you enter in the local scanner’s DeviceNet node address, the command is executed by the local scanner. • Service This pull-down menu lets you select services based on name rather than Service Code. The Custom service lets you enter in any Service Code in the hexadecimal range of 1…7F. The services listed in the pull-down menu are: – Read Assembly. – Write Assembly. – Write Output Point. – Read Output Point. – Read Input Point. – Read Parameter. – Write Parameter. – Read Analog Input. – Write Analog Output. – Generic Get Attribute Single. – Generic Set Attribute Single. – Reset Identity Object. – Custom. • Service Code (hex) This field is read-only unless the Custom Service is selected. Possible Service Codes are 1…7F (hex). See Volume 1 of the CIP Common Specification, Appendix A, for the list of valid explicit messaging Service Codes.

Publication 1747-UM655B-EN-P - June 2007

Page 96

96

DeviceNet Explicit Messaging

• Class (hex)/(dec) Possible Classes are 0…FF (hex). See Volume 1 of the CIP Common Specification for the list of defined Classes. You may either enter in a hexadecimal Class value in the (hex) field or a decimal Class value in the (dec) field. • Instance (hex)/(dec) Possible Instances are 0…FFFF (hex). See Volume 1 of the CIP Common Specification for the list of valid Instances for each Class. You may either enter in a hexadecimal Instance value in the (hex) field or a decimal Instance value in the (dec) field. • Attribute (hex)/(dec) Possible Attributes are 0…FF (hex). See Volume 1 of the CIP Common Specification for the list of valid Attributes for each Class. You may either enter in a hexadecimal Attribute value in the (hex) field or a decimal Attribute value in the (dec) field. Note that if the value of the Attribute is set to 0, the DeviceNet scanner does not transmit an Attribute byte. Some Service Codes require that a zero-value Attribute byte be transmitted. For these Service Codes, the first byte of the Send Data must be set to zero and the Size of Send Data (Bytes) must include this additional byte.

Definitions for Message Status Bits on the General Tab The table below lists the various status bits associated with the DEM instruction as displayed in the DEM instruction setup screen. DEM Instruction Setup Screen Status Bits

Publication 1747-UM655B-EN-P - June 2007

Bit Definition

Bit Mnemonic

Bit Address

Abort

AB

08

Error

ER

12

Page 97

DeviceNet Explicit Messaging

97

DEM Instruction Setup Screen Status Bits Bit Definition

Bit Mnemonic

Bit Address

Done

DN

13

Enabled

EN

15

Waiting for slot

WS

10

• Abort bit AB (word 0, bit 8) lets you abort an executing DEM instruction by setting this bit. The ER bit will be set as soon as the AB bit is set. This bit is reset the next time the message rung goes from false to true. • Error bit ER (word 0, bit 12) is set when the message has failed to complete successfully. This bit is reset the next time the message rung goes from false to true. Do not set or reset this bit. It is informational only. • Done bit DN (word 0, bit 13) is set when the message has completed successfully. This bit is reset the next time the message rung goes from false to true. Do not set or reset this bit. It is informational only. • Enabled bit EN (word 0, bit 15) is set after the message rung goes from false to true AND the module accepts this message because it is not currently processing any other explicit messages. (The module can process only one DEM instruction at a time.) If the message rung goes false before the module accepts this message, then the enable bit will remain off and the message will not be executed. This bit is reset when the message has completed with either the Done bit set or the Error bit set and the message rung goes false. If the message rung conditions remain true, you may retrigger the message instruction by resetting this bit after either the ER or DN bit has been set, indicating that the previous execution has completed. • Waiting for Slot bit WS (word 0, bit 10) is set when the message rung goes from false to true, but the module is still processing another DEM instruction. To be sure that this message gets processed, you must leave the message rung conditions true until the WS bit is reset and the EN bit is set, indicating that the module has accepted this message for processing. Do not set or reset this bit. It is informational only.

Publication 1747-UM655B-EN-P - June 2007

Page 98

98

DeviceNet Explicit Messaging

Scanner Status, Error, and Error Description on the General Tab The error code displays the explicit message status returned by the module. An error code of 01h means Transaction completed successfully. DEM Instruction Scanner Codes Scanner Code

Description of Scanner Status

2H

Transaction in progress.

3H

Slave not in scanlist.

4H

Slave offline.

5H

DeviceNet port disabled/offline.

6H

Transaction TXID unknown.

7H

Slave not responding to explicit request.

8H

Invalid command code.

9H

Scanner out of buffers.

10H

Another transaction in progress.

11H

Could not connect to slave device.

12H

Response data too large for block.

13H

Invalid port.

14H

Invalid size specified.

15H

Connection busy.

All error codes listed above result in an error code of 2. Complete List of Valid DEM Error Codes Error Code

Description of Error Condition

0

No error.

1

Timeout error. DeviceNet explicit message timed out by processor.

2

Scanner error. See Scanner Status.

3

User error. DeviceNet explicit message aborted by user.

For error code 4, the error description displays the CIP response error code and description as documented in the CIP Response Error Codes table.

Publication 1747-UM655B-EN-P - June 2007

Page 99

DeviceNet Explicit Messaging

99

CIP Response Error Codes Numeric Code

Name

Description

02H

Resource unavailable

A needed resource was not available

08H

Service unsupported

Service is not defined or implemented for this class/instance

09H

Invalid attribute value

Data is invalid for the specified attribute

0BH

Already in requested state

Object is in the requested state - redundant request

0CH

Object state conflict

Not allowed with object in present state

0EH

Attribute cannot be set

Read-only attribute

0FH

Privilege violation

A permission/privilege check failed

10H

Device state conflict

Not allowed with device in present state

11H

Reply too big

Reply larger than buffer allocated when connection was established

13H

Too little data

Request included insufficient data

14H

Attribute not supported

Attribute number is incorrect

15H

Too much data

Request included extra data

16H

Object does not exist

Class/instance numbers are incorrect

18H

No stored attribute data

Attribute data was not saved prior to this request

19H

Store operation failure

Attribute data was not successfully saved

1FH

Vendor-specific error

Second byte may offer details - refer to vendor documentation

20H

Invalid parameter

Parameter associated with request is invalid

D0H

Reserved and service-specific errors

Used only when none of the standard error codes supplemented by the second byte accurately describes the problem

FFH

Any time the error code is non-zero, the DEM error (ER) bit is set.

Publication 1747-UM655B-EN-P - June 2007

Page 100

100

DeviceNet Explicit Messaging

Send Data Tab The Send Data Tab provides a convenient way of viewing and entering in data to be sent along with the explicit message command. The data is shown in byte format with a selectable radix of either decimal or hex/BCD. The display shows only the number of words that are defined in the Size of Send Data (Bytes) field, starting with the low byte of the first word. If the Size of Send Data is zero, then no data is displayed. You can also change the data being viewed, but only when offline or during an online edit. Click on the data and enter in a byte value based on the current radix (0…255 for decimal and 0 to FF for hex/BCD). The changed data gets copied to the DEM control block when the rung is accepted. To update the Send Data display with the current values stored in the DEM control block, click Refresh.

Receive Data Tab The Receive Data Tab provides a convenient way of viewing the data that is returned by the target device in response to the explicit message command sent. The data is shown in byte format with a selectable radix of either decimal or hex/BCD. The display shows 58 bytes of receive data, starting with the low byte of the first word. To update the Receive Data display with the current values stored in the DEM control block, click Refresh.

Publication 1747-UM655B-EN-P - June 2007

Page 101

DeviceNet Explicit Messaging

101

Control Block Layout The control block layout is shown below.

SLC 5/0x DeviceNet Explicit Message (DEM) Control Block Structure 15 Word 0

14

EN

13

12

DN

ER

Word 1

11

10 WS

09

08

07

06

05

04

AB

Error Code

IMR

Message Timeout Preset

Word 2

Message Timeout Accumulator

Word 3

Message Timer Scaled Zero

Word 4

Unused

Word 5

Unused

Word 6

Transaction ID

Scanner Command

Word 7

Scanner Port (always 0x00)

Size of Send Data (in bytes)

Word 8

Service Code

Target MAC ID

Word 9

Reserved (not transmitted)

Class

03

02

01

0

Word 10 Instance Word 11 Reserved (not transmitted)

Attribute (optional)

Word 12 Transaction Send Data …

(next 26 words)

Word 37 Word 38 Transaction ID

Scanner Status

Word 39 Scanner Port (always 0x00)

Size of Reply Data (in bytes)

Word 40 Reply Service Code

Target MAC ID

Word 41 Transaction Reply/Receive Data …

(next 29 words)

Word 69

Publication 1747-UM655B-EN-P - June 2007

Page 102

102

DeviceNet Explicit Messaging

Publication 1747-UM655B-EN-P - June 2007