PCS7 help on CFC editor->using signals from slaves

Sandor-CRX

Member
Join Date
Oct 2009
Location
Timboektoe
Posts
22
Hello guys,


I'm engineering software with PCS7 7.1.
I have a S7400 controller with five s7300 controllers as I-slaves. Three of those are 315 cpu's with a cp342-5 module.
The question is how I can use the signals from the slaves in my cfc editor.

Are there any blocks in the library which you can use to connect signals from a cp342-5 module?

Thanks

Grtz Sandor
 
Hello guys,


I'm engineering software with PCS7 7.1.
I have a S7400 controller with five s7300 controllers as I-slaves. Three of those are 315 cpu's with a cp342-5 module.
The question is how I can use the signals from the slaves in my cfc editor.

Are there any blocks in the library which you can use to connect signals from a cp342-5 module?

Thanks

Grtz Sandor

Using I-Slaves require programming both PLCs.

Have you declared the Master-Slave table for the signal interchange?
 
Hello,

You need to setup the connection via netpro. Then use AG_SEN and AG_RECEIVE.
For communication between PCS7 systems use SEND_BO and SEND_R....
 
After you have parameterized the S7-300 as an ISlave and then declared the Master-Slave table on the HW Config (not an S7 connection on Netpro), on the S7-300 you have to use AG_SEN and AG_RECEIVE. The addresses on the parameters for these blocks are those that were declared on the table.

On the S7-400, you can use SFC14 and SFC15 (DPWRITE and DPREAD - not exact names) to send and receive to and from the S7300.

The addreses are going to be I/O areas of both PLCs (not necessarily the same)

PS: If you need help on parameterizing and creating the table just tell us.
 
Hello guys, sorry for my late reply:

@ Fariam: For the CPU315DP I have configured Master-slave mode. For the CPU315 with CP342-5 module, I configured Direct Data Exchange.

The problem is that the project was created with PCS7 4.0. After years we are restarting the factory with PCS7 7.1.
The S7-300 programs are available, but the S7-400 (master) program is gone.
In the S7-300 with CP342-5 module are the following FC's: FCxSend and FCxRecieve. There is also an DB which is the exchange data buffer.
I configured the S7-300 with and without CP to the DP master interface of my CPU.

The problem I have is using the right communication blocks and proper addresses.
I will try to get it to work.

Thank you for your help and you'll hear from me

Grt Sandor
 
Hello Sandor,

Configuring the CPU with CP as Direct Data Exchange makes no sense. DDE is for ISlave-to-Slave communication. Unless, is that what you want?

In both cases you have to setup Master-Slave, making either the CPU or the CP as "DP slave" under their properties. Then set the Master-Slave table up.
 
Hello Fariam,

I told you that the S7-300 programs still exist: Below is a copy of the S7-300 program with a cp342-5 module:

FC86 Send
FC87 Recieve
FC 85 containing:

Network 1
CALL "Transmit to DP Module"
CPLADDR :=W#16#170
RECV :=P#DB85.DBX10.0 BYTE 32
NDR :=DB85.DBX1.0
ERROR :=DB85.DBX1.1
STATUS :=DB85.DBW2
DPSTATUS:="DP module buffer".STAT0[4]

Network 2

CALL "Receive from DP module"
CPLADDR:=W#16#170
SEND :=P#DB85.DBX70.0 BYTE 32
DONE :=DB85.DBX5.0
ERROR :=DB85.DBX5.1
STATUS :=DB85.DBW6

DB85 is the "buffer" between CPU and CP342-5 and looks like this:

0.0--------------------STRUCT
+0.0-----STAT0------ARRAY[0...9]
*1.0-------------------BYTE
+10.0---STAT1-------ARRAY[10...60]
*1.0-------------------BYTE
+62.0---STAT2------ARRAY[61...69]
*1.0-------------------BYTE
+72.0---STAT3------ARRAY[70...125]
*1.0-------------------BYTE---
=128.0---------------END_STRUCT---

* The lines above are needed to display the format correctly

I 'thought DDX was the mode to use: Intelligent slave to a master...

What can you make of this?

Thanks,

Sandor
 
Last edited:
Master-Slave (MS) is the one you need, not DX.

I have used the FC1 (DP-SEND) and FC2 (DP-RECV) from the SIMATIC_NET_CP library. These are for being used when the CP is the master (or slave) on PROFIBUS. FC1 and FC2 transfer and receive the data FROM the CPU to the CP and viceversa. I'm not sure if the ones you are using would work.

From those networks you state, I'm assuming the W#16#170 are the addresses from the MS Table?

Attached is a sample table, the left address column is the master, right is the slave. In this case, the SLAVE blocks would go like this:

