04 Intelligent Slaves

  • Uploaded by: Isai Anguiano
  • 0
  • 0
  • January 2021
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View 04 Intelligent Slaves as PDF for free.

More details

  • Words: 5,701
  • Pages: 25
Loading documents preview...
Automation and Drives

Intelligent slaves (I slaves)

SITRAIN IK-PBSYS / Intelligent Slaves

Page 1

Contents

03/2007 © Siemens AG 2007 - Subject to change without prior notice

Page

Example of application for intelligent slaves (I slave) ......................................................................... Transfer memory in the CPU of the I slave ....................................................................................... Transfer area configuration (example) .............................................................................................. Configuring a bus connection for an I slave ...................................................................................... Setting the "DP slave" operating mode ............................................................................................. Configuring I/O data areas of the slave ............................................................................................. Example of an output area ................................................................................................................ Example of an input area .................................................................................................................. Coupling an I slave to the DP master system .................................................................................... Configuring I/O data areas of the master .......................................................................................... Result of coupling the I slave ............................................................................................................ S7 program (DP master and I slave) ................................................................................................. Consistent data exchange (> 4 bytes) .............................................................................................. Application of system function SFC 15 ............................................................................................. Application of system function SFC 14 ............................................................................................. Task description for exercises with I slave ....................................................................................... Exercise 1 : Configure the I slave .................................................................................................... Exercise 2 : Connect the I slave ....................................................................................................... Exercise 3 : Download S7 programs ................................................................................................. If you want to know more .................................................................................................................. Direct data exchange (slave-to-slave communication) ..................................................................... Address assignments ....................................................................................................................... Exercise 4 : Configure a direct data exchange .................................................................................. Exercise 5 : S7 program in the I-slave ..............................................................................................

SITRAIN training for Automation and Industrial Solutions

Page 1

2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25

IK-PBSYS Intelligent Slaves

Automation and Drives

Example of application for intelligent slaves (I slave)

Autonomous PLC with DP interface

SITRAIN IK-PBSYS / Intelligent Slaves

Page 2

03/2007 © Siemens AG 2007 - Subject to change without prior notice

Area of application Automation tasks can be broken down into subtasks which are controlled by a higher-level automation system. These control jobs, which can be executed independently and efficiently, are preprocessed by an independent CPU. Since the entire control program is broken down into smaller units, this task can generally be handled by a smaller PLC. The concept of "local logic" is therefore an core principle of systems with "intelligent slaves" (I slaves). Preconditions

The only requirement is that the PLC designated as the DP slave must have a PROFIBUS connection which can function as the DP slave. With the current product versions, this means all internal DP interfaces on the 300 and 400 CPU models, plus the communications processors for PROFIBUS DP in the S7-300 and S7-400 ranges, i.e. the same interfaces which are used as DP masters. Whether any of the specified modules can function as a DP master or a DP slave is determined solely by how it is configured. Please note, however, that a module can only ever work as either a master or a slave.

IO data areas

The I slave uses its IO area to exchange data with the DP master. The only important point to note when configuring these areas is that you must not use any addresses that have already been assigned for use by the central IOs. As these areas can be very large for I slaves (as compared to compact slaves), it is also important to observe the specified limit of 244 bytes. This is the maximum possible quantity of data which can be transferred in a PROFIBUS message frame. Whether the addresses are inside or outside the process images is subject to the same rules/principles which apply to the central IOs.

SITRAIN training for Automation and Industrial Solutions

Page 2

IK-PBSYS Intelligent Slaves

Automation and Drives

Transfer memory in the CPU of the I slave

Transfer memory in IO address space of the I slave

SITRAIN IK-PBSYS / Intelligent Slaves

Master view

Page 3

03/2007 © Siemens AG 2007 - Subject to change without prior notice

A key feature of an intelligent DP slave is that its input/output data are not supplied directly via a real input/output to the DP master, but that the master accesses them on a preprocessing CPU. From the viewpoint of the DP master, an I slave behaves in exactly the same way as a simple slave, i.e. as a "terminal" with a prespecified number of IOs. In contrast to the simple slave this number does not however depend on the hardware of the slave but on the configuration (restrictions due to the message frame structure (244 bytes)).

Standard slave

