-
The main difference between fb and fc is that fc uses a shared data block, fb uses a background data block, fb uses a background data block, for example, if you want to control 3 motors with the same parameters, then you only need to use fb programming plus 3 background data blocks, but if you use fc, then you need to constantly modify the shared data block, otherwise it will lead to data loss. FB ensures that the parameters of the 3 motors do not interfere with each other.
FB and FC are essentially the same, they are both equivalent to subroutines, which can be called by other programs (and can also be called by other subroutines). The biggest difference between them is that FB works with DB, which holds the data used by FB and will remain even after FB exits. FC does not have a permanent block to store data, and is only allocated a temporary data area during operation.
In actual programming, whether to use FB or FC depends on the actual needs. The benefits of FB upstairs are well explained. FB is not much different from FC, FB comes with background chunks, while FC does not.
Therefore, if fb has different data blocks, it can carry different parameter values. This allows multiple objects to be called with the same fb and different background data blocks. Fc and fb are like functions in C, except that fb can generate static variables, and the data can be retained the next time the function is called, while the fc variables are only valid for the call period and are replaced again the next call.
What is the difference between FB and FC in the S7-300PLC? FB has its own background DB and FC does not have its own background DB, what is the difference between FC and FB, they can all achieve control functions, should they use FB or FC, when to use FB and when to use FC? FB is not much different from FC, FB comes with background chunks, while FC does not.
Therefore, if fb has different data blocks, it can carry different parameter values. This makes it possible to use the same FB and different background data.
-
FB is a DB block, and every time FB is executed, data is read from the corresponding DB block and data is written to the DB block. In this way, for instructions with the same function, you can use a fb block, add a different db block, and you can call fb repeatedly. For example, if you write a motor or valve function block, you can write an FB function block, which can be used for multiple motors or valves, but the DB is different.
When FC is executed, the data is read directly, and the intermediate variables are different each time.
For those who need to save intermediate data and have a large amount of intermediate data, it is more convenient to use FB and define DB blocks. If the intermediate data is not saved, or the intermediate variables are relatively few, it can also be implemented with fc, but it is necessary to define and assign values one by one.
-
If fb and fc don't need to be called multiple times, then there's no difference between the two. If called multiple times, the FB module can have a data db with an initial value. FC does not have a data db.
As a simple example, there is a process that needs to be called multiple times and uses a single data that has different values in different times. In this case, it is not possible to achieve such a function using FC. With fb, in the data area, each call can define a different initial value, and the problem is solved.
When talking, if the module process that is called multiple times does not carry data, then FB and FC are no different, which is equivalent to 200 miles of subroutines.
-
1. Different data blocks: FC uses shared data blocks, and FB uses background data blocks.
For example, if you want to control 3 motors with the same parameters, you only need to use FB programming as well as 3 background data blocks. However, if you use FC, you need to constantly modify the shared chunks. Otherwise, the data will be lost.
FB ensures that the parameters of the three motors do not interfere with each other.
2. The actual decision is different
FB and FC are essentially the same, they are equivalent to subroutines and can be called by other programs (and other subroutines can be called). The biggest difference between them is that FB is used in conjunction with DB, and the data used by FB is stored in DB even after FB exits. FC does not have a permanent block to store data, and only a temporary data area is allocated during operation.
In actual programming, whether to use FB or FC depends on the actual requirements.
There is not much difference between FB and FC. FB has a background chunk, while FC does not. As a result, fb can bring different parameter values to different data blocks. In this way, multiple objects can use the same FB and different background data blocks.
3. Different static variables:
Fc and FB are similar to the functions in C, except that Fb can generate static variables and the data can be persisted for the duration of the next function call, while Fc variables are only valid for the duration of the call and will be replaced the next time.
There is not much difference between FB and FC. FB has a background chunk, while FC does not. As a result, fb can bring different parameter values to different data blocks. In this way, multiple objects can use the same FB and different background data blocks.
Fc and FB are similar to the functions in C, except that Fb can generate static variables and the data can be persisted for the duration of the next function call, while Fc variables are only valid for the duration of the call and will be replaced the next time. Every time the IO area of the FC is called, you have to enter it manually every time, while FB doesn't need it, which saves a lot of trouble. If you directly enter the db control address in the upper computer control!
-
fc is a function, fb is a function block, the most intuitive is fc does not have a background data block, and fb call will automatically generate a background data block to permanently save the data in fb; If you use the FC+ global background data block, it is no different from the FB function;
But how do you choose between FB and FC when programming? Generally, the control program is written as fb, which can be called multiple times; FC is mainly called FB to achieve the function of segmenting the whole program! For example, motor control, cylinder control, and each station are written as FB, and the manual automatic module is written as FC, and the program is very clear when calling FB in FC!
Got it!
-
fc and fb are fundamentally a function. They have the same features. Like two people, they will stir-fry this dish.
But FC is very poor because they don't have their own kitchen, and when he needs to stir-fry, he needs to borrow a kitchen from others, and after he finishes cooking, he has to clean it and return it to others. If he stir-fried twice, he would need to borrow it twice.
FB is different, he passed on his craft to DB1, DB2...DBN, there are a total of n such apprentices. And these n people have their own kitchens.
When it is time to stir-fry, n apprentices can start work at the same time, and the dish will be ready quickly. And they don't need to clean their own kitchens after they finish cooking.
FC is a one-man single shadow sling. When you do the operation, you need to borrow space from RAM, and after the operation is completed, this space does not belong to it. All data is erased.
Leave only the results to others. FB is a rich and handsome man who owns an N house. He wanted to use that house to stir-fry, so he used that house to stir-fry.
After each finish, there is no need to clean the room, because this is his own house. The data of the FB running process can be saved in the DB block, and it will only be overwritten by the new data until the next operation.
-
Combined with my engineering experience, I think that fb is mainly called for special functions, for example, if I want to implement pid adjustment, then I have to call fb41,.
The fc is mainly called during specific programming, and I also need to call fb41 in the fc in order to achieve pid adjustment
A humble opinion is not necessarily correct.
-
FC is a high-speed serial transmission bus proposed by the X3T11 group of the American Standards Council (ANSI) in 1988, which solves the technical bottleneck encountered by the parallel bus SCSI and can map more FC-4 upper-layer protocols under the framework of the same large protocol platform. FC has the dual advantages of channel and network, with the advantages of high bandwidth, high reliability, high stability, and resistance to electromagnetic interference.
FB means back focal length in optics, such as in plano-convex lenses, FB refers to the distance from the plane to the focal point, and in biconvex lenses, FB refers to the distance from the surface of any mirror to the focal point.
-
FB and FC are equivalent to a calculation formula in PLC, FC is a function, which can call the shared data, because its calling interface and the called shared data are invariant, so the result of FC execution is invariant; FB has its own 1 to n "background data blocks", FB can call the shared data or call the background data, assuming that the shared data is regarded as the "background data block 0" of FB, then, the data block that FB can call is from 0 to n, and the execution result of calling different data blocks is different (because the background data is different). Both FC and FB are called by the organization block ob.
Example: A class has taken two tests, and because the second question is more difficult, the second score coefficient is *2 (this is called weighting).
Calculate a student's (weighted) average score: (x, first score, y, second score).
a=(x+2y) 2 (this formula is equivalent to fb, here set to fb1).
The x and y values of student A are stored in the data block db1 of fb1, and the value of student B is stored in db2... Hai's is stored in db24. These DBs are the background blocks of FB1.
Call db1 when calculating the average score of student A, and call db2 when calculating the average score of student B...
As for how to use this average score, such as for evaluation, promotion or something, the final result is analyzed by the organization block ob call. OB may also have to consider sports performance FB2, moral FB3 or something.
-
fb,,,function block ; fc,,,function ..The difference between a function block and a function is that the function block has its own data block, and the data during execution can be saved.
-
FC does not have a background data block, so the temporary data used inside the FC cannot be saved, because this temporary data area is shared with other FC, for example, I don't know if it is appropriate or not, just like a school class, many teachers (FC) share a blackboard (temporary data area), if a teacher (FC1) leaves useful content on the blackboard after class and wants to continue to talk in the next class, he will find that the things on the blackboard have changed when he comes to class again, because other teachers also want to use it. Therefore, if you can't save the data that can be used in the next cycle (such as flip-flops, rising edge and falling edge instructions, if you use the temporary variable of fc, there will be problems), and you can only specify the absolute address if you want to save it, which loses the encapsulation of the program block to a certain extent.
FB has background data blocks, which is equivalent to each teacher (FB) having a dedicated classroom and blackboard (background DB), so the above problems will not appear.
Generally speaking, FB can replace FC, but some programs are relatively simple, do not need to save intermediate variables, and it is more convenient to use FC.
The people at Siemens recommend using FB for programming.
-
There is not much difference from scanning, which is that FB has background data blocks that can be used to store local variables.
In general, FB has one more static variable stat than FC, and if stat is not practical, FC can completely replace FB function blocks. It's all about how you program yourself.
-
The abbreviation of function blocks is the meaning of function blocks mentioned upstairs.
Just like an integrated block, there are pins, and you can use it directly if you understand the function of the pins, regardless of the internal program.
In fact, it is to encapsulate a piece of program, and then give input and exit parameters.
-
It's a function block, and you can create different background data blocks to use this function block.
These two are mainstream PLCs, one made in Japan, one made in Germany, I have used both, both are very representative, it is recommended to learn both, you can learn Mitsubishi's first, because most of the programming methods of other brands of PLC are imitation of Mitsubishi, especially domestic brands, just like the Delta I use now, and Xinjie, which is almost exactly the same as Mitsubishi. Mitsubishi is what a traditional ladder looks like. And Siemens is also unique, although he also said that it is a ladder diagram, but his is a modular ladder diagram, which looks more intuitive than Mitsubishi's, and the step7 software is also very easy to use. >>>More
The problem you encounter now is something I have experienced when I used to study on my own, I used to buy a ** of technical success, I can only read it for a year, and I bought a lot of books, and I look at it Sometimes I doze off, sometimes I encounter a problem, although I have a friend who is an engineer and can occasionally answer it, but it is not good to trouble people often, and then I don't want to learn when I learn to learn, and there was no equipment practice at that time, and I didn't learn again for several months, and then it was a colleague of mine, who used to be an electrician together, He learned from Bojun PLC, at that time his monthly salary was more than nine k, and then I also went to study, and now I am also an engineer, and I also take on some projects in my spare time, which is not bad.
PLC did not delve into it, did not understand.
Siemens PLC
The reason for the internal error in OLE is that the password in the IIS Metabase is synchronized, because this change is too sensitive and important, and Microsoft. >>>More
Explanation: Two devices of the same model may have different programs. The same MMC card model only means that the hardware is the same, but the user program is not necessarily the same. >>>More