3/24/2010 7:08 AM | |
Joined: 10/7/2005 Last visit: 10/10/2024 Posts: 3024 Rating: (1054)
|
Hello lambertws Please check wich S5 CPU you have and get the manual for it via a search from https://support.automation.siemens.com. OB254/255 functionality is unfortunately not consistent across the various S5 CPU's had these OB's (e.g. OB254 updates the Process image in a 944 CPU but is responsible for transfering DB's into the DB RAM in a 928CPU). The (correct) S5 CPU manual does however explains the OB functionality quite well which should help in finding a suitable S7logic implementation. I hope this helps |
Cheers |
|
3/24/2010 11:49 AM | |
Joined: 10/7/2005 Last visit: 10/10/2024 Posts: 3024 Rating: (1054)
|
Hello again lambertws a 928B it is and here is what your code does in this case: L KF +11 G DB 3 // create DB 3 with a lenght of 11 Words C DB 3 // Open DB 3 L KF +6 T DW 2 // put a value of 6 into DW2 of DB3 (Note, the above really has nothing to do with what follows below) L KF +4 T FW 200 //put a value of4 into FW200 L KF +221 T FW 202 //put a value of221 into FW202 L FD 200 // Load FD200 into ACCU1 (FD200=FW200/FW202) // --> ACCU1 High:4 ; ACCU1 Low: 221 JU OB 255 // create DB221 in the DB RAM as acopy of DB 4 (which is currently in the "normal" RAM) As you would know, a special DB RAM does no longer exist in S7, (some)S5 had it simply as an additional memory area for storing DB's. Bear in mind that a 928B had "only" 64KByte of user memory (used by code and DB's), so having the ability to "offload" DB's into the additional 46KByte of pure DB RAM was handy as it freed up user memory formore code Blocks. I hope this helps |
Cheers |
|
3/25/2010 7:29 AM | |
Joined: 10/7/2005 Last visit: 10/10/2024 Posts: 3024 Rating: (1054)
|
Hello lambertws the info is in the928B programming manual that you already haveand I'm afraid to state the obvious, but you willhave to learn (or know) at least a little bit about S5 when you attemptan S5 to S7 conversion. As for the rest of your questions: It doesn't matter in which FB the code is, important is in this case from where the FB1 is called. I would assume that it is called from a startup OB (e.g. OB20, 21 and/or 22) in which case DB3 is created and DB221 is created asa copy of DB4 via your logic snippet. You can do the same in S7 (have a look at SFC22 in combination with SFC20 if required) or you can opt to create DB3 and DB221 (and others that crated in FB1) as an offlineDB instead that you then simply download into the S7 (and still preset them with values in OB100 if need be). I hope this helps |
Cheers |
|
3/25/2010 10:48 AM | |
Posts: 58 Rating: (0) |
Okay, ill try to cover the documents wholly first. Before, I just read the problem I met. Thanks. |
Follow us on