With a "normal" DP slave such as a compact (ET 200B) or modular (ET 200M) DP slave, the DP master accesses the distributed inputs/outputs directly.

I slave

With an intelligent DP slave, the DP master does not access the connected inputs/outputs of the intelligent DP slave, but it accesses instead a transfer area in the input/output address area of the "preprocessing“ CPU. The user program of the preprocessing CPU must handle the data exchange between the operand area and the inputs/outputs.

SITRAIN training for Automation and Industrial Solutions

Page 3

IK-PBSYS Intelligent Slaves

Automation and Drives

Transfer area configuration (example) Addresses in the master program

Addresses in the program of the I slave

SITRAIN IK-PBSYS / Intelligent Slaves

Address areas

Page 4

03/2007 © Siemens AG 2007 - Subject to change without prior notice

You configure the I/O address areas in STEP 7: • You can configure up to 32 input or output address areas • Each of these address areas can be up to 32 bytes long • You can configure up to 244 bytes for inputs and 244 bytes for outputs in total The table in the figure above shows the basic structure of address areas. You can also find this figure in the STEP 7 configuring instructions.

Rules

Please note the following rules when configuring the transfer memory: • Assignment of address areas: Input data of the DP slave are always output data of the DP master. Output data of the DP slave are always input data of the DP master. • You can freely assign addresses. You use load/transfer commands or SFCs 14 and 15 to access the data in the user program. As regards data consistency, the same rules apply as to the DP master interface.

SITRAIN training for Automation and Industrial Solutions

Page 4

IK-PBSYS Intelligent Slaves

Automation and Drives

Configuring a bus connection for an I slave

Assign address for PB connection

Assign name for I slave Diagnostic address applies only to DP master SITRAIN IK-PBSYS / Intelligent Slaves

Page 5

03/2007 © Siemens AG 2007 - Subject to change without prior notice

Configuring sequence An I slave is always configured on a DP master system in two predefined steps which must be performed in a specific order. Step 1

As an I slave is essentially a complete PLC, it is not available for selection like other slaves in the module catalog of HW Config. It would be impossible to create a GSD file that would fully describe this slave. Instead, this S7 station must be configured first in step 1. It is then "attached" to the master system in step 2. The most important DP slave configuring settings are listed below: 1. Assignment to the same subnet on which the DP master is also configured. 2. Input of slave bus address (no address switch is provided) 3. Input of IO areas which the slave CPU must use to exchange data with the master.

Note

Even though you can still alter these areas in configuring step 2, you must specify at least one area (I or O) in step 1.

Step 2

The station configured in step 1 is configured as an additional DP slave on the master system. This step also includes specification of the IO addresses to be used by the master CPU to exchange data with this particular I slave. The I slave is displayed in the hardware catalog in group "Configured stations".

SITRAIN training for Automation and Industrial Solutions

Page 5

IK-PBSYS Intelligent Slaves

Automation and Drives

Setting the "DP slave" operating mode

DP slave mode with test functions, etc.

Diagnostic address for DP slave

SITRAIN IK-PBSYS / Intelligent Slaves

Operating mode

Page 6

03/2007 © Siemens AG 2007 - Subject to change without prior notice

The operating mode of the DP slave is activated on this tab, i.e. this module is no longer a DP master (default), but a DP slave. The "Test, Commissioning, Routing" box must be checked whenever this DP interface is used to handle S7 online functions to the CPU, i.e. the CPU of this station is not accessed online via the MPI, but via PROFIBUS instead. The same applies if this station is to function as a router to another subnet. If the box is not checked, the interface remains passive on the PROFIBUS which means that data are exchanged only with the configured DP master. The interface cannot then handle online functions or act as a router.

Diagnostic address The diagnostic address must be outside the space designated for IO addresses. The diagnostic address is used internally to transfer diagnostic information from the DP master to the DP slave. Additional information (e.g. operating state transitions by the master or process alarms from the master) is passed from the master to the slave in DPV1 mode via the address set in "Address for slot 2". The default settings can be accepted in most cases. .

SITRAIN training for Automation and Industrial Solutions

Page 6

IK-PBSYS Intelligent Slaves

Automation and Drives

Configuring I/O data areas of the slave

Configuring IO areas

SITRAIN IK-PBSYS / Intelligent Slaves

Page 7

