4/11/2006 2:00 PM | |
Joined: 8/31/2005 Last visit: 10/24/2024 Posts: 217 Rating: (41) |
Hi! I don't know exactly, what you want to do... Maybe something like this: In STL you can use conditional calls to call functions depending on the RLO (Chapter "10.12 CC Conditional Call" in the STL manual): [quote user="Manual"]CC <logic block identifier> (conditional block call) calls a logic block if RLO=1. CC is used to call logic blocks of the FC or FB type without parameters. CC is used in the same way as the CALL instruction except that you cannot transfer parameters with the calling program. The instruction saves the return address (selector and relative address), the selectors of the two current data blocks, as well as the MA bit into the B (block) stack, deactivates the MCR dependency, creates the local data area of the block to be called, and begins executing the called code. The address for the logic block can be specified absolutely or symbolically. If you want to transfer parameters to a function you should use jump instructions (Chapter "6 Logic Control Instructions" in the STL manual). [quote user="Manual"]You can use the Jump instructions to control the flow of logic, enabling your program to interrupt its linear flow to resume scanning at a different point. You can use the LOOP instruction to call a program segment multiple times. The STL Manuel can be found here: http://support.automation.siemens.com/WW/view/en/18653496 |
Greetings, Chris |
|
Follow us on