5/5/2011 7:11 PM | |
Joined: 3/21/2006 Last visit: 4/12/2023 Posts: 10221 Rating:
|
|
5/9/2011 10:46 AM | |
Joined: 10/7/2005 Last visit: 6/5/2023 Posts: 2966 Rating:
|
Hello Tala
I'm afraid to say that that is NOT going to work. Absolute memory access as done in the S5 is no longer available in an S7 (and even if it would, the memory addresses would be different).
Correct, "TNB 1" does only transfer 1 Byte so you don't have to use SFC20 (the S5 to S7 converter simply uses SFC20 as adefault replacement suggestion for these type of S5 commands). I suggest you do the following: 1.) Downloadthe manual for your CPU and determine with its help what addresses you are transfering from/to. I presume it is either a 941,2,3 or4 or 928 CPU based on the EEFF destination address which would thenFlagbyte255. 2.) Check the call of the FB in the S5 program and find out what value is passed on to Parameter "#PADR". This value is OR'ed with a value of 1 and then becomesthe absolute memory start address. 3.) Once you determined the "functionality" of the logic, you can decide on how to best replace it with new S7 logic (which could turn out to be a simple as "L IB 7; T MB 255" but may also require indirect addressing). I hope this helps and should you need more assistancewith the above, please provide us with the S5 CPU type and "#PADR" values for the FB call(s) (ideallyupload your S5 program here and let us know which FB it is). |
Cheers |
|
5/13/2011 10:41 PM | |
Posts: 20 Rating:
|
I have attached the s5 program hope to find some solution.. Thank You AttachmentS5_Program.zip (241 Downloads) |
5/14/2011 3:20 AM | |
Joined: 10/7/2005 Last visit: 6/5/2023 Posts: 2966 Rating:
|
Hello Tala my crystal ball is broken, so can you please provide us with the previously requested info which will help us to be able to help you.
|
Cheers |
|
5/14/2011 4:17 AM | |
Posts: 20 Rating:
|
The CPU type is 115U 942, The FB is FB 203 which is called in FB100 |
5/14/2011 2:50 PM | |
Joined: 10/7/2005 Last visit: 6/5/2023 Posts: 2966 Rating:
|
Hello Tala good news first: FB203 is only called once and Parameter "PADR" has "F0F0" as a constant assigned to it. As such, your code snippet inside FB203means the following: LW =PADR// load value F0F0 into accu1 T DW 1 // store in DW 1 L KH 0001 // load value of 1 into accu1 OW // or it with F0F0 --> accu1 now contains F0F1 L KH EEFF// load valueEEFF into accu1 TNB 1 // copy 1 byte from absolute memory address F0F1 to EEFF As for the absolute memory addresses, F0F1 is PY241 and EEFF is FY255 in your S5 942 CPU (see also attached extract from the 115U manual). This where the good news ends though as there's more (similar to the of the above) happening inside FB203, the block has no comments and I don't know what the intent of the logic is (what functionalityit is trying to achieve). I suggest you do the following: 1.) Determine what I/O type is at address 241 (e.g. AI, AQ etc.) 2.) Continue "deciphering" the functionality ofthe remainder of FB203 asper above example (you need to understand what it does to be able to reprogram it, ideally you do tests with the real S5 to help yougain an understanding of FB203). 3.) Create a functional replacement logicfor itin the S7. I hope this helps |
Last edited by: fritz at: 5/14/2011 2:52 PMuploaded pic Cheers |
|
5/15/2011 3:46 PM | |
Joined: 10/7/2005 Last visit: 6/5/2023 Posts: 2966 Rating:
|
there's not much to confirm Tala, if the Blocks are no longer needed then they can be deleted, wouldn't you agree? Just make sure that you also clean up (or replace as needed) any interaction these blocks may have had with the remainder of the program. |
Cheers |
|
Follow us on