03/2007 © Siemens AG 2007 - Subject to change without prior notice

Configuration

The address areas for the data exchange with the DP master are configured on this tab. Up to 32 so-called areas can be defined. These are input and output areas and each can have a maximum length of 32 bytes. Click on the New ... button to create a new area or on the Edit button to modify an existing area.

Mode

This value cannot be changed on this tab. The default setting MS stands for master/slave data exchange. DX is an alternative setting for direct data exchange between two slaves. This setting can be selected on the master system.

DP partner: Master If the I slave has not yet been connected to a master system (step 2 has still not been completed), the fields on the left-hand side of the window are not accessible. These are entered directly in step 2. Local: Slave

The IO areas from the viewpoint of the slave CPU are configured here.

Address type

Input: Data are transferred by the master Output: Data are transferred to the master

Address

Start address of the I or O area. You cannot enter address which have already been assigned for use by the central IOs.

Length/unit

These two fields combine to determine the length of the data block. A maximum length of 32 bytes can be specified for each data block. Since the permissible length for several data blocks is 244 bytes in total, the maximum length of the last block can be less than 32 bytes.

Consistency

Possible settings are Unit or Total.

SITRAIN training for Automation and Industrial Solutions

Page 7

IK-PBSYS Intelligent Slaves

Automation and Drives

Example of an output area

Configuring IO areas

Configuration result

SITRAIN IK-PBSYS / Intelligent Slaves

Configuring

Page 8

03/2007 © Siemens AG 2007 - Subject to change without prior notice

The figure above shows an example of how to configure an output area. 1.A new area is opened with a click on the "New" button. 2.In the Properties screen, "output" is entered as the address type and byte 20 set as the start address. 3.The total length of this area must be 8 bytes, the data need only be consistent byte by byte. The input is finished with a click on OK. With line 1 in the properties window configured in this way, this particular DP slave will transfer the data area from OB20 to OB27 to the DP master.

S7 program

It is now possible to access this address area quite "normally" in the user program of the slave CPU, e.g. with L MB10 T QB 20 The content of MB10 is copied into the first byte (QB20) of the output area. The DP master accesses this information by reading the first byte of the input area assigned to this particular DP slave. This assignment is programmed in step 2 when the I slave is "attached" to the DP master.

SITRAIN training for Automation and Industrial Solutions

Page 8

IK-PBSYS Intelligent Slaves

Automation and Drives

Example of an input area

Configuring IO areas

Configuration result (complete)

SITRAIN IK-PBSYS / Intelligent Slaves

Configuring

Page 9

03/2007 © Siemens AG 2007 - Subject to change without prior notice

The figure above shows an example of how to configure an input area. 1.A new area is opened with a click on the "New" button. 2.In the Properties screen, "input" is entered as the address type and byte 20 set as the start address. 3.8 bytes is specified as the total permissible length of this area, the data needonly be consistent byte by byte. The input is finished with a click on OK. With line 2 in the properties window configured in this way, the data received by this slave from its master are stored in the area from IB20 to IB27. This configuration must be compiled again (Save and compile) and can then be downloaded to the target system, i.e. the CPU of the DP slave.

S7 program

It is now possible to access this address area quite "normally" in the user program of the slave CPU. L IB23 T MB 200 The content of the fourth byte sent by the DP master (IB23) is copied into MB200. In its S7 program, the DP master has copied this value into the fourth byte of the output area assigned to this particular slave. This assignment is programmed in step 2 when the I slave is "attached" to the DP master.

SITRAIN training for Automation and Industrial Solutions

Page 9

IK-PBSYS Intelligent Slaves

Automation and Drives

Coupling an I slave to the DP master system Configured stations

Couple configured stations to the bus system SITRAIN IK-PBSYS / Intelligent Slaves

Note

Page 10

03/2007 © Siemens AG 2007 - Subject to change without prior notice

The process now continues with the configuration of the master.

"Attach" the I slave You will find the I slave you have configured in folder Configured stations. Object CPU31x is merely a dummy which can be dragged and dropped onto the bus cable. The DP slave properties window is displayed. If the I slave has been configured in step 1 on the same subnet on which it will now be "attached" to the master, the appropriate information will be displayed on a line in the properties window. Select this line and click on the Couple button to assign the slave to the subnet.

