Using SFB15 with two simulates PLC's in PLCsim

rick-brinkman

Member
Join Date
Dec 2012
Location
Overijssel
Posts
21
Hello all,

I want to send data to an MPI partner with SFB15 "PUT", but while trying the SFB15 gives me error code 1.

The SFB15 is programmed on a S7-400 PLC (CPU413-2DP, MPI address 2) and I want to send/put data to an MPI partner s7-300 PLC (CPU314 IFM, MPI address 3). Both PLC's are simulated by PLCsim V5.4 SP4.

The sequence I'm doing is as follows:
Open project and create PLC with PLCSim
Create a second PLC with PLCSim
Download project of first PLC
Download project of second PLC
Open Netpro, select both PLC´s and then download to the selected PLC´s

My program code is as follows:

2gvlgkw.jpg


Can someone tell me what I'm doing wrong?

Thanks in advance!
 
For MPI, I believe you have to use X_PUT and X_GET. And these cannot be simulated.
edit: Actually I am not sure that you cannot create an S7 connection via MPI and S7-400 CPUs. Please post a screenshot of your NetPro setup of the connection.

Look here for what can be done with communicating between two PLCSIM'ed CPUs:
http://support.automation.siemens.com/IT/view/en/38726591
 
Last edited:
X_put indeed works fine with real PLC's. unfortunately not with PLCsim. therefore I tried SFB15. I thought it is also for MPI but I don’t see it mentioned in the help function.

Here is my Netpro Setup:

2rzb2oz.jpg
 
You have to create a connection between the two CPUs in NetPro.
NetPro informs you a connection ID. This ID number must be specified to the PUT/GET blocks.
The ID is NOT the same as the MPI station number.

Post a screenshot where the connection setup can be seen.

edit: If you dont know what a connection is or how to create one, then in NetPro select one of the CPUs, and from the menu use Insert .. New Connection.
Specify S7 connection as the connection type.
Specify the other CPU as the connection partner.
Make a note of the ID number.
Save and compile.
Download to both CPUs.
Add PUT or GET blocks in one or both CPUs, using the ID number.
 
Last edited:
Just did a test trying to setup an S7 connection between an S7-300 and an S7-400 via MPI.
It is possible, you just have to select the S7-400 CPU when you create the connection. It means that the S7-300 will be passive. The S7-400 will be active and you have to place the PUT/GET blocks in the S7-400 program.
 
You're my hero! :geek:

I didn’t know that I had to make a connection between the CPU's with NetPro. I followed your steps and the communication between the two PLC's simulated by PLSsim works fine now.

Thanks a lot!
 

Similar Topics

Hi, I wrote a sequence loop using EQU and MOV instructions and would like to validate that i'm doing this properly. i attached a picture of the...
Replies
14
Views
502
Hi I'm very new to PLC programming and I'm trying to find out if this library (Tc2_NcFifoAxes) is necessary for our task In our case we need to...
Replies
0
Views
55
I have a project to automate four generator sets. The system will monitor and store the load demand of the factory. Once there's Power outage, the...
Replies
0
Views
97
Adding ethernet equipment to an existing panel that has none. We have some solid ethernet cables coming from other remote cabinets that I plan to...
Replies
3
Views
158
I'm trying to control a device via MODBUS RTU and the ModbusRtuMasterV2_PcCOM in Twincat 3. I've configured a device with the right com port and...
Replies
7
Views
309
Back
Top Bottom