6/7/2018 8:58 PM | |
Joined: 9/27/2006 Last visit: 8/29/2024 Posts: 12280 Rating: (2680) |
Hello Dostoyevsky; There have been a few discussions on the forum on the subject, here are some informative ones: Difference between FB and FC's Differences between Function Block (FB) and Function (FC) And here is an important FAQ on the same subject: What is the difference between an instance data block and a global data block and how does a CALL influence the DB register: https://support.industry.siemens.com/cs/ww/en/view/15360455 So, basically the main difference between the 2 types of blocks is that an Instance DB (IDB) is generated for each call of a particular FB; so if you define and program an FB to control a motor, and you have 10 motors of the same type in your project, each motor's data can be reached through the STAT variables of its instance DB. FCs are used generally when you do not need to retrieve specific values while the funstion is not running (not being called by the CPU), for calculations for example: ypu need only the results of the calculation (say a temperature or analog value scaling) at the end of the FC, you will transfer it to a memory register and use it from there. But you might need to read the value of the torque read from the motor, or the status of the drive at any moment, even while the FB is not being called. So for your pumps, motors and conveyors, it might be advisable to use FBs; for temperature and level values, use a FC. Hope this helps, Daniel Chartiier |
Follow us on