SITRAIN training for Automation and Industrial Solutions

Page 10

IK-PBSYS Intelligent Slaves

Automation and Drives

Configuring I/O data areas of the master

Mode: Master/slave

Input areas of DP master

SITRAIN IK-PBSYS / Intelligent Slaves

Configuration

Page 11

03/2007 © Siemens AG 2007 - Subject to change without prior notice

By clicking on the "Configuration" tab, you will open the screen for entering the areas viewed as address areas by the DP master. The areas configured in step 1 as address areas from the viewpoint of this DP slave are already displayed. Select the line with the area to be configured and click on Edit ...

Properties

In this screen, assign the data area which must be assigned to the previously configured area (as viewed by slave) from the viewpoint of the master. You need only configure the start address as the length is already defined by the area on the slave. A new setting in this field would automatically alter the value for the slave. The same also applies to the fields for unit and consistency. It is of course possible to change the previously configured area for the DP slave again at this point, but if any of the DP slave settings are changed, the altered configuration will need to be downloaded to the DP slave again.

Data exchange

Assignment of these data areas is subject to the following rules: The definition "input / output" always refers to the local view, i.e. the input area configured for the slave must be declared as the output area for the master and vice versa. If the master wants to send data to the slave, it uses the S7 program to write them to the output area defined here. The slave receives these data within its S7 program in the input area configured here. If the slave wishes to transfer data to the master, the slave CPU writes them to the output area of the slave and the S7 program of the master reads them out of the master input area again. The address values of an area are not connected in terms of master and slave, i.e. it is only important to ensure that none of the address used is yet assigned from the local viewpoint.

SITRAIN training for Automation and Industrial Solutions

Page 11

IK-PBSYS Intelligent Slaves

Automation and Drives

Result of coupling the I slave

SITRAIN IK-PBSYS / Intelligent Slaves

Page 12

03/2007 © Siemens AG 2007 - Subject to change without prior notice

Notes

SITRAIN training for Automation and Industrial Solutions

Page 12

IK-PBSYS Intelligent Slaves

Automation and Drives

S7 program (DP master and I slave)

Communications area in the DP master

Communications area in the I slave S7 program in the slave

S7 program in the master

Error OBs for commissioning

L MB 120 T QB 40

L IB 20 T QB 5

L IW 42 T MW 50

L MW 30 T QW 22

SITRAIN IK-PBSYS / Intelligent Slaves

Page 13

Error OBs for commissioning

03/2007 © Siemens AG 2007 - Subject to change without prior notice

Assignments

As regards the assignments of area addresses, it now only remains to assign them in the correct sequence. The example above is designed to illustrate this:

Master Æ slave

The content of MB120 is copied to QB40 in the DP master program. QB40 is the 1st byte in the output area which is transferred to this I slave. In consequence, this value also appears in the first byte on the slave, but in the input area, or to be specific, in IB20. The content of this IB20 is copied to QB5 in the S7 program of the slave. In fact, the outputs QB5 on the slave are switched by the master's program (QB40). However, this type of direct switching does not actually require an I slave.

Slave Æ master

In the slave's S7 program, MW30 is written to QW22, i.e. to the second word of the configured output area. Accordingly, the master's S7 program accesses these data by reading the second word of input area IW42. Copying this value into MW50 stores it for further processing at another point in the program.

Data consistency

Since the data areas in this example have only been configured for "byte" consistency, they can be accessed simply with the load or transfer command.

Note

As the "other" station is always "missing" when the master system initially boots, the following problem is encountered when I slaves are used: The absence of a station is handled internally in the CPU like a subrack failure (OB82) or station failure (OB86), i.e. if the relevant OB is missing in each case, the CPU switches to STOP on errors which causes the other station to react with the same error. Since an S7 CPU can be prevented from stopping on errors merely by the presence of the assigned error OB, the simplest solution is to download the "empty" error OBs.

SITRAIN training for Automation and Industrial Solutions

Page 13

IK-PBSYS Intelligent Slaves

Automation and Drives

Consistent data exchange (> 4 bytes)

Net data exchange > 32 bytes

SITRAIN IK-PBSYS / Intelligent Slaves

Page 14

03/2007 © Siemens AG 2007 - Subject to change without prior notice

Task description

A data block with a total length of 32 bytes must be transferred consistently from the I slave to the master.

