C Scripts In Wincc Explorer | WinCC C script | WinCC C script | SIMATIC WinCC C Script

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hello everyone uh welcome to ipc's global channel youtube channel uh today we are going to learn about how to do c in which is explorer so let me move to the topic i'm going to create a new file so file new i'm just going to i'll give a project name is project test then i'm going to create a create then it will take some time okay okay the project says create a new file then here loading yes active mode and the active mode is there if you want to go to the run press active mode if you want to go to the offline then the active mode you can react with so i'm going to do the project computer there is there is a name my pc has a sdaf is there then double click go to the starter here global script runtime is there we have to enable this uh global search and group script runtime so that's the way the script is going to work then tag management when i go to a tag management tag in tag management then right click open the another window is going to open yes so you can create a tag name in internal text i'm going to create as as a switch um it will be like not unsigned bit it's a binary tag i'm going to give a binary so here on a lot of types of binaries so sorry tag is there so i'm going to give a binary text and then output then op this is also in binary type binary tags then increment inc i'm going to create another one increment the value it's in its uh is there is i need an unsigned link with that unsigned it is only positive value so i am going to get the 32 bit padding and sign in and then i'm going to create either more five tags in binary l1 l2 l3 so now it would be like l1 l2 l3 l4 and fine then all the tags will be like binary tags because l1 l2 is like a switch sorry output light so all the types could be binary tags okay so the tag has been created then minimize this we are going to do another one is like going to design a project like switch and light i'm going to go open a graphic designer and open so here we see this graph religion is that here we are going to design a put a switch uh lights and tanks and all the elements so i just save the file and go it is just save the file the graphic thing is open and the save option is there and runtime option also that i'm going to save the profile as a test project okay save okay then minimize uh then we are going to before designing you are going to do a script here yeah the here option is that global script the there are two types of script is the c script and a vbs script we are going to see how to do c script then open it [Music] uh i mean this is great i'm going to create a new file new action okay here internal function there is lot of option is that we are using only tags only so if there is any other letters in between that please delete and create you have to give a condition in integer um okay the tag management all the input type management and integer in small letter increase space sws which i'm going to take sw output and increment sorry inc command then i'm l1 l2 l3 all the tags okay [Music] so these are the tags i'm going to add this okay so here i'm going to get all the tags so we have to use the get tab built in uh uh mean to get a tag from tag management so if you want to add increment we have to use get double double word so sorry i'm just given the binary tag we have to change into unseen little bit uncertainty 32 bit okay close it minimize it i'm going to add switch sw is equal to get tab bit into the tab management use get that bit so that the diagnosis is there in a list list all tags okay okay going list of all texts go to the list of all tags here is stack is all the tags is there and then after here i can add sw because sign code together sw [Music] output is equal to get that bit tag name time selection and open output copy binary output and then click double click and working i get the exercise output then i'm going to get another one is increment it's a real time value so you have to add a git tag double bond then tag names tag selection and increment i can see unsigned it a bit okay then i'm going to another remaining tax level and l2 to alpha so all the tags will be like l1 is equal to tag tag selection this one okay okay then i matched i've just added l5 so you have to give the condition the condition will be like if if switch we saw then output is on i'm going to give like this so i start if i sw in open drag open bracket close drag in sw equal to double equal to 1 then you have to give a condition like between the flower bracket so this is to set output is one so you have to sit you use a tag bit so i'm just saying set attack bit double click and the tag name is output i'm going to attach the output so you use output output binary then okay so the value the value will change we have to uh tighten the output like uh we say we have to add one so i'm going to give the one okay like sorry is wrong this line replaced i'm going to replace it so i'll put one and just to become just to turn on this so that way i give a one so if the switch is off the output to turn off so i'm going to add another one more condition e sw is equal to zero as w is equal to zero then set dial bit second target output zero tag name is stack selection output the value becomes zero because we already have unloaded on this so we have to turn it off okay okay okay so i'm going to increment the tag i'm already give the condition if sw is equal to then well i hope already you know this condition uh end condition would be like double a double ampersand then i'm going to set increment like say double tag double word because it's a thread to build uh unsigned bit so that selection increment is uncertainty category then click on it incremental condition is like increment plus one i'm going to place increment class one and okay increment i double embossing comma increment plus one so i go and give a condition like the increment up to 100 then i have to add if condition if as w is equal to and so increment is equal to 100 and say it's called so i'll give a condition like speech switches on then tank increment 200 the l1 alpha is on so that's the way i'm going to write the condition so switch one is 100 increment and alpha is set tag set that bit is equal to turn on one so one with the switch is one then 100 reaches then alpha is going to be on okay so piece i'm going to delete the space yes yes okay okay so i i have added a few more uh conditioning to light one light to light three so you can see whether it's right or wrong uh then i'm going to add another one condition like image to decrement the value inc tag to decrement yeah the condition will be like switches on then increment up to zero where there is no negativity so that's why we give two decrement to zero increment increments decrement okay and when alpha is one so i'm gonna add this okay okay just spend time okay so set tag double word to decrement the tag name is inc using this 100 reaches value have to become zero so i inc minus one decrement one by one so that's y minus one then we have to check whether the program is shared or whether the program is correct or not so we have to compile it the compile option is just right click and compile it yeah that is now zero error in zero warning the program is right of things right so i'm going to save the project say the then action the file name is section i'm going to give that file a mass action so then we have to add a trigger name uh so right click trigger trigger name trigger timer and timer cyclic we have to add another timer so tiger ty trigger timer any of them you can give either view cycle then 250 milliseconds it will be refreshing every 250 milliseconds the problem okay i'm gonna play okay then i have to merge this program into the designer pro so picture selection dialog the the designer pages that graphic designer register the name is test project i'm going to merge it the program into the test project then okay again [Music] then recompile and then i'm going to build this to project so i'm going to replace this positive sen i'm going to design a project like i'm going to buy every elements are available in library the global library i'm going to take a switch now switch to stock [Music] button i'm going to take the sixth button six to switch and i'll switch sides to switch whatever placed it into the window then i'm going to take a light the light will be like circle so i'm going to draw it draw a circle then i'm going to add one more tank because i give a increment to a process so tank will be available in a rivalry then tanks i'm going to add a few more tanks i don't know which time i'm going to take it okay another one these are so let's take this one remaining i'll delete okay take this tank then i'm going to add few more lights l1 l2 i'm going to draw a circle to give a tag name then i'm going to add another tank under the same tank in rectangular shape so this one okay you have to give i will feel like to write a bit of read the tags so i'm going to binary upon change okay you have to [Music] i'm going to give you all the tag names the right real time value on runtime so that's why so i'm going to mention it as a switch switch which the the text is available invite static test you can use it i'm going to take this yeah i have done this all that i have and this okay so i'm going to give a diagonal means a switch the tag name is tag assignment uh in toggle you have to give a title so right click tag and switch binary tag change upon change two seconds into account chain so there are lot of times there then [Music] go to the light to give a color so go to the color and background colors give a dynamic direct tag name so here tag name is available in formula okay output the output will be like boolean now to other lag we're going to change boolean so if the condition is true the light will flow like green if the condition is false then the light will be like a red color so i'm going to give a red color then i'm going to check the condition is whether here and or not so no error okay no record then okay then finally we have to give [Music] tag or cement tank with the tag assignment maximum value is centered in minimum value zero you have to give a tag name in process give a tags then tag name increment inc change upon change to second input on and just forget about the light color i think light color to change into effects effects go to the effect color scheme you have to change yes into notes um so that's the way the output will be getting okay [Music] then you have to give a tag name in rectangular filling okay building our filling level is 0 to 100 dynamic fielding we have to give access we have the real time changing 100 so dynamically it will change it then we have to give a tag name in tag increment as upon change to second open change then because and i uh i give the tag name all the lights so then we go then save the project and we can go to the run board save the project i'm going to save it save the project yeah here i give the switch tag and output tabs and time tags also then i'm going to finally save it save then i'm going to arrive mode here and then it will be take some time loading okay the page the runtime page is what i'm going to just increase okay so when the switch is on the light is on i'm going to turn on the switch the light is on then the tank increment to 100 when the tank reaches zero the l one is on then when uh 25 raises i'll do is one when 50 reaches l3 is on i give the condition of the condition in script c script then when it switches to 100 the alpha is on okay then it will be like increment 200 and alpha is on okay so these are the condition i have done the uh system so when the switch is on the light up and the switches on the light down it'll be like so i'm going to rewrite the ivo field as a tank zero and i'm going to turn it off all the light as a zero then i'm going to then uh the processing again and the switch is solved the tank requirement up to 100 the light will be on all the level of light will be on so thanks for watching you guys um this i hope you have understand this script so you have to give like this um thank you thank you you
Info
Channel: IPCS Global
Views: 8,919
Rating: undefined out of 5
Keywords: simatic manager, siemens wincc, simatic, Wincc, siemens, wincc training, c script wincc, wincc c script, wincc flexible, c script in wincc, wincc tutorial, siemens c#, siemens s7, siemens plc, siemens wincc comfort v13, wincc scada, wincc vb script, siemens pcs7, wincc comfort script, wincc siemens, wincc tia portal, siemens s7 training, siemens training, wincc flexible course, siemens simatic, wincc course, wincc comfort scripting, siemens automation, ipcs global, plc
Id: a_PXt74tB5k
Channel Id: undefined
Length: 22min 34sec (1354 seconds)
Published: Mon Nov 22 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.