The difference between Simens PLC programming FB and FC

FB–function blocks, blocks with background data
FC–function, or function
They Zhijian of main difference is: FC using of is shared data block, FB using of is background data block lift a example, if you to on 3 a parameter same of motor for control, so only need using FB programming plus 3 a background data block on can has, but, if you using FC, so you need constantly of modified shared data block, or will led to data lost. FB 3 motor parameters are ensuring noninterference.


FB,FC of the essence is the same, are equivalent to the subroutine can be called by another program (you can also call other subroutines). The biggest difference between them is that FB for use with DB, DB holds FB data, even if FB after the withdrawal will remain. FC does not have a data block to store the data permanently, will be assigned a temporary data at run time. In actual programming, are using FB or FC, depends on the actual needs. FB benefits upstairs to very well.


No much difference between FB and FC, FB with a background chunk, FC did not. FB data with different blocks, you can take different parameter values. So you can use the same FB and various background chunks, called by more than one object.


FC and FB like c functions, though FB can generate static variables, data will be saved in the next function call, and FC variable is only valid during the call period, the next call to replace.


S7-300plc FB and FC respectively? FB has its own background, DB and DB FC does not have its own background, FC and FB have a difference, they can achieve the control function, what to use FB or FC should be used, when using FB when FC?
No much difference between FB and FC, FB with a background chunk, FC did not. FB data with different blocks, you can take different parameter values. So you can use the same FB and various background chunks, called by more than one object.


FC and FB like c functions, though FB can generate static variables, data will be saved in the next function call, and FC variable is only valid during the call period, the next call to replace. Each call to the FC I/O areas must be of yourself each time you manually enter, and FB is not, save a lot of trouble, if the PC can control directly to the DB control address.
Related Post

Leave a Reply

Your email address will not be published. Required fields are marked *