5/5/2006 2:10 PM | |
Joined: 8/31/2005 Last visit: 10/24/2024 Posts: 217 Rating: (41) |
Hi! [quote user="pago06"]1- What is the behavior when i call the FB does the rest of the program calls keep running? When an FB (or FC, SFB, SFC) is called in a block (OB, FB or FC), the execution of the calling block is stopped and CPU executes the called block. After finishing the execution of the called block the CPU continues the execution of the calling block. See chapter "4.2.2 Call Hierarchy in the User Program" in the manual "Programming with STEP 7 V5.4" [quote user="pago06"]2- Do i need to add an End instruction on the called FB? No, you don't need one. But you can use one. See (if you use STL) chapter "10.2 BE Block End" in the manual "Statement List (STL) for S7-300 and S7-400 Programming". [quote user="pago06"]3- How do i know that FB finished? An FB has finished, when the execution of the calling block continues (See first question). You can also use parameters to pass variables to a called block or back to the calling block. See chapter "4.2.3 Block Types" in the manual "Programming with STEP 7 V5.4" [quote user="pago06"]4- There is any internal flag that indicates me the first scan (it is useful to reset values)? You can use a Startup Organization Blocks to set or reset values. See chapter "1.26 Startup Organization Blocks (OB100, OB101 and OB102)" in the manual "System Software for S7-300/400 System and Standard Functions". [quote user="pago06"]Thanks in advance! You are welcome [;)] The list of all available STEP 7 manuals can be found here: http://support.automation.siemens.com/WW/view/en/10805384/133300 |
Last edited by: Chris at: 5/5/2006 2:12 PMGreetings, Chris |
|
Follow us on