1/21/2018 3:41 PM | |
Joined: 1/21/2013 Last visit: 11/20/2024 Posts: 4620 Rating:
|
Hello, Wrote: Requirements of the S7-200 CPU: Set the address of the S7-200 CPU. Put the data that should be sent into the output buffer (sending) or take the received data from the input buffer (receiving). The output and input buffer can be defined in STEP 7 during the configuration of X_PUT / X_GET. In order to read the data of the S7-200 please use SFC 67 (X_GET). It can be called in the OB1 of the S7-300. Example: You want to read the input byte EB0 out of the S7-200 CPU (address 4) and safe it in the byte 0 of the data block DB10 on a S7-300: Call SFC67 Function of the parameters REQ:= E 0.0 a positive level located at the E 0.0 of the S7 300/S7 400 starts reading the S7 200 CONT:= False Dismantle the connection after the end of the data transmission DEST_ID:= W#16#4 MPI address of the CPU from which you intend to read (S7-200) VAR_ADDR:= P#E0.0 Byte 1 Input byte 0 of the S7-200 is read out P#DB1.DBX100.0 byte 10 Data area 100-109 of the S7-200 will be read out RET_VAL:= MW 10 Errorcode; if no error occurs, the length of the data block which was copied into the input area (receiving) "RD" is entered in byte as a positive number. BUSY:= M 12.0 BUSY=1: The receipt process is not completed yet. BUSY=0: The receipt process is completed. RD:= P#DB10.DBX0.0 byte 1 Reference to the receive data area. The following data types are allowed: BOOL, BYTE, WORD, DWORD as well as Arrays of the mentioned data types with the exception of BOOL. The receive data area RD has to be at least as long as the reading area of VAR_ADDR with the communication partner. Moreover, the data types of RD and VAR_ADDR have to be in accordance with each other. P#DB10.DBX100.0 byte 10 Table 3: SFC 67 - Parameter In order to write the data of the S7-300 into the S7-200 use SFC68 (X_PUT). It can be called in the OB1 of the S7-300. Example: you want to display the content of the marker byte MB 4 of the S7-300 in the Output byte1 of the S7-200: CALL SFC68 Function of the parameter REQ := E 1.1 A positive level located at the E 1.1 of the S7-300 starts the writing into the S7-200 CONT := FALSE Dismantling connection after the end of the data transmission DEST_ID := W#16#3 Addressing parameter "Destination ID". Contains the MPI address of the communication partner. It was configured with STEP 7 VAR_ADDR:= P#A 1.0 BYTE 1 Reference to the target area in the passive CPU into which you intend to write. You have to select a data type which is supported by the communication partner. SD := P#M 4.0 BYTE 1 Reference to the source area in the own CPU, which contains the data to be sent. The following data types are allowed: BOOL,BYTE, WORD, DWORD as well as Arrays of the mentioned data types with the exception of BOOL. SD must have the same length as the parameter VAR_ADDR of the communication partner. In addition, the data types SD and VAR_ADDR have to be in accordance with each other. RET_VAL := MW 21 If an error occurs during the processing of the function, the return value contains the accompanying error code. BUSY := M 12.2 BUSY=1: The sending process is not completed yet. BUSY=0: The sending process is completed or no sending process is active. Have a look and please follow Aristotelis: comunicating s7-200 with s7-300 "RS232" - Industry Support Siemens |
Last edited by: Ste39 at: 1/21/2018 3:47:52 PM |
|
This contribution was helpful to
1 thankful Users |
Follow us on