4/16/2010 12:28 PM | |
Joined: 10/7/2005 Last visit: 9/14/2025 Posts: 3049 Rating:
|
Hello arturas you can achieve the same in your CPU 942B S5 CPU, albeit with obviously slightly different syntax. Main thing to know is that indirect addressing takes place via the "DO" command and the format for a "Byte.Bit" address in S5 (which has the bit number in the high byte of the word and the Byte number in the low byte of the word. Whiele this seems counterintuitive, thegood news isthat you can usethe"KY" format to make the addressdeclaration look a bit"better): An (silly hardcoded) example for indirectly setting an Output would be this: [code]L KY3,15 //Address 15.3 T FW 250 // store in scratch flag word (can also be DB Word) A M 7.7// create RLO DO FW 250 // "Process" the flagword, RLO is NOT affected by this = Q 0.0 // Result: Q 15.3 is set based on RLO [/code] As you are familiar with indirect addressing in S7, you shallfind the following FAQ useful for the reverse engineering of your S7 logic to S5 as well a theS5 115U manual (search it for the "DO" command,"KY" format and Jump instructions): What is the difference between STEP 7 and STEP 5 with regard to the operations for indirect addressing? S5-115U Programmable Controller I hope this helps |
Cheers |
|
This contribution was helpful to
2 thankful Users |
Follow us on