Profibus - SFB52 "RDREC"

kolargol

Member
Join Date
May 2008
Location
HAUGESUND
Posts
9
S7-315 Master
Sirius Softstarter 3RW44 Profibus DP slave

I want to read
DATA SET 95
ID NO: 603 "Number of starts motor right"

DP address 4
DP ID 192
Diagnostic address 2047


Data_set_95.JPG


Can anyone explain for me how to get this function block to work? I have tried to read the system manual for the S7-300 and the SFB 52 but I can't figure it out.


CALL "RDREC" , DB52
REQ :=M0.0
ID :=DW#16#4
INDEX :=603
MLEN :=4
VALID :=M0.1
BUSY :=M0.2
ERROR :=M0.3
STATUS:=MD2
LEN := ??
RECORD:=MD6
 
Why have you got "LEN:= ??" when it should be an integer ?
Have yopu called the block and then analysed the STATUS parameter if an ERROR occurs ?
 
I'll take a guess.

ID shall be the i/o address of the "module" (not the DP node address) as it appears in the HW Config. And it shall be entered as a hex value.

LEN can be any unused word-sized address. It is only for status of how many words was actually transfered.

RECORD shall be an ANY pointer where to put the retrieved data.
So it should be P#M6.0 BYTE 4 if you want the data to arrive in MD6.
 
Try using SFC 59 RD_REC it works better, I could never get SFB52 to work either.

Here is a real life one that works, this reads the outputs of a Simocode Pro V

CALL "RD_REC"
REQ :=#RD_REC_67
IOID :=B#16#54
LADDR :=#LADDR
RECNUM :=B#16#43
RET_VAL:=#TEMP_RET_VAL
BUSY :=#RD_REC_67_BUSY
RECORD :=P#DB33.DBX0.0 BYTE 4

The temp variables are input variables so I can set the logical address and trigger the read from elswhere. RET_VAL is discarded and BUSY is only used within the block.
 

Similar Topics

Hi, I was noticing that Profibus connectors have 2 ports on them that can house 2 separate cables. Can I use 2 cables with Profibus signals...
Replies
4
Views
174
Hello, I am in possession of a WAGO PFC 200 750-8216 which I was successfully able to set up as a Modbus RTU Master to a slave device using...
Replies
0
Views
78
I am trying to implement a profibus network and am a newbie in the automation and communication industry. what are the components required for the...
Replies
1
Views
101
Hi, I am using TIA Portal V18. I have imported a (v5.7) SIMATIC manager project via device proxy. I have created a HMI project (TP700) in TIA...
Replies
2
Views
316
Hi Folks, I am new to the S7-300 and the whole Profibus communication. And I just wonder that can you connect a S7-300 module to a Beckhoff Bus...
Replies
1
Views
315
Back
Top Bottom