Sei sulla pagina 1di 40

6,0$7,& 1(7 4XLFN 6WDUW

$ERXW WKLV 'RFXPHQW

This document contains information on the samples for Profibus communication between an S7 station and a SIMATIC S5 station using the FDL (Fieldbus Data Link) service.

)RU D EULHI RYHUYLHZ RI WKLV VDPSOH UHIHU WR &KDSWHU  )RU GHWDLOHG LQIRUPDWLRQ UHIHU WR &KDSWHU  DQG WKH FKDSWHUV IROORZLQJ
The document covers the following topics: System structure Introduction to the required blocks and their communication structure Program structures and extracts of code Operator control and monitoring Troubleshooting

Profibus Communication: S7-CP 443-5 Basic/Ext. S5-CP 5431

6,0$7,& 1(7 4XLFN 6WDUW

2YHUYLHZ RI WKH 6DPSOH

6FKHPDWLF RI WKH 6\VWHP


6 6WDWLRQ S7 135 Station

HQD

Local Profibus network

QBvrshpr 8QVhq8Q

as

PG/PC with STEP 7/STEP 5/NCM

&KHFNLQJ WKH )XQFWLRQDOLW\ RI WKH 6DPSOH


The variable table of the active S7 station allows you to determine if the sample is functioning correctly. The variable table is contained in the Blocks folder of the STEP 7 project. Data being sent and received has continuously changing values (see also "Operator Control and Monitoring").

Profibus Communication: S7-CP 443-5 Basic/Ext. S5-CP 5431

6,0$7,& 1(7 4XLFN 6WDUW

)XQFWLRQ 'LDJUDP
The following diagram illustrates how the sample works:

SIMATIC S7-400 Station

SIMATIC S5 Station

3UHSDUH GDWD IRU VHQGLQJ Send data (2 bytes) Receive data and copy it to the send buffer

Send data (2 bytes)

6DYH UHFHLYHG GDWD

'DWD ([FKDQJH
2 bytes of data are exchanged cyclically by the stations involved in communication.

66 3DUWQHU
The S7 partner initiates connection establishment and the sending of new data. The S5 partner returns the received data to the S7 end. Return means that received data is sent back to the S7 end after it has been completely received.

Profibus Communication: S7-CP 443-5 Basic/Ext. S5-CP 5431

