1/30/2008 11:45 PM | |
Posts: 7 Rating: (1) |
Ok, I have a similar situation except I am using an S7 connection via IE. My 312 needs to read and write directly to the 224. I use the GET and PUT functions. I set up the 312 according to the following example: Sample program: S7 communication with the blocks FB14 ("GET") and FB15 ("PUT") with S7-300
|
Last edited by: CS Moderator at: 31.01.2008 11:09new subject after splitting refered post inserted |
|
1/31/2008 12:29 AM | |
Posts: 130 Rating: (1) |
etronmac: what's your protocol between the 2xx and 3xx? |
2/2/2008 7:05 PM | |
Posts: 7 Rating: (1) |
OK, Thanks for all the help. I have the solution. For my setup with an S7 312 CPU, you only need to setup the S7 connection on the 312 side. I am using an S7 312 via 343-1 and an S7 224 via 243-1. The TSAP for the 224 needs to be retrieved through the Ethernet Wizard in the STEP 7-MicroWIN program. I do not know how to get the TSAP if you are using another program. However, the TSAP is typically 10.00 for a basic setup. The TSAP for the 312 is preset and cannot be changed. However, if you want to go from a 312 to a 312, then you need to specify the 312 as a partner, instead of unspecified. The TSAP configuration is setup automatically for both ends. Again, you only need to setup the CPU that you are going to read and write with. If you want to setup an S7 connection from the 224 to the 312 via a 343-1-Lean, then you need to enter a TSAP of 03.02 for the partner. Even though the 312 will show its TSAP as 10.04 when configuring the 312 S7 connection. I do not know why the TSAPs do not match, but it will not work if you do not use 03,02 in the 224 S7 connection. I do not know about other CPUs, but this is how it has to be done for my setup. Another imprtant peice of information is that the REQ bit for the PUT and GET FBs need to cycle. If it remains high, you will not get an ERROR or a STATUS word. It will give the false illusion that it is working, but no data will be sent or retrieved. Trust me, I learned that lesson the hard way. Make sure you cycle the REQ bit for the functions. Also, when pointing to the V memory in the 224, you have to use P#DB1.BDX y.y BYTE z (y.y is the starting bit, z is the number of bytes to send) when using the PUT and GET functions in the 312. The 312 recognizes the 224 V memory as DB1. When I get some time, I will try to put together some setup instructions with pictures and post it here. Attachment312 to 224 TSAP.pdf (617 Downloads) |
Last edited by: etronmac at: 28.02.2008 20:07Last edited by: etronmac at: 28.02.2008 19:01Last edited by: etronmac at: 28.02.2008 18:14Correction: When establishing an S7 connection from the 312 to the 224, the 224 needs to be configured as a server with the Ethernet wizard in STEP 7-MicroWIN. Also, when setting up the 224, the remote TSAP to the 312 will be same as what the 312 sets it to when creating the connection in the 312. |
|
Follow us on