Configuring

Configure this block in exactly the same way as before, i.e. specify the send and receive areas from the view of the relevant station in each case. In the example shown above, the send mailbox on the I slave starts at QB 200. The receive area for the data block on the master starts at IB 200. The 32 byte block length is configured for both stations together in the field at the bottom. The Total setting in the Consistency field specifies that this data block must be transferred consistently and applies equally to the master and slave.

Programming

The two system functions -

SFC 14 "DPRD_DAT" on the master and SFC 15 "DPWR_DAT" on the slave

must now be programmed so that the data are transferred consistently.

SITRAIN training for Automation and Industrial Solutions

Page 14

IK-PBSYS Intelligent Slaves

Automation and Drives

Application of system function SFC 15

Addressed memory area 200(dec) = C8(hex)

Data source

Addressed memory area 200(dec) = C8(hex)

SITRAIN IK-PBSYS / Intelligent Slaves

SFC15

Page 15

03/2007 © Siemens AG 2007 - Subject to change without prior notice

The system function SFC15 "DPWR_DAT" writes the data block specified by parameter RECORD consistently to the destination area with a start address defined by parameter LADDR. The destination area is thus the I/O address area provided by the DP interface. (The PROFIBUS itself always transfers data consistently between the master and slave).

SITRAIN training for Automation and Industrial Solutions

Page 15

IK-PBSYS Intelligent Slaves

Automation and Drives

Application of system function SFC 14

Addressed memory area 200(dec) = C8(hex) Received data

Addressed memory area 200(dec) = C8(hex)

SITRAIN IK-PBSYS / Intelligent Slaves

SFC14

Page 16

03/2007 © Siemens AG 2007 - Subject to change without prior notice

The system function SFC14 "DPWR_DAT" reads the data block with a start address specified in parameter LADDR consistently to the destination area specified by parameter RECORD. The source area is thus the I/O address area provided by the DP interface. (The PROFIBUS itself always transfers data consistently between the master and slave).

SITRAIN training for Automation and Industrial Solutions

Page 16

IK-PBSYS Intelligent Slaves

Automation and Drives

Task description for exercises with I slave

6

2

8

4

SITRAIN IK-PBSYS / Intelligent Slaves

Hardware

Page 17

03/2007 © Siemens AG 2007 - Subject to change without prior notice

To carry out the exercises described in this section, you will need a second S7300 trainer PLC which can function as the DP slave (I slave). If no separate PLC is available for this purpose, you can use the PLC of a neighboring group instead.

Functions

In the following exercises, you will configure the I slave and connect it to the master system. The following areas must be used for exchanging data: 1.Master-slave data exchange (MS) -

8 bytes of inputs to the DP master 8 bytes of outputs from the DP master

2. Direct data exchange (DX) -

SITRAIN training for Automation and Industrial Solutions

1 word of inputs from the ET200M (analog value)

Page 17

IK-PBSYS Intelligent Slaves

Automation and Drives

Exercise 1 : Configure the I slave

DP slave mode with test functions, etc.

Diagnostic address for DP slave

Assign address for PB connection

8 bytes for send and receive data (consistent) SITRAIN IK-PBSYS / Intelligent Slaves

Page 18

03/2007 © Siemens AG 2007 - Subject to change without prior notice

Task description

In the following exercises, you will configure the I slave and connect it to the master system.

Procedure

1.Create a complete hardware configuration for your "I slave" station. 2.Double click on the DP interface of the CPU to open it, click on Properties in the General tab, set address 6 and select the PROFIBUS network in your project as the subnet. Confirm the settings with OK. 3.Select DP slave on the Operating mode tab and check the box for Test, Commissioning, Routing . 4.Finally, select the Configuration tab and enter two areas for data transmission with the DP master. To do this, click on the New button for each area and fill in the fields for the local station in the next screen (8 bytes of send and receive data (consistent)). 5.Generate the new system data blocks by clicking on button Save and compile. 6.Download the entire configuration to the CPU of the I slave.

Note

Even though the IO areas are not yet fully configured, the configuration can still be downloaded to the CPU of the I slave. This is because the missing configuration data only include information for the DP master.

SITRAIN training for Automation and Industrial Solutions

Page 18

IK-PBSYS Intelligent Slaves

