Industry Online Support
Technical Forum
9/10/2009 3:40 AM | |
Joined: 10/7/2005 Last visit: 10/10/2024 Posts: 3024 Rating: (1054) |
Hello eng ahmed the "DO" command relates to indirect addressing and you code will "do" this (pun intended): [code]T DW 1// Copy current accu1 value intoDW1. >F// this actually does NOTdo anything useful in this code snippet DO DW 1 // "Get ready for indirect addressing" -> Next line will use the value of DW 1 as the address T FY 0// Transfer accu 1 value into FY "xyz" (xyz=value of DW1. E.g. If DW 1 = 5 --> T FY 5 is executed) JU FB 1// call FB1 unconditionally (not relevant to the above DO command) [/code] You can find more about the DO command in the programming manual for your S5 CPU and the information in thelink below will probably also come in handy: What is the difference between STEP 7 and STEP 5 with regard to the operations for indirect addressing? I hope this helps |
Cheers |
|
Follow us on