6,0$7,& 1(7 4XLFN 6WDUW

3URJUDP

S7 End OB1
MY_SEND_CALL FC-AG_SEND FB RECEIVE

S5 End

REC-T2

FC5 FC40 OB1


FC-AG_RECV MY_RECEIVE_CALL

FB121 FB41 OB1


FB SEND SEND-T2

FC6 FC41

FB120 CALL

'HVFULSWLRQ RI WKH 6 HQG An "AG_SEND" FC is called every cycle to


send 2 bytes of data.

'HVFULSWLRQ RI WKH 6 HQG


An FB RECEIVE is triggered in every cycle.

Parallel to the send job, an "AG_RECV" FC is called to fetch received data from the CP. The data is saved once it has been completely received.

If the "FB RECEIVE" signals newly received data, an FB SEND" is triggered with the newly received data to send the received data back.

Once the RECEIVE job has been processed without error, the data to send is incremented by 1 and the send/receive cycle begins again.

Profibus Communication: S7-CP 443-5 Basic/Ext. S5-CP 5431

6,0$7,& 1(7 4XLFN 6WDUW

2SHUDWRU &RQWURO DQG 0RQLWRULQJ


An operator control and monitoring function is available using the supplied variable table. The following conditions must be met to allow you to use the "Monitoring and Modifying Variables" program: There must be an online connection to the CPU. "Monitor variables" must be activated. The values to be modified must be marked as valid. If the conditions listed above are met, you can determine whether the VDPSOH LV IXQFWLRQLQJ FRUUHFWO\ by observing that the data sent and received from the active station is FKDQJLQJ FRQWLQXRXVO\.

Profibus Communication: S7-CP 443-5 Basic/Ext. S5-CP 5431

6,0$7,& 1(7 4XLFN 6WDUW

6\VWHP 6WUXFWXUH
This chapter lists the hardware and software required to run the sample.

Profibus Communication: S7-CP 443-5 Basic/Ext. S5-CP 5431

6,0$7,& 1(7 4XLFN 6WDUW

1RWH 6FRSH RI $SSOLFDWLRQ RI WKLV 'RFXPHQW The content of this document assumes a specific configuration. This documentation can, however, be used for all FDL samples of communication between a SIMATIC S7 and a SIMATIC S5 station.

&DXWLRQ The samples relate to specific hardware configurations. These must exist to ensure problem-free operation. If you want to use a different configuration, you must make modifications (refer to the notes below).

*HQHUDO 6WUXFWXUH
Bus system Communications protocol Active End Passive End Communications processors Services PROFIBUS SDA (Send Data with Acknowledge) SIMATIC S7 SIMATIC S5 CP 443-5,CP 5431 FDL

The sample uses the FDL protocol. Using this protocol and the SDA services, there is a data exchange between a SIMATIC S7 station and a a SIMATIC S5 station. A CP 443-5 Basic is used as the communication processor in the active SIMATIC S7-400 . A CP 5431 is used at the passive SIMATIC S5 end.

Profibus Communication: S7-CP 443-5 Basic/Ext. S5-CP 5431

6,0$7,& 1(7 4XLFN 6WDUW

+DUGZDUH 5HTXLUHG IRU WKH $FWLYH (QG

ORFDWLRQ
1 2 3 PS407 10A

0RGXOH

CPU 414-1
CP 443-5

1RWH 8VLQJ D GLIIHUHQW &38 If you want to use a different CPU for the sample, please read the document "Change_CPU".

1RWH 8VLQJ D GLIIHUHQW &3 If you want to use a different CP for the sample, please read the document "Change_CP".

+DUGZDUH 5HTXLUHG IRU WKH 3DVVLYH 6 (QG

6ORW
1 2 3 4 CPU

0RGXOH

CP 5431
Power supply Rack

Profibus Communication: S7-CP 443-5 Basic/Ext. S5-CP 5431

6,0$7,& 1(7 4XLFN 6WDUW

&DEOHV DQG 2WKHU +DUGZDUH 5HTXLUHG

MPI cable
PROFIBUS Cable 2 Profibus connectors PG or PC with MPI port

5HTXLUHG 6RIWZDUH
You require the following software to run the sample: Microsoft Windows 95 or Windows NT 4.0 as the operating system STEP 7 V4.02 (See also "1RWH") NCM S7 PROFIBUS V4.02 + Service Pack 1 STEP 5 V6.65 NCM 5431

Profibus Communication: S7-CP 443-5 Basic/Ext. S5-CP 5431

6,0$7,& 1(7 4XLFN 6WDUW

,QWURGXFWLRQ WR WKH 5HTXLUHG %ORFNV DQG WKHLU &RPPXQLFDWLRQ 6WUXFWXUH


This chapter covers the following topics: How the sample works Blocks required for communication and their communication structure

Profibus Communication: S7-CP 443-5 Basic/Ext. S5-CP 5431

10

6,0$7,& 1(7 4XLFN 6WDUW

 +RZ WKH 6DPSOH :RUNV


'DWD ([FKDQJH
2 bytes of data are exchanged cyclically by the stations involved in communication.

$FWLYH  3DVVLYH (QG


The active SIMATIC S7 end initiates the SEND / RECEIVE function. The passive SIMATIC S5 end receives the data and sends it back to the active end. Profibus is used as the network medium.

6WHSE\6WHS ([HFXWLRQ RI WKH 8VHU 3URJUDP DW WKH $FWLYH (QG 6,0$7,& 6


SEND: A data field of 2 bytes is sent to the passive partner in every cycle. RECEIVE: A receive job is triggered in every cycle and, depending on the return value, the received data is written to the receive buffer. Incrementing data: The value of the data to be sent is incremented by 1 and the send/receive cycle starts again.

6WHSE\6WHS ([HFXWLRQ RI WKH 8VHU 3URJUDP DW WKH 3DVVLYH (QG 6,0$7,& 6


SEND: A receive job is triggered at the passive end every cycle. When new data is received, it is entered in the common receive/send buffer. RECEIVE: A send job is triggered when new data is received.

Profibus Communication: S7-CP 443-5 Basic/Ext. S5-CP 5431

11

6,0$7,& 1(7 4XLFN 6WDUW

 %ORFNV 5HTXLUHG IRU &RPPXQLFDWLRQ DQG WKHLU &RPPXQLFDWLRQ 6WUXFWXUH


This chapter describes the AG_SEND and AG_RECV blocks required for SEND / RECEIVE communication in greater detail.

Profibus Communication: S7-CP 443-5 Basic/Ext. S5-CP 5431

12

6,0$7,& 1(7 4XLFN 6WDUW

 6 )XQFWLRQ $*B6(1' )&


3XUSRVH RI WKH %ORFN
The AG_SEND function (FC) transfers data from the specified send buffer of the Simatic S7 to the configured partner station. The send buffer pointer can point to a process image area, a bit memory area, or a data block area. The addresses and SAP of the partner are specified during configuration and are assigned a connection ID with which the AG_SEND function sends the data. 7KH EORFN SDUDPHWHUV DUH GHVFULEHG LQ GHWDLO LQ &KDSWHU 

 6 )XQFWLRQ 6(1' )%


3XUSRVH RI WKH %ORFN
The function block sends the PLC data from the specified send buffer to the specified address area of the CP. The addresses and TSAPs of the partners are set in the CP configuration. 7KH EORFN SDUDPHWHUV DUH GHVFULEHG LQ GHWDLO LQ &KDSWHU 

Profibus Communication: S7-CP 443-5 Basic/Ext. S5-CP 5431

13

6,0$7,& 1(7 4XLFN 6WDUW

 6 )XQFWLRQ $*B5(&9 )&


3XUSRVH RI WKH %ORFN
The AG_RECV function sends the data received from the specified partner station to the specified receive buffer of the Simatic S7. The receive buffer can point to a process image area, a memory bit area or a data block area. The receive buffer must be at least as long as the longest data field that can be expected. The addresses and TSAPs of the partners are specified during configuration and are assigned a connection ID with which the AG_RECV function receives the data. 7KH EORFN SDUDPHWHUV DUH GHVFULEHG LQ GHWDLO LQ &KDSWHU 

 6 )XQFWLRQ 5(&(,9( )%


3XUSRVH RI WKH %ORFN
The function block transfers the CP data from the specified address area to the specified send buffer of the PLC. The receive buffer can reference a process image area, a bit memory area, or data block area. The receive buffer must be at least as long as the longest data field that can be expected. The addresses and TSAPs of the partners are set in the CP configuration. 7KH EORFN SDUDPHWHUV DUH GHVFULEHG LQ GHWDLO LQ &KDSWHU 

Profibus Communication: S7-CP 443-5 Basic/Ext. S5-CP 5431

14

6,0$7,& 1(7 4XLFN 6WDUW

3URJUDP 6WUXFWXUHV DQG ([WUDFWV RI &RGH

This chapter introduces you to the structure of the program for both the active and passive ends and important sections of code are shown and explained.

Profibus Communication: S7-CP 443-5 Basic/Ext. S5-CP 5431

15

6,0$7,& 1(7 4XLFN 6WDUW

 3URJUDP 6WUXFWXUH RI WKH $FWLYH 3DUWQHU


Program/cycle start

Call AG_SEND

Error occurred with AG_SEND?

Yes

No

Save error number

Call AG_RECV

Error occurred with AG_RECV?

Yes

No AG_RECV job complete? No

Yes

Increment variable value

Save error number

Profibus Communication: S7-CP 443-5 Basic/Ext. S5-CP 5431

16

6,0$7,& 1(7 4XLFN 6WDUW

 ([WUDFWV RI &RGH IRU WKH $FWLYH 3& 3DUWQHU


 $FWLYH (QG 6\PEROV

6\PERO 7DEOH 8VHG IRU WKH 6HQG  5HFHLYH 6DPSOHV

8VHV
The use of symbols makes the code easier to read. The symbolic name then appears in the program instead of the address. Example: Instead of "MW50" you see "RECEIVE_DATA" in the code.

Profibus Communication: S7-CP 443-5 Basic/Ext. S5-CP 5431

17

6,0$7,& 1(7 4XLFN 6WDUW

 $FWLYH (QG 2%


3XUSRVH
OB1 is responsible for cyclic execution of the user program. In this sample program, the blocks that implement the send / receive functionality (AG_SEND and AG_RECV) are called.

&DOO
OB1 is called in every CPU cycle.

1DPH
OB1

&RGH

'HVFULSWLRQ
OB1 calls the blocks named "MY_SEND_CALL" (call AG_SEND) and "MY_RECEIVE_CALL" (call FC AG_RECV) in every cycle.

Profibus Communication: S7-CP 443-5 Basic/Ext. S5-CP 5431

18

6,0$7,& 1(7 4XLFN 6WDUW

 $FWLYH (QG $*B6(1' -RE


3XUSRVH
Two bytes of data are sent to the configured partner using the Send / Receive service $*B6(1'.

&DOO
Called within OB1.

1DPH
MY_SEND_CALL (FC40)

&RGH

Profibus Communication: S7-CP 443-5 Basic/Ext. S5-CP 5431

19

6,0$7,& 1(7 4XLFN 6WDUW

0HDQLQJ RI WKH 3DUDPHWHUV IRU WKH 65 6HUYLFH $*B6(1'


ACT: Edge signal for executing the block. ID: This identifier identifies the S/R connection (obtained with "CPU -> Connections"). LADDR: This parameter provides the address of the local CP (assigned in "HW Config" and can also be read out using "Netpro") SEND: Address of a local data area from which the values are transferred. LEN: Length of the data area to be sent. DONE: Indicates error-free execution of the job. ERROR: Indicates whether or not an error has occurred. STATUS: Provides detailed information about states or errors during execution of the job.

'HVFULSWLRQ
&$// $*B6(1'  The S/R service "send data" is called. Depending on the "SEND_ERROR" bit, the status word is saved or the function is exited using a conditional block end (BEC).

6XPPDU\
The send block is signaled in every cycle to send data from the send buffer (DB40). When an error occurs during sending, the returned status value is saved in a data block (DB43).

Profibus Communication: S7-CP 443-5 Basic/Ext. S5-CP 5431

20

6,0$7,& 1(7 4XLFN 6WDUW

 $FWLYH (QG $*B5(&9 -RE


3XUSRVH
Two bytes of data are sent to the configured partner using the Send / Receive service $*B6(1'.

&DOO
Called within OB1.

1DPH
MY_RECEIVE_CALL (FC41)

&RGH

Profibus Communication: S7-CP 443-5 Basic/Ext. S5-CP 5431

21

6,0$7,& 1(7 4XLFN 6WDUW

0HDQLQJ RI WKH 3DUDPHWHUV IRU WKH 65 6HUYLFH $*B5(&9


ID: This identifier identifies the S/R connection (obtained with "CPU -> Connections"). LADDR: This parameter provides the address of the local CP (assigned in "HW Config" and can also be read out using "Netpro") RECV: Address of a local data area from which the values are transferred. NDR: Indicates error-free execution of the job. ERROR: Indicates whether or not an error has occurred. STATUS: Provides detailed information about states or errors during execution of the job. LEN: Length of the data area to be sent.

'HVFULSWLRQ
&$// $*B5(&9  The S/R service "receive data" is called. Depending on the "RECV_ERROR" bit, the status value is saved. Otherwise the received data length is accepted and if received correctly the data word is incremented.

6XPPDU\
The receive block is triggered in every cycle to receive data and write it to the receive buffer (DB41). When an error occurs during sending, the returned status value is saved in a data block (DB43). If no error occurs in reception the data is incremented.

Profibus Communication: S7-CP 443-5 Basic/Ext. S5-CP 5431

22

6,0$7,& 1(7 4XLFN 6WDUW

 3URJUDP 6WUXFWXUH IRU WKH 3DVVLYH 3DUWQHU


Program/cycle start

Call RECEIVE

Error occurred with RECEIVE?

Yes

Save error number No No Receive complete Yes Reset send bit

Call SEND with send bit

Error occurred with SEND?

Yes

No

Save error number

Profibus Communication: S7-CP 443-5 Basic/Ext. S5-CP 5431

23

6,0$7,& 1(7 4XLFN 6WDUW

 ([WUDFWV RI &RGH IRU WKH 6,0$7,& 6 3DVVLYH 3DUWQHU


 3DVVLYH (QG 2%
3XUSRVH
OB1 is responsible for cyclic execution of the user program. In this sample program, the blocks that implement the send / receive functionality (AG_SEND and AG_RECV) are called.

&DOO
OB1 is called in every CPU cycle.

1DPH
OB1

&RGH

OB1

Segment 1 : : JU FB 1 Name : TRIGGER ANST : F : : JU FB 2 Name : SEND-T2 ANST : F : : JU FB 102 Name : REC-T2 : :BE 2.0 2.0

'HVFULSWLRQ
OB1 calls the blocks named "MY_SEND_CALL" (call AG_SEND) and "MY_RECEIVE_CALL" (call FC AG_RECV) in every cycle.

Profibus Communication: S7-CP 443-5 Basic/Ext. S5-CP 5431

24

6,0$7,& 1(7 4XLFN 6WDUW

 3DVVLYH (QG 6(1' -RE


3XUSRVH
Two bytes of data are sent to the configured partner using the Send / Receive service 6(1'.

&DOO
Called within OB1.

Profibus Communication: S7-CP 443-5 Basic/Ext. S5-CP 5431

25

6,0$7,& 1(7 4XLFN 6WDUW

&RGH
FB 2 Segment 1 Name : SEND-T2 : JU FB 123 Name : CONTROL SSNR : A-NR : ANZW : PAFE : KY 0,0 KY 0,2 FW 10 FY 14

: A F 11.2 : AN F 17.0 : = F 17.1 : A F 11.2 : = F 17.0 : A F 17.1 : AN F 15.0 : RB =TRIGGER : A =TRIGGER : AN F 11.1 : R F 17.0 : JC FB 120 Name : SEND SSNR : A-NR : ANZW : QTYP : DBNR : QANF : QLAE : PAFE : :BE KY 0,0 KY 0,2 FW 10 KS DB KY 0,41 KF +0 KF +1 FY 15

Profibus Communication: S7-CP 443-5 Basic/Ext. S5-CP 5431

26

6,0$7,& 1(7 4XLFN 6WDUW

0HDQLQJ RI WKH 3DUDPHWHUV IRU WKH 65 6HUYLFH 6(1' )%


SSNR: Interface number of CP. A-NR: The order number identifies the S/R connection of the CP. ANZW: Display word QTYP: Type of buffer area. DBNR: The DB number for data blocks. QANF: Offset within the buffer area. QLAE: Length of the area to send in WORD. PAFE: Error byte of the block.

'HVFULSWLRQ
The S/R service "Send Data" is called. Depending on the "Data_transfer" and "PAFE" bytes, the send bit is reset and the block is closed.

6XPPDU\
The send block is triggered in every cycle to transfer data.

Profibus Communication: S7-CP 443-5 Basic/Ext. S5-CP 5431

27

6,0$7,& 1(7 4XLFN 6WDUW

 3DVVLYH (QG 5(&(,9( -RE


3XUSRVH
Two bytes of data are sent by the configured partner using the S/R 5(&(,9(.

&DOO
Called within OB1.

&RGH
FB 41

Segment 1 Name : REC-T2 : : JU FB 123 Name : CONTROL SSNR : KY 0,0 A-NR : KY 0,102 ANZW : FW 110 PAFE : FY 114 : : AN F 111.0 : BEB : : JC FB 121 Name : RECEIVE SSNR : KY 0,0 A-NR : KY 0,102 ANZW : FW 110 ZTYP : KC DB DBNR : KY 0,41 ZANF : KF +0 ZLAE : KF -1 PAFE : FY 115 : : O F 115.0 : O F 111.3 : BEB : : : :BE

Profibus Communication: S7-CP 443-5 Basic/Ext. S5-CP 5431

28

6,0$7,& 1(7 4XLFN 6WDUW

0HDQLQJ RI WKH 3DUDPHWHUV IRU WKH 65 6HUYLFH 5(&(,9(


SSNR: Interface number of CP. A-NR: This parameter shows the order number for the connection of the local communication CP. ANZW: Display word ZTYP: ID for type of receive buffer. DBNR: Number of the data block. ZANF: Offset of the receive buffer. ZLAE: Length of the data area to send. When "1" the length of the data to receive. PAFE: Process image error in executing the receive block.

'HVFULSWLRQ
The S/R service "Receive Data" is called. When the "receive end" bit "PAFE" bits have been successfully passed the block is closed and the send job bit is set.

6XPPDU\
The receive block is triggered in every cycle to receive data and, after successful reception, to trigger the send job.

Profibus Communication: S7-CP 443-5 Basic/Ext. S5-CP 5431

29

6,0$7,& 1(7 4XLFN 6WDUW

2SHUDWRU &RQWURO DQG 0RQLWRULQJ

This chapter covers the following topic: Operator control and monitoring

Profibus Communication: S7-CP 443-5 Basic/Ext. S5-CP 5431

30

6,0$7,& 1(7 4XLFN 6WDUW

 2SHUDWRU &RQWURO DQG 0RQLWRULQJ


1RWH If problems occur during operator control and monitoring, please read Chapter 7, Troubleshooting.

0RQLWRULQJ
You can monitor the functions using the variable table provided with the sample. The following table explains how to use the variable table.

6WHS 1 2 3 4 5

'HVFULSWLRQ Insert this end of the MPI cable in the MPI port of the S7 CPU in the active station Select "Blocks" in the project window of the SIMATIC Manager under the active station. Double-click "VAT1". In the "Monitoring and Modifying Variables" program, select 3/&  ! &RQQHFW WR ! &RQILJXUHG &38 To monitor the specified variables, select "9DULDEOH ! 0RQLWRU

1RWH The monitor function is active when "Online" is displayed in the status bar in the "Monitoring and Modifying Variables" program and you can see a continuously changing progress bar.

Profibus Communication: S7-CP 443-5 Basic/Ext. S5-CP 5431

31

6,0$7,& 1(7 4XLFN 6WDUW

When you have completed the steps listed above, you will see the following variable table (value deviations are possible!):

6(1' 3DUDPHWHU In the upper part, "SEND", you can see the parameters of the AG_SEND Send/Receive service. ,I WKH VDPSOH LV ZRUNLQJ FRUUHFWO\ $PRQJVW RWKHU WKLQJV WKH SDUDPHWHU 6(1'B'21( $*B6(1' MRE FRPSOHWHG FKDQJHV LWV VWDWH FRQWLQXRXVO\ IURP  !   5(&(,9( 3DUDPHWHU In the "RECEIVE" section you will see the same but for the Send/Receive service AG_RECV. ,I WKH VDPSOH LV ZRUNLQJ FRUUHFWO\ $PRQJVW RWKHU WKLQJV WKH SDUDPHWHU 5(&9B1'5 GDWD UHFHLYHG VKRXOG VKRZ D FRQWLQXRXVO\ FKDQJLQJ VWDWXV RI  !   If the error output is set, you will see the status messages of the blocks in "last error in program". ,I WKH VDPSOH LV ZRUNLQJ FRUUHFWO\ 'XH WR WKH XSGDWH F\FOH RI WKH YDULDEOH WDEOH WKH ZULWWHQ DQG UHDG GDWD VKRXOG EH GLIIHUHQW ,I WKH VDPSOH LV IXQFWLRQLQJ FRUUHFWO\ WKH GDWD VKRXOG EH FRQWLQXRXVO\ FKDQJLQJ

Profibus Communication: S7-CP 443-5 Basic/Ext. S5-CP 5431

32

6,0$7,& 1(7 4XLFN 6WDUW

1RWH The meaning of the values of the parameters for AG_SEND and AG_RECV is explained in detail in the relevant documentation and in the NCM online help (for example 6WDUW ! 6LPDWLF ! 1&0 6 352),%86 ! +HOS )XQFWLRQV )& ! (QJOLVK ).

1RWH The sample is functioning correctly when the value of the data read and written changes continuously. ! Dont forget! The variable table must be online and monitoring must be active for the values to be updated.

2SHUDWRU &RQWURO
You can call the functions using the variable table provided with the sample. How to start and activate it was described above.

1RWH To call up the functions, the variable table must be "Online" and "Monitor" must be active so that the values can be updated (see above).

The following table shows you how to change the value of the data sent to (and then read by) the passive end.

6WHS 1 2

'HVFULSWLRQ Enter a value between 0 and 32767 in the last column ("Modify Value") of the line "MW 52" "SEND_DATA" in the variable table. Select "Variable" -> "Activate Modify Value"

&RUUHFW IXQFWLRQ If the value has been successfully modified, the value read should also return a new value.

Profibus Communication: S7-CP 443-5 Basic/Ext. S5-CP 5431

33

6,0$7,& 1(7 4XLFN 6WDUW

([LWLQJ 2SHUDWRU &RQWURO DQG 0RQLWRULQJ


6WHS 1 2 'HVFULSWLRQ In the "Monitoring and Modifying Variables" program select 7DEOH ! ([LW Click the "No" button in the subsequent dialog.

Profibus Communication: S7-CP 443-5 Basic/Ext. S5-CP 5431

34

6,0$7,& 1(7 4XLFN 6WDUW

7URXEOHVKRRWLQJ
This chapter is intended to help you if you encounter problems installing and starting up the sample.

Profibus Communication: S7-CP 443-5 Basic/Ext. S5-CP 5431

35

6,0$7,& 1(7 4XLFN 6WDUW

3UREOHPV 'RZQORDGLQJ WKH +DUGZDUH &RQILJXUDWLRQ WKH &RQQHFWLRQ RU WKH %ORFNV


Run the following checks. If your answer is "NO" to a question, go straight to the corresponding steps in "Remedies".

6WHS 1 2

'HVFULSWLRQ Is the MPI cable connected to both the PG/PC and the S7 CPU? In the "Setting the PG/PC Interface" program is the correct interface parameter set assigned to the "Access point of application" "S7ONLINE (STEP 7)"? For example, "MPI-ISA on board (MPI)" if you are using the PG-MPI port? Is the hardware configuration in the project (offline configuration) identical in every way with the actual configuration (online configuration)? Has the CPU been reset?

3 4

5HPHGLHV
Correct the problem by working through the steps below if your answer was no to one of the questions above. $QVZHU WR 6WHS  ZDV 12 No connection can be established to the S7 CPU, it is not possible to download to the CPU.

6WHS 1 2

'HVFULSWLRQ Insert one end of the MPI cable in the MPI port on your PG or PC. Insert the other end of the MPI cable in the MPI port of your S7 CPU.

Profibus Communication: S7-CP 443-5 Basic/Ext. S5-CP 5431

36

6,0$7,& 1(7 4XLFN 6WDUW

$QVZHU WR 6WHS  ZDV 12 No connection can be established to the S7 CPU, it is not possible to download to the CPU.

6WHS 1 2

'HVFULSWLRQ Start the "Setting the PG/PC Interface" program: "Start" -> "Simatic" -> "STEP 7" -> "Setting the PG/PC Interface". Set the module you want to use as the MPI port in "Interface parameter assignment used". For example, "MPI-ISA on board (MPI)" if you are using the PG-MPI port. Click the "OK" button.

<RXU DQVZHU WR VWHS  ZDV 12

6WHS 1

'HVFULSWLRQ Adapt the actual hardware configuration to that of the project or read the documentation "Change_CPU" or "Change_CP" if you want to use a different CPU or CP than the one used in the sample.

<RXU DQVZHU WR VWHS  ZDV 12

6WHS 1 Reset the CPU.

'HVFULSWLRQ

Profibus Communication: S7-CP 443-5 Basic/Ext. S5-CP 5431

37

6,0$7,& 1(7 4XLFN 6WDUW

9DULDEOH 7DEOH :ULWWHQ DQG UHDG GDWD GR QRW FKDQJH


Run the following checks. If your answer is "NO" to a question, go straight to the corresponding steps in "Remedies".

6WHS 1 2 3

'HVFULSWLRQ Is the Profibus cable connected to both the active and passive stations? Can you see "Online" in the status bar of the variable table? Can you see a continuously changing progress bar in the status bar?

5HPHGLHV
Correct the problem by working through the steps below if your answer was no to one of the questions above. 7KH DQVZHU WR VWHS  ZDV 12 No connection can be established between the stations and data exchange is not possible.

6WHS 1 2

'HVFULSWLRQ Connect the end of the PROFIBUS cable to the CP port of the station. Repeat steps 1 and 2 for the passive station.

Profibus Communication: S7-CP 443-5 Basic/Ext. S5-CP 5431

38

6,0$7,& 1(7 4XLFN 6WDUW

<RXU DQVZHU WR 6WHS  ZDV 12 No connection was established to the S7 CPU and monitoring was not possible.

6WHS 1

'HVFULSWLRQ In the program "Monitoring and Modifying Variables", select 3/& ! &RQQHFW 7R ! &RQILJXUHG &38 

<RXU DQVZHU WR VWHS  ZDV 12 The monitoring function is not activated.

6WHS 1

'HVFULSWLRQ Select 9DULDEOH ! 0RQLWRU in the "Monitoring and Modifying Variables" program.

Profibus Communication: S7-CP 443-5 Basic/Ext. S5-CP 5431

39

6,0$7,& 1(7 4XLFN 6WDUW

9DULDEOH 7DEOH 2SHUDWRU FRQWURO LV QRW ZRUNLQJ


Run the following checks. If your answer is "NO" to a question, go straight to the corresponding steps in "Remedies".

6WHS 1 2

'HVFULSWLRQ Have you activated 9DULDEOH ! 0RGLI\ 9DOXH 9DOLG in the "Monitoring and Modifying Variables" program? Is the value you entered for memory word 52 (MW52) between 0 and 32767?

5HPHGLHV
Correct the problem by working through the steps below if your answer was no to one of the questions above. <RXU DQVZHU WR VWHS  ZDV 12

6WHS 1

'HVFULSWLRQ Select 9DULDEOH ! 0RGLI\ 9DOXH 9DOLG in the "Monitoring and Modifying Variables" program.

<RXU DQVZHU WR VWHS  ZDV 12

6WHS 1

'HVFULSWLRQ Enter a value between 0 and 32767 in the last column ("Modify Value") of the line "MW 52" "SEND_DATA" in the variable table.

1RWH If you do not find the solution to your problem in this chapter, reinstall the sample.

Profibus Communication: S7-CP 443-5 Basic/Ext. S5-CP 5431

40

Potrebbero piacerti anche