Automation and Drives

Exercise 2 : Connect the I slave Configured stations

Couple configured stations to the bus system SITRAIN IK-PBSYS / Intelligent Slaves

Procedure

Page 19

03/2007 © Siemens AG 2007 - Subject to change without prior notice

1.Connect up the station of the I slave using the PROFIBUS cable of the existing master system (change the terminating resistors!). 2.From the hardware catalog under PROFIBUS DP Æ Configured stations, drag the object CPU 31x to the bus cable of the master system. You will see the I slave configured in the previous exercise. 3. Select this and click on the Couple button. 4.Open tab Configuration. You will see the two data areas configured in the previous exercise. Select one of these at a time, click on button Edit and complete the data area configuration by adding the values for the master (see figure above). 5.Generate the new system data blocks by clicking on button Save and compile. 6. Download the entire configuration to the CPU of the DP master.

Result

The DP master synchronizes all slaves which are configured and connected to the bus. The CPUs of the master and slave have stopped on errors because the error OBs still need to be downloaded to both stations. This download operation will be practiced in the next exercise.

SITRAIN training for Automation and Industrial Solutions

Page 19

IK-PBSYS Intelligent Slaves

Automation and Drives

Exercise 3 : Download S7 programs

DP master program

SITRAIN IK-PBSYS / Intelligent Slaves

Task description

I slave program

Page 20

03/2007 © Siemens AG 2007 - Subject to change without prior notice

IB1 is copied to QB40 in FC7 of the master. QB40 is transferred to the I slave and copied there into IB20. The FC7 in the I slave copies IB20 to the local QB8 and QB20. QB20 is transferred from the I slave to the master where it is copied into IB40. The FC7 in the master copies QB40 into the local QB88.

Procedure

1.Write an FC7 function using the program shown in the diagram for both the DP master and the I slave. 2.Also call block FC7 in OB1 (DP master and I slave) and download the blocks and the modified OB1 to the relevant CPUs. 3. Switch the inputs of IB1 on the master simulator. Monitor the following outputs: -

SITRAIN training for Automation and Industrial Solutions

On the I slave: On the master:

QB8 QB88

Page 20

IK-PBSYS Intelligent Slaves

Automation and Drives

If you want to know more

SITRAIN IK-PBSYS / Intelligent Slaves

Note

Page 21

03/2007 © Siemens AG 2007 - Subject to change without prior notice

The following pages provide additional information for reference.

SITRAIN training for Automation and Industrial Solutions

Page 21

IK-PBSYS Intelligent Slaves

Automation and Drives

Direct data exchange (slave-to-slave communication)

SITRAIN IK-PBSYS / Intelligent Slaves

Page 22

03/2007 © Siemens AG 2007 - Subject to change without prior notice

Direct data exchange (slave-to-slave communication) "Direct data exchange” is a special communication relationship between PROFIBUS DP nodes. Principle

You can configure a direct data exchange (slave-to-slave communication) when data which are transferred from one DP slave to the master also need to be read simultaneously by another slave, but without being transferred again from the master to the second slave. This principle is based on the fact that every bus node can always "hear" any data exchange on the bus, but only reads those data which are directly addressed to itself (bus address). However, PROFIBUS also uses the BROADCAST message, i.e. a message with address 127. This is addressed to all nodes, i.e. it can basically be read by any station. Slave-to-slave communication is based on the principle that the slave-to-slave receiver only reads the content of a broadcast message if it originates from a particular sender. From the configuring aspect, this is the slave-to-slave sender. When the message is configured, it is also possible to specify whether the entire data block or simply a connected area must be read by the receiver, as the read data in this case are also input data.

Sender

Any simple and any I slave which can identify this extended function can be designated as a sender.

Receiver

I slaves or DP masters which can "identify" this function (product version) can be designated as slave-to-slave communication receivers. If a DP master is configured as a slave-to-slave communication receiver, then it is the master of another DP master system.

Example

The figure shows which relationships you can configure. All the DP masters and DP slaves above are of the type CPU 31x-2. Please note that other DP slaves (ET 200M, ET 200X, ET 200S) can only be senders.

SITRAIN training for Automation and Industrial Solutions

Page 22

IK-PBSYS Intelligent Slaves

Automation and Drives

