Sign in to follow this  
Followers 0
Guest Jonthan

S7-226 & S7-314

3 posts in this topic

I need to read from a MPI device 2 Siemens PLC's, a S7 226 and a S7 314, the problem that I have is that the S7-226 appears to be a PPI device even though we have set it up to 187.5Kps Is there an easy solution... Jontahn jlevin@handj.co.za

Share this post


Link to post
Share on other sites
True the serial ports on the 226 are PPI. I'll look into it and see if 226 can talk MPI. Other option would be Profibus slave on 226 and master on 314...

Share this post


Link to post
Share on other sites
Here you go- Communication between S7-300/S7- 400 and S7-200 via MPI QUESTION: How can I get data access to the S7 200 CPUs starting from the S7 300/S7 400 via a one-sided base communication? ANSWER: You can get access from the S7-300 / 400 with X_PUT / X_GET via MPI to several S7-200 CPUs. The S7-300 / S7-400 is the Master and S7-200 is the Slave. You can work with the baudrates 19,2kBd and 187,5kBdfor the S7-200 CPUs of the product line CPU 22x . Which transfer rates will be supported by the S7-300 / S7-400 CPU to the MPI interface can be found out in the technical data of the CPU. Subsequently, you can see the synchronously possible MPI connections of the CPU S7-31xC and CPU S7-31x. If the MPI connection was disconnected and newly connected, a delay of ca. 1 second has to be taken into consideration. This value depends on the CPU cycle and the communication settings of the CPU. If several MPI connections are processed one after each other, longer operating times have to be taken into consideration. CPU Maximal synchronously possible MPI connections 312 / 312C 2 / 2 313 / 313C 4 / 4 314 / 314C 8 / 8 315 / 315-2AG10-0AB0 8 / 12 316 8 318 30 317 30 Table 1: Number of synchronously possible MPI connections of the CPUs S7-31xC and S7-31x CPU Maximal synchronously possible MPI connections 412-1 14 412-2 14 414-2 34 414-3 34 416-2 42 416-3 42 417-4 42 Table 2: Number of synchronously possible MPI connections of the S7-400 CPUs 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. Please note the hints for the connection of CPUs in the S7-200 system manual under entry-ID: 1109582. 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 / S7-400. 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/S7-400: 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 eachother. P#DB10.DBX100.0 byte 10 Table 3: SFC 67 - Parameter In order to write the data of the S7-300 / S7-400 into the S7-200 please use SFC68 (X_PUT). It can be called in the OB1 of the S7-300 / S7-400. Example You want to display the content of the marker byte MB 4 of the S7-300 / S7-400 in the Outputbyte1 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 / 400 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 eachother. 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. Table 4: SFC 68 - Parameter More information about the functions X_GET / X_PUT can be found in the manual "Automation system S7-300/400, System and Standard functions" Entry-ID: 1214574. Note: Before you transfer the STEP 7 block, which is called in the communication block SFC67/SFC68, you should set the S7-300/S7-400 control to the control mode "STOP". Otherwise the communication blocks are not initialized and the communication does not work. If a faster data transmission is required, you have to use a PROFIBUS net instead of the MPI net. The PROFIBUS communication is no connection-oriented communication with X PUT/X GET, but a normal DP-using data communication. Therefore, for the S7-200 a PROFIBUS extension block EM 277 is needed. All necessary information about the EM 277 is contained in the system manual S7-200. Hints for the configuration or integration of the EM 277 into the STEP7 project can be found under entry-ID: 2615830.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0