Technical Forum

MICROMASTER

MM4 and S7-300 on PROFIBUS read / write values

Thread Starter: Berg   Started: 7/30/2006 5:28 AM   Replies: 4

« Previous thread Next thread »
Page 1 of 1 (5 items)
  7/30/2006, 5:28 AM
Joined 1/17/2006
Last visit: 8/22/2014
Posts: 341
Rating:
Rated: Outstanding [3.75 out of 5 / rated 20 time(s)]. (20) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 

Hello sirs,


I'm working in a project with a PLC (S7-300) and some MM440 with Profibus boards. I saw in this forum a topic "How do I read write / write parameters using Profibus on the MM4 ? " but I still have questions about write datas from PLC to Micromaster. So please, I need your help !

The situation:

I configured in HW Config, 8 PZD inputs and 8 PZD outputs. In OB1 block the SFC14 and SFC15 are called. See below:


// Control word 1 + main setpoint to MM4
      CALL  "DPWR_DAT"  (SFC15)
       LADDR  :=W#16#100
       RECORD :=P#DB1.DBX 0.0 WORD 8
       RET_VAL:=MW0

// Read 8 words of process data
      CALL  "DPRD_DAT"  (SFC14)
       LADDR  :=W#16#100
       RET_VAL:=MW4
       RECORD :=P#DB1.DBX 16.0 WORD 8

I can understand the reading datas, because in the MM4 we have a parameter P2051
[page 2710 MM440] with 8 PZDs that can be configured, in other words, we have acess.
But I can't understand the writing datas, because we have 8 PZDs but these datas are not available (read only parameter) r2050 [page 2700].
So, I've configurated 8 words in my DB1 but don't I have acess to use these words ??
For example, If I need to chance the frequency several times during the process, for this writing differents values of frequencies on the second word (second PZD) - r2050. Is it possible ? How to do ??

Please, I'm very confused about it. On Masterdrive MC these parameters are available in words.

Sorry my english, it isn't my mother tongue.

 

Best regards,

Berg








 


"Educate the children and it won't be necessary to punish the men."
Pythagoras
Top
Thank you for this post from:
  7/30/2006, 4:26 PM
Joined 1/7/2006
Last visit: 9/26/2014
Posts: 2674
Rating:
Rated: Excellent [4.07 out of 5 / rated 258 time(s)]. (258) 
Rated: Very Good [2 out of 5 / rated 1 time(s)]. (1) 
Hi Berg,

I have found a nice example on internet by Siemens that give you maybe some more information: MICROMASTER: Function block to operate on Profibus DP it is not the same configuration but it is a very good example. blink

 

I hope that the answer will help, if you have still questions, don't hesitate to ask me.

All the best, Late
Never say never, think in solutions, not in trouble......
Top
  7/31/2006, 4:31 PM
Joined 7/24/2006
Last visit: 9/26/2008
Posts: 48
Rating:
Rated: Outstanding [3.75 out of 5 / rated 4 time(s)]. (4) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Berg wrote:

Hello sirs,


I'm working in a project with a PLC (S7-300) and some MM440 with Profibus boards. I saw in this forum a topic "How do I read write / write parameters using Profibus on the MM4 ? " but I still have questions about write datas from PLC to Micromaster. So please, I need your help !

The situation:

I configured in HW Config, 8 PZD inputs and 8 PZD outputs. In OB1 block the SFC14 and SFC15 are called. See below:


// Control word 1 + main setpoint to MM4
      CALL  "DPWR_DAT"  (SFC15)
       LADDR  :=W#16#100
       RECORD :=P#DB1.DBX 0.0 WORD 8
       RET_VAL:=MW0

// Read 8 words of process data
      CALL  "DPRD_DAT"  (SFC14)
       LADDR  :=W#16#100
       RET_VAL:=MW4
       RECORD :=P#DB1.DBX 16.0 WORD 8

I can understand the reading datas, because in the MM4 we have a parameter P2051
[page 2710 MM440] with 8 PZDs that can be configured, in other words, we have acess.
But I can't understand the writing datas, because we have 8 PZDs but these datas are not available (read only parameter) r2050 [page 2700].
So, I've configurated 8 words in my DB1 but don't I have acess to use these words ??
For example, If I need to chance the frequency several times during the process, for this writing differents values of frequencies on the second word (second PZD) - r2050. Is it possible ? How to do ??

Please, I'm very confused about it. On Masterdrive MC these parameters are available in words.

Sorry my english, it isn't my mother tongue.

 

Best regards,

Berg








 



Hi there let's see if I can help you.

when reading data from the MM4, the data to be send can be set in the MM4 bij means of parameter P 2051. The data is then transferred to the PLC. The first word comes in at DBx.DBWy+0.

When writing data the data to be read is placed in the CPU buffer at for example DB10.dbw16 and further. This data is then sent to the MM4 and arrives in the indices of R2050. This data can then be distributed to the drives. For example by setting r2050:0 to P1070.0 (P1070.0 = 2050). In this way you can couple the data from the profibus and connect them to the drive internal parameters.

Actually a lot of settings are made for you by setting P700 and P1000 to 6. If you set P700 and P1000 to 6, variables like P840 and P1070 are set for you by the drive.

I hope that this information is helpful in understanding how it works. Late's sample programme can help you on your way when programming.



Mechanic.
Top
  8/1/2006, 10:01 PM
Joined 1/17/2006
Last visit: 8/22/2014
Posts: 341
Rating:
Rated: Outstanding [3.75 out of 5 / rated 20 time(s)]. (20) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 

Hi Mechanic,
 
First, thank you and all for the help. So, let's see if I've understood you ... ok ? blink

If I set in the MM4 the parameter P1070.0 = 2050:2 
                                                P1070.1 = 2050:3

Doing this, am I defining a double word (32 bits) with my second and third word of r2050 ?

In my example, I have the follow case:


      CALL  "DPWR_DAT"  (SFC15)
       LADDR  :=W#16#100
       RECORD :=P#DB1.DBX 0.0 WORD 8
       RET_VAL:=MW0


Finally, if I do the instructions :

L 500
T DB1.DBD2

Will be the setpoint (P1070) a data with the value 500 (32 bits) ? How to scale the values, in other words, what's the meaning of this value 500, for example ?

I wait that I have been clearly ... blush

Regards

Berg


"Educate the children and it won't be necessary to punish the men."
Pythagoras
Top
  1/3/2008, 11:33 PM
Joined 1/16/2006
Last visit: 7/10/2013
Posts: 17
Rating:
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
Rated: no ratings [0 out of 5 / rated 0 time(s)]. (0) 
grin Thanks for the link, Late! I hope you have a merry New Year. BTW, where are you at? I'm in TN. I see alot of your posts. Thanks for all the insight.
Top
Page 1 of 1 (5 items)
Actions