Address assignments Mode: Direct data exchange (slave-to-slave communication) I slave as a data receiver

ET 200M

Analog value (PEW 304)

SITRAIN IK-PBSYS / Intelligent Slaves

Page 23

03/2007 © Siemens AG 2007 - Subject to change without prior notice

Mode DP address

The mode of transmission Slave-to-slave DX is specified in this box. PROFIBUS address of the slave-to-slave sender. The field displays only the bus address of slaves configured on the same subnet which are capable of slave-toslave communication. Name Name of interface module on the relevant slave (entered automatically). Address type The data area which is transferred to the DP master by the slave-to-slave sender according to the configured settings (always the input area). Address of DP partner Start address from this data area. The (existing) input area configured for the slave-to-slave sender is displayed in this field. Local address Destination address on the slave-to-slave receiver, i.e. the S7 program accesses the message data through this area. Slot Number of the virtual slot. This number is assigned automatically by STEP 7. For DX, a slot number is only displayed for the local station .Process image With DX, a process image can only be set for the local station. Diagnostic address Can only be set for DX. For DX, each DP partner is referenced via a separate diagnostic address. This diagnostic address can be used, for example, to diagnose failure of the DP partner. Length Exact setting indicating which bytes transferred by the slave-to-slave sender to the master must be read. Consistency As the data are read directly from the bus, the data are automatically consistent from the viewpoint of the sender. It may be necessary to program SFC14 "DPRD_DAT" on the slave-to-slave receiver to ensure data are read in consistently to the CPU. The same criteria apply in this case as to normal data exchanges (3 bytes, > 4bytes).

SITRAIN training for Automation and Industrial Solutions

Page 23

IK-PBSYS Intelligent Slaves

Automation and Drives

Exercise 4 : Configure a direct data exchange

The analog value (the I slave must be capable of reading ET 200M directly)

Analog value (PEW 304) Configure a "direct data exchange"

SITRAIN IK-PBSYS / Intelligent Slaves

Page 24

03/2007 © Siemens AG 2007 - Subject to change without prior notice

Task description

The measured value (e.g. temperature) sent to the analog module of the ET200M (PB=4) must also be read by the I slave (PB=6) using the direct data exchange functionality and made available for processing in the I slave's S7 program.

Configuring

The data block for the direct data exchange is configured on the slave-to-slave receiver (I slave with PB=6). The screen for configuring the data block is opened with the New button.

Procedure

1.Open the configuration of the DP master. 2. Open the properties screen of the I slave and select the tab Configuration. Create the data area for slave-to-slave communication by clicking on button New. Enter the values (as illustrated on the previous page) -

Mode: DX DP address: 4 Address of DP partner: 304 Address of local receiver: 60 Length : 1 Unit : Word

and confirm the settings with OK. 3.Generate the new system data blocks by clicking on button Save and compile. New system data blocks are set up for the master and the I slave! 4.Download the entire configuration to the CPU of the master. 5.Open the configuration of the I slave and download it to the CPU of the I slave.

SITRAIN training for Automation and Industrial Solutions

Page 24

IK-PBSYS Intelligent Slaves

Automation and Drives

Exercise 5 : S7 program in the I-slave

QW 6 IW 60

Contains analog value

SITRAIN IK-PBSYS / Intelligent Slaves

S7 program

Page 25

03/2007 © Siemens AG 2007 - Subject to change without prior notice

The program of the slave-to-slave receiver now has "quite normal" access to the data read from the ET200M by direct data exchange. In this instance as well, the DP interface simulates the receive area to the CPU configured as a local address as an I/O area so that this address area can be used for accessing from the viewpoint of the S7 program.

Procedure

The use of slave-to-slave communication data should be added in the FC7 block which has already been downloaded to the CPU as part of previous exercises described above. Monitor the value on the digital display of the simulator in the training case of the I slave by varying the potentiometer for the analog value on the simulator in the master's training case.

SITRAIN training for Automation and Industrial Solutions

Page 25

IK-PBSYS Intelligent Slaves

Related Documents


More Documents from ""

04 Intelligent Slaves
January 2021 0
01 Profibus Technology
January 2021 0
0_ik-pbsys_cover15_v201
January 2021 2
05 Dp Dp Coupler
January 2021 3
Lake Shore Drive Forma
February 2021 0