Are you ready to become a confident TIA PLC programmer?
Improve your PLC programming skills and become a confident TIA Portal programmer with clear and simple step-by-step video tutorials. Start building professionally structured PLC and HMI applications that are easy to maintain and troubleshoot. My online PLC training courses are short, hands-on, and to the point, with no fluff.
Take your programming skills to the next level and transform your career. Check out my courses now at www.plcskilltree.com and start building your PLC and HMI applications like a pro.
FREE GUIDE Just getting started with TIA Portal? Grab my FREE guide by clicking on the link below and learn how to structure your PLC application in TIA Portal like a Pro.
Hi David, The meaning of this tutorial is not to explain the application that I am using, it is to point out some important insights and tips on function blocks in general.
Depends. For small network edits (e.g. extra instructions in your ladder logic), PLC does not go in stop. When you start changing UDTs or DBs, it might go in to stop. But it will always tell you before it does. So you can decide not to go through with it.
you have an on delay time in your function block but you want to try a different value maybe from 75ms t0 5 seconds. then keep those changes when you find a comfortable fit. but temporary at first and on a live system.
1st of all - PRO never ever use LAD... just and only SCL. If you are using something else - you can't call youself a PRO or saying how PRO would do it. (other then SCL for PRO - it's 10-20 years ago was TRUE, right now - FALSE)
Haha, I strongly disagree but appreciate your honesty. The language does not define the skill level. Every language has its purpose, I happen to prefer ladder logic and been doing this professionally and very successfully since 2003 with industry leading machine builders. Your professionalism in PLC programming depends on how you can create modular and organized logic, NOT which language you use.
It can be done with Technology Objects as I've done it. However, in my instance it was still using Telegram 1, and it resulted in over simplifying everything. I will be using your method from now on, which I hope will give me more control. Thank you!
Dear friend... some of the blocks are already created in previously. So Need to create all by this session video itself. Then only easy understand this all
Hi Hans chris again 😊. I've followed your steps and i created the "Standard Vfd Control FB", i've never thought it would be this easy especially the abuse of UDTs. But i wanted to ask about COMMISSIONING (inserting the motor data etc..), do you do it as a second step or do you follow another method ? Thanks in advance 🙏
Hi Chris, My video about creating the software is the first step, before the commissioning. Then during commissioning you will need to setup the VFD - give it an IP address, configuring the motor data like voltage, current, rpm, power etc.... I typically get the motor data from the data plate on the motor (picture with mobil phone) and I use the setup on the BOP screen of the VFD to set the applicable parameters to the correct values. I also write down the motor data for each motor in my project worksheet, just so I have a backup.
1- I apologize for skipping ahead of the video i'am just a bit excited😋 2- It seems that my Noob brain and its short term memory had a misunderstanding. I thought that "VFD control FB + commissioning" was enough and forgot about adjusting the VFD's Parameters through it's BOP/AOP so it can be controlled by the PLC through PN like in our example. Signature NOOB_Lvl_ONE_THOUSAND
I appreciate the time and effort you've put into this. Pls keep pumping these kind of lessons as they are gold to us. But i have a QUESTION in terms of "byte swapping", would keeping the bits as you declared in the video instead of bit15 to bit8 then bit7 to bit0 affect the control of the vfd or not ?
Hi Chris, Thanks for your nice words, happy to hear you get something out of these videos. If you do not do the byte swapping, then your VFD control will not work (because your bits 0 to 7 will be switched with 8 to 15). Was that your questions?
I can't thank you enough for this PROFESSIONAL GUIDE 🤩you're truly a man of the FIELD. I have few questions from an AUTOMATIOIN NOOB 😋: 1- Why do we need to use "memories" such as "iLevel" and "xLowLevel" ? aren't these values taken from real inputs (tag table) ? 2- What benefits and oppertunities can we acquire by stocking an "input" in a "memory" instead of using the "input" right away (e.g water referrence in the HMI) or for e.g stocking the "true signal" that passed through "conditions" in a "memory" than transferring that to "output" ? 3- Do you do this by a simple "move" function or is there another method 🧐 As a NOOB i "Take" values from "inputs" directly and "Send" signals to "ouputs" also directly.
Hi Chris, Thanks for your feedback, love it! 1- "iLevel" and "xLowLevel" are part of the module data structure. And yes they are copied over from real inputs. There are a couple advantages to this. First off, it makes troubleshooting easier because all relevant data is easily accessible in the data structure. If you go online and open the DB where the module structure is situated, you get a great overview of what is happening in that module. Secondly, some inputs are being manipulated or scaled before they can be used (like e.g. scaling of a 0 to 100 degrees temperature sensor input). So instead of scaling this input every time that you use it, you scale it only once and add it to your module data structure. Now if you want to use it in another location in your PLC application, you can take the value directly from your module data structure (which is already scaled) instead of taking the input again. 2- Explanation is above 3- In case of simply moving the input, then yes a MOVE instruction will suffice. If you need to scale the input, then you might need a CALCULATE instruction, or even a small FC that takes care of the scaling calculations. I would recommend using an input (or an output) only 1 place in your user application. That input or output typically belongs to a specific module. So add it to that module's data structure. Furthermore, inputs and outputs should never be used directly in re-usable function blocks, always assign them to the Input or Output of the block interface. Else your function block is dependent on those exact inputs or outputs and cannot easily be copied to other projects or cannot be called multiple times in your application if needed. I hope this helps clarify things. -Hans
There’s a complete lecture in my HMI course dedicated to system diagnostics. I’m only using OB1 in my courses but I might update my premium content with interrupt OBs.
I disagree about it being complex. It’s actually straightforward with simple steps. If you’re used to building structures for your plc applications then this example is relatively easy. Can you send me a link to the library that you are mentioning?
Hi. Your videos are awesome. Im interested in your courses but i want to know what are the knowledge i will learn in the course. I already bought courses before but i didn't expect what i need. Thanks Hans
Thanks. You will learn how to build structured TIA PLC and HMI applications from scratch, not just loose concepts or isolated examples - complete and fully functional applications. If you go to my website www.plcskilltree.com, you can read much more about each course or bundle and there are plenty of testimonials from people who took my courses. That should give you a good idea.
You were a little quick on showing your statehandler fb. I couldn't see the whole code and I didn't understand, how you have an integer indicating the state, when all your states are boolean (at least if its the same as in the "how to organize your project"-video)
The integer is used as the state representation as a number. It’s used for defining the conditions for switching from one state to another. The boolean states are status flags for the actual states. You would use those booleans in other parts of your logic. Hope this clears it up.
Being a huge fan of the TIA portal, I find it pityful that the inbuilt PLCSIM can't perform any communication to 3rd party applications. In my job I also need to use Schneider Electric's mediocre Control Expert IDE and their little simulator allows communication which is a must for our company. I fear that the high license fees for TIA and its PLCSIM Advanced will eventually make us switch to Schneider and its Control Expert and Automation Expert
I think that’s maybe a bit much to ask from a PLC simulator no? 😃 S7-PLCSIM allows you to simulate both PLC and HMI super easy with a click of a button, even simulating servo drives. I just used it to run several servo axes in positioning tasks using only my laptop.
@@PLCskilltree apparently not, if the Control Expert simulator manages to deliver this feature. The CE simulator has other weaknesses like wrong memory mapping sometimes but that's another story
@@simxschl I have experience with Rockwell and Siemens simulators and the TIA S7-PLCSIM is by far the easiest to use with most features. I do not have experience with Schneider simulators so you could be right, it might be better. But it doesn’t help you with simulating TIA Portal applications , which is what I am interested in 😃
problem of the FB's is that in fact you have double memmory usage. Each input and output are stored in instance memmory. You have UDT as "iq" parameter and you store same memmory in global variable as well in your instance..so you expend you memmory usage. So i exceed the work memmory limit by creating "big" projects ( 50 valve's , 20 motors, 40 Switches etc...) Solution: replaced all to the FC's and use the counter for count the time and its reduce my memmory usage at least to 40%... :) I still think that the best praxis to use the FB's only in OOP (example TwinCat/Beckhoff) there you can create the object(class) and work almost without "global variables" and you will avoid double usage of the memmory as well many benefits from OOP. Waiting Simatic AX
Using the InOut of an FB only passes the UDT through to the FB, like a gateway (=call-by-reference). Using the Input and Output of an FB required copying to and from the instance data of the FB = requires extra resources. I only use FCs for small repetitive tasks that don’t require static memory, like small calculations, conversions, or scaling operations. I use practically only FBs in my projects (and they get very big) and I never had problems with work memory (retained memory is a different conversation)
@@PLCskilltree I have 2 seperate projects. One has only the PLC and the other has only the HMI. Now I want them to be in the same project so I just copy the HMI from the HMI-Project to my PLC with drag and drop. After that I set the PN/IE connection for them and try to simulate the programm. THe Problem is that on my screen I only see for example #### instead of the value that I drag and drop from a data block. So I-m trying to solve that problem. Maybe you could help me ?
@@elnino9139try and check your PG/PC interface (start typing “PG” in the start menu of your Windows). Make sure it’s configured with the correct network adapter. In case you’re running a simulation on your laptop, it should be set to PLCSIM. In case you are downloading to a hardware PLC and run a simulated HMI on your laptop, it should be configured with the network adapter that you use for downloading to your hardware PLC. The hashtags indicate that there is no connection between your HMI and PLC. Check as well if “Connections” is set up correctly in your HMI application.
@@PLCskilltree Thanks for the helping. I have figured it out. The problem was that I chose in the loading plc menu X1 instead of PN/PE_1. And then it forced me to type some password for PLC and I forgot. Thats a bit rough but I think I will copy the Data seperately to my new plc in another project. Hope it will work as well
When i follow these exact step creating HMI tags and connecting them to my PLC tags via HMI_connection its requires an address for the tag even though i am using datablock tags. I've tried to find a way to change absolute access to symbolic access but the program wont let me and doesnt even offer the possibility. In my global datablock properties the "optimized" option is grey and i cannot activate it. I am using a S7-300 PLC. Can anyone help me with my problem?
Primary reason for me to use FBs, I hate merkers. But that's more or less a 'how to structure this' issue. I want to use as less merkers as possible. Regarding the local variables of the FB, I always use the following notations: Input : i_"Tag_name" Output: q_"Tag_name" InOut: iq_"Tag_name" Static: "Tag_name" Temp: t_"Tag_name" Constant: "TAG_NAME" If your code is clear, everybody can see if it's a binary value, int, word, real, etc, but it's hard to see the difference between a IO, static or temp variable.That's why I use this system. But every structure is better than no structure. Keep up the good work! Regards, Alex
Thanks for your explanation Alex, I almost use the exact same tag name convention as yourself 😃. As for merkers, you are correct, they should be avoided at all costs. Build structured data in Datablocks instead.