Network 1 (1st Row - ISlave Outputs)
CALL "Transmit to DP Module"
CPLADDR :=W#16#14
RECV :=P#DB85.DBX10.0 BYTE 8
NDR :=DB85.DBX1.0
ERROR :=DB85.DBX1.1
STATUS :=DB85.DBW2
DPSTATUS:="DP module buffer".STAT0[4]

Network 2 (2nd row - Islave Inputs)

CALL "Receive from DP module"
CPLADDR:=W#16#14
SEND :=P#DB85.DBX70.0 BYTE 8
DONE :=DB85.DBX5.0
ERROR :=DB85.DBX5.1
STATUS :=DB85.DBW6

On the master, this case an S7-400, the addresses should be w#16#28.

Regards.
 
Hello Fariam,

The CPLADDR address is the address of the CP module, that is correct. In my example, the CP has address: 368 (W#16#170).

In my program, a S7300 is connected through CP342-5 module to DP master interface of a S7400.
This means that CP module is the slave and S7400 is the master.
What I understand from your MS table is the following:

Partner address = S7-400 master, the partner address is determined by Simatic(free adres) and Input address is actually the output of the CP module. Output address of the master is the input for the CP module. The local address is also determined by Simatic.

Attached is a table is quickly created. This represents the DB.
The other attached image is the MS table.


In my DB I have 1 Byte and five REAL types. This means that I want to send and recieve 1 BYTE and 2 WORDS.

Is my definition correct?

Thanks!

db.JPG MStable.jpg
 
You can do it the way you already have it, but then you would need send or receive blocks for all the rows in the table.

However, you can send all the DB as bytes (total 21 bytes - Consistency: all) at once, there is no need to create several rows for the Master-Slave interchange. You only have to worry about reading the correct format or data type on the S7-400 and viceversa.

I'm doubtful on the blocks. In the case you are sending/receiving more than 4 bytes, you have to use SFC14 and SFC15 (Send/Receive Consistent Data). But that is when the DP is being used through the CPU interface. Using these blocks, the destination/source addresses must be the ones on the MS Table.

Using the blocks you mention, the "CPLADDR" parameter, must be the I/O address of the CP under HW Config, not the ones on the table. I think you should do some essay and error here. There are several Send and Receive blocks for DP. You should look for one that contains both the CPLADDR parameter and the Destination/source address parameters.

Hope hearing from you.

Regards.
 
Hello Fariam,

I got an example of a S7400 communicating with a s7300 with cp. from Siemens. (Consistent data transfer)

The S7-400 is using the FC's(DPRD_DAT and DPWR_DAT).
The S7300 is configured in DX mode and not in MS mode, and is using the FC's (DP_SEND, DP_RECV).


Both cpu's have two datablocks and when I change the value in one S7300 DB, it changes also on the S7400 DB. It works.

Why are they using DX instead your advice to use MS mode?
 
Hello Fariam,

I got an example of a S7400 communicating with a s7300 with cp. from Siemens. (Consistent data transfer)

The S7-400 is using the FC's(DPRD_DAT and DPWR_DAT).
The S7300 is configured in DX mode and not in MS mode, and is using the FC's (DP_SEND, DP_RECV).


Both cpu's have two datablocks and when I change the value in one S7300 DB, it changes also on the S7400 DB. It works.

Why are they using DX instead your advice to use MS mode?

I have no idea. I'll ask.

DX is supposed to be for communication between a Slave and an Intelligent Slave. Maybe because the I-Slave is really a CP, it's got to be DX.
 
Hmm...just thinking, the CP is connected to DP master and is a slave. A S7300 with CP is an intelligent slave.
A s7300 with CP module is the same as a S7300 2DP (integrated). You only have to create the send and recieve functions yourselfs.

In my project is also a CPU315 2DP and is configured in MS mode.

Integrated profibus as slave = MS mode
External profibus (CP) as slave = DX

?
 

Similar Topics

Hello, I'm having a problem: I'm working on a old plant which is controlled by PCS7 4.0 The plant stood still for 10 years and now I'm...
Replies
0
Views
2,316
Need to install a new install of PCS7 and Import a Wincc OS1 project The existing project is pointing to a Project server and I need to make it a...
Replies
0
Views
1,390
Hey, i have a Siemens PCS7 project with some standard blocks but when i wanna look at the help file, there isn't any, one block that i can...
Replies
3
Views
4,405
DOos anyone have a link for documentaion that can help a newbie understand how to incorporate field devices such as flow control valves (Fischer)...
Replies
3
Views
5,852
Does anyone have an example project of the cm ptp ET200 SP HA with 410-5H DCS (PCs7 9.1 SP1) for MODBUS MASTER/SLAVE communication ?
Replies
2
Views
139
Back
Top Bottom