当前位置:首页 >> 工学 >>

PCS7 LIB Driver Blocks Manual (1999.11)


27.01.00 16.11.99

Contents Signal blocks and diagnostic drivers PROFIBUS PA - Blocks

1 2 A

SIMATIC PCS 7 Driver Blocks

Appendix Index

Manual

11/99 C79000-G7076-C752 Edition 01

27.01.00 16.11.99

Safety Guidelines
This manual contains notices which you should observe to ensure your own personal safety, as well as to protect the product and connected equipment. These notices are highlighted in the manual by a warning triangle and are marked as follows according to the level of danger:

! ! !

Danger
indicates that death, severe personal injury or substantial property damage will result if proper precautions are not taken.

Warning
indicates that death, severe personal injury or substantial property damage can result if proper precautions are not taken.

Caution
indicates that minor personal injury or property damage can result if proper precautions are not taken.

Note
draws your attention to particularly important information on the product, handling the product, or to a particular part of the documentation.

Qualified Personnel
Only qualified personnel should be allowed to install and work on this equipment. Qualified persons are defined as persons who are authorized to commission, to ground, and to tag circuits, equipment, and systems in accordance with established safety practices and standards.

Correct Usage
Note the following:

!

Warning
This device and its components may only be used for the applications described in the catalog or the technical descriptions, and only in connection with devices or components from other manufacturers which have been approved or recommended by Siemens. This product can only function correctly and safely if it is transported, stored, set up, and installed correctly, and operated and maintained as recommended.

Trademarks
SIMATIC?, SIMATIC HMI? and SIMATIC NET? are registered trademarks of SIEMENS AG. Some of other designations used in these documents are also registered trademarks; the owner's rights may be violated if they are used by third parties for their own purposes.

Copyright ? Siemens AG 1999 All rights reserved
The reproduction, transmission or use of this document or its contents is not permitted without express written authority. Offenders will be liable for damages. All rights, including rights created by patent grant or registration of a utility model or design, are reserved.

Disclaimer of Liability
We have checked the contents of this manual for agreement with the hardware and software described. Since deviations cannot be precluded entirely, we cannot guarantee full agreement. However, the data in this manual are reviewed regularly and any necessary corrections included in subsequent editions. Suggestions for improvement are welcomed.

Siemens AG
Bereich Automatisierungs- und Antriebstechnik Geschaeftsgebiet Industrie-Automatisierungssysteme Postfach 4848, D- 90327 Nuernberg Siemens Aktiengesellschaft

?Siemens AG 1999 Technical data subject to change.

C79000-G7076-C752

27.01.00 16.11.99

Contents

1

Signal blocks and diagnostic drivers 1.1 1.1.1 1.2 1.2.1 1.3 1.3.1 1.4 1.4.1 1.5 1.5.1 1.5.2 1.6 1.6.1 1.6.2 1.7 1.7.1 1.7.2 1.8 1.8.1 1.8.2 1.9 1.10 1.11 1.11.1 1.12 1.12.1 1.13 1.14 1.14.1 1.14.2 1.15

1-1

CH_AI: Analog Input................................ ............................... ....................1-1 . . I/O bar of CH_AI................................ ............................... ..........................1-4 . . CH_AO: Analog Output................................ ............................... ................1-5 . . I/O bar of CH_AO ................................ ............................... ........................1-7 . . CH_DI: Digital Input................................ ............................... .....................1-9 . . I/O bar of CH_DI................................ ............................... ........................1-11 . . CH_DO: Digital Output................................ ............................... ............... 1-12 . . I/O bar of CH_DO................................ ............................... ......................1-14 . . MOD_1: Monitoring of S7-300/400 SM modules which cannot be diagnosed with 16 channels maximum ................................ .......................1-14 . I/O bar of MOD_1 ................................ ............................... ......................1-17 . . Message texts of MOD_1 ................................ ............................... ........... 1-19 . . MOD_2: Monitoring of S7-300/400 SM modules which cannot be diagnosed with 32 channels ................................ ............................... ....... 1-20 . . I/O bar of MOD_2 ................................ ............................... ......................1-22 . . Message texts of MOD_2 ................................ ............................... ........... 1-24 . . MOD_D1: Monitoring of S7-300/400 SM modules which can be diagnosed with 16 channels maximum................................ ............................... ........ 1-25 . . I/O bar of MOD_D1................................ ............................... ....................1-28 . . Message texts of MOD_D1................................ ............................... ........ 1-31 . . MOD_D2: Monitoring of S7-300/400 SM modules which cannot be diagnosed with 32 channels ................................ ............................... ....... 1-32 . . I/O bar of MOD_D2................................ ............................... ....................1-35 . . Message texts of MOD_D2................................ ............................... ........ 1-37 . . Addressing................................ ............................... ............................... . 1-39 . . . MODE ................................ ............................... ............................... ....... 1-39 . . . RACK: Signal rack failure ................................ ............................... ........... 1-42 . . I/O bar of RACK................................ ............................... .........................1-45 . . SUBNET: Runtime group control for driver blocks ................................ ...... 1-46 . I/O bar of SUBNET ................................ ............................... ....................1-49 . . PO_UPDAT: Update process image................................ ..........................1-50 . IM_DRV: Transferring time-stamp process signal changes ed ......................1-50 I/O bar of IM_DRV................................ ............................... .....................1-55 . . Interface IM153-2................................ ............................... .......................1-56 . . Error information of the MSG_STAT output parameter ................................1-59 2-1

2

PROFIBUS PA - Blocks 2.1 2.1.1

PA_AI: Analog Input PROFIBUS PA................................ ............................2-1 . I/O bar of PA_AI................................ ............................... ...........................2-2 . .

PCS 7 Driver Blocks C79000-G7076-C752-01

iii

27.01.00 16.11.99

Contents

2.2 2.2.1 2.3 2.3.1 2.4 2.4.1 2.5 2.5.1 A

PA_AO: Analog Output PROFIBUS PA................................ ........................2-4 . I/O bar of PA_AO................................ ............................... .........................2-6 . . PA_DI: Discrete Input PROFIBUS PA................................ ..........................2-9 . I/O bar of PA_DI................................ ............................... ........................2-11 . . PA_DO: Discrete Output PROFIBUS PA................................ .....................2-12 . I/O bar of PA_DO ................................ ............................... ......................2-14 . . PA_TOT: Totalizer PROFIBUS PA................................ .............................. -17 . 2 I/O bar of PA_TOT................................ ............................... .....................2-18 . . A-1

Appendix A.1

Technical data................................ ............................... .............................A-1 . . Index - 1

Index

iv

PCS 7 Driver Blocks C79000-G7076-C752-01

27.01.00 16.11.99

1

Signal blocks and diagnostic drivers

1.1

CH_AI: Analog Input

Type/Number
FC 275

Calling OBs
The watchdog interrupt OB into which the block is installed (for example OB 32). If you use the CFC driver wizard, it interconnects the input MODE automatically to the respective output OMODE_xx of the module diagnostic block.

Application
The block is used for signal processing of an analog input value from S7-300/400 SM analog input modules.

Functional description
The block processes all the channel-specific signal functions cyclically.

Operating principle
The block reads an analog non-linearized value from the (partial) process image and adapts it to its physical size or determines a percentage value from it. The MODE input parameter is used to determine in which form the non-linearized value exists and is to be processed. If the high byte of the MODE input parameter = 16#40 (value status = higher-level error), the non-linearized value is handled as invalid. A quality code which can have the following states is generated for the resultant value:
State Valid value Simulation Substitution value Invalid value Quality code 16#80 16#60 16#48 16#00

PCS 7 Driver Blocks C79000-G7076-C752-01

1-1

27.01.00 16.11.99

Signal blocks and diagnostic drivers

Non-linearized value check
Depending on the measured value and the measuring range a nominal range of the analog input module is obtained by converting the analog signal into a digital value (non-linearized value). In addition there is an over- and underrange in which the analog signal can still be converted. There is an overflow or underflow outside these limits. The block indicates whether the non-linearized value lies inside the nominal range of the module. If the value drops below the nominal range, the output parameter value QCHF_LL = TRUE is set. If the value exceeds the nominal range, the output parameter value QCHF_HL = TRUE is set. In case of an overflow or underflow QBAD = TRUE (channel error) is also set. Exception: At 4 to 20 mA signals QCHF_HL = TRUE and QBAD = TRUE is set when a wire breaks.

Note In case of a wire breakage at 4 to 20 mA signals the module response is not uniform. Depending on the module either 16#7FFF (overflow) or 16#8000 (underflow) is written as the non-linearized value into the process image. The channel block CH_AI then correspondingly sets either an overflow (QCHF_HL = TRUE) or an underflow (QCHF_LL = TRUE) together with QBAD = TRUE is output.

NAMUR limit check
The NAMUR guidelines for analog signal processing define limits for life zero (4 to 20 mA) analog signals which have a channel error: 3.6 mA = Analog signal = 21 mA. The above NAMUR limits are set as fixed defaults for limit monitoring. If you want to set other limits, you have to set the input parameter CH_F_ON = TRUE and set corresponding new values for the input parameters CH_F_HL and CH_F_LL in mA. If the lower or upper active limit is exceeded, QBAD = TRUE is set at a life zero analog signal.

Note The selectable limits must lie below the overrange or above the underrange of the module. Values outside the NAMUR range are also possible in as far as the module does not limit the measured values automatically to these.

Addressing
The symbol generated with HWConfig in the symbol table for the analog input channel has to be interconnected to the VALUE input parameter.

1-2

PCS 7 Driver Blocks C79000-G7076-C752-01

27.01.00 16.11.99

Signal blocks and diagnostic drivers

Normal value
The non-linearized value is adapted to its physical value on the basis of the input parameters VLRANGE, VHRANGE and MODE (see OMODE_xx) In order to allow interconnecting of the settings of VLRANGE and VHRANGE to other block parameters, these have to be written to the outputs OVLRANGE and OVHRANGE. The conversion algorithm is based on a linear input signal. If VLRANGE = 0 and VHRANGE = 100, a percentage value is output. If VHRANGE = VLRANGE is set, the input signal of the analog input module (for example mA) is output in accordance with the MODE setting. If the non-linearized value is already a physical value, set VLRANGE = 0 and VHRANGE = 1. The quality code is set to (QUALITY =) 16#80.

Simulation
If the input parameter SIM_ON = TRUE, the value of the input parameter SIM_V is output with the quality code (QUALITY =) 16#60. A valid mode must also be set in simulation mode in the low word of the input MODE. Otherwise QBAD = 1 is output. Simulation has the highest priority.

Substitute value
If the input parameter SUBS_ON = TRUE, the value of the input parameter SUBS_V is output as the value in as far as the non-linearized value is invalid. The quality code is set to (QUALITY =) 16#48.

Hold last value
If the input parameter SUBS_ON = FALSE, the last valid output parameter is output if the non-linearized value is invalid. The quality code is set to (QUALITY =) 16#00.

Error handling
No plausibility checks are carried out with reference to the input parameters. In case of invalid operating mode in the low word of the MODE input parameter it is assumed that the non-linearized value is invalid.

Start-up characteristics
Do not exist.

Time response
Does not exist.

PCS 7 Driver Blocks C79000-G7076-C752-01

1-3

27.01.00 16.11.99

Signal blocks and diagnostic drivers

Message characteristics
The block does not have message characteristics.

Operator control and monitoring
The block does not have a faceplate.

1.1.1
Element CH_F_HL CH_F_LL CH_F_ON MODE

I/O bar of CH_AI
Meaning High Limit of Input Value (mA) High limit of input value (mA) Low Limit of Input Value (mA) Low limit of input value (mA) 1=Limit Failure Active Activate limit monitoring Quality and Mode Value status (quality) and mode High Range of Process Value (Copy) Upper limit of the process value (copy) Low Range of Process Value (Copy) Lower limit of the process value (copy) 1=Bad Process Value 1=Bad process value 1=Input Value High Limit Failure 1 = Input value overloaded 1=Input Value Low Limit Failure 1 = Input value underloaded 1=Simulation Active 1=Simulation active 1=Failure Substitution Active 1 = Substitution value feedforward active DWORD REAL REAL BOOL BOOL BOOL BOOL BOOL IO O O O O O O O I I I I I I I BOOL IO I REAL IO I Type REAL Initial I/O IO Attr. I O Valid M&C values

OVHRANGE OVLRANGE QBAD QCHF_HL QCHF_LL QSIM QSUBS

QUALITY SIM_ON SIM_V SUBS_ON

Quality Code of Process Value Status of the process value 1=Activate Simulation 1=Activate simulation Simulation Value Simulation value 1=Enable Failure Substitution 1 = Substitution value feedforward enabled

BYTE BOOL REAL BOOL

O IO IO IO I I

1-4

PCS 7 Driver Blocks C79000-G7076-C752-01

27.01.00 16.11.99

Signal blocks and diagnostic drivers

Element SUBS_V V V_LAST VALUE VHRANGE VLRANGE

Meaning Substitution Value Substitution value Process value Process value Last Valid Process Value Last valid process value Input Value Input value High Range of Process Value Upper limit of the process value Low Range of Process Value Lower limit of the process value

Type REAL REAL REAL WORD REAL REAL

Initial

I/O IO O IO IO IO IO

Attr.

O Valid M&C values

I

1.2

CH_AO: Analog Output

Type/Number
FC 276

Calling OBs
The watchdog interrupt OB into which the block is installed (for example OB 32) and the restart OB100. If you use the CFC driver wizard, it interconnects the input MODE automatically to the respective output OMODE_xx of the module diagnostic block.

Application
The block is used for signal processing of an analog output value from S7-300/400 SM analog output modules.

Functional description
The block processes all the channel-specific signal functions cyclically.

Operating principle
The block writes a process value as an analog non-linearized value into the (partial) process image. The MODE input parameter is used to determine in which form the non-linearized value is to be generated. If the high byte of the MODE input parameter = 0 (value status), the non-linearized value continues to be written into the (partial) process image - however, a quality code "invalid value" is set.
PCS 7 Driver Blocks C79000-G7076-C752-01

1-5

27.01.00 16.11.99

Signal blocks and diagnostic drivers

The quality code can have the following states:
State Valid value Open value limited Lower value limited Simulation Invalid value Quality code 16#80 16#56 16#55 16#60 16#00

Addressing
The symbol generated with HWConfig in the symbol table for the analog output channel has to be interconnected to the VALUE output parameter.

