The text of a manual · part 8 of 13
FLEX I/O PROFIBUS Adapter (Cat. No. 1794-APB) User Manual: 4 - Configure the Adapter for Master/Slave Communication, pages 52 to 59
Pages 52 to 59 of 90, from FLEX I/O PROFIBUS Adapter (Cat. No. 1794-APB) User Manual
The original document is the PDF (924 KB). 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 1794-IB16
Page 52
Chapter
4
Configure the Adapter for Master/Slave Communication What this Chapter Contains
In this chapter, we describe: • how master/slave communication takes place
• • • •
How Master/Slave Communication Takes Place entering user parameter data entering check configuration data read configuration response data a programming configuration example using Allen-Bradley PROFIBUS manager software
A data exchange between the master and slave cannot be performed until check configuration and send parameter data are issued. Each time you power-up the network, the master sends check configuration and send parameter data to the slave (FLEX I/O adapter). Check configuration data determines or checks the number of input and output words used by each FLEX I/O module. Send parameter data contains device-specific parameters you define for each FLEX I/O module.
PROFIBUS Manager Software Catalog Number 1785-PFBMGR
You need a software configuration tool to set the values associated with these parameters. If you are using the Allen-Bradley 1785-PFB/B coprocessor as a master, you must use the Allen-Bradley PROFIBUS Manager Software configuration tool. Since the FLEX I/O adapter is compatible with any master, you can use any configuration tool available on the market. The device database (GSD) file is included on the software diskette you received with your shipment of the FLEX I/O adapter. The GSD file is used by your configuration tool to help you set up your system. Your configuration tool automatically reads the GSD file and extracts defaults used in the data exchange.
Software diskette with GSD file
The file is in ASCII format and you can view it with any text editor. A printed copy of your GSD file appears in Appendix B of this user manual. The user parameter data fields are not defined in the GSD file. Depending on the format you choose, you may have to manually edit these values with your configuration tool.
Publication 1794-6.5.6 – April 1996
Page 53
4–2
Configure the Adapter for Master/Slave Communication
More Information...
Entering User Parameter Data
For more information on how you define and enter these user parameter values, refer to the documentation associated with your master and software configuration tool. If you are using an Allen Bradley 1785-PFB/B Coprocessor master, refer to publications 1785-6.5.15 and 1785-6.5.20.
Send parameter data is comprised of a string of octets (1–32) that contains 244 bytes of data:
• octets 1–7 contain data specific to the: – PROFIBUS standard – defaults contained in the database (GSD) file • octets 8–32 are user configurable and contain user parameter data. User parameter data consists of these formats:
– auto configure – condensed – full The following illustration shows the structure of the send parameter data table. Octet 1
Octet 2
Octet 3
Station Status
Watchdog Watchdog Control Control
Octet 4 Octets 5&6 Minimum Ident. Station Number Delay
These values are defined by the PROFIBUS standard. The defaults are provided by the GSD file.
Publication 1794-6.5.6 – April 1996
Octet 7
Octets 8–32
Group Ident.
User Parameter Data
You configure these values using your software configuration tool.
Page 54
Configure the Adapter for Master/Slave Communication
4–3
User Parameter Data The first byte of the user parameter data is the flags byte. This byte selects the appropriate format and also specifies adapter behavior. The flags byte is defined in the following table: Send Parameter Data Flags Byte Bit Position
Name
Description
0–1
Format Selection
2–3
Fault Action
4
Format Selection
5–7
Reserved
00 = Auto Configure 01 = Reserved 10 = Condensed 11 = Full 00 = Reset to zero 01 = Hold Last State 10 = Use Safe State 11 = Reserved 0 = Reset inputs to zero 1 = Hold Last Value Reserved bits must be zero
If the send parameter data is received with no user parameter data, the flags byte is set to zero which selects:
• auto configure • reset outputs to zero on fault • reset inputs to zero on fault The reserved bits must be set to zero to prevent undesired firmware update behavior. This is the default behavior of the module as defined in the GSD file. The descriptions in this chapter use the following example FLEX I/O configuration to explain the information required for each of these functions: 1794-APB Adapter Slave 1794-IB16
1794-OB16
1794-IE8
1794-OE4 Flex I/O System
Module ID#: 0281h ID#: 0191h ID# 1920h
ID# 1121h
Publication 1794-6.5.6 – April 1996
Page 55
4–4
Configure the Adapter for Master/Slave Communication
Auto Configure Format The Auto Configure format allows you to change modules without affecting the User Parameter or Check Configuration data. This format provides no keying from the master on the I/O modules installed in the FLEX I/O system. The installed module at power-up is taken as the key. If you change a module while it is being controlled by a master, a minor recoverable fault will occur. To recover from this fault, you must replace the module with an identical module type. User Parameter Example User Parameter Message, Auto Configure Format (Length 1 byte) Name
Value
Octet 8: 00h
Description Auto Configure Format, Reset to Zero on Fault
Condensed Format The condensed format consists of the flags byte and the module key parameter for each of the eight slots. This parameter dictates which I/O module must be installed. If at any time the actual module ID does not match this module key, the slot will be considered in fault and the following occurs:
• STATUS LED flashes red/off • an error bit in the poll response data is set • a diagnostic bit in the Ext_Diag_Data field returned in the Read DP–Slave Diagnostic Information message response is set All eight slots must be configured. The size for this format is always 17 bytes (including the flags byte). The condensed format structure must be repeated for each of the eight slots. Data format for Condensed Format Name
Size
Description
Module Key
WORD
Module ID # that must be installed1
1 Only bits 0–12 are used. Bits 13–15 must be zero except when keying an empty slot where 0FFFFh is used.
Publication 1794-6.5.6 – April 1996
Page 56
Configure the Adapter for Master/Slave Communication
4–5
The following table shows the identification numbers for current FLEX I/O modules. FLEX I/O Module Catalog Number
Module Identification Number (module key)
Four-word Modules 1794-IB16
0281h
1794-OB16
0191h
1794-IA8
0285h
1794-OA8
0195h
1794-IB8S
0289h
1794-OW8
0199h
Sixteen-word Modules 1794-IE8/A
1920h
1794-OE4/A
1121h
1794-IE4XOE2/A
1522h
1794-IT8
1B00h
1794-IR8
1B01h
1794-IE8/B
1924h
1794-OE4/B
1125h
1794-IE4XOE2
1526h
1293-FM1
1600h
When you use the condensed format, no safe state data can be defined, thus the safe state data is left at the power up default of all zeroes. Setting the Fault Action in the byte to Use Safe State with this format is the equivalent of setting Reset to Zero. User Parameter Example User Parameter Message, Condensed Format (Length 17 bytes) Name
More Information...
Value
Octet 8:
02h
Octet 9–10: Octet 11–12: Octet 13–14: Octet 15–16: Octet 17–18: Octet 19–20: Octet 21–22: Octet 23–24:
0281h 0191h 1920h 1121h 0FFFFh 0FFFFh 0FFFFh 0FFFFh
Description Condensed Format, Reset to Zero on Fault, Rest Inputs to Zero 1794-IB16 16-point discrete input module 1794-OB16 16-point discrete output module 1794-IE8 8-point analog input module 1794-OE4 4-point analog output module Empty Empty Empty Empty
Refer to the configuration example on page 4–11 to understand how and where to enter this data.
Publication 1794-6.5.6 – April 1996
Page 57
4–6
Configure the Adapter for Master/Slave Communication
Full Format The full format consists of the flags byte and four parameters for each of the eight slots. The module key parameter is the same for the full format as defined by the condensed format, but adds three more parameters for each slot. Use the full format to:
• provide Safe State values for output points • send FLEX I/O module configurations once (when you send parameters) instead of every poll
• configure data sizes to reduce the size of data required during run mode You must configure all eight slots. The minimum size is 25 bytes (no slots have FLEX I/O module configuration or safe state data). The maximum size is 237 bytes (the size of the PROFIBUS user parameter area). Data format for Full Format Name
Size
Description
Module Key Module Data Sizes2 Safe State Data
WORD BYTE
Module Configuration Data
ARRAY
Module ID that must be installed1 Bits 0–3 Safe State Size (in words) Bits 4–7 Config Size (in words) Output Safe States. Word array of size Safe State Size. Flex Module Configuration. Word array of size Config Size.
ARRAY
1 Only bits 0–12 are used. Bits 13–15 must be zero except when keying an empty slot where 0FFFFh is used. 2 Each of the two sizes can range from 0–15 words but when combined cannot exceed 15 words total.
There are some possible configurations of FLEX I/O modules that would exceed the user parameter area of 237 bytes. Be aware of the totals of the words and modules you are using.
Publication 1794-6.5.6 – April 1996
Page 58
Configure the Adapter for Master/Slave Communication
The data format is repeated for each Flex I/O slot. and all slots are configured, even when empty.
Slot #1
Slot #2
Slot #3
Slot #4
Flags byte Module Key Module Data Sizes Module Configuration Data Module Key Module Data Sizes Safe State Data Module Key Module Data Sizes Module Configuration Data Module Key Module Data Sizes Module Configuration Data Safe State Data
Slot #5 Slot #6 Slot #7 Slot #8
Module Key Module Data Sizes Module Key Module Data Sizes Module Key Module Data Sizes Module Key Module Data Sizes
More Information...
4–7
User Parameter Example User Parameter Message, Full Format (Length 43 bytes) Name
Value
Description
Octet 8: Octet 9–10: Octet 11: Octet 12–13: Octet 14–15: Octet 16: Octet 17–18: Octet 19–20: Octet 21: Octet 22–23: Octet 24–25: Octet 26: Octet 27–28: Octet 29–30: Octet 31–32:
02h 0281h 10h 0000h 0191h 01h 0000h 1920h 10h 0000h 5121h 24h 0000h 0000h 0000h
Full Format, Reset to Zero on Fault Slot 1 Module Key 1794-IB16 16-point discrete input module Slot 1 config size 1 word, safe state size 0 words 1 config word, input delay times Slot 2 Module Key 1794-OB16 16-point discrete output module Slot 2 config size 0 words, safe state size 1 word 1 safe state data word, safe state value for output points Slot 3 Module Key 1794-IE8 8-point analog input module Slot 3 config size 1 word, safe state size 0 words 1 config word, channel selection Slot 4 Module Key 1794-OE4 4-point analog output module Slot 4 config size 2 words, safe state size 4 words 2 config words – channel selection and
Octet 33–34:
0000h output point 2
Octet 35–36:
0000h output point 3
Octet 37–38:
0000h output point 4
Octet 39–40: Octet 41: Octet 42–43: Octet 44: Octet 45–46: Octet 47: Octet 48–49: Octet 50:
0FFFFh 00h 0FFFFh 00h 0FFFFh 00h 0FFFFh 00h
Slot 5 empty Slot 5 all sizes zero Slot 6 empty Slot 6 all sizes zero Slot 7 empty Slot 7 all sizes zero Slot 8 Empty Slot 8 all sizes zero output enable 4 safe state data words – safe state value for output point 1
Refer to the configuration example on page 4–11 to understand how and where to enter this data.
Publication 1794-6.5.6 – April 1996
Page 59
4–8
Entering Check Configuration Data
Configure the Adapter for Master/Slave Communication
On a PROFIBUS DP network, the I/O data exchanged between the PROFIBUS DP master and a DP slave is encapsulated into logical modules. The total I/O data exchanged between a PROFIBUS DP master and a DP slave device comprises a set of logical modules which is defined in the check configuration data. Each physical slot of the FLEX I/O system is represented by two logical modules (one input and one output). When the FLEX I/O adapter is powered-up, the check configuration message configures the module format (input and output words) and defines the size of the modules within the device. When the sizes are configured, the I/O data can be optimized to remove unused data from the data stream. Both input and output sizes can be configured. If a slot is empty, or if either the input or output module is zero length, the specific identifier for an empty module (free place) must be used. If the end of the identifiers is reached before all slots have been configured, the remaining slots are configured as empty. The first two modules allocated are for the adapter itself, and must always be a 1 word input module and a 1 word output module, regardless of what parameter format you choose. The adapter uses these words for adapter status information. Modules for each of the individual slots (FLEX I/O modules) must also follow these word assignments. The format of the adapter status word is defined in the following table: Adapter Status Word Input Status Word Bit Position
Name
Description
0
Address Change
1–7 8–15
Reserved I/O Module Fault1
This bit is set when the Node Address switch is changed since power up. Sent as zeroes. This bit is set when an error is detected in a slot position (bits 0–7 refer to slots 1–8)
Output Status Word Bit Position 0–15
Name Reserved
Description Sent as zeroes.
1 I/O Module Faults are caused by:
• transmission errors on the FLEX I/O backplane • bad module • removed module • incorrect module inserted
The adapter expects the identifier area for each of the eight FLEX I/O slots to be 2 bytes. The DP input/output identifier and all specific DP identifiers (except the empty module) are not supported. Publication 1794-6.5.6 – April 1996