data exchange over profibus

tonny

Member
Join Date
Sep 2008
Location
belgium
Posts
19
hi guys

I`ve got a profibus connection between a s7 315-2DP station and a s5-95u L2-DP. the connection is ok.

I need to exchange data. therefor I need to program in both plc`s some FB`s. but i don`t know wich one. o_O

I don`t have the standaard FB`s in S5 when i upload them from the plc.

doesn`t have:
FB 244 SEND
FB 245 RECIEVE
...

are there other methods? please help.

greetz
Tonny
 
Hi Tonny.

According to THIS manual, the 95U CPU with the "L2-DP" designation is always a DP slave (*).
That means that the only way of exchanging data with it, is via I/O data to a DP master.

So, you have to setup the 95U as a DP slave in the HW Config of the 315-2DP.
And DB1 in the 95U has to be setup as described in chapter 5 in the manual.

*: edit: But some people also say that there were variants for master and slave. I think you can find out if you state the exact type number of the CPU.

edit again: There is a complete FAQ for setting up a 95U L2-DP as a slave for a 315-2DP:
http://support.automation.siemens.com/WW/view/en/264755
 
Last edited:
Thanks,

I had already DB1 configured with com DB1.

Can I send and recieve data with the "AG_SEND", "AG_RCV" function blocks in S7? Or is this only for profibus CP?

greetz
Tonny
 
the number is: 6ES5 095-8MD01

the link shows:

  • Memory area of the extended I/O area in the AG95U DP Slave:

SEND MAILBOX / RECEIVE MAILBOX

EPQ EPI
128.0 5780 Hex 128.0 5700 Hex

To

159.7 579F Hex 159.7 571F Hex
  • S5 Program in the AG95U DP Slave:
L PY 128 from the Master
T AB32 to the Slave
L EB 32 from the Slave
T PY 128 to the Master



Where do i need to program this?
OB1?

greetz
 
tonny said:
the number is: 6ES5 095-8MD01
That means it works as a DP slave as mentioned before.

tonny said:
S5 Program in the AG95U DP Slave:
L PY 128 from the Master
T AB32 to the Slave
L EB 32 from the Slave
T PY 128 to the Master

Where do i need to program this?
OB1?
The link is a sample project, and it assumes that the DP data shall be passed directly from/to the I/O of the 95U.
The mentioned i/o adresses EB32 and AB32 are already used in the 95U (because they are in the fixed i/o), so the code will directly read and write those adresses !
Now, if this is not your intention, then you have to alter the code to suit your requirements. Maybe you want to pass the data to some DB or Merker adresses in stead.
 
Hi again,

the data exchange is working fine. ( over 1 "s5-95U" plc)

now there are 2 of them. i can`t read from the second one.
i checked, double checked the configuration settings and they look ok. like the first one, only with other adresses.

Can I use SFC 14 for several DP slaves?
In RET_VAL the value is 0000, so there is no fault in the communication.

any ideas?

greetz
Tonny
 
You need to use SFC14 and SFC15 to exchange i/o data when it needs to be consistent over more than 4 bytes. So yes, you can make several SFC14 calls, or one call covering the i/o area of both 95U's if they are next to each other in the i/o image.
If you dont need consistency over more than 4 bytes, then you dont need SFC14 or SFC15 at all. Just use PI and PQ adressing directly.

Check the HW Diagnostics of the 315.
 
I deleted the SFC 14, i just want to send 1 byte for trying and read directly in PIB. But that ain`t working.
mayby the adress of S5 is wrong.

do you know what adresses are legal to use?

I started at 128. this adress works one the first plc.
the second has adres 140 but doesn`t work, i can see in S5 that it sends the byte in py 140. but i can`t see it in S7.

edit: what is the difference of consistent data and not consistent data?

greetz
 
Last edited:

Similar Topics

two CPU under Profibus DP Master/Slave communication. do they exchange DB data? eg CPU1 DB1 -> CPU2 DB10 CPU1 DB2<- CPU2 DB11 is it...
Replies
2
Views
4,839
Hello all! In company I have two s300 (314) communicating via profibus. To make that i inserted programs (with all blocks) from booth plcs in...
Replies
2
Views
2,262
Hi all. I'm trying to set up communication between a 1756-L72 (EN2TR) and a 1756-L82 (CPU port) using produced / consumed tags. From the L72...
Replies
13
Views
366
Gents, I've a Beckhoff TwinSAFE project in TwinCAT 3 where I've 2 EL6910 Safety controllers, and need to exchange data between them. So I...
Replies
2
Views
829
Hi, Has anyone tried here to work with Mitsubishi FX3U as controller 1(connected thru serial) for Mitsubishi HMI E1071 then AB Compactlogix as...
Replies
1
Views
1,508
Back
Top Bottom