Normal value
? The parameters ULRANGE and UHRANGE map the process value U onto the non-linearized value VALUE (quantification stages) of the analog output module depending on the MODE. For example in the mode 4..20mA (16#0203) the non-linearized value for 4mA is output for U = ULRANGE and the non-linearized value for 20mA is output for U = UHRANGE. ? PHYS_LIM is used to set the limitation of the VALUE non-linearized value. In the default setting (PHYS_LIM = 0) the VALUE output value is limited to the normalizing limits of the module. In accordance with the above example the block calculates the non-linearized value for 20 mA for U UHRANGE and > the non-linearized value for 4mA for U< ULRANGE Accordingly the quality codes 16#56 (upper value limited) and 16#55 (lower value limited) are applied at the QUALITY output instead of the 16#80 (valid value). ? In order to output analog values outside the normalization values up to the physical limits of the module, you have to set PHYS_LIM = 1. The output values are not limited until, in the above example, the module limits are exceeded by specifying U = 200 (36mA) or U = -50 (-4mA) at ULRANGE = 0 and UHRANGE = 100. The output values are then limited to the physical limits specified in the data sheets of the modules and the corresponding quality codes are output. ? The outputs QCHF_HL and QCHF_LL also provide information on whether the output values have been limited.

Simulation
If the input parameter SIM_ON = TRUE, the value of the input parameter SIM_U is output with the quality code (QUALITY =) 16#60 is output. A valid mode must also be set in simulation mode in the low word of the input MODE. Otherwise QBAD = 1 is output. Simulation has the highest priority.

1-6

PCS 7 Driver Blocks C79000-G7076-C752-01

27.01.00 16.11.99

Signal blocks and diagnostic drivers

I/O fault
If the high byte of the input parameter MODE = 0 (value status), the quality code (QUALITY) = 16#00 is set. The current non-linearized value is always written into the (partial) process image.

Error handling
No plausibility checks are carried out with reference to the input parameters. In case of an invalid operating mode in the low word of the MODE input parameter the digitized output value is set to 0 and QUALITY = 16#00 is output.

Start-up characteristics
The MOD blocks set the LSB in Byte 2 of their output parameter QMODE_xx in the priority class OB100. If the block recognizes this code, it acknowledges it and then reacts as follows: If START_ON is not set, the process value U is processed and is transferred to the process image. Otherwise the non-linearized value corresponding to the START_U process value is written to the process image.

Note The CH_AO block must be installed after the MOD block assigned to it in the OB100. If you use the CFC driver wizard, this process is carried out automatically.

Time response
Does not exist.

Message characteristics
The block does not have message characteristics.

Operator control and monitoring
The block does not have a faceplate.

1.2.1
Element MODE

I/O bar of CH_AO
Meaning Quality and Mode Value status (quality) and mode Type DWORD Initial I/O IO Attr. O Valid C&M values

PCS 7 Driver Blocks C79000-G7076-C752-01

1-7

27.01.00 16.11.99

Signal blocks and diagnostic drivers

Element PHYS_LIM

Meaning 1=Enable Physical Module Limits 1 = Enabling of the physical module limits

Type BOOL

Initial

I/O IO

Attr. I

O Valid C&M values

QBAD QCHF_HL QCHF_LL QSIM QUALITY SIM_ON SIM_U START_ON

1=Bad Output Value 1 = Output value invalid 1=Process Value High Limit Failure 1 = Process value overloaded 1=Process Value Low Limit Failure 1 = Process value underloaded 1=Simulation Active 1=Simulation active Quality Code of Output Value Status of the output value 1=Activate Simulation 1=Activate simulation Simulation Value Simulation value 1=Enable Startup Substitution Value 1 = Substitution value feedforward at start-up

BOOL BOOL BOOL BOOL BYTE BOOL REAL BOOL

O O O O O IO IO IO

I I I I

I I I

START_U U UHRANGE ULRANGE VALUE

Startup Substitution Value Substitution value at start-up Process value Process value High Range of Process Value Upper limit of the process value Low Range of Process Value Lower limit of the process value Output Value Output value

REAL REAL REAL REAL WORD

IO IO IO IO O

I

1-8

PCS 7 Driver Blocks C79000-G7076-C752-01

27.01.00 16.11.99

Signal blocks and diagnostic drivers

1.3

CH_DI: Digital Input

Type/Number
FC 277

Calling OBs
The watchdog interrupt OB into which the block is installed (for example OB 32). If you use the CFC driver wizard, it interconnects the input MODE automatically to the respective output OMODE_xx of the module diagnostic block.

Application
The block is used for signal processing of a digital input value from S7-300/400 SM digital input modules.

Functional description
The block processes all the channel-specific signal functions cyclically.

Operating principle
The block reads a digital value from the (partial) process image. If the high byte of the MODE input parameter = 0 (value status), the digital value is handled as invalid. If the input parameter PQC = TRUE, the value status of the digital value is read from the (partial) process image. A quality code which can have the following states is generated for the resultant value
State Valid value Simulation Substitution value Invalid value Quality code 16#80 16#60 16#48 16#00

Addressing
The symbol generated with HWConfig in the symbol table for the digital input channel has to be interconnected to the VALUE input parameter. If the value status of the digital input channel is also in the (partial) process image, you have to interconnect the corresponding symbol with the input parameter VALUE_QC and set the input parameter PQC = TRUE.

PCS 7 Driver Blocks C79000-G7076-C752-01

1-9

27.01.00 16.11.99

Signal blocks and diagnostic drivers

Normal value
The digital value of the (partial) process image is output to the output parameter Q with quality code (QUALITY) = 16#80.

Simulation
If the input parameter SIM_ON = TRUE, the value of the input parameter SIM_I is output to the output parameter Q with quality code QUALITY = 16#60. Simulation has the highest priority.

Substitution value
If the input parameter SUBS_ON = TRUE, the value of the input parameter SUBS_I is output to the output parameter Q with quality code (QUALITY) = 16#48, in as far as the digital value of the (partial) process image is invalid.

Hold last value
If the input parameter SUBS_ON = FALSE, the last valid output parameter is output if the non-linearized value is invalid. The quality code is set to (QUALITY =) 16#00.

Error handling
No plausibility checks are carried out with reference to the input parameters.

Start-up characteristics
Does not exist.

Time response
Does not exist.

Message characteristics
The block does not have message characteristics.

Operator control and monitoring
The block does not have a faceplate.

1-10

PCS 7 Driver Blocks C79000-G7076-C752-01

27.01.00 16.11.99

Signal blocks and diagnostic drivers

1.3.1
Element MODE PQC

I/O bar of CH_DI
Meaning Quality and Mode Value status (quality) and mode 1=Use Process Image Quality Bit 1 = Use the value status (quality bit) in the process image BOOL IO I Type DWORD Initial I/O IO Attr. O Valid C&M values

Q Q_LAST QBAD QSIM QSUBS

Process value Process value Last Valid Process Value Last valid process value 1=Bad Process Value 1=Bad process value 1=Simulation Active 1=Simulation active 1=Failure Substitution Active 1 = Substitution value feedforward active

BOOL BOOL BOOL BOOL BOOL

O IO O O O I I I I

QUALITY SIM_I SIM_ON SUBS_I SUBS_ON

Quality Code of Process Value Status of the process value Simulation Value Simulation value 1=Activate Simulation 1=Activate simulation Substitution Value Substitution value 1=Enable Failure Substitution 1 = Substitution value feedforward enabled

BYTE BOOL BOOL BOOL BOOL

O IO IO IO IO I I

VALUE VALUE_QC

Input Value Input value Process Image Quality Bit Value status (quality status) in the process image

BOOL BOOL

IO IO I

PCS 7 Driver Blocks C79000-G7076-C752-01

1-11

27.01.00 16.11.99

Signal blocks and diagnostic drivers

1.4

CH_DO: Digital Output

Type/Number:
FC 278

Calling OBs
The watchdog interrupt OB into which the block is installed (for example OB 32) and the restart OB100. If you use the CFC driver wizard, it interconnects the input MODE automatically to the respective output OMODE_xx of the module diagnostic block.

Application
The block is used for signal processing of a digital output value from S7-300/400 SM digital output modules.

Functional description
The block processes all the channel-specific signal functions cyclically.

Operating principle
The block writes a process value into the (partial) process image. If the high byte of the MODE input parameter = 0 (value status), the digital value continues to be written into the (partial) process image - however, a quality code "invalid value" is set. The quality code can have the following states:
State Valid value Simulation Invalid value Quality code 16#80 16#60 16#00

Addressing
The symbol generated by HWConfig in the symbol table for the digital output channel has to be interconnected to the VALUE output parameter.

Normal value
The digital value is written to the (partial) process image and Quality Code (QUALITY) = 16#80 is set.

1-12

PCS 7 Driver Blocks C79000-G7076-C752-01

27.01.00 16.11.99

Signal blocks and diagnostic drivers

Simulation
If the input parameter SIM_ON = TRUE, the value of the input parameter SIM_I is written into the (partial) process image and the quality code (QUALITY =) 16#60 is set. Simulation has the highest priority.

I/O fault
If the high byte of the input parameter MODE = 0 (value status), the quality code (QUALITY) = 16#00 is set. The current digital value is always written into the (partial) process image.

Error handling
No plausibility checks are carried out with reference to the input parameters.

Start-up characteristics
The MOD blocks set the LSB in Byte 2 of their output parameter QMODE_xx in the priority class OB100. If the block recognizes this code, it acknowledges it and then reacts as follows: If START_ON is not set, the process value I is written to the process image. Otherwise START_I is used instead of the process value I.

Note The CH_DO block must be installed after the MOD block assigned to it in the OB100. If you use the CFC driver wizard, this process is carried out automatically.

Time response
Does not exist.

Message characteristics
The block does not have message characteristics.

Operator control and monitoring
The block does not have a faceplate.

PCS 7 Driver Blocks C79000-G7076-C752-01

1-13

27.01.00 16.11.99

Signal blocks and diagnostic drivers

1.4.1
Element I MODE QBAD QSIM QUALITY SIM_I SIM_ON START_I

I/O bar of CH_DO
Meaning Process value Process value Quality and Mode Value status (quality) and mode 1=Bad Output Value 1 = Output value invalid 1=Simulation Active 1=Simulation active Quality Code of Output Value Status of the output value Simulation Value Simulation value 1=Activate Simulation 1=Activate simulation Startup Substitution Value Substitution value at start-up BOOL IO IO I I BOOL IO I BOOL IO I BYTE O BOOL O I BOOL O I DWORD IO Type BOOL Initial I/O IO Attr. O Valid C&M values

START_ON

1=Enable Startup Substitution Value BOOL 1 = Substitution value feedforward at start-up

VALUE

Output Value Output value

BOOL

O

1.5

MOD_1: Monitoring of S7-300/400 SM modules which cannot be diagnosed with 16 channels maximum

Type/Number
FB 91

Calling OBs
Install the block with the same instance in OB100, OB70, OB72, OB83, OB85, OB86, OB1. If you use the CFC driver wizard, it configures the inputs MODE_xx. SUBN1_ID, SUBN2_ID and SUBN_TYP automatically.

1-14

PCS 7 Driver Blocks C79000-G7076-C752-01

27.01.00 16.11.99

Signal blocks and diagnostic drivers

Application
The block monitors S7-300/400 SM modules with 16 channels maximum which cannot be diagnosed (no mixed modules).

Functional description
The block analyzes all the events which affect a module acyclically. It forms the MODE and value status (quality code) for the signal processing blocks channelspecifically. Events are signaled with ALARM_8P. The signaling function can be switched off.

Operating principle
The block checks on the basis of the logical basic address of the module whether its module instance is responsible for the event in the starting info. If the input SUBN_TYP = FALSE, the rack of the module is connected to an integrated DP interface (distributed I/O device interface) of the CPU module by means of a line. Otherwise set SUBN_TYP = TRUE. Each signal channel of the module has an input (MODE_xx). Here the configurations carried out with HWConfig are signaled to the module channels. MODE_xx is read into the low word of the output parameter OMODE_xx. The current value status of the channel is entered in the highest-value byte. If good, OMODE_xx = 16#80xxxxxx is set. The following events lead to a value status "invalid value due to higher-level error" (OMODE_xx = 16#40xxxxxx): ? CPU redundancy loss (OB72) (output parameter QRACKF = TRUE) ? Line failure (OB86, OB70) ? Rack failure (OB86, OB70) ? I/O access error (OB85) ? Module withdrawn (OB83) (output parameter QRACKF = TRUE) (output parameter QRACKF = TRUE) (output parameter QPERAF = TRUE) (output parameter QMODF = TRUE)

The events "Module withdrawn" and "I/O access error" are signaled to WinCC by means of ALARM_8P. Detailed information on the faults is supplied in the accompanying values of ALARM_8P (see message characteristics). During starting up the system checks whether the module is available (plugged). The module state information read here is available in the form of service output parameters (MOD_INF).

Redundancy
The block supports the line redundancy of the CPU 417H in the case of decentralized I/Os To this purpose the inputs SUBN1_ID (connection to CPU 0) and SUBN2_ID (connection to CPU 1) have to be configured with the numbers of the redundant lines. If there is no line redundancy, the remaining input must have the value 16#FF (initial value) assigned.

PCS 7 Driver Blocks C79000-G7076-C752-01

1-15

27.01.00 16.11.99

Signal blocks and diagnostic drivers

MODE setting
The input parameters MODE_xx are available for a maximum of 16 signal channels. The initial value is zero (no signal). Depending on the signal channel xx you have to set the type and, if appropriate, the coding of the measuring range of an analog module at the MODE_xx input. Refer to MODE

Note If you change the configuration of the inputs MODE_xx during operation, the change does not become active until the input ACC_MODE = 1 has been set.

Addressing
Refer to Addressing

Error handling
No plausibility checks are carried out with reference to the input parameters.

Service information
In order to analyze faults you can read the module state information, which is entered during starting up, via the structured output parameter MOD_INF (refer to the reference manual "System software for S7-300/400 – System and standard functions", system state list, module state information).

Start-up characteristics
After a restart or an initial start the system checks whether the module is available under the logical base address. A restart (OB100) is signaled via the LSB in Byte 2 of the outputs QMODE_xx.

Time response
Does not exist.

Message characteristics
MOD_1 signals module faults by means of ALARM_8P. The inputs DELAY1 and DELAY2 are used to delay signaling of the I/O access error. DELAY1 is used to specify the time in seconds which the block waits after an I/O access error (OB85) for a higher-level error (rack failure or withdrawn/plugged), before it outputs the message. DELAY2 determines the number of seconds which the block waits until it

1-16

PCS 7 Driver Blocks C79000-G7076-C752-01

27.01.00 16.11.99

Signal blocks and diagnostic drivers

signals the I/O access error still existing after a higher-level error has passed. Both values have a default value of 2 seconds. Also refer to: Message texts of MOD_1 Error information of the MSG_STAT output parameter

Operator control and monitoring
The block does not have a faceplate.

1.5.1
Element

I/O bar of MOD_1
Meaning 1=Accept New Mode Settings 1=Accept new mode settings Type BOOL Initial 0 I/O IO Attr. O Valid C&M values

ACC_MODE

DELAY1 DELAY2 EN_MSG EV_ID LADDR

Alarm Delay 1 (s) Alarm delay 1 (s) Alarm Delay 2 (s) Alarm delay 2 (s) 1=Enable Alarm 1 = Enable message Event ID Message number Logical Address of Module Logical address of the module

INT INT BOOL DWORD INT

2 2 1 0 0

I I I I I

I I I I

MOD_INF

Module Information Structure Module parameters Actual Module Type Actual module type Area ID Area ID / module width Base Address Base address Expected Module Type Expected module type Data ID of Logical Address Data ID of the logical address

STRUCT

0

O

I

MOD_INF .ACTTYP MOD_INF .AREA_ID MOD_INF .BASADR MOD_INF .EXPECTYP MOD_INF .IOSTAT

WORD WORD WORD WORD BYTE

0 0 0 0 0

O O O O O

I I I I I

MOD_INF .IOSTAT_0

1=Module Fault 1 = Module fault

BOOL

0

O

I

PCS 7 Driver Blocks C79000-G7076-C752-01

1-17

27.01.00 16.11.99

Signal blocks and diagnostic drivers

Element MOD_INF .IOSTAT_1 MOD_INF .IOSTAT_2 MOD_INF .IOSTAT_3 MOD_INF .IOSTAT_4 MOD_INF .IOSTAT_5

Meaning 1=Module Exists 1 = Module exists 1=Module Removed 1 = Module not available Reserved Reserved Reserved Reserved 1=Module can be Host for Submodule 1 = Module can be the host of a submodule

Type BOOL BOOL BOOL BOOL BOOL

Initial 0 0 0 0 0

I/O O O O O O

Attr. I I I I I

O Valid C&M values

MOD_INF .IOSTAT_6 MOD_INF .IOSTAT_7

Reserved for S7-400 Reserved for S7-400 1=Module on Local Bus Segment 1 = Module on the local bus segment

BOOL BOOL

0 0

O O

I I

MOD_INF .RACK_NO MOD_INF .RESERVE MOD_INF .SLOT_NO MOD_INF .SUBN_ID MOD_INF .SUBSL_NO MODE_xx MSG_ACK MSG_STAT OMODE_xx QERR QMODF

Rack Number Rack number Reserved Reserved Slot Number Slot number Subnet Number Subnet number Subslot Number Subslot number Mode Channel xx Mode of Channel xx Message Acknowledged Message acknowledgement Message Failure Message failure information Mode Channel xx Mode of Channel xx 1=Program Error 1 = Program error

BYTE WORD BYTE BYTE BYTE WORD WORD WORD DWORD BOOL

0 0 0 0 0 0 0 0 0

O O O O O I O O O O

I I I I I

I I

I

1=Module Removed / Out of BOOL Order 1 = Module withdrawn / defective

0

O

1-18

PCS 7 Driver Blocks C79000-G7076-C752-01

27.01.00 16.11.99

Signal blocks and diagnostic drivers

Element QPERAF

Meaning 1=Module I/O Access Failure 1 = I/O access failure 1=Rack failure 1 = Rack failure ID of Primary Subnet Subnet number of the primary line

Type BOOL

Initial 0

I/O O

Attr.

O Valid C&M values

QRACKF SUBN1_ID

BOOL BYTE

0 255

O IO

SUBN2_ID

ID of Redundant Subnet Subnet number of the redundant line

BYTE

255

IO

SUBN_TYP

1=External DP-Interface 1 = External DP interface

BOOL

0

IO

1.5.2

Message texts of MOD_1

Assignment of message texts and classes to the block parameters of MOD_1
Message block ALARM_8P EV_ID Message No. Block parameter 1 QMODF Default message text Module @1%d@/@2%d@/@3%d@: withdrawn Module @1%d@/@2%d@/@3%d@: access error Message class S

2

QPERAF

S

Assignment of the auxiliary process values for the block parameters of MOD_1
Message block ALARM_8P EV_ID Value 1 2 3 Block parameter MOD_INF.SUBN_ID MOD_INF.RACK_NO MOD_INF.SLOT_NO Meaning Line number (byte) Rack number (byte) Slot number (byte)

PCS 7 Driver Blocks C79000-G7076-C752-01

1-19

27.01.00 16.11.99

Signal blocks and diagnostic drivers

1.6 MOD_2: Monitoring of S7-300/400 SM modules which cannot be diagnosed with 32 channels
Type/Number
FB 92

Calling OBs
Install the block with the same instance in OB100, OB70, OB72, OB83, OB85, OB86, OB1. If you use the CFC driver wizard, it configures the inputs MODE_xx, SUBN1_ID, SUBN2_ID and SUBN_TYP automatically.

Application
The block monitors S7-300/400 SM modules with 32 channels which cannot be diagnosed (no mixed modules).

Functional description
The block analyzes all the events which affect a module acyclically. It forms the MODE and value status (quality code) for the signal processing blocks channelspecifically. Events are signaled with ALARM_8P. The signaling function can be switched off.

Operating principle
The block checks on the basis of the logical basic address of the module whether its module instance is responsible for the event in the starting info. If the input SUBN_TYP = FALSE, the rack of the module is connected to an integrated DP interface (distributed I/O device interface) of the CPU module by means of a line. Otherwise set SUBN_TYP = TRUE. Each signal channel of the module has an input (MODE_xx). Here the configurations carried out with HWConfig are signaled to the module channels. MODE_xx is read into the low word of the output parameter OMODE_xx. The current value status of the channel is entered in the highest-value byte. If good, OMODE_xx = 16#80xxxxxx is set. The following events lead to a value status "invalid value due to higher-level error" (OMODE_xx = 40xxxxxx): ? CPU redundancy loss (OB72) (output parameter QRACKF = TRUE) ? Line failure (OB86, OB70) ? Rack failure (OB86, OB70) ? I/O access error (OB85) ? Module withdrawn (OB83) (output parameter QRACKF = TRUE) (output parameter QRACKF = TRUE) (output parameter QPERAF = TRUE) (output parameter QMODF = TRUE)

1-20

PCS 7 Driver Blocks C79000-G7076-C752-01

27.01.00 16.11.99

Signal blocks and diagnostic drivers

The events "Module withdrawn" and "I/O access error" are signaled to WinCC by means of ALARM_8P. Detailed information on the faults is supplied in the accompanying values of ALARM_8P (see message characteristics). During starting up the system checks whether the module is available (plugged). The module state information read here is available in the form of service output parameters (MOD_INF).

Redundancy
The block supports the line redundancy of the CPU 417H in the case of decentralized I/Os To this purpose the inputs SUBN1_ID (connection to CPU 0) and SUBN2_ID (connection to CPU 1) have to be configured with the numbers of the redundant lines. If there is no line redundancy, the remaining input must have the value 16#FF (default) assigned.

MODE setting
The input parameters MODE_xx are available for a maximum of 32 signal channels. The initial value is zero (no signal). Depending on the signal channel xx you have to set the type and, if appropriate, the coding of the measuring range of an analog module at the MODE_xx input. Refer to MODE

Note If you change the configuration of the inputs MODE_xx during operation, the change does not become active until the input ACC_MODE = 1 has been set.

Addressing
Refer to Addressing

Error handling
No plausibility checks are carried out with reference to the input parameters.

Service information
In order to analyze faults you can read the module state information, which is entered during starting up, via the structured output parameter MOD_INF (refer to the reference manual "System software for S7-300/400 – System and standard functions", system state list, module state information).

PCS 7 Driver Blocks C79000-G7076-C752-01

1-21

27.01.00 16.11.99

Signal blocks and diagnostic drivers

Start-up characteristics
After a restart or an initial start the system checks whether the module is available under the logical base address. A restart (OB100) is signaled via the LSB in Byte 2 of the outputs QMODE_xx.

Time response
Does not exist.

Message characteristics
MOD_2 signals module faults by means of ALARM_8P. The inputs DELAY1 and DELAY2 are used to delay signaling of the I/O access error. DELAY1 is used to specify the time in seconds which the block waits after an I/O access error (OB85) for a higher-level error (rack failure or withdrawn/plugged), before it outputs the message. DELAY2 determines the number of seconds which the block waits until it signals the I/O access error still existing after a higher-level error has passed. Both values have a default value of 2 seconds. Also refer to: Message texts of MOD_2 Error information of the output MSG_STAT parameter

Operator control and monitoring
The block does not have a faceplate.

1.6.1
Element ACC_ MODE DELAY1 DELAY2 EN_MSG EV_ID LADDR MOD_INF MOD_INF .ACTTYP

I/O bar of MOD_2
Meaning 1=Accept New Mode Settings Alarm Delay 1 (s) Alarm Delay 2 (s) 1=Enable Alarm 1 = Enable message Event ID Message number Logical Address of Module Logical address of the module Module Information Structure Module parameters Actual Module Type Actual module type
PCS 7 Driver Blocks C79000-G7076-C752-01

Type BOOL INT INT BOOL DWORD INT STRUCT WORD

Initial 0 2 2 1 0 0 0 0

I/O IO I I I I I O O

Attr.

O Valid C&M values

I I I I

I I

1-22

27.01.00 16.11.99

Signal blocks and diagnostic drivers

Element MOD_INF .AREA_ID MOD_INF .BASADR

Meaning Area ID Area ID / module width Base Address Base address

Type WORD WORD WORD BYTE BOOL BOOL BOOL BOOL BOOL

Initial 0 0 0 0 0 0 0 0 0 0

I/O O O O O O O O O O O

Attr. I I I I I I I I I I

O Valid C&M values

MOD_INF Expected Module Type .EXPECTYP Expected module type MOD_INF .IOSTAT MOD_INF .IOSTAT_0 MOD_INF .IOSTAT_1 MOD_INF .IOSTAT_2 MOD_INF .IOSTAT_3 MOD_INF .IOSTAT_4 MOD_INF .IOSTAT_5 MOD_INF .IOSTAT_6 MOD_INF .IOSTAT_7 MOD_INF .RACK_NO MOD_INF .RESERVE MOD_INF .SLOT_NO MOD_INF .SUBN_ID Data ID of Logical Address Data ID of the logical address 1=Module Fault 1 = Module fault 1=Module Exists 1 = Module exists 1=Module Removed 1 = Module not available Reserved Reserved Reserved Reserved

1=Module can be Host for Submodule BOOL 1 = Module can be the host of a submodule Reserved for S7-400 Reserved for S7-400 1=Module on Local Bus Segment 1 = Module on the local bus segment Rack Number Rack number Reserved Reserved Slot Number Slot number Subnet Number Subnet number BYTE WORD WORD WORD DWORD BYTE BYTE WORD BYTE BOOL BOOL

0 0 0 0 0 0 0 0 0 0 0

O O O O O O O I O O O

I I I I I I I

MOD_INF Subslot Number .SUBSL_NO Subslot number MODE_xx MSG_ACK MSG_STAT OMODE_xx Mode Channel xx Mode of Channel xx Message Acknowledged Message acknowledgement Message Failure Message error information Mode Channel xx Mode of Channel xx
PCS 7 Driver Blocks C79000-G7076-C752-01

I I

1-23

27.01.00 16.11.99

Signal blocks and diagnostic drivers

Element QERR QMODF QPERAF QRACKF SUBN1_ID SUBN2_ID SUBN_TYP

Meaning 1=Program Error 1 = Program error 1=Module Removed / Out of Order 1 = Module withdrawn / defective 1=Module I/O Access Failure 1 = I/O access error 1=Rack failure 1 = Rack failure ID of Primary Subnet Subnet number of the primary line ID of Redundant Subnet Subnet number of the redundant line 1=External DP-Interface 1 = External DP interface

Type BOOL BOOL BOOL BOOL BYTE BYTE BOOL

Initial

I/O O

Attr. I

O Valid C&M values

0 0 0 255 255 0

O O O IO IO IO

1.6.2

Message texts of MOD_2

Assignment of message texts and classes to the block parameters of MOD_2
Message block ALARM_8P EV_ID Message No. Block parameter 1 QMODF Default message text Message class

Module S @1%d@/@2%d@/@3%d @: withdrawn S Module @1%d@/@2%d@/@3%d @: access error

2

QPERAF

Assignment of the auxiliary process values for the block parameters of MOD_2
Message block ALARM_8P EV_ID Value 1 2 3 Block parameter MOD_INF.SUBN_ID MOD_INF.RACK_NO MOD_INF.SLOT_NO Meaning Line number (byte) Rack number (byte) Slot number (byte)

1-24

PCS 7 Driver Blocks C79000-G7076-C752-01

27.01.00 16.11.99

Signal blocks and diagnostic drivers

1.7 MOD_D1: Monitoring of S7-300/400 SM modules which can be diagnosed with 16 channels maximum
Type/Number
FB 93

Calling OBs
Install the block with the same instance in OB100, OB70, OB72, OB82, OB83, OB85, OB86, OB1. If you use the CFC driver wizard, it configures the inputs MODE_xx, SUBN1_ID, SUBN2_ID and SUBN_TYP automatically.

Application
The block monitors S7-300/400 SM modules with 16 channels maximum which can be diagnosed (no mixed modules).

Functional description
The block analyzes all the events which affect a module and its channels acyclically. It forms the MODE and value status (quality code) for the signal processing blocks channel-specifically. The events are signaled with ALARM_8P. The signaling function can be switched off.

Operating principle
The block checks on the basis of the logical basic address of the module whether its module instance is responsible for the event in the starting info. If the input SUBN_TYP = FALSE, the rack of the module is connected to an integrated DP interface (distributed I/O device interface) of the CPU module (= FALSE) by means of a line. Otherwise set SUBN_TYP = TRUE. Each signal channel of the module has an input (MODE_xx). Here the configurations carried out with HWConfig are signaled to the module channels. MODE_xx is read into the low word of the output parameter OMODE_xx. The current value status of the channel is entered in the highest-value byte. If good, OMODE_xx = 16#80xxxxxx is set. The following events lead to a value status "invalid value due to higher-level error" (OMODE_xx = 16#40xxxxxx): ? CPU redundancy loss (OB72) (output parameter QRACKF = TRUE) ? Line failure (OB86, OB70) ? Rack failure (OB86, OB70) ? I/O access error (OB85) ? Module withdrawn (OB83) (output parameter QRACKF = TRUE) (output parameter QRACKF = TRUE) (output parameter QPERAF = TRUE) (output parameter QMODF = TRUE)

PCS 7 Driver Blocks C79000-G7076-C752-01

1-25

27.01.00 16.11.99

Signal blocks and diagnostic drivers

? Diagnostic interrupt (OB82) faults and channels faults:

One differentiates between module

Module faults are the following events (output parameter QMODF = TRUE):
? ? ? ? ? ? ? ? ? ? ? ? ? ? External auxiliary voltage lacking Front connector missing Module not configured Incorrect parameters in the module Module missing / incorrect Communication fault CPU module Time monitoring triggered (watchdog) Module-internal supply voltage failed Rack failure Processor failure EPROM fault RAM fault ADC/DAC fault Fuse tripped

Channel faults are the following events (value status "invalid value", OMODE_xx = 16#00xxxx):
? ? ? ? Short circuit to L+ Short circuit to ground Output transistor has a break Line break

The events "Module withdrawn", "I/O access error" and diagnostic interrupt are signaled to WinCC by means of ALARM_8P. In the case of a diagnostic interrupt a difference is made between module and channel faults, whereby a message number is assigned to each channel. During starting up the system checks whether the module is available (plugged). The module state information read here is available in the form of service output parameters (MOD_INF). The detailed information on the faults (refer to the reference manual "System software for S7-300/400 – System- and standard functions", diagnostic data, Byte0 to Byte8, structure of the channel-specific diagnostic data) is entered in the output parameter DIAG_INF on the data type STRUCT.

Note Even if you operate a HART module in the HART operating mode MODE=16#070C, possible HART protocol errors and re-configurations are masked by the MOD_D1 driver block and are not signaled as channel errors.

1-26

PCS 7 Driver Blocks C79000-G7076-C752-01

27.01.00 16.11.99

Signal blocks and diagnostic drivers

Redundancy
The block supports the line redundancy of the CPU 417H in the case of decentralized I/Os. To this purpose the inputs SUBN1_ID (connection to CPU 0) and SUBN2_ID (connection to CPU 1) have to be configured with the numbers of the redundant lines. If there is no line redundancy, the remaining input must have the value 16#FF (default) assigned.

MODE setting
The input parameters MODE_xx are available for a maximum of 16 signal channels. The initial value is zero (no signal). Depending on the signal channel xx you have to set the type and, if appropriate, the coding of the measuring range of an analog module at the MODE_xx input. Refer to MODE

Note If you change the configuration of the inputs MODE_xx during operation, the change does not become active until the input ACC_MODE = 1 has been set.

OMODE structure
Refer to QMODE

Addressing
Refer to Addressing ? In the case of HART modules which access the process image in reading and writing mode configuration is carried out as for input modules. It is generally not permissible to specify different input and output ranges. For example SM332 AO 2x0/4..20mA HART 332-5TB00-0AB0:
Address input range HWConfig 544 Address output range HWConfig 544 LADDR (decimal) 544 LADDR (hexadecimal) 16#0220

Error handling
No plausibility checks are carried out with reference to the input parameters.

Service information
In order to analyze faults you can read the module state information, which is entered during starting up, via the structured output parameter MOD_INF (refer to
PCS 7 Driver Blocks C79000-G7076-C752-01

1-27

27.01.00 16.11.99

Signal blocks and diagnostic drivers

the reference manual "System software for S7-300/400 – System and standard functions", system state list, module state information). In addition detailed module diagnostic information is contained in the output parameters MODDIAG0 to MODDIAG8 after a diagnostic interrupt (refer to the reference manual "System software for S7-300/400 – System- and standard functions", diagnostic data, Byte0 to Byte8). The output parameters CHDIAG00 to CHDIAG15 contain detailed channel state information (refer to the reference manual "System software for S7-300/400 – System- and standard functions", structure of the channel-specific diagnostic data).

Start-up characteristics
After a restart or an initial start the system checks whether the module is available under the logical base address. A restart (OB100) is signaled via the LSB in Byte 2 of the outputs QMODE_xx.

Time response
Does not exist.

Message characteristics
MOD_D1 signals module faults by means of ALARM_8P_1. In addition the ALARM_8P_2 and ALARM_8P_3 specified for channel faults are called up. The inputs DELAY1 and DELAY2 are used to delay signaling of the I/O access error. DELAY1 is used to specify the time in seconds which the block waits after an I/O access error (OB85) for a higher-level error (rack failure or withdrawn/plugged), before it outputs the message. DELAY2 determines the number of seconds which the block waits until it signals the I/O access error still existing after a higher-level error has passed. Both values have a default value of 2 seconds. Also refer to: Message texts of MOD_D1 Error information of the output MSG_STAT parameter

Operator control and monitoring
The block does not have a faceplate.

1.7.1
Element ACC_ MODE DELAY1 DELAY2

I/O bar of MOD_D1
Meaning 1=Accept New Mode Settings Alarm Delay 1 (s) Alarm Delay 2 (s) Type BOOL INT INT Initial 0 2 2 I/O IO I I I I Attr. O Valid C&M values

1-28

PCS 7 Driver Blocks C79000-G7076-C752-01

27.01.00 16.11.99

Signal blocks and diagnostic drivers

Element DIAG_INF

Meaning Module Diagnostic Information Structure Diagnostic information Channel Diagnostic xx Diagnostic data of Channel xx

Type STRUCT

Initial 0

I/O O

Attr. I

O Valid C&M values

DIAG_INF .CHDIAGxx

BYTE BYTE BOOL DWORD INT STRUCT WORD WORD WORD WORD BYTE BOOL BOOL BOOL BOOL BOOL

0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0

O O I I I O O O O O O O O O O O O

I I I I

DIAG_INF Module Diagnostic x .MODDIAGx Module diagnostic byte x EN_MSG EV_IDx LADDR MOD_INF MOD_INF .ACTTYP MOD_INF .AREA_ID MOD_INF .BASADR 1=Enable Alarm 1 = Enable message Event ID x Message number x Logical Address of Module Logical address of the module Module Information Structure Module parameters Actual Module Type Actual module type Area ID Area ID / module width Base Address Base address

I I I I I I I I I I I I

MOD_INF Expected Module Type .EXPECTYP Expected module type MOD_INF .IOSTAT MOD_INF .IOSTAT_0 MOD_INF .IOSTAT_1 MOD_INF .IOSTAT_2 MOD_INF .IOSTAT_3 MOD_INF .IOSTAT_4 MOD_INF .IOSTAT_5 MOD_INF .IOSTAT_6 MOD_INF .IOSTAT_7 Data ID of Logical Address Data ID of the logical address 1=Module Fault 1 = Module fault 1=Module Exists 1 = Module exists 1=Module Removed 1 = Module not available Reserved Reserved Reserved Reserved

1=Module can be Host for Submodule BOOL 1 = Module can be the host of a submodule Reserved for S7-400 Reserved for S7-400 1=Module on Local Bus Segment 1 = Module on the local bus segment BOOL BOOL

0 0

O O

I I

PCS 7 Driver Blocks C79000-G7076-C752-01

1-29

27.01.00 16.11.99

Signal blocks and diagnostic drivers

Element MOD_INF .RACK_NO MOD_INF .RESERVE MOD_INF .SLOT_NO MOD_INF .SUBN_ID

Meaning Rack Number Rack number Reserved Reserved Slot Number Slot number Subnet Number Subnet number

Type BYTE WORD BYTE BYTE BYTE WORD WORD WORD DWORD BOOL BOOL BOOL BOOL BYTE BYTE BOOL

Initial 0 0 0 0 0 0 0 0 0

I/O O O O O O I O O O O

Attr. I I I I I

O Valid C&M values

MOD_INF Subslot Number .SUBSL_NO Subslot number MODE_xx MSG_ACKx MSGSTATx OMODE_xx QERR QMODF QPERAF QRACKF SUBN1_ID SUBN2_ID SUBN_TYP Mode Channel xx Mode of Channel xx Message Acknowledged x Message acknowledgement x Message Failure x Message error information x Mode Channel xx Mode of Channel xx 1=Program Error 1 = Program error 1=Module Removed / Out of Order 1 = Module withdrawn / defective 1=Module I/O Access Failure 1 = I/O access error 1=Rack failure 1 = Rack failure ID of Primary Subnet Subnet number of the primary line ID of Redundant Subnet Subnet number of the redundant line 1=External DP-Interface 1 = External DP interface

I I

I

0 0 0 255 255 0

O O O IO IO IO

1-30

PCS 7 Driver Blocks C79000-G7076-C752-01

27.01.00 16.11.99

Signal blocks and diagnostic drivers

1.7.2

Message texts of MOD_D1

Assignment of message texts and classes to the block parameters of MOD_D1
Message block ALARM_8P EV_ID1 Message No. Block parameter 1 QMODF Default message text Message class

S Module @1%d@/@2%d@/@3%d@ : withdrawn S Module @1%d@/@2%d@/@3%d@ : Access error Module S @1%d@/@2%d@/@3%d@ : Error Module S @1%d@/@2%d@/@3%d@ : Error channel 00 ... Module S @1%d@/@2%d@/@3%d@ : Error channel 07 Module S @1%d@/@2%d@/@3%d@ : Error channel 08 ... Module S @1%d@/@2%d@/@3%d@ : Error channel 15

2

QPERAF

3

QMODF

EV_ID2

1

-

... 8 -

EV_ID3

1

-

... 8 -

Assignment of the auxiliary process values for the block parameters of MOD_D1
Message block ALARM_8P EV_ID1 Value 1 2 3 EV_ID2 1 2 3 4 EV_ID3 1 2 MOD_INF.SUBN_ID MOD_INF.RACK_NO Line number (byte) Rack number (byte) Block parameter MOD_INF.SUBN_ID MOD_INF.RACK_NO MOD_INF.SLOT_NO MOD_INF.SUBN_ID MOD_INF.RACK_NO MOD_INF.SLOT_NO Meaning Line number (byte) Rack number (byte) Slot number (byte) Line number (byte) Rack number (byte) Slot number (byte)

PCS 7 Driver Blocks C79000-G7076-C752-01

1-31

27.01.00 16.11.99

Signal blocks and diagnostic drivers

Message block ALARM_8P

Value 3

Block parameter MOD_INF.SLOT_NO

Meaning Slot number (byte)

1.8

MOD_D2: Monitoring of S7-300/400 SM modules which cannot be diagnosed with 32 channels

Type/Number
FB 94

Calling OBs
Install the block with the same instance in OB100, OB70, OB72, OB82, OB83, OB85, OB86, OB1. If you use the CFC driver wizard, it configures the inputs MODE_xx, SUBN1_ID, SUBN2_ID and SUBN_TYP automatically.

Application
The block monitors S7-300/400 SM modules with 32 channels which can be diagnosed (no mixed modules).

Functional description
The block analyzes all the events which affect a module and its channels acyclically. It forms the MODE and value status (quality code) for the signal processing blocks channel-specifically. The events are signaled with ALARM_8P. The signaling function can be switched off.

Operating principle
The block checks on the basis of the logical basic address of the module whether its module instance is responsible for the event in the starting info. If the input SUBN_TYP = FALSE, the rack of the module is connected to an integrated DP interface (distributed I/O device interface) of the CPU module (= FALSE) by means of a line. Otherwise set SUBN_TYP = TRUE. Each signal channel of the module has an input (MODE_xx). Here the configurations carried out with HWConfig are signaled to the module channels. MODE_xx is read into the low word of the output parameter OMODE_xx. The current value status of the channel is entered in the highest-value byte. If good, OMODE_xx = 16#80xxxxxx is set. The following events lead to a value status "invalid value due to higher-level error" (OMODE_xx = 16#40xxxxxx): ? CPU redundancy loss (OB72) (output parameter QRACKF = TRUE) ? Line failure (OB86, OB70) (output parameter QRACKF = TRUE)

1-32

PCS 7 Driver Blocks C79000-G7076-C752-01

27.01.00 16.11.99

Signal blocks and diagnostic drivers

? Rack failure (OB86, OB70) ? I/O access error (OB85) ? Module withdrawn (OB83) ? Diagnostic interrupt (OB82) faults and channels faults:

(output parameter QRACKF = TRUE) (output parameter QPERAF = TRUE) (output parameter QMODF = TRUE) One differentiates between module

Module faults are the following events (output parameter QMODF = TRUE):
? ? ? ? ? ? ? ? ? ? ? ? ? ? External auxiliary voltage lacking Front connector missing Module not configured Incorrect parameters in the module Module missing / incorrect Communication fault CPU module Time monitoring triggered (watchdog) Module-internal supply voltage failed Rack failure Processor failure EPROM fault RAM fault ADC/DAC fault Fuse tripped

Channel faults are the following events (value status "invalid value", OMODE_xx = 16#00xxxxxx):
? ? ? ? Short circuit to L+ Short circuit to ground Output transistor has a break Line break

The events "Module withdrawn", "I/O access error" and diagnostic interrupt are signaled to WinCC by means of ALARM_8P. In the case of a diagnostic interrupt a difference is made between module and channel faults, whereby a message number is assigned to each channel. During starting up the system checks whether the module is available (plugged). The module state information read here is available in the form of service output parameters (MOD_INF). The detailed information on the faults (refer to the reference manual "System software for S7-300/400 – System- and standard functions", diagnostic data, Byte 0 to Byte 8, structure of the channel-specific diagnostic data) is entered in the output parameter DIAG_INF on the data type STRUCT.

Redundancy
The block supports the line redundancy of the CPU 417H in the case of decentralized I/Os To this purpose the inputs SUBN1_ID (connection to CPU 0) and SUBN2_ID (connection to CPU 1) have to be configured with the numbers of
PCS 7 Driver Blocks C79000-G7076-C752-01

1-33

27.01.00 16.11.99

Signal blocks and diagnostic drivers

the redundant lines. If there is no line redundancy, the remaining input must have the value 16#FF (default) assigned.

MODE setting
The input parameters MODE_xx are available for a maximum of 16 signal channels. The initial value is zero (no signal). Depending on the signal channel xx you have to set the type and, if appropriate, the coding of the measuring range of an analog module at the MODE_xx input.

Note If you change the configuration of the inputs MODE_xx during operation, the change does not become active until the input ACC_MODE = 1 has been set.

OMODE structure
Refer to QMODE

Addressing
Refer to Addressing

Error handling
No plausibility checks are carried out with reference to the input parameters.

Service information
In order to analyze faults you can read the module state information, which is entered during starting up, via the structured output parameter MOD_INF (refer to the reference manual "System software for S7-300/400 – System and standard functions", system state list, module state information). In addition detailed module diagnostic information is contained in the output parameters MODDIAG0 to MODDIAG10 after a diagnostic interrupt (refer to the reference manual "System software for S7-300/400 – System- and standard functions", diagnostic data, Byte 0 to Byte 10). The output parameters CHDIAG00 to CHDIAG31 contain detailed channel state information (refer to the reference manual "System software for S7-300/400 – System- and standard functions", structure of the channel-specific diagnostic data).

Start-up characteristics
After a restart or an initial start the system checks whether the module is available under the logical base address. A restart (OB100) is signaled via the LSB in Byte 2 of the outputs QMODE_xx.

1-34

PCS 7 Driver Blocks C79000-G7076-C752-01

27.01.00 16.11.99

Signal blocks and diagnostic drivers

Time response
Does not exist.

Message characteristics
MOD_D1 signals module faults by means of ALARM_8P_1. In addition the ALARM_8P_2, ALARM_8P_3, ALARM_8P_4 and ALARM_8P_5 specified for channel faults are called up. The inputs DELAY1 and DELAY2 are used to delay signaling of the I/O access error. DELAY1 is used to specify the time in seconds which the block waits after an I/O access error (OB85) for a higher-level error (rack failure or withdrawn/plugged), before it outputs the message. DELAY2 determines the number of seconds which the block waits until it signals the I/O access error still existing after a higher-level error has passed. Both values have a default value of 2 seconds. Also refer to: Message texts of MOD_D2 Error information of the output MSG_STAT parameter

Operator control and monitoring
The block does not have a faceplate.

1.8.1
Element ACC_ MODE DELAY1 DELAY2 DIAG_INF

I/O bar of MOD_D2
Meaning 1=Accept New Mode Settings Alarm Delay 1 (s) Alarm Delay 2 (s) Module Diagnostic Information Structure Diagnostic information Channel Diagnostic xx Diagnostic data of Channel xx BYTE BOOL DWORD INT 0 1 0 0 O I I I I I I Type BOOL INT INT STRUCT Initial 0 2 2 0 I/O IO I IO O I I I Attr. O M & Valid C values

DIAG_INF .CHDIAGxx

BYTE

0

O

I

DIAG_INF Module Diagnostic x .MODDIAGx Module diagnostic byte x EN_MSG EV_IDx LADDR 1=Enable Alarm 1 = Enable message Event ID x Message number x Logical Address of Module Logical address of the module

PCS 7 Driver Blocks C79000-G7076-C752-01

1-35

27.01.00 16.11.99

Signal blocks and diagnostic drivers

Element MOD_INF MOD_INF .ACTTYP MOD_INF .AREA_ID MOD_INF .BASADR

Meaning Module Information Structure Module parameters Actual Module Type Actual module type Area ID Area ID / module width Base Address Base address

Type STRUCT WORD WORD WORD WORD BYTE BOOL BOOL BOOL BOOL BOOL BOOL

Initial 0 0 0 0 0 0 0 0 0 0 0 0

I/O O O O O O O O O O O O O

Attr. I I I I I I I I I I I I

O M & Valid C values

MOD_INF Expected Module Type .EXPECTYP Expected module type MOD_INF .IOSTAT MOD_INF .IOSTAT_0 MOD_INF .IOSTAT_1 MOD_INF .IOSTAT_2 MOD_INF .IOSTAT_3 MOD_INF .IOSTAT_4 MOD_INF .IOSTAT_5 Data ID of Logical Address Data ID of the logical address 1=Module Fault 1 = Module fault 1=Module Exists 1 = Module exists 1=Module Removed 1 = Module not available Reserved Reserved Reserved Reserved 1=Module can be Host for Submodule 1 = Module can be the host of a submodule MOD_INF .IOSTAT_6 MOD_INF .IOSTAT_7 MOD_INF .RACK_NO MOD_INF .RESERVE MOD_INF .SLOT_NO MOD_INF .SUBN_ID Reserved for S7-400 Reserved for S7-400 1=Module on Local Bus Segment 1 = Module on the local bus segment Rack Number Rack number Reserved Reserved Slot Number Slot number Subnet Number Subnet number

BOOL BOOL

0 0

O O

I I

BYTE WORD BYTE BYTE BYTE WORD

0 0 0 0 0 0

O O O O O I

I I I I I

MOD_INF Subslot Number .SUBSL_NO Subslot number MODE_xx Mode Channel xx Mode of Channel xx

1-36

PCS 7 Driver Blocks C79000-G7076-C752-01

27.01.00 16.11.99

Signal blocks and diagnostic drivers

Element MSG_ACKx MSGSTATx OMODE_xx QERR QMODF QPERAF QRACKF SUBN1_ID SUBN2_ID

Meaning Message Acknowledged x Message acknowledgement x Message Failure x Message error information x Mode Channel xx Mode of Channel xx 1=Program Error 1 = Program error

Type WORD WORD DWORD BOOL

Initial 0 0 0

I/O O O O O

Attr. I I

O M & Valid C values

I

1=Module Removed / Out of Order BOOL 1 = Module withdrawn / defective 1=Module I/O Access Failure 1 = I/O access error 1=Rack failure 1 = Rack failure ID of Primary Subnet Subnet number of the primary line ID of Redundant Subnet Subnet number of the redundant line BYTE BYTE BOOL BOOL

0 0 0 255 255

O O O IO IO

SUBN_TYP

1=External DP-Interface 1 = External DP interface

BOOL

0

IO

1.8.2

Message texts of MOD_D2

Assignment of message texts and classes to the block parameters of MOD_D2
Message block ALARM_8P EV_ID1 Message No. Block parameter 1 QMODF Default message text Message class

Module S @1%d@/@2%d@/@3%d @: withdrawn S Module @1%d@/@2%d@/@3%d @: Access error S Module @1%d@/@2%d@/@3%d @: Error S Module @1%d@/@2%d@/@3%d @: Error channel 00 ...

2

QPERAF

3

QMODF

EV_ID2

1

-

...

PCS 7 Driver Blocks C79000-G7076-C752-01

1-37

27.01.00 16.11.99

Signal blocks and diagnostic drivers

Message block ALARM_8P

Message No. Block parameter 8 -

Default message text

Message class

S Module @1%d@/@2%d@/@3%d @: Error channel 07 S Module @1%d@/@2%d@/@3%d @: Error channel 08 ... S Module @1%d@/@2%d@/@3%d @: Error channel 15 S Module @1%d@/@2%d@/@3%d @: Error channel 16 ... Module S @1%d@/@2%d@/@3%d @: Error channel 23 Module S @1%d@/@2%d@/@3%d @: Error channel 24 ... Module S @1%d@/@2%d@/@3%d @: Error channel 31

EV_ID3

1

-

... 8 -

EV_ID4

1

-

... 8 -

EV_ID5

1

-

... 8 -

Assignment of the auxiliary process values for the block parameters of MOD_D2
Message block ALARM_8P EV_ID1 Value 1 2 3 EV_ID2 1 2 3 EV_ID3 1 2 3 EV_ID4 1 2 3 EV_ID5 1 2 3 Block parameter MOD_INF.SUBN_ID MOD_INF.RACK_NO MOD_INF.SLOT_NO MOD_INF.SUBN_ID MOD_INF.RACK_NO MOD_INF.SLOT_NO MOD_INF.SUBN_ID MOD_INF.RACK_NO MOD_INF.SLOT_NO MOD_INF.SUBN_ID MOD_INF.RACK_NO MOD_INF.SLOT_NO MOD_INF.SUBN_ID MOD_INF.RACK_NO MOD_INF.SLOT_NO Meaning Line number (byte) Rack number (byte) Slot number (byte) Line number (byte) Rack number (byte) Slot number (byte) Line number (byte) Rack number (byte) Slot number (byte) Line number (byte) Rack number (byte) Slot number (byte) Line number (byte) Rack number (byte) Slot number (byte)

1-38

PCS 7 Driver Blocks C79000-G7076-C752-01

27.01.00 16.11.99

Signal blocks and diagnostic drivers

1.9

Addressing
If you do not use the driver wizard of CFC, you have to set the logical basic address of the module created with HWConfig at the input parameter LADDR. The following points are generally to be observed for all the MOD modules: ? In the case of pure input modules, that is modules which write data exclusively into the input range of the CPU process image the basic address can be taken directly from HWConfig. For example the module SM331 AI 8x12Bit 3317KF01-0AB0:

Address input range HWConfig 512

Address output range HWConfig -

LADDR (decimal) 512

LADDR (hexadecimal) 16#0200

? In the case of pure output modules, that is modules which read data exclusively from the output range of the CPU process image, the MSB (most significant bit) has to be set in the basic address from HWConfig. For example the SM332 AO 4x12Bit 332-5HD01-0AB0:
Address input range HWConfig Address output range HWConfig 512 LADDR (decimal) -32256 LADDR (hexadecimal) 16#8200

1.10

MODE

Measuring range coding of the analog input module
Depending on the coding of the measuring range of the analog input modules, the parameter MODE_xx (measuring range coding) corresponding to the channel must be specified in accordance with the table. When thermoelements are used (due to the various combinations of the measuring type with the measuring range) this is to be calculated in accordance with the following formula and the result then entered as an INTEGER value at the MODEinput.(MODE= 256 ? Coding A + Coding B):

PCS 7 Driver Blocks C79000-G7076-C752-01

1-39

27.01.00 16.11.99

Signal blocks and diagnostic drivers

Measuring type Voltage

Coding (A) 2#0001

Measuring range ± 25 mV ± 50 mV ± 80 mV ± 250 mV ± 500 mV ±1 V ± 2,5 V ±5 V 1 to 5 V ± 10 V

Coding (B) 2#1010 2#1011 2#0001 2#0010 2#0011 2#0100 2#0101 2#0110 2#0111 2#1001 2#0000 2#0101 2#0001 2#0010 2#0011 2#0100 2#1100 2#0011 2#0000 2#0010 2#0100 2#0110 2#1000 2#0000

MODE (256?A+B) 16#010A 16#010B 16#0101 16#0102 16#0103 16#0104 16#0105 16#0106 16#0107 16#0109 16#0200 16#0205 16#0201 16#0202 16#0203 16#0204 16#070C 16#0303 16#0400 16#0402 16#0404 16#0406 16#0408 16#0800

4-wire measuring transducer

2#0010

± 3,2 mA ± 5 mA ± 10 mA 0 to 20 mA 4 to 20 mA ± 20 mA

HART interface 2-wire measuring transducer Resistor 4-wire connection

2#0111 2#0011 2#0100

4 to 20 mA 4 to 20 mA 48 ? 150 ? 300 ? 600 ? 6000 ?

Thermal resistor + linearization 4-wire connection

2#1000

Pt 100 climate range Pt 200 climate range Pt 500 climate range Pt 1000 climate range Ni 100 climate range Ni 1000 climate range

2#0111 2#1000 2#1001 2#0001 2#1010

16#0807 16#0808 16#0809 16#0801 16#080A 16#0802 16#0803 16#0804

Pt 100 2#0010 standard range Pt 200 2#0011 standard range Pt 500 2#0100 standard range

1-40

PCS 7 Driver Blocks C79000-G7076-C752-01

27.01.00 16.11.99

Signal blocks and diagnostic drivers

Measuring type

Coding (A)

Measuring range

Coding (B)

MODE (256?A+B) 16#0805 16#080B 16#0806

Pt 1000 2#0101 standard range Ni 100 2#1011 standard range Ni 1000 2#0110 standard range Thermocouples internal comparison 2#1010 Type B [PtRh-PtRh] Type N [NiCrSi-NiSi] Thermocouples external comparison 2#1011 Type E [NiCr-CuNi] Type R [PtRh-Pt] Thermocouples + linearization internal comparison 2#1101 Type S [PtRh-Pt] Type J [Fe-CuNi IEC] 2#1110 Type L [Fe-CuNi DIN] Type T [Cu-CuNi IEC] Type K [NiCr-Ni] Type U [Cu-CuNi DIN] 2#0000 2#0001 2#0010 2#0011 2#0100

MODE = 2#0101 (256 ? Coding A) + Coding B Depending on the combination

2#0110

Thermocouples + linearization external comparison

2#0111

2#1000 2#1001

Measuring range coding of the analog output modules
Depending on the coding of the measuring range of the analog output modules, the parameter MODE_xx (measuring range coding) corresponding to the channel must be specified in accordance with the table.
Measuring type Voltage Measuring range 1 to 5 V 0 to 10 V ± 10 V Current 0 to 20 mA 4 to 20 mA ± 20 mA HART interface 4 to 20 mA MODE 16#0107 16#0108 16#0109 16#0202 16#0203 16#0204 16#070C

PCS 7 Driver Blocks C79000-G7076-C752-01

1-41

27.01.00 16.11.99

Signal blocks and diagnostic drivers

? Digital input modules There is neither a measuring type nor a measuring range for digital input modules: MODE = 16#FFFF ? Digital output modules There is neither a measuring type nor a measuring range for digital output modules: MODE = 16#FFFF

OMODE structure
The outputs OMODE_xx of data type DWORD are structured as follows and have the following meaning: Byte 3: 16#80: Value status "valid value" 16#20: Value status "valid value" (redundancy error) 16#00: Value status "invalid value (channel fault) 16#40: Value status "invalid value" (higher-level fault) Byte 2: 16#01: Restart (OB100) has been carried out MODE (see above)

Byte 1, 0 (Low Word):

Example: 16#80010203 corresponds to value state "valid value", restart has en be carried out, current 4 to 20mA

1.11

RACK: Signal rack failure

Type/Number
FB 107

Calling OBs
The block must be installed in the following OBs: ? OB1 ? OB70 ? OB72 ? OB85 ? OB86 ? OB100 Cyclic processing (signaling hierarchy) Line redundancy (Profibus DP) CPU diagnostics I/O access error Rackand subnet monitoring Startup (message initialization)

If you use the CFC driver wizard, it configures the inputs RACK_NO, SUBN1_ID, and SUBN2_ID automatically.

1-42

PCS 7 Driver Blocks C79000-G7076-C752-01

27.01.00 16.11.99

Signal blocks and diagnostic drivers

Application
The block monitors the state of a rack and signals the corresponding error events.

Functional description
The RACKblock generates a process control system fault message for the OS in case of redundancy losses and rack or stations failures. In addition it indicates faults within the rack (SUBN1ERR, SUBN2ERR) and the preferred channel (SUBN1ACT, SUBN2ACT) when the DP slaves are activated at the output bar. The output structure RAC_DIAG contains the geographic address of the rack as well as the group error information RACK_ERR. If RACK_ERR = 1, the corresponding rack is not available. The RACK block is installed as the first block in the respective runtime group of a rack (station) of the OB70, OB72, OB85 and OB86.

Operating principle
The RACK module determines the number of the affected line and rack on the basis of the start information of the calling OB and generates a corresponding message (see message characteristics), if the current instance is affected. The block determines the currently active preferred channel (SUBN1ACT, SUBN2ACT) in the case of redundant PROFIBUS DP interfaces by evaluating the error events and, if required, the diagnostic address ADDR of the DP slave. If you use the CFC driver wizard, runtime groups with driver blocks organized by racks are generated automatically.

Redundancy
The block supports the line redundancy of the CPU 417H in the case of decentralized I/Os To this purpose the inputs SUBN1_ID (connection to CPU 0) and SUBN2_ID (connection to CPU 1) have to be configured with the numbers of the redundant lines. If there is no line redundancy, the remaining input must have the value 16#FF (default) assigned.

Error handling
Error handling of the block is limited to the error information of ALARM_8P. Refer to Error information of the MSG_STAT output parameter

PCS 7 Driver Blocks C79000-G7076-C752-01

1-43

27.01.00 16.11.99

Signal blocks and diagnostic drivers

Start-up characteristics
The RACK block initializes the messages of ALARM_8P.

Time response
Refer to the message characteristics.

Message characteristics
After being called by OB70, OB72, OB85 or OB86 the block analyzes the state of the CPU, DP master and DP slaves assigned to it. If necessary, it generates the corresponding messages for redundancy losses and station failures in the rack by emitting an ALARM_8P. The block generally only signals events whose cause lies within the rack monitored by it. Redundancy loss and station failures which are caused by the failure of a DP masters or of a CPU, are initially neither signaled nor indicated at the outputs SUBN1ERR and SUBN2ERR. The DELAY input allows a signal delay, which can be configured, for an outgoing higher-order error. If, for example, the RACK block recognizes an outgoing error in a DP master connected to it, it initially assumes that there is a faulty assigned DP slave in the rack monitored by it and sets the corresponding output SUBNxERR. The error is not canceled until the DP slave returns (in this case: OB86, OB70). The RACK blocks suppress the potential slave failure for DELAY seconds in order not to trigger a wave of messages from the DP slaves which are not synchronized yet after the master returns. An error message is not output to the OS unless a DP slave does not report its return before this period expires. You should not set the value of DELAY too high. Otherwise DP slaves which were removed during the master failure or which are defective will be reported back to the OS after the master returns with a correspondingly high delay period.

Assignment of message text and message class
Message No. 1 2 3 4 Default message text DP slave @1%d@, @3%d@: Redundancy loss DP-Slave @2%d@, @3%d@: Redundancy loss Station @1%d@, @3%d@: Failure Station @2%d@, @3%d@: Failure Message class S S S S

1-44

PCS 7 Driver Blocks C79000-G7076-C752-01

27.01.00 16.11.99

Signal blocks and diagnostic drivers

Assignment of the auxiliary values
Value 1 2 3 Block parameter Primary line number (SUBN1_ID) Redundant line number (SUBN2_ID) Rack or station number (RACK_NO)

1.11.1

I/O bar of RACK
The following table lists the I/O bar of the block.

Element DADDR DELAY EN_MSG EV_ID MSG_STAT RAC_DIAG .LADDR

Meaning Diagnostic address of DP slave Alarm Delay (s) 1=Enable Alarm Event ID Message number Message Failure Message error information Reserved

Type INT INT BOOL DWORD WORD WORD BOOL BYTE BOOL BYTE BYTE WORD BYTE

Initial 65536 0 1 0 0 0 0 255 0 255 255 0 255

I/O I I I I O O O O O O O I IO

Attr. I I I I I I I I I I I I I

O Valid C&M values

RAC_DIAG 1=Rack is not accessible .RACK_ERR RAC_DIAG .RACK_NO RAC_DIAG .SUBN_TYP RAC_DIAG .SUBN1_ID RAC_DIAG .SUBN2_ID RACK_NO SUBN1_ID RackNumber Reserved ID of Primary Subnet ID of Redundant Subnet Rack Number ID of Primary Subnet Subnet number of the primary line SUBN2_ID ID of Redundant Subnet Subnet number of the redundant line SUBN1ACT SUBN2ACT SUBN1ERR 1=Slave 1 Active 1=Slave 2 Active 1=Subnet Failure 1 = Failure in the line

BYTE

255

IO

I

BOOL BOOL BOOL

0 0 0

O O O

I I I

PCS 7 Driver Blocks C79000-G7076-C752-01

1-45

27.01.00 16.11.99

Signal blocks and diagnostic drivers

Element SUBN2ERR

Meaning 1=Subnet Failure 1 = Failure in the line

Type BOOL

Initial 0

I/O O

Attr. I

O Valid C&M values

1.12

SUBNET: Runtime group control for driver blocks

Type/Number
FB 106

Calling OBs
The block must be installed in the following OBs: ? OB1 ? OB70 ? OB72 ? OB82 ? OB83 ? OB85 ? OB86 ? OB100 Cyclic processing (signaling hiearchy) r Line redundancy (Profibus DP) CPU diagnostics Module diagnostics Withdrawn/plugged I/O access error Rack and subnet monitoring Startup (message initialization)

If you use the CFC driver wizard, it configures the inputs SUBN1_ID, SUBN2_ID and SUBN_TYP automatically and interconnects the outputs EN_Rxxx to the runtime groups.

Application
The block is used to reduce the acyclic OB processing times. Only the blocks actually affected can be called in case of an acyclic event.

Functional description
In the acyclic priority classes (OB70, OB72, OB82, OB83, OB85, OB86) the block determines the rack number(s) of a DP line for which the event applies. It is used to reduce the above mentioned OB processing times together with the use of driver blocks. The driver blocks are organized in runtime groups per rack. Corresponding messages are generated and the output variables SUBN1ERR and SUBN2ERR set at a failure or redundancy loss of a DP master system.

1-46

PCS 7 Driver Blocks C79000-G7076-C752-01

27.01.00 16.11.99

Signal blocks and diagnostic drivers

Operating principle
The block is installed with the same instance into the OBs listed above for each connected distributed I/O device line and once for the centrally plugged I/O devices. It has an output for each rack or subsystem which can be connected (per expansion rack in the case of centralized I/O devices). It uses the starting information of the calling OB to determine whether the signaled result has occurred at its distributed I/O device line (or at the centrally plugged I/O devices) and then sets the output of the respective rack or subsystem (EN_Rx). If a DP line fails, all EN_Rxxx are set to TRUE and the event is signaled to the OS. The line return is signaled as soon as a rack of this DP line can be reached again. If redundant DP lines are used (only for H-CPUs) a rack (for example ET200M) is connected to the two DP lines and has the same station number at both DP lines. The SUBNET block has two input parameters (SUBNx_ID) and the type identifier SUBN_TYP. If a DP line fails, all EN_Rxxx are set to TRUE and the redundancy loss or failure is signaled. The redundancy or station return is signaled as soon as a failed DP slave has reconnected. If you use the CFC driver wizard, runtime groups with driver blocks are generated automatically organized by racks. The respective output of the SUBNET block is interconnected automatically to the enable input of the respective runtime group of the driver blocks. This means that only the runtime group which also contains the corresponding driver block is executed when the OB is called.

Note Block instances can only be installed in one runtime group per OB by means of CFC. One runtime group per rack must be created if two redundant modules in different racks are to be monitored with the driver blocks of the Basic Block library (for example IN_A1). The driver blocks must then continue to be installed flat in the acyclic OBs

Error handling
Error handling of the block is limited to the error information of ALARM_8P. Refer to Error information of the MSG_STAT output parameter

Start-up characteristics
The SUBNETblock initializes the messages of ALARM_8P.

Time response
Does not exist.

PCS 7 Driver Blocks C79000-G7076-C752-01

1-47

27.01.00 16.11.99

Signal blocks and diagnostic drivers

Message characteristics
-

After being called by an OB86, OB70 and OB72 the block analyzes the state of the DP master assigned to it and generates the corresponding messages for redundancy loss and line failure by emitting an ALARM_8P. The block generally only signals events whose cause lies within the DP master system monitored by it. Redundancy losses and subnet failures which are caused by the failure of a CPU, are initially neither signaled nor indicated at the outputs SUBN1ERR and SUBN2ERR. The DELAY input allows a signal delay, which can be configured, for an outgoing higher-order error. If the SUBNET block recognizes an outgoing CPU error it initially assumes that an assigned DP master is faulty and sets the corresponding output SUBNxERR, if the system involved is a DP master system. The error is not canceled until the DP master returns (in this case: OB86, OB70). The SUBNET blocks suppress the potential master failure for DELAY seconds in order not to trigger a wave of messages from the DP master which is not synchronized yet after the CPU returns. An error message is not output to the OS unless a DP master does not report its return before this period expires. You should not set the value of DELAY too high. Otherwise DP masters which were removed during the CPU failure or which are defective will be reported back to the OS after the CPU returns with a correspondingly high delay period.

-

-

-

Assignment of message text and message class
Message No. 1 2 3 4 Default message text DP master @1%d@: Redundancy loss DP master @2%d@: Redundancy loss DP master @1%d@: Failure DP master @2%d@: Failure Message class S S S S

Assignment of the auxiliary values
Value 1 2 Block parameter Primary line number (SUBN1_ID) Redundant line number (SUBN2_ID)

1-48

PCS 7 Driver Blocks C79000-G7076-C752-01

27.01.00 16.11.99

Signal blocks and diagnostic drivers

1.12.1

I/O bar of SUBNET
The following table lists the I/O bar of the block.

Element DELAY EN_MSG EN_Rxxx EV_ID EN_Rxxx MSG_STAT SUBN_TYP SUBN1_ID

Meaning Alarm Delay (s) 1=Enable Alarm 1: Enable Rack xxx Event ID Message number 1: Enable Rack xxx 1: Enable rack xxx Message Failure Message error information 1=External DP-Interface 1 = External DP interface ID of Primary Subnet Subnet number of the primary line

Type INT BOOL BOOL DWORD BOOL WORD BOOL BYTE

Initial 0 1 0 0 0 0 0 255

I/O I I O I O O IO IO

Attr. I I I I I I I I

O Valid C&M values

SUBN2_ID

ID of Redundant Subnet Subnet number of the redundant line

BYTE

255

IO

I

SUBN1ERR

1=Subnet Failure 1 = Failure in the line

BOOL BOOL

0 0

O O

I I

SUBN2ERR 1=Subnet Failure 1 = Failure in the line

Note The number of racks possible results from the address volume of PBUS. All available CPUs can thus be used. The entire address volume is used by the CPU 417-4.

PCS 7 Driver Blocks C79000-G7076-C752-01

1-49

27.01.00 16.11.99

Signal blocks and diagnostic drivers

1.13

PO_UPDAT: Update process image

Type/Number
FC 279

Calling OBs
The block is not supported by the CFC driver wizard. It must be installed by the user at the end of the OB100.

Area of application
The block ensures the functions "Hold last value" and "Apply substitution value" of the output modules when a CPU is restarted (OB100).

Functional description
When a CPU is restarted (OB100), the CH_AO and CH_DO blocks write the start values to the process image. The PO_UPDAT block sends all the (partial) process images to the modules at the end of the OB100 in order for these values to be active immediately when the CPOU passes to RUN. The output PO_MAP indicates the partial process images updated or used in the system (BIT0: Process image 0, BIT15: Partial process image 15).

1.14

IM_DRV: Transferring time-stamped process signal changes

Type/Number
FB 90

Block use under CFC
The following description is intended for use of the block without CFC. If you use CFC, the following actions are carried out automatically at the block: ? Installation in the priority class (OB)

1-50

PCS 7 Driver Blocks C79000-G7076-C752-01

27.01.00 16.11.99

Signal blocks and diagnostic drivers

Calling OBs
OB1 or the watchdog interrupt OB (for example OB 32) into which the block is installed . In addition with the same instance in OB100, OB86 and in the process interrupt OB40 or alternatively in another process interrupt (OB41 to OB47).

Application
The block is used to transfer time-stamped process signal changes and non-signalspecific events (special messages) to the OS.

Functional description
In an AS the block forms the interface between an IM153-2 and the OS (WinCC). It reads the messages from the message buffers (max. of 20 messages each) of an IM153-2 and uses the pseudo message function ALARM_T to transfer these to the OS (WinCC).

Operating principle
? Process interrupt: The IM153-2 creates a process interrupt when there are new messages. The status of the time stamp with the number of the record to be fetched of the IM153-2 and the number of messages in the record are stored for cyclic processing from the start information of the process interrupt OB (refer to the process interrupt data). The information of up to 17 process interrupts can be stored. If the maximum number is exceeded, the new information is lost. ? Cyclic processing: If messages are ready to be fetched, the respective record (message buffer) is read by the SFC 59/RD_REC (read record). If several records are to be fetched, the record with the oldest messages (oldest process interrupt) is fetched. A maximum of 20 messages of a record (current number of messages is listed in the process interrupt data) are saved temporarily in the instance of the block As soon as a record has been read, new messages can be entered again from the IM153-2. If all the records are occupied, the IM153-2 enters the special message "Buffer overflow coming" into the message buffer. The special message "Buffer overflow going" is entered as the first message into the first free record. Messages which occur between the occurrence of a buffer overflow and the enabling of a record are lost. The slot no./channel no. of the stored messages are compared with the input parameters of the block for the slot no./channel no. (S_CH_xxx). If they agree, the message is assigned to the corresponding event ID (EV_ID_xxx) and signal number (1 to 8) of the pseudo ALARM_T (ALARM_8P) block. The time stamp of the message (8 bytes) is entered in the ARRAY of byte (index corresponding to the signal number of the pseudo ALARM_T). When all the messages have been assigned, the pseudo ALARM_T blocks which are to transfer the new messages to OS (WinCC) are called up. The return signals of the pseudo ALARM_T and of the process control system message block ALARM_8P (STAT_xx, M_ACK_xx) are available at the block output. If STAT_xx = 11 (previous job not yet completed) the pseudo ALARM_T or ALARM_8P is called
PCS 7 Driver Blocks C79000-G7076-C752-01

1-51

27.01.00 16.11.99

Signal blocks and diagnostic drivers

again in the next cycle. In all other cases messages can be lost. If no agreement can be found with the input parameters at a message, the output QBPARF is set TRUE for one cycle (see error handling). The event is signaled (see message characteristics).

Addressing/Configuration
The logical address of the IM153-2 determined with HWConfig (corresponds to the diagnostic address) is entered at the block input (LADDR) of the driver. Each change to the LADDR block input leads to a single check corresponding to the start-up characteristics of the block. Process signals which are to be provided with a time stamp and are detected via an IM153-2 must be configured correspondingly in the HWConfig. Each signal which is provided with a time stamp from the IM153-2 has a unique assignment through its slot in combination with the corresponding channel number. There are 128 inputs of data type WORD for 128 signals. The slot number of the respective digital input module is entered in the higher-value byte and the channel number (signal of the digital input module) in the lower-value byte. The slot and signal number of the process signals are entered in the block inputs (S_CH_XXX) (hexadecimal format). Example: You have set the digital signal 10 of a digital input module plugged into slot 5 of an ET200M to 10 ms exact time stamp by means of HWConfig. You have to enter the number 16#050A at the first free input S_CH_XXX of the IM_DRV .

Error handling
I/O access error QPERAF The block could not access IM153-2. A record could not be read. If it is not stored in the IM153-2, these messages are lost. Block processing error: QERR processed. An error has occurred while the block was being

Module configuration error: QPARF Incorrect module configuration (incorrect logical basic address entered). Configuration error: QBPARF The block was configured incorrectly. The slot/channel number of an IM153-2 message does not agree with any slot/channel number of the block input parameters. (message is lost) Rack failure: QRACKF of IM153-2 Failure of the rack in which the IM153-2 is pluggedro failure a

1-52

PCS 7 Driver Blocks C79000-G7076-C752-01

27.01.00 16.11.99

Signal blocks and diagnostic drivers

Start-up characteristics of the IM153-2
When the IM153-2 is started up/restarted process interrupts are emitted again for those records which were occupied before restarting but had not been fetched. The special message "Begin start-up data" is entered as the first message into the first free record. Then all the digital signals to be monitored are checked for changes after the restart and a message is triggered, if appropriate. The special message "End start-up data" is generated finally.

Start-up characteristics of the driver block IM_DRV
Initialization of the ALARM_8P and the pseudo ALARM_T blocks with the data stored before the stop state of the CPU. At a start-up the signal state is initialized to zero. At a start-up/initial start the driver checks whether there is an IM153-2 under the logical address LADDR. Otherwise the driver sets its output QPARF = TRUE and does not carry out any further I/O accesses in the subsequent cycles. Not until the right module has been plugged or until after new configuration does QPARF = FALSE and is the I/O access enabled. Stored process interrupt data which were not processed before the restart are deleted.

Time response
Does not exist.

Message characteristics
The block uses one ALARM_8P and 17 pseudo ALARM_T blocks which are installed as multiple instances. Transferring of the 8 time-stamp values per pseudo ALARM_T call is carried out via an ARRAY [0..65] of BYTE. The ARRAY is structured as follows:

BYTE 0 – 1: BYTE 2 – 9: BYTE 10 – 17: etc. BYTE 58 – 65:

Format identifier of the following ate/time stamp d Date/time stamp for Signal_1 Date/time stamp for Signal_2

Date/time stamp for Signal_8

The format identifier of the bytes 0 - 1 specifies the bit coding of the time stamp structure (8 bytes are assigned to one time stamp value):
Format identifier = 1: = 0: Date/time in Simatic S7 BCD format ( DATE_AND_TIME)

Date/time in ISP format

PCS 7 Driver Blocks C79000-G7076-C752-01

1-53

27.01.00 16.11.99

Signal blocks and diagnostic drivers

Year Day Minutes 1/10 s 1/100 s

Month hours Seconds 1/1000 s Weekday

Time stamp in ISP format
BYTE 0 3 4 7 Second fragments (4 BYTES) Seconds (4 BYTES)

The time stamps provided by IM153-2 were passed on unchanged by the driver in ISP format. In cyclic operation of the driver the pseudo ALARM_T blocks and the process control system message block ALARM_8P are only called when the signal states have changed. This reduces unnecessary runtimes.

Assignment of message texts and message classes to the signal and special messages
An ALARM_8P block is used for the process control system messages in the following table. The geographic address of the IM153-2 is entered in the auxiliary value 1 = SUBNET_ID (line number) and the auxiliary value 2 = RACKNO (rack number).
ALARM_8P_L messages 1 2 3 4 Output parameter QRACKF QPERAF QPARF QBPARF Default message text Rack failure I/O access error Parameter assignment error Block configuration fault Message class S S S S

The following special messages which can be contained in the message buffer are generated with ALARM_8P_00 (multiple-instanced call of the pseudo ALARM_T) The format identifier and the 8 time-stamp values are entered in the first auxiliary value
ALARM_8P_00 Default message text Message No. 1 2 3 4 5 Start-up data BEGINNING/END Time-of-day message failure COMING/GOING Sync-Signal failure COMING/GOING (onlyrelevant for precision ≤ 1ms) Time difference between message and internal clock > 1 second POSITIVE/NEGATIVE STOP of the functionality time stamp COMING/GOING Message class S S S S S
PCS 7 Driver Blocks C79000-G7076-C752-01

1-54

27.01.00 16.11.99

Signal blocks and diagnostic drivers

ALARM_8P_00 Default message text Message No. 6 Message loss at IM153-2 (buffer overflow) COMING/GOING

Message class S

ALARM_8P_01 to ALARM_8P_16 (multiple-instanced call of the pseudo ALARM_T) can generate the following signal messages. The format identifier and the 8 time-stamp values are entered in the first auxiliary value
ALARM_8P_01 Message No. 1 2 3 4 5 6 7 8 Default message text TEXT S_CH_000 TEXT S_CH_001 TEXT S_CH_002 TEXT S_CH_003 TEXT S_CH_004 TEXT S_CH_005 TEXT S_CH_006 TEXT S_CH_007 Message class S S S S S S S S

......
ALARM_8P_16 Message No. 1 2 3 4 5 6 7 8 Default message text TEXT S_CH_120 TEXT S_CH_121 TEXT S_CH_122 TEXT S_CH_123 TEXT S_CH_124 TEXT S_CH_125 TEXT S_CH_126 TEXT S_CH_127 Message class S S S S S S S S

Operator control and monitoring:
The block does not have a faceplate.

1.14.1
Element EV_ID EV_ID_00

I/O bar of IM_DRV
Meaning EVENT_ID/ALARM_8P EVENT-ID for ALARM_8P EVENT_D/ALARM_T_00 EVENT_ID for special messages (ALARM_T_00) DWORD 0 I I Type Initial I/O Attr. I I OC &M Valid values

DWORD 0

EV_ID_01

EVENT_D/ALARM_T_01 EVENT_ID for S_CH_000,..,S_CH_007 (ALARM_T_01)

DWORD 0

I

I

PCS 7 Driver Blocks C79000-G7076-C752-01

1-55

27.01.00 16.11.99

Signal blocks and diagnostic drivers

Element EV_ID_16

Meaning EVENT_D/ALARM_T_16 EVENT_ID for S_CH_120,..,S_CH_127 (ALARM_T_16)

Type

Initial

I/O Attr. I I

OC &M

Valid values

DWORD 0

LADDR M_ACK_x00 MSTAT_00x Q_ERR_x00 QBPARF QERR QPARF QPERAF QRACKF S_CH_x000

Logical Address Logical address of IM153-2 Message acknowledge x Message acknowledgement x Message failure x Message failure information x Message failure x Message failure x 1: Parameter failure block Block configuration fault 1: Error output (inverted value of ENO) 1: Parameter failure module Module configuration error 1: I/O access failure I/O access error 1:Rack Failure Rack failure Slot-/channel-N0 x Slot/Channel No. x

WORD WORD WORD BOOL BOOL BOOL BOOL BOOL BOOL WORD

0 O O O 0 1 0 0 0 0

I O O O O O O O O I I I I I

1.14.2

Interface IM153-2
xxThe IM153-2 triggers a process interrupt when it wants to send messages to the AS. The user data of the IM153-2 are specified in the start information of the process interrupt as follows.

Process interrupt data
Element Data type Meaning 0 1 BYTE BYTE Event class and identifiers: B#16#11 = Interrupt is active B#16#41 = Interrupt via interrupt line B#16#42 = Interrupt via interrupt line 2 (only for S7-400) B#16#43 = Interrupt via interrupt line 3 (only for S7-400) B#16#44 = Interrupt via interrupt line 4 (only for S7-400) 2 3 BYTE BYTE Configured priority class: Default values: 16 (OB 40) to 23 (OB 47) OB No. (40 to 47)

1-56

PCS 7 Driver Blocks C79000-G7076-C752-01

27.01.00 16.11.99

Signal blocks and diagnostic drivers

Element Data type Meaning 4 5 6 7 BYTE BYTE WORD BYTE Reserved Input module: B#16#54 Output module: B#16#55 Logical basic address of the module which triggers the interrupt State of the time stamp (interrupt cause from the view of the time stamp)t Bit 7: State of the synchronization via time message = 0: No synchronization exists = 1: Synchronization exists Bit 6: (only 1 ms) State of the synchronization via optical fiber synchronization signal = 0: No optical fiber signal exists = 1: Optical fiber signal exists Bit 5: Reserved Bit 4: Reserved Bit 3: Reserved Bit 2: Reserved Bit 1: = 1: Buffer overflow Bit 0: = 1: Message buffer is ready for fetching on the IM 8 9 10 11 BYTE BYTE BYTE Record number if a record (message buffer) is to be fetched Number of messages contained in the record n: 1 – 20 Reserved

DATE_AN Date and time at which the OB was requested D_TIME

Record (message buffer)
An IM153-2 has 15 records (message buffers). Access to a record is specified by the record number supplied in the process interrupt data.

Structure of a record (message buffer) in the IM153-2
Date Message1 . Message20 12 Signal or special message Number of bytes 12 Remarks Signal or special message

A maximum of 20 signal or special messages can be stored in a message buffer.

PCS 7 Driver Blocks C79000-G7076-C752-01

1-57

27.01.00 16.11.99

Signal blocks and diagnostic drivers

Structure of a special message from IM153-2
Element Meaning 1 2 Slot number of the header module Data type Remarks BYTE Fixed = 2 01h: Start-up data(a) 02h: Time message failure Subsequent signal messages may have a precision worse than 10ms (b) 03h: Synchronization signal failure: Subsequent signal messages may have a precision worse than 1ms (b) 04h: Time difference between message and (d) internal clock > 1 second
(b) 05h: STOP of the functionality time stamp

Identifier of the special messageBYTE

06h: Buffer overflow: Subsequent signal (b) messages are lost until the buffer is free again 3 Characteristic of special message BYTE For further specification of the event 01h: BEGINNING00h: END 01h: COMING 00h: GOING (a) (b) (c) or or

01h: POSITIVE 00h: NEGATIVE (d) positive: Internal clock lost and was reset negative: Internal clock gained and was reset: 4 5 Reserved Time of the signal change BYTE ISP time Not used at present Complete time by ISP method (time since (8 BYTES) 1.1.1900; 00:00 h)

Structure of a signal message from IM153-2
Element Meaning 1 Slot number of the module Data type Remarks BYTE In connection with the channel number for address referencing of the digital signal. Range of values: 0, 1, 2, 3 4 ... 11 12 ... 255 2 Channel number of the module BYTE Not assigned Slot number of the DI module Not assigned

In connection with the slot number for address referencing of the digital signal. Range of values: 0, 1, ... 15 module 16 ... 255 Channel number of the DI Not assigned = 1: Signal coming = 0: Signal going Bit 6 ... Bit 0: Not used

3

Signal state

BYTE

Bit 7

1-58

PCS 7 Driver Blocks C79000-G7076-C752-01

27.01.00 16.11.99

Signal blocks and diagnostic drivers

Element Meaning 4 5 Reserve Time of the signal change

Data type Remarks BYTE ISP time Not used at present Complete time by ISP method (time since (8 BYTES) 1.1.1900; 00:00 h)

1.15

Error information of the MSG_STAT output parameter
The messages can be de-activated via the input EN_MSG = FALSE (output parameter MSG_STAT (_x) remains unchanged). The ALARM8_P(_x) block is called in the acyclic OBs and OB1 if message suppression has not been suppressed Error information of the ALARM_8P(_x) (messages cannot be emitted) is displayed in the output parameter MSG_STAT(_x). The error information of the output parameter MSG_STAT and of the acknowledgement word MSG_ACK(_x) of ALARM8_8P is described in the on-line help for SSFB35 (ALARM_8P).

PCS 7 Driver Blocks C79000-G7076-C752-01

1-59

27.01.00 16.11.99

27.01.00 16.11.99

2

PROFIBUS PA - Blocks

2.1

PA_AI: Analog Input PROFIBUS PA

Type/Number
FB 101

Application
The block reads an analog value of a PROFIBUS driver cyclically.

Calling OBs
? Cyclic task: OB1 or watchdog interrupt OB: for example OB32 ? In addition with the same instance in OB86 (rack failure) and OB100 (restart)

Function
The block forms the interface between a PROFIBUS PA field device and the blocks of the SIMATIC PCS 7 libraries. It can also be interconnected with other SIMATIC S7 blocks. The block requires an interfacing to the PROFIBUS DP. This can be integrated either into the CPU or be effected as an external DP interface (CP). The link from the PROFIBUS DP to the PROFIBUS PA is effected by a SIMATIC segment coupler DP/PA Link (alternatively DP/PA coupler) or a comparable segment coupler which fulfils the standards EN 50170, Vol.2, EN 61158-2, IEC 1158-2.

Operating principle
The block cyclically reads the process value with status byte of the PROFIBUS PA field device (structure an accordance with the Analog Input of the PA profiles). The process value exists as a physical value. The status byte contains information on the measured value and the state of the PROFIBUS PA field device. In order to improve the interconnectability further important detailed information in addition to the status byte as Boolean (BOOL) values is supplied at the output interface. They correspond to the bit combinations specified in the PROFIBUS PA "General Requirements".

PCS 7 Driver Blocks C79000-G7076-C752-01

2-1

27.01.00 16.11.99

PROFIBUS PA - Blocks

Addressing
At the block (LADDR) set the logic address of the PROFIBUS PA field device determined while configuring the hardware with STEP 7. The PA field device is not accessed during a failure.

Error handling
The following cases are handled by the block algorithm: ? QPERAF=1: I/O access error. The block could not access a PROFIBUS PA field device. ? QRACKF_1=1 : Incorrect logical address set, rack failure or PROFIBUS PA field device failed.

Start-up characteristics
Check whether a PA field device exists under the set logical address (LADDR), or has failed. If there is a fault, QRACKF = TRUE. A check whether the PA field device contains the PA profile suitable for the block is not possible during cyclic operation.

Time response
Does not exist.

Message characteristics
Does not exist.

Operator control and monitoring via OS
Does not exist.

2.1.1
Element LADDR QA_1 QA_2 QBAD_0 QBAD_1 QBAD_2 QBAD_3

I/O bar of PA_AI
Meaning Logical address 1 = Alarm/Warning 1 1 = Alarm/Warning 2 1 = Non-specific 1 = Configuration error 1 = Not connected 1 = Device failure Type INT BOOL BOOL BOOL BOOL BOOL BOOL Initial 0 0 0 0 0 0 0 I/O I O O O O O O I I I I I I Attr. O Valid C&M values

2-2

PCS 7 Driver Blocks C79000-G7076-C752-01

27.01.00 16.11.99

PROFIBUS PA - Blocks

Element QBAD_4 QBAD_5 QBAD_6 QBAD_7 QBAD_HL QBAD_LL

Meaning 1 = Sensor failure

Type BOOL

Initial 0 0 0 0 0 0

I/O O O O O O O

Attr. I I I I I I

O Valid C&M values

1 = No communication (last usable BOOL value) 1 = No communication (no usable BOOL value) 1 = Out of service BOOL 1 = High limit upper physical range BOOL of sensor has been reached 1 = Low limit lower physical range BOOL of sensor has been reached = 1 = OK (cascade) 1 = Initialization acknowledged 1 = Initialization request 1 = Not requested 1 = Not selected 1 = Do not select 1 = Local override 1 = Fail safe active 1 = Initiate fail safe 1 = Constant BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL

QCASCAD0 QCASCAD1 QCASCAD2 QCASCAD3 QCASCAD4 QCASCAD5 QCASCAD6 QCASCAD7 QCASCAD8 QCONST QOUT_HHL QOUT_HL QOUT_LLL QOUT_LL QERR QNONCAS0 QNONCAS1 QNONCAS2 QNONCAS3 QNONCAS4 QNONCAS5 QNONCAS6 QNONCAS7 QNONCAS8 QPERAF

0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0

O O O O O O O O O O O O O O O O O O O O O O O O O

I I I I I I I I I I I I I I I I I I I I I I I I

1 = Active critical alarm, high limit BOOL of OUT has been exceeded 1 = Active advisory alarm, high limit of OUT has been exceeded BOOL

1 = Active critical alarm, low limit of BOOL OUT has been exceeded 1 = Active advisory alarm, low limit BOOL of OUT has been exceeded 1 = Error output (inverted value of BOOL ENO) 1 = OK (non-cascade) 1 = Active block alarm BOOL BOOL

1 = Active advisory alarm (priority BOOL <8) 1 = Active critical alarm (priority >8) 1 = Unacknowledged advisory alarm 1 = Initial fail safe 1 = Maintenance required 1 = I/O access failure BOOL

1 = Unacknowledged block alarm BOOL BOOL

1 = Unacknowledged critical alarm BOOL BOOL BOOL BOOL

PCS 7 Driver Blocks C79000-G7076-C752-01

2-3

27.01.00 16.11.99

PROFIBUS PA - Blocks

Element QRACKF QUNCERT0 QUNCERT1 QUNCERT2 QUNCERT3 QUNCERT4 QUNCERT5 QUNCERT6 QUNCERT7 STATUS V

Meaning 1 = Rack failure 1 = Non-specific 1 = Last usable value 1 = Substitute set 1 = Initial value 1 = Sensor conversion not accurate 1 = Engineering unit range violation 1 = Sub-normal 1 = Configuration error Process value status Process value

Type BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BYTE REAL

Initial 0 0 0 0 0 0 0 0 0 O O

I/O O O O O O O O O O O O

Attr.

O Valid C&M values

I I I I I I I I

2.2

PA_AO: Analog Output PROFIBUS PA

Type/Number
FB 103

Application
The block is used to cyclically output an analog value via a PROFIBUS PA field device Class A and B.

Calling OBs
? Cyclic task: OB1 or watchdog interrupt OB: for example OB32 ? In addition with the same instance in OB86 (rack failure) and OB100 (restart)

Function
The block forms the interface between a PROFIBUS PA field device and the blocks of the SIMATIC PCS 7 libraries. It can also be interconnected with other SIMATIC S7 blocks. The block requires an interfacing to the PROFIBUS DP. This can be integrated either into the CPU or be effected as an external DP interface (CP). The link from the PROFIBUS DP to the PROFIBUS PA is effected by a SIMATIC segment coupler DP/PA Link (alternatively DP/PA coupler) or a comparable segment coupler which fulfils the standards EN 50170, Vol.2, EN 61158-2, IEC 1158-2.

2-4

PCS 7 Driver Blocks C79000-G7076-C752-01

27.01.00 16.11.99

PROFIBUS PA - Blocks

Operating principle
The block cyclically writes the setpoint (SP) with status byte into the PROFIBUS PA field device (configuration of the setpoints and process values in accordance with the Analog Output of the PA profiles, REAL with 1 byte status). The setpoint exists as a physical unit. The status byte contains information on the state of the setpoint. The coding of a status byte is described in the PROFIBUS PA "General Requirements". Optionally (MODE_I <>0) the reference variable (RCAS_IN) with status byte can be transferred in the same cycle. The PROFIBUS PA field devices cyclically read the process variable (READBACK) and the discrete position feedback (POS_D). Optionally (MODE_O refer to addressing) you can additionally read the active reference variable (RCAS_OUT) and the detailed device information (CHECK_BACK). The device information is available at the block output in bit-granular form. The data are written consistent with SFC 15 (DPWR_DAT) and read consistent with SFC 14 (DPRD_DAT). In order to improve the interconnectability important detailed information is offered from the status bytes read (READBACK) as Boolean (BOOL) values at the output interface. They correspond to the bit combinations specified in the PROFIBUS PA "General Requirements".

Note Zero is assigned as the initial value to the status byte of the setpoint (ST_SP) and the reference variable (ST_RCAS_IN). The setpoint or the reference variable only becomes active in the PROFIBUS PA field device if you set the corresponding status byte to 16#80.

Addressing
At the block (LADDR) set the logic address of the PROFIBUS PA field device determined while configuring the hardware with STEP 7. The PA field device is not accessed during a failure. The parameters RCAS_IN, RCAS_OUT and CHECKBACK can be activated optionally for each PA device separately. Setting is carried out by using HWConfig. The inputs MODE_I and MODE_O must be used to inform the block which user data are to be exchanged with the PA field device. The following combinations are supported:
MODE_I = 0 (default setting): MODE_I # 0: MODE_O = 0 (default setting): MODE_O = 1: Write the setpoint SP to the PA field device (Input 5 bytes) Write the setpoint SP to the PA field device and RCAS_IN to the PA field device (input 10 bytes of which the first 5 bytes correspond to SP) Read READBACK and POS_D from the PA field device (output 7 bytes of which the first 5 bytes correspond to READBACK) Read READBACK, RCAS_OUT and POS_D from the PA field device (output 12 bytes of which the first 5 bytes correspond to READBACK and bytes 6 to 10 to RCAS_OUT)

PCS 7 Driver Blocks C79000-G7076-C752-01

2-5

27.01.00 16.11.99

PROFIBUS PA - Blocks

MODE_O = 2:

Read READBACK, POS_D and CHECKBACK from the PA field device (output 10 bytes of which the first 5 bytes correspond to READBACK and bytes 6 and 7 to POS_D) Read READBACK, RCAS_OUT, POS_D and CHECKBACK from the PA field device (output 15 bytes of which the first 5 bytes correspond to READBACK , bytes 6 to 10 to RCAS_OUT, bytes 11 and 12 to POS_D)

MODE_O > 2:

Error handling
The following cases are handled by the block algorithm: QPERAF=1: I/O access error. The block could not access a PROFIBUS PA field device. QRACKF_1=1 : Incorrect logical address set, rack failure or PROFIBUS PA field device failed.

Start-up characteristics
Check whether a PA field device exists under the set logical address (LADDR), or has failed. If there is a fault, QRACKF = TRUE. A check whether the PA field device contains the PA profile suitable for the block is not possible during cyclic operation.

Time response
Does not exist.

Message characteristics
Does not exist.

Operator control and monitoring via OS
Does not exist.

2.2.1
Element LADDR MODE_I MODE_O

I/O bar of PA_AO
Meaning Logical address MODE Input parameter MODE Output parameter Type INT BYTE BYTE Initial 0 0 0 I/O I I I I I Attr. O Valid C&M values

2-6

PCS 7 Driver Blocks C79000-G7076-C752-01

27.01.00 16.11.99

PROFIBUS PA - Blocks

Element POS

Meaning The current position of the valve (discrete). The coding of the POS bytes is as follows: 0 initialized 1 2 3 Intermediate = Not = Closed = Opened =

Type BYTE

Initial 0

I/O O

Attr.

O Valid C&M values

QA_1 QA_2 QBAD_0 QBAD_1 QBAD_2 QBAD_3 QBAD_4 QBAD_5 QBAD_6 QBAD_7 QCASCAD0 QCASCAD1 QCASCAD2 QCASCAD3 QCASCAD4 QCASCAD5 QCASCAD6 QCASCAD7 QCASCAD8 QCONST QCB_0

1 = Alarm/Warning 1 1 = Alarm/Warning 2 1 = Non-specific 1 = Configuration error 1 = Not connected 1 = Device failure 1 = Sensor failure 1 = No communication (last usable value) 1 = No communication (no usable value) 1 = Out of service = 1 = OK (cascade) 1 = Initialization request 1 = Not requested 1 = Not selected 1 = Do not select 1 = Local override 1 = Fail safe active 1 = Initiate fail safe 1 = Constant 1 = Field device in fail safe position (Mode = out of service). 1 = Request for local operation.

BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

O O O O O O O O O O O O O O O O O O O O O

I I I I I I I I I I I I I I I I I I I I I

1 = Initialization acknowledged BOOL

QCB_1 QCB_10 QCB_11 QCB_12

BOOL

0 0 0 0

O O O O

I I I I

1 = The alert generated by any BOOL change to the static data 1 = Simulation of process values is enabled BOOL

1 = Device disturbance, details BOOL see Physical Block parameter DIAGNOSIS

PCS 7 Driver Blocks C79000-G7076-C752-01

2-7

27.01.00 16.11.99

PROFIBUS PA - Blocks

Element QCB_13 QCB_14

Meaning 1 = Internal control loop disturbed 1 = Positioner inactive (MODE = out of service or local) 1 = Device under self test ( MODE = out of service) 1 = Indicates that total valve travel limit is exceeded 1 = Field device under local control, LOCKED OUT switch is in gear. 1 = Emergency override active. 1 = Discrepancy in direction occurred (expected reaction failed) 1 = Indicates that the torque limit in OPEN direction is exceeded 1 = Indicates that the torque limit in CLOSE direction is exceeded

Type BOOL BOOL

Initial 0 0

I/O O O

Attr. I I

O Valid C&M values

QCB_15 QCB_16 QCB_2

BOOL BOOL BOOL

0 0 0

O O O

I I I

QCB_3 QCB_4

BOOL BOOL

0 0

O O

I I

QCB_5

BOOL

0

O

I

QCB_6

BOOL

0

O

I

QCB_7

1 = Indicates status of travel BOOL monitoring equipment. If YES, travel time 1 = Actuator is moving towards BOOL open direction 1 = Actuator is moving towards BOOL close direction 1 = Error output (inverted value of ENO) 1 = OK (non-cascade) 1 = Active block alarm 1 = Active advisory alarm (priority <8) 1 = Active critical alarm (priority >8) 1 = Unacknowledged block alarm BOOL BOOL BOOL BOOL BOOL BOOL

0

O

I

QCB_8 QCB_9 QERR QNONCAS0 QNONCAS1 QNONCAS2 QNONCAS3 QNONCAS4 QNONCAS5 QNONCAS6 QNONCAS7 QNONCAS8 QPERAF

0 0 1 0 0 0 0 0 0 0 0 0 0

O O O O O O O O O O O O O

I I I I I I I I I I I I

1 = Unacknowledged advisory BOOL alarm 1 = Unacknowledged critical alarm 1 = Initial fail safe 1 = Maintenance required 1 = I/O access failure BOOL BOOL BOOL BOOL

2-8

PCS 7 Driver Blocks C79000-G7076-C752-01

27.01.00 16.11.99

PROFIBUS PA - Blocks

Element QRACKF QUNCERT0 QUNCERT1 QUNCERT2 QUNCERT3 QUNCERT4 QUNCERT5 QUNCERT6 QUNCERT7 RCAS_IN

Meaning 1=Rack failure 1 = Non-specific 1 = Last usable value 1 = Substitute set 1 = Initial value 1 = Sensor conversion not accurate 1 = Engineering unit range violation 1 = Sub-normal 1 = Configuration error

Type BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL

Initial 0 0 0 0 0 0 0 0 0 0

I/O O O O O O O O O O I

Attr.

O Valid C&M values

I I I I I I I I I

Target setpoint provided by a REAL supervisory host to the analog control or output block Function Block setpoint REAL The actual position of the final REAL control element within the travel span (between OPEN and CLOSE position) in PV units. Setpoint Status POS RCAS_IN status Setpoint status REAL BYTE BYTE BYTE Function Block setpoint status BYTE

RCAS_OUT READBACK

0 0

O O

I

SP ST_ READBACK ST_POS ST_RCAS_IN ST_RCAS_OUT ST_SP

0 0 0 0 0 0

I O O I O I I I

Function Block setpoint status BYTE

2.3

PA_DI: Discrete Input PROFIBUS PA

Type/Number
FB 104

Application
The block is used to cyclically input digital values (max. of 8) via a PROFIBUS PA field device Class A and B.

Calling OBs
? Cyclic task: OB1 or watchdog interrupt OB: for example OB32

PCS 7 Driver Blocks C79000-G7076-C752-01

2-9

27.01.00 16.11.99

PROFIBUS PA - Blocks

? In addition with the same instance in OB86 (rack failure), OB100 (restart) and OB122 (for recognizing an I/O access error)

Function
The block forms the interface between a PROFIBUS PA field device and the blocks of the SIMATIC PCS 7 libraries. It can also be interconnected with other SIMATIC S7 blocks. The block requires an interfacing to the PROFIBUS DP. This can be integrated either into the CPU or be effected as an external DP interface (CP). The link from the PROFIBUS DP to the PROFIBUS PA is effected by a SIMATIC segment coupler DP/PA Link (alternatively DP/PA coupler) or a comparable segment coupler which fulfils the standards EN 50170, Vol.2, EN 61158-2, IEC 1158-2.

Operating principle
The block cyclically reads the process value (OUT_D) with status byte of the PROFIBUS PA field device (structure an accordance with the Discrete Input of the PA profiles). The status byte contains information on the measured value and the state of the PROFIBUS PA field device. The process value and status bytes (total of 2 bytes) are read directly and coherently as a WORD. The process value is offered in bit-granular form and further important detailed information is supplied as Boolean (BOOL) values at the output interface in addition to the status byte in order to improve the interconnectability. They correspond to the bit combinations specified in the PROFIBUS PA "General Requirements".

Addressing
At the block (LADDR) set the logic address of the PROFIBUS PA field device determined while configuring the hardware with STEP 7. The PA field device is not accessed during a failure.

Error handling
The following cases are handled by the block algorithm: QPERAF=1: I/O access error. The block could not access a PROFIBUS PA field device. QRACKF_1=1 : Incorrect logical address set, rack failure or PROFIBUS PA field device failed.

Start-up characteristics
Check whether a PA field device exists under the set logical address (LADDR), or has failed. If there is a fault, QRACKF = TRUE. A check whether the PA field device contains the PA profile suitable for the block is not possible during cyclic operation.

2-10

PCS 7 Driver Blocks C79000-G7076-C752-01

27.01.00 16.11.99

PROFIBUS PA - Blocks

Time response
Does not exist.

Message characteristics
Does not exist.

Operator control and monitoring
Does not exist.

2.3.1
Element LADDR OUT_D Q0 Q1 Q2 Q3 Q4 Q5 Q6 Q7 QA_1 QA_2 QBAD_0 QBAD_1 QBAD_2 QBAD_3 QBAD_4 QBAD_5 QBAD_6 QBAD_7 QCONST QERR QPERAF QRACKF

I/O bar of PA_DI
Meaning Logical address Process value Process value Bit 0 Process value Bit 1 Process value Bit 2 Process value Bit 3 Process value Bit 4 Process value Bit 5 Process value Bit 6 Process value Bit 7 1 = Alarm/Warning 1 1 = Alarm/Warning 2 1 = Non-specific 1 = Configuration error 1 = Not connected 1 = Device failure 1 = Sensor failure Type INT BYTE BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL Initial 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 I/O I O O O O O O O O O O O O O O O O O O O O O O O I I I I I I I I I I I I I I I I I I I I Attr. O Valid C&M values

1 = No communication (last usable BOOL value) 1 = No communication (no usable value) 1 = Out of service 1 = Constant = 1 = Error output (inverted value of BOOL ENO) 1 = I/O access failure 1=Rack failure BOOL BOOL BOOL BOOL BOOL

PCS 7 Driver Blocks C79000-G7076-C752-01

2-11

27.01.00 16.11.99

PROFIBUS PA - Blocks

Element QUNCERT0 QUNCERT1 QUNCERT2 QUNCERT3 QUNCERT4 QUNCERT5 QUNCERT6 QUNCERT7 STATUS

Meaning 1 = Non-specific 1 = Last usable value 1 = Substitute set 1 = Initial value 1 = Sensor conversion not accurate 1 = Sub-normal 1 = Configuration error Process value status

Type BOOL BOOL BOOL BOOL BOOL

Initial 0 0 0 0 0 0 0 0 0

I/O O O O O O O O O O

Attr. I I I I I I I I

O Valid C&M values

1 = Engineering unit range violationBOOL BOOL BOOL BYTE

2.4

PA_DO: Discrete Output PROFIBUS PA

Type/Number
FB 105

Application
The block is used to cyclically output digital values (SP or RCAS_IN, max. of 8) via a PROFIBUS PA field device Class A and B.

Calling OBs
? Cyclic task: OB1 or watchdog interrupt OB: for example OB32 ? In addition with the same instance in OB86 (rack failure), OB100 (restart) and OB122 (for recognizing an I/O access error)

Function
The block forms the interface between a PROFIBUS PA field device and the blocks of the SIMATIC PCS 7 libraries. It can also be interconnected with other SIMATIC S7 blocks. The block requires an interfacing to the PROFIBUS DP. This can be integrated either into the CPU or be effected as an external DP interface (CP). The link from the PROFIBUS DP to the PROFIBUS PA is effected by a SIMATIC segment coupler DP/PA Link (alternatively DP/PA coupler) or a comparable segment coupler which fulfils the standards EN 50170, Vol.2, EN 61158-2, IEC 1158-2.

2-12

PCS 7 Driver Blocks C79000-G7076-C752-01

27.01.00 16.11.99

PROFIBUS PA - Blocks

Operating principle
The block cyclically writes the setpoint (SP) with status byte into the PROFIBUS PA field device (configuration of the setpoints and process values in accordance with the Discrete Output of the PA profiles, 1 byte with a status byte). The status byte contains information on the state of the setpoint. The coding of a status byte is described in the PROFIBUS PA "General Requirements". Optionally (MODE_I <>0) the setpoint in the state RCAS (remote cascade) (RCAS_IN) can be transferred in the same cycle. The PROFIBUS PA field devices cyclically read the state of the valve (READBACK), the process value of the valve setting in the state RCAS (RCAS_OUT) and the detailed device information (CHECK_BACK) optionally (MODE_O refer to addressing). The device information is available at the block output in bit-granular form. The data are written coherent and read partially with SFC 14 (DPRD_DAT). In order to improve the interconnectability important detailed information is offered from the status bytes read as Boolean (BOOL) values at the output interface. They correspond to the bit combinations specified in the PROFIBUS PA "General Requirements". If READBACK and RCAS_OUT exist simultaneously, the detailed information is derived from the READBACK status byte.

Note Zero is assigned as the initial value to the status byte of the setpoint (ST_SP) and the reference variable (ST_RCAS_IN). The setpoint or the reference variable only becomes active in the PROFIBUS PA field device if you set the corresponding status byte to 16#80.

Addressing
At the block (LADDR) set the logic address of the PROFIBUS PA field device determined while configuring the hardware with STEP 7. The PA field device is not accessed during a failure. The parameters RCAS_IN, RCAS_OUT and CHECKBACK can be activated optionally for each PA device separately. Setting is carried out by using HWConfig. At present it is not possible to read out the settings by means of an SFC. The inputs MODE_I and MODE_O must be used to inform the block which user data are to be exchanged with the PA field device. The following combinations are supported:
MODE_I = 0 (default setting): MODE_I # 0 MODE_O = 0 (default setting): MODE_O = 1 MODE_O = 2 MODE_O = 3
PCS 7 Driver Blocks C79000-G7076-C752-01

Write setpoint SP to the PA field device (input 2 bytes) Write the setpoint SP and RCAS_IN to the PA field device (input 4 bytes of which the first 2 bytes correspond to SP) Read from PA field device (output 0 bytes) Read READBACK from PA field device (output 2 bytes) Read RCAS_OUT from PA field device (output 2 bytes) Read CHECKBACK from PA field device (output 3 bytes)

2-13

27.01.00 16.11.99

PROFIBUS PA - Blocks

MODE_O = 4 MODE_O = 5 MODE_O = 6 MODE_O = 6

Read READBACK and RCAS_OUT from the PA field device (output 4 bytes of which the first 2 bytes correspond to READBACK) Read READBACK and CHECKBACK from the PA field device (output 5 bytes of which the first 2 bytes correspond to READBACK) Read RCAS_OUT and CHECKBACK from the PA field device (output 5 bytes of which the first 2 bytes correspond to RCAS_OUT) Read READBACK, RCAS_OUT and CHECKBACK from the PA field device (output 7 bytes of which the first 2 bytes correspond to READBACK and bytes 2 and 3 to RCAS_OUT)

Error handling
The following cases are handled by the block algorithm: QPERAF=1: I/O access error. The block could not access a PROFIBUS PA field device. QRACKF_1=1 : Incorrect logical address set, rack failure or PROFIBUS PA field device failed.

Start-up characteristics
Check whether a PA field device exists under the set logical address (LADDR), or has failed. If there is a fault, QRACKF = TRUE. A check whether the PA field device contains the PA profile suitable for the block is not possible during cyclic operation.

Time response
Does not exist.

Message characteristics
Does not exist.

Operator control and monitoring
Does not exist.

2.4.1
Element LADDR MODE_I MODE_O QA_1 QA_2

I/O bar of PA_DO
Meaning Logical address MODE Input parameter MODE Output parameter 1 = Alarm/Warning 1 1 = Alarm/Warning 2 Type INT BYTE BYTE BOOL BOOL Initial 0 0 0 0 0 I/O I I I O O I I I I Attr. O M Valid & C values

2-14

PCS 7 Driver Blocks C79000-G7076-C752-01

27.01.00 16.11.99

PROFIBUS PA - Blocks

Element QBAD_0 QBAD_1 QBAD_2 QBAD_3 QBAD_4 QBAD_5 QBAD_6 QBAD_7 QCB_0 QCB_1 QCB_10 QCB_11 QCB_12 QCB_13 QCB_14 QCB_15 QCB_16 QCB_17

Meaning 1 = Non-specific 1 = Configuration error 1 = Not connected 1 = Device failure 1 = Sensor failure 1 = No communication (last usable value)

Type BOOL BOOL BOOL BOOL BOOL BOOL

Initial 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

I/O O O O O O O O O O O O O O O O O O O

Attr. I I I I I I I I I I I I I I I I I I

O M Valid & C values

1 = No communication (no usable BOOL value) 1 = Out of service = 1 = Field device in fail safe position (Mode = out of service). 1 = Request for local operation. 1 = The alert generated by any change to the static data BOOL BOOL BOOL BOOL

1 = Simulation of process values BOOL is enabled 1 = Device disturbance, details see Physical Block parameter 1 = Positioner inactive (MODE = out of service or local) 1 = Device under self test ( MODE = out of service) BOOL

1 = Internal control loop disturbed BOOL BOOL BOOL

1 = Indicates that total valve travel BOOL limit is exceeded 1 = Limit for the time between the BOOL change to state OPEN/CLOSE and the indication that the valve is leaving the state OPEN/CLOSE. Underflow 1 = Limit for the time between the BOOL change to state OPEN/CLOSE and the indication that the valve is leaving the state OPEN/CLOSE. Overflow 1 = Error occurred in the internal cycle test 1 = Field device under local control. BOOL BOOL

QCB_18

0

O

I

QCB_19 QCB_2 QCB_20

0 0 0

O O O

I I I

1 = Limit for the time between the BOOL change of the state from OPEN to CLOSE or CLOSE to OPEN. Underflow

PCS 7 Driver Blocks C79000-G7076-C752-01

2-15

27.01.00 16.11.99

PROFIBUS PA - Blocks

Element QCB_21

Meaning

Type

Initial 0

I/O O

Attr. I

O M Valid & C values

1 = Limit for the time between the BOOL change of the state from OPEN to CLOSE or CLOSE to OPEN. Overflow 1 = Emergency override active. 1 = Discrepancy in direction occurred (expected reaction failed) 1 = Indicates that the torque limit in OPEN direction has been exceeded 1 = Indicates that the torque limit in CLOSE direction has been exceeded 1 = Indicates status of travel monitoring equipment. If YES, travel time 1 = Actuator is moving towards open direction 1 = Actuator is moving towards close direction 1 = Constant BOOL BOOL

QCB_3 QCB_4

0 0

O O

I I

QCB_5

BOOL

0

O

I

QCB_6

BOOL

0

O

I

QCB_7

BOOL

0

O

I

QCB_8 QCB_9 QCONST QERR QPERAF QRACKF QUNCERT0 QUNCERT1 QUNCERT2 QUNCERT3 QUNCERT4 QUNCERT5 QUNCERT6 QUNCERT7 RCAS_IN RCAS_OUT READBACK SP ST_ READBACK ST_RCAS_IN ST_RCAS_OUT ST_SP

BOOL BOOL BOOL

0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

O O O O O O O O O O O O O O I O O I O I O I

I I I I

1 = Error output (inverted value of BOOL ENO) 1 = I/O access failure 1=Rack failure 1 = Non-specific 1 = Last usable value 1 = Substitute set 1 = Initial value 1 = Sensor conversion not accurate 1 = Engineering unit range violation 1 = Sub-normal 1 = Configuration error Target setpoint FB setpoint Process value (READBACK) Setpoint READBACK status Status target setpoint Status FB setpoint Status setpoint BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BYTE BYTE BYTE BYTE BYTE BYTE BYTE BYTE

I I I I I I I I I I I I I I

2-16

PCS 7 Driver Blocks C79000-G7076-C752-01

27.01.00 16.11.99

PROFIBUS PA - Blocks

2.5

PA_TOT: Totalizer PROFIBUS PA

Type/Number
FB 102

Application
The block reads an analog value of a PROFIBUS PA field device cyclically.

Note Resetting the sum value is an acyclic operation and is not supported by the block.

Calling OBs
The block can be installed alternatively as follows: ? Cyclic task: OB1 ? Watchdog interrupt OB: for example OB32 ? In addition with the same instance in OB86 (rack failure) and OB100 (restart)

Function
The block forms the interface between a PROFIBUS PA field device and the blocks of the SIMATIC PCS 7 libraries. It can also be interconnected with other SIMATIC S7 blocks. The block requires an interfacing to the PROFIBUS DP. This can be integrated either into the CPU or be effected as an external DP interface (CP). The link from the PROFIBUS DP to the PROFIBUS PA is effected by a SIMATIC segment coupler DP/PA Link (alternatively DP/PA coupler) or a comparable segment coupler which fulfils the standards EN 50170, Vol.2, EN 61158-2, IEC 1158-2.

Operating principle
The block cyclically reads the process value with status byte of the PROFIBUS PA field device (structure an accordance with the Analog Input of the PA profiles). The process value exists as a physical value. The status byte contains information on the measured value and the state of the PROFIBUS PA field device. In order to improve the interconnectability further important detailed information in addition to the status byte as Boolean (BOOL) values is supplied at the output interface. They correspond to the bit combinations specified in the PROFIBUS PA "General Requirements".

PCS 7 Driver Blocks C79000-G7076-C752-01

2-17

27.01.00 16.11.99

PROFIBUS PA - Blocks

Addressing
At the block (LADDR) set the logic address of the PROFIBUS PA field device determined while configuring the hardware with STEP 7. The PA field device is not accessed during a failure.

Error handling
The following cases are handled by the block algorithm: ? QPERAF=1: I/O access error. The block could not access a PROFIBUS PA field device. ? QRACKF_1=1 : Incorrect logical address set, rack failure or PROFIBUS PA field device failed.

Start-up characteristics
Check whether a PA field device exists under the set logical address (LADDR), or has failed. If there is a fault, QRACKF = TRUE. A check whether the PA field device contains the PA profile suitable for the block is not possible during cyclic operation.

Time response
Does not exist.

Message characteristics
Does not exist.

Operator control and monitoring via OS
Does not exist.

2.5.1
Element LADDR QA_1 QA_2 QBAD_0 QBAD_1 QBAD_2 QBAD_3

I/O bar of PA_TOT
Meaning Logical address 1 = Alarm/Warning 1 1 = Alarm/Warning 2 1 = Non-specific 1 = Configuration error 1 = Not connected 1 = Device failure Type INT BOOL BOOL BOOL BOOL BOOL BOOL Initial 0 0 0 0 0 0 0 I/O I O O O O O O I I I I I I Attr. O Valid C&M values

2-18

PCS 7 Driver Blocks C79000-G7076-C752-01

27.01.00 16.11.99

PROFIBUS PA - Blocks

Element QBAD_4 QBAD_5 QBAD_6 QBAD_7 QBAD_HL QBAD_LL QCASCAD0 QCASCAD1 QCASCAD2 QCASCAD3 QCASCAD4 QCASCAD5 QCASCAD6 QCASCAD7 QCASCAD8 QCONST QOUT_HHL QOUT_HL QOUT_LLL QOUT_LL QERR QNONCAS0 QNONCAS1 QNONCAS2 QNONCAS3 QNONCAS4 QNONCAS5 QNONCAS6 QNONCAS7 QNONCAS8 QPERAF

Meaning 1 = Sensor failure

Type BOOL

Initial 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0

I/O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O

Attr. I I I I I I I I I I I I I I I I I I I I I I I I I I I I I I

O Valid C&M values

1 = No communication (last usable BOOL value) 1 = No communication (no usable BOOL value) 1 = Out of service = 1 = High limit upper physical range BOOL of sensor has been reached 1 = Low limit lower physical range BOOL of sensor has been reached 1 = OK (cascade) 1 = Initialization acknowledged 1 = Initialization request 1 = Not requested 1 = Not selected 1 = Do not select 1 = Local override 1 = Fail safe active 1 = Initiate fail safe 1 = Constant BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL

1 = Active critical alarm, high limit BOOL of OUT has been exceeded 1 = Active advisory alarm, high limit of OUT has been exceeded BOOL

1 = Active critical alarm, low limit of BOOL OUT has been exceeded 1 = Active advisory alarm, low limit BOOL of OUT has been exceeded 1 = Error output (inverted value of BOOL ENO) 1 = OK (non-cascade) 1 = Active block alarm BOOL BOOL

1 = Active advisory alarm (priority BOOL <8) 1 = Active critical alarm (priority >8) 1 = Unacknowledged advisory alarm 1 = Initial fail safe 1 = Maintenance required 1 = I/O access failure BOOL

1 = Unacknowledged block alarm BOOL BOOL

1 = Unacknowledged critical alarm BOOL BOOL BOOL BOOL

PCS 7 Driver Blocks C79000-G7076-C752-01

2-19

27.01.00 16.11.99

PROFIBUS PA - Blocks

Element QRACKF QUNCERT0 QUNCERT1 QUNCERT2 QUNCERT3 QUNCERT4 QUNCERT5 QUNCERT6 QUNCERT7 STATUS V

Meaning 1=Rack failure 1 = Non-specific 1 = Last usable value 1 = Substitute set 1 = Initial value 1 = Sensor conversion not accurate 1 = Engineering unit range violation 1 = Sub-normal 1 = Configuration error Process value status Process value

Type BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BOOL BYTE REAL

Initial 0 0 0 0 0 0 0 0 0 O O

I/O O O O O O O O O O O O

Attr.

O Valid C&M values

I I I I I I I I

2-20

PCS 7 Driver Blocks C79000-G7076-C752-01

27.01.00 16.11.99

A

Appendix

A.1

Technical data
The column headings have the following meaning:

Block type name
The symbolic identifier in the symbol table of the library for the respective FB or FC. FC It must be unique within the project.

FB/FC No.
Block number

Typical run time
The time which the CPU needs to process the corresponding block program under normal circumstances (for example, for a driver this is the execution time in the watchdog interrupt OB, without message generation in the event of channel errors). The table below lists the run times in a CPU S7 414-2 DP 6ES7 414-2XG02-0AB0, S7 416-2 DP 6ES7 416-2XK01-0AB0, S7 417-4 DP 6ES7 417-4XL00-0AB0 and a 417H-4 DP. With other CPUs the run time depends on their performance.

Block length
Memory requirements of the program code, once for every block type.

Instance data length
Memory requirement of an instance DB

Temporary memory
The local-data memory required in a priority class when the block is called. This is limited CPU-specifically. When it is exceeded, a CPU STOP is caused. You have to check it in the CPU configuration and, if necessary, distribute it amongst the priority classes (OBs) to meet the real requirements.

PCS 7 Driver Blocks C79000-G7076-C752-01

A-1

27.01.00 16.11.99

Appendix

Multiple instance block
The specified blocks are used by the technological block and must exist in the user program. They can be found in the same library.
Block (type name) FB/FC No. Typi cal run time (ms)
CPU 414-2 DP

Typi cal run time (ms)
CPU 416-2 DP

Typi cal run time (ms)
CPU 417-4 DP

Typi cal run time (ms)
CPU 417H-4 DP

Block length (bytes)

Instan ce data length (bytes)

Temporary memory (bytes)

Multiple instance block

CH_AI CH_AO CH_DI CH_DO IM_DRV MOD_1 MOD_2 MOD_D1 MOD_D2 PA_AI PA_AO PA_DI PA_DO PA_TOT PO_ UPDATE RACK SUBNET

FC275 FC276 FC277 FC278 FB90 FB91 FB92 FB93 FB94 FB101 FB103 FB104 FB105 FB102 FC279 FB107 FB106

0.099 0.050 0.028 0.023 0.975 1.012 1.021 0.45 0.46 0.28 0.57 0.45

0.054 0.028 0.015 0.012 0.250 0.264 0.274 0.42 0.43 0.25 0.56 0.42

0.064 0.032 0.018 0.014 0.056 0.078 0.095 0.108 0.42 0.43 0.25 0.56 0.42

0.064 0.033 0.018 0.014 0.094 0.110 0.122 0.42 0.43 0.25 0.56 0.42

3288 1014 282 248 10262 5040 5360 8188 9562 1572 3164 1268 2892 1572 252

4046 318 414 604 976 56 80 50 62 56 208 212

28 26 2 2 112 98 98 100 100 88 138 78 100 88 10 96 116

18x SFB35 SFB35 SFB35 3x SFB35 5x SFB35 SFB35 SFB35

0.50 1.43

0.48 1.33

0.48 1.33

0.48 1.33

5442 5726

The typical runtime of the SUBNET block increases by approx. 0.7 ms when the CPU 416-2DP is used (or by 0.8 ms when CPU 414-2DP is used), if the I/O unit affected by the occurring event is connected via a DP interface not integrated in the CPU (for example CP443-5 EXT).

The following SM modules are supported by the diagnostic blocks MOD_x and are thus tested and approved. 6ES7321-1BH01-0AA0 6ES7321-1BL00-0AA0 6ES7321-1FF01-0AA0 6ES7321-7BH00-0AB0

A-2

PCS 7 Driver Blocks C79000-G7076-C752-01

27.01.00 16.11.99

Appendix

6ES7321-7RD00-0AB0 6ES7322-1BH01-0AA0 6ES7322-1BL00-0AA0 6ES7322-1FF01-0AA0 6ES7322-5RD00-0AB0 6ES7322-5SD00-0AB0 6ES7322-8BF00-0AB0 6ES7331-7KF01-0AB0 6ES7331-7RD00-0AB0 6ES7331-7SF00-0AB0 6ES7331-7TB00-0AB0 6ES7332-5HD01-0AB0 6ES7332-5RD00-0AB0 6ES7332-5TB00-0AB0 6ES7421-1BL00-0AA0 6ES7421-5EH00-0AA0 6ES7421-7BH00-0AB0 6ES7421-7DH00-0AB0 6ES7422-1BL00-0AA0 6ES7422-1HH00-0AA0 6ES7422-5EH00-0AA0 6ES7422-7BL00-0AA0 6ES7431-7KF00-0AB0 6ES7431-7KF10-0AB0 6ES7431-7QH00-0AB0 6ES7432-1HF00-0AB0 HART: Refer to MOD_D1 HART: Refer to MOD_D1

Other SM modules can possibly be operated with the MOD_x blocks. However, they must be tested by the user. Their use lies within your own risk.

PCS 7 Driver Blocks C79000-G7076-C752-01

A-3

27.01.00 16.11.99

27.01.00 16.11.99

Index
Addressing................................ ................1-39 . CH_AI................................ ..................1-2, 1-4 . CH_AO ................................ .......................1-7 . CH_DI................................ ................1-9, 1-11 . CH_DO................................ ............1-13, 1-14 . I/O bar of CH_AI................................ ..........1-4 . I/O bar of CH_AO................................ ........1-7 . I/O bar of CH_DI ................................ .......1-11 . I/O bar of CH_DO................................ ......1-14 . I/O bar of IM_DRV................................ .....1-55 . I/O bar of MOD_1................................ ......1-17 . I/O bar of MOD_2................................ ......1-22 . I/O bar of MOD_D1 ................................ ...1-28 . I/O bar of MOD_D2 ................................ ...1-35 . I/O bar of PA_AI:................................ .........2-2 . I/O bar of PA_AO................................ ........2-6 . I/O bar of PA_DI................................ ........2-11 . I/O bar of PA_DO................................ ......2-14 . I/O bar of PA_TOT ................................ ....2-18 . I/O bar of RACK................................ ........1-45 . I/O bar of SUBNET ................................ ... 1-49 . IM_DRV................................ ...1-50, 1-52, 1-55 . Message texts of MOD_1...........................1-19 Message texts of MOD_2...........................1-24 Message texts of MOD_D1........................1-31 Message texts of MOD_D2........................1-37 MOD_1................................ ....1-16, 1-17, 1-19 . MOD_2................................ .............1-22, 1-24 . MOD_D1 ................................ ..........1-26, 1-28 . MOD_D2 ................................ .1-32, 1-35, 1-37 . MODE .............................1-39, 1-40, 1-41, 1-42 MSG_STAT ................................ .............. 1-59 . PA_AI................................ .................. 2-1, 2-2 . PA_AO ................................ .......................2-4 . PA_DI................................ ................ 2-9, 2-11 . PA_DO................................ .............2-12, 2-14 . PA_TOT ................................ ...........2-17, 2-18 . PO_UPDAT Output process image............. 1-50 RACK ................................ ...............1-42, 1-45 . SUBNET..........................1-46, 1-47, 1-48, 1-49

PCS 7 Driver Blocks C79000-G7076-C752-01

Index - 1

27.01.00 16.11.99

Index

2 - Index

PCS 7 Driver Blocks C79000-G7076-C752-01


赞助商链接
相关文章:
pcs7 engineer manual 01 ...
Engineer Manual 170页 免费 Engineer Manual 92页 免费 PCS7 LIB Driver Blocks... 90页 免费 Engineer Manual 69页 免费 Timken-Engineering-Man... 暂无评价 ...
PCS7 V7.0过程对象视图使用入门
Blocks Parameters Signals Messages Picture objects ...图 11Picture objects 标签页 2.6 Archive Tags ...功能只对 PCS7 标准库中的 驱动块(CH_xxx)起作用...
PCS7综合实验演练第三部分
PCS7 实验(3)实验 11 图中图 1.在多项目中建立主库 在 Component View 中...v 6.回到 TEST1.CFC,在 lib0113 主库中 blocks—training 下将 V_SIM_FB...
更多相关标签: