19: Function (FC) vs Function Block (FB) - PLC Programming

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
salamualikum' welcome to another session today we are going to talk about Kobe have C and FB what are these and how we can actually use them so FC and FB are used as a subroutine the main function of these two are actually to divide the whole program into small parts so that it's easy for the programmer later on to see and troubleshoot if any issues there at unorganised home and organized home which one is very recording you definitely will say organized home if in the case in the organized home if you want see something you can easily find whereas in an organized home it's very difficult to find something same is the case in programming if you program everything well-organized then it is gonna be very easy for someone moves troubleshooting later on to kind of troubleshoot any issue in there for better organizing the PLC programming in Siemens we use F CFP and OB concepts now next thing is you might be thinking what are the difference between actually FC and FB so here is the difference between these two fasting FB uses instance DVR DB for its inputs and output whereas FC is not using that FC is using addresses instead of that now we are going towards the programming pair of today's class and these concepts will be very much clearer to you because we are gonna have a look at each and everything here so now we are going to program first C and then we will talk about that be and then you will you see yourself what we talk in theory and what we are doing in practical so it will make the picture very much clearer for you so starting with F C so insert object and here is a function so if you will select that now it's asking you which lab with you for sure neither so I will select later and click OK that's not now the next step is once you're done with that just totally collapse see possible program and C and then D and B B's concept will be in FP so stay connected come here now we are already here so first thing is to define inputs now we are making a function called for an operation so n1 input 1 input 2 so we are making n1 and n2 as an end in two inputs and output will be about so we are done with that defining stuff now next thing is to write in so we have already talked before if we want them in para if you put them in parallel that is actually our operation if you put them in series that is an operation so we are putting them in series and now what is our output right here and that is out right we have already FC ready just save it and you can close it now we'll call that OB if you will open up OB we can use that FC for them so do you go to deaf see you got your in-1 and in2 and you will output okay so I zero point zero five zero point one and Q zero point zero this is a simple example but you may have a thousands work you know drums and networks in that program possible like you can create a scene with thousands of Network so this you are actually defining your program in a way like you're customizing it very well are you're utilizing or organizing it very well so that it's very easy period like for example you have motor you make one lock for that you have some process for certain processes like for a level control you could make one Fc go ahead make it and it will do one thing it is gonna make your program very easy for reading to understand that right hopefully that's clear this example is very basic just to give you understanding later on we will talk about programming how to program water block and we have studied analog scaling not right what is the formula in that side that particular function block that's we are gonna make it by ourself in next section so that was very clear right so Moorhead now what we will do we will kill to the program here and you try to download make sure to download both will be in fc-1 because if you're gonna download only one it will off so they have downloaded it now you can go to that FC one and see that first run it and then after that this was sign you have already downloaded both now when you go on it see both are currently zero so if you have one input we don't have on because I need to have both inputs I to get an output so if i click to second input here a 0.1 that is going to become out true so that is the FC now we are going to utilize another code that is going to be in FP and we are going to make good for our official in there no they are going to make FB block insert new object select function block choose your language I already selected let alone if you want STL video offline it's all up to you and click OK no you have everyone already here so the next step is going to be to define inputs and outputs as we have defined f6a we are if you have to define inputs and output so give one to okay we are making this FB for our operation down and make it up now over architecture network is ready just put a zero point sorry in one into no that's not Q zero point zero sorry for that it's output here we have the findings in outs there actually when we will use that be there we will define that dresses okay so say that out yes close that go back to OB to call it so we are now in OB and we have to call that function rocket we have created right so you see something is coming up here that was not there in the case of FC at that time you didn't see that right so we have to define here DB so that's what I was saying to you that we need to have a data block fraud we are creating DB's it was very FPS we need to have a data block for that so here we have to name it DB to it will say the instance data block at db2 doesn't exist do you want to eliminate yes I want it and then after that you have to kind of make by viewpoint zero sorry sorry we can't make it go to point 2 because we have utilized that before so just make a difference by 0.3 I and then we have you have to go this obi-wan selector you see now we have already created DB here so let's open it all the see what's inside so it should contain all inputs and output what we discuss in theory right so let's see how it's going to be inside that DB what is gonna be their inputs and outputs that we have just defined for our operation so you can see here we have n1 into and out so we have both inputs and we have two of inputs and one output it okay so that's pretty much clear so let's have a data block that contains all inputs and outputs in FP and that was not the case in FC you remember that so now we have to download OB 1 FD 1 along with it DB to do this simulator here we go what because if you will not download these three cabinets this program is not OK after that we will just download it from here also this one and then we can turn on the watch and you just see the magic okay if we have in one it's decided open tool is not easy we got an output right as because for our operation if any one of that input is high we will get an output let's give it is 0.3 here so if I press is 0.3 0.2 it's gonna turn on i beautiful do here is in 198 is into so that's pretty much it about function blocks and function codes you have clearly understand it will actually giving us a virginity where we are utilizing the code like we have you know for motors we have but you can say at least 10 to 20 networks there depending on how big is the motor so instead of putting all it will be 1 because normally be a up to know we were programming OB 1 so we cannot put whole plant in OB 1 right we have multiple areas multiple processes multiple machines running it there multiple you can say control loops to him to be executed in there so based on our need what we are going to choose here we have to choose you know selecting FB is people created these motors walls and like we we have control for example for certain application like boiler so we we will make different control loads in athletes and I've ceased to make of a program very much care in next session we will talk about a function block of scaling function we we just use it at the existing function library now let's think we don't have that how we can actually make that scaling function by using a formula and by making you know a function through FB RFC so we are going to utilize it next session a lot of things are coming up in upcoming sessions all you have to do is stay connected with idea Auto Academy YouTube channel and if you want to learn it would pull through the language your Hindi language we have another channel link of that channel is in the description of this video that's learn or omission with nomads don't worry you subscribe because we have to keep you know a lot of tension to that channel also a lot of things that coming up need your sports here too you know each the everybody in entire world was looking for the right skills he's not able to find that and with that message like wherever you are stay happy and take care of your lower [Music]
Info
Channel: IT and Automation Academy
Views: 35,939
Rating: undefined out of 5
Keywords: Function (FC) vs Function Block (FB) in Siemens PLC Programming, How to create FC(Function) on Simatic Manager for S7-300 or S7-400, How to create FB(Function Block) on Simatic Manager for S7-300 or S7-400, How to create DB(Data Block) on Simatic Manager for S7-300 or S7-400, What is DB, How to create Programming with function on Simatic Manager for S7-300 or S7-400, Function (FC) vs Function Block (FB) - PLC Programming (Siemens ), SIEMENS FUNCTION BLOCK, FB and FC in PLC
Id: nXnwlKLixbA
Channel Id: undefined
Length: 14min 31sec (871 seconds)
Published: Fri Feb 02 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.