PLC Programming | Allen Mupandasekwa | Skillshare

Playback Speed


1.0x


  • 0.5x
  • 0.75x
  • 1x (Normal)
  • 1.25x
  • 1.5x
  • 1.75x
  • 2x

PLC Programming

teacher avatar Allen Mupandasekwa

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Watch this class and thousands more

Get unlimited access to every class
Taught by industry leaders & working professionals
Topics include illustration, design, photography, and more

Lessons in This Class

    • 1.

      Introduction

      1:21

    • 2.

      PLC Application Example

      5:31

    • 3.

      Software Installations

      11:50

    • 4.

      Communication Manager Setup

      26:12

    • 5.

      Contacts And Coils

      49:12

    • 6.

      Timers And Counters

      32:36

    • 7.

      Arithmetic Operations

      39:19

    • 8.

      Conclusion

      4:10

  • --
  • Beginner level
  • Intermediate level
  • Advanced level
  • All levels

Community Generated

The level is determined by a majority opinion of students who have reviewed this class. The teacher's recommendation is shown until at least 5 student responses are collected.

85

Students

1

Projects

About This Class

Learn the fundamentals of PLC programming using Delta PLCs and DiaStudio software in this beginner-friendly course. Whether you're an aspiring automation technician, an engineering student, or a hobbyist, this class will guide you step by step through the basics of PLCs, digital logic, timers, counters, and arithmetic functions. With hands-on examples, real-world applications, and easy-to-follow visuals, you’ll gain the skills needed to start programming your own industrial automation systems with confidence.

Meet Your Teacher

Level: All Levels

Class Ratings

Expectations Met?
    Exceeded!
  • 0%
  • Yes
  • 0%
  • Somewhat
  • 0%
  • Not really
  • 0%

Why Join Skillshare?

Take award-winning Skillshare Original Classes

Each class has short lessons, hands-on projects

Your membership supports Skillshare teachers

Learn From Anywhere

Take classes on the go with the Skillshare app. Stream or download to watch on the plane, the subway, or wherever you learn best.

Transcripts

1. Introduction: Hello, everyone, and welcome to the POC programming course. My name is Alan and I'll be walking you through the entire POC programming course. In this course, we'll be learning about more mostly on how to program write programs for POCs. A POC it's a programmable logic controller that is used in a lot of industries. Now, if I'm to type POC and then we go to images, we can see that there are quite a number of POCs that are available on the market. We've got Siemens, we've got Mitsubishi, and the Siemens again, and then we've got Delta, we've got Alan Bradley, there are quite a number of POCs that are available on the market. And also, we've got the Delta PLC. If I'm to type Delta PLC, we can also see some kind PLCs that are available. As you can see, there is the Delta PLC. In this course, we'll be focusing on the basics and the fundamentals of PLC programming and we'll be mostly focused on programming the Delta PLC. I'll explain in the next class, enjoy. 2. PLC Application Example: Hello, everyone, and welcome back to our POC programming class. In this first class, we are going to, I'm just going to be giving you a basic introduction on PLC on PLCs. PLC is the abbreviation that stands for programmable logic controller. A PLC is also referred to as a CPU which is also an abbreviation for a cenral processing unit. So this processing unit, is also called a CPU, like I said, which also is the other name that is given to PLC. So the reason why a POC is also referred to as a CPU is because it also works almost the same way as our normal CPU, our normal computer. So what it does is a POC is a programmlogic controller. What it does it is inputs and it also gives outputs. So, it gets the inputs from a different sources, and then as the central processing unit, it processes all the data that it gets from different various inputs and gives an output depending on how it was programmed. So in this course, we'll be mostly focused on writing the programs that will respond to the inputs and give out feedback or give out an output. So let me just quickly go to web page here, where I've opened a document that is from the Delta website. You can visit the Delta website and go to the application center. So, um in this application sender, that's where you can find this Delta labeling machine solution. So I'm just going to quickly run through the purposes and the uses and applications of the PLC. As you can see, this is our PLC. So on this actually text that I have in front of you right now is we have a PLC that is connected to different devices. If you have industrial background, you already know what these inveters are and you might even know this eth kit connection. If you don't have a background in engineering background, don't worry. I'll explain. As you can see, we have a Delta controller that is linked to the sevo drives and also these inverters. What it does basically is this POC controls the operation of the inverters and the SevO drives and also it's linked to this HMI. This HMI is like a screen whereby a user operates the machine so this interface it's an HMI, which stands for human machine interface. So, later on, we will also learn how to program and design programs for the HMI and also be able to learn how to link them to our POC program. So the reason why I opened this document is to show you just a brief application of POC. As you can see now, we've got a flow process for the labeling machine. We've got the injection part where they make the bottles and the scrambling and washing where they wash them, and then we've got the filling capping, labeling and packaging. So in all these steps, the POC controls every step of this process. So as you can see now, this is where by the start, the feeding bottles, spacing bottles, calibrating and all that. So each and every step of this machine it's broken down and written as a program inside the POC, which controls each and every equipment that will be linked to your POC. As you can see now, as I've shown you earlier on, we've got the control, we've got the devices and the info. This is whereby the user interacts with the machine, the HMI, the CPU is the brain of the machine. So, um, I can say this is basically an example, a good example of how a POC operates and where it is used in the industry. So in the next class, we'll start by setting up and learning how to write programs for the POC. Goodbye. 3. Software Installations: Hello, everyone, and welcome back to our POC programming course. My name is Alan, and for those who are joining us in this class, you can feel free to watch the earlier videos where I was explaining about POCs and giving just a basic introduction on how the POC operates and the applications of the POC. So right now we are getting started with our POC programming. So what you basically need for POC programming is a laptop, preferably any type of computer that you can have. And the next thing that you need is the programming software. So I'm just going to quickly show you where you can download the software programming the Delta POC. So you can open your browser and then you can just type Delta Sorry, you can just type DIA Studio. So DIA Studio is integrated software for programming the POC ETS code, various sections where depending on the device that you want to program. So as you can see now, we've got the DIA studio here and within the DI studio, we've got DIA selector and we've got the DIA designer. A DIA selector helps you to pick devices for different types. You enter your number of inputs and your number of outputs and it helps you to select or pick the right device depending on your application. Then we've got the DIA designer. This is where we're going to be starting from. The DIA designer, this is whereby we write the main program that runs or that allows the PLC to operate different equipment. So in DIA designer, that's where we're going to be doing most of our programming. Then we've got the DIA screen. Like I said in the previous video, there is going to be a time where we will be also learning on how to program, the Dota HMI. Delta HMI is a screen that is used for human um, supervision and monitoring and also and also communication with the machine. So it's HMI as it stands for human machine interface. It's basically a user interface that allows an operator to run a machine that is using the PLC. So, for now, we just focus on the DIA designer. This is our starting point. So you can download and create an account on this platform. So Underdwnload, Sender that's where you can just go to Software and then you can see your software different kind of software and this is basically where you find the software that we need. Okay, so Nightfa the first software that we're going to need is called uh DIA Installer. So DIA installer is a installation package where we will be where we need to which we use for sorry for downloading all the packages that we need for programming our PLC. So you should go to DIA Studio Smart Machine suit, let's just wait for it to finish loading. Okay, right. So this is where we get the link for us to download the DIA installer, so you can just scroll down and go to the Download Center. Let me just quickly go back. Yes. Now you can click there, and this is whereby you be linked to link directly to your link for downloading the DIA installer. So remember, as I was explaining DII studio, it's an integration of different various software that are used for programming Delta products. So now you go to software. That's where you need to download them the DI Installer software. So I'm just going to click the wait for it to load. So now after clicking it will ask you to log in or sign in. But you don't really if you don't have an account, you can create an account. It's completely for free. You don't need to pay anything. So you enter your email address and your password, then you sign in. And then from there, it will allow you to download the DI installer. After downloading the DI Installer, you are required to to install after installation, then you can download your software. So I'm just going to quickly show you how you're going to download the software after installing. I'm just going to close the web browser now and search for my dear installer. So I'm just going to type DI Installer. So there you can see the DI installer app. So I'm just going to quickly click on it. So just wait for it to load. It doesn't really take time, and then we can just close this. I'm just going to click on don't show this guide wizard again and then I close it so that it doesn't pop up next time when I open my DI installer. I recently downloaded my software, so they're fairly the updated versions. So now you can see on DI installer, we've got this left tab where we've got all apps installed apps and updates. So on apps, so if you are using it for the first time on installed apps, you won't see any um applications here, you have to install first. So like I said, we will be mostly using the DIA designer software, in our course. So so once you open the DI installer, then you have to download DIE designer. So for you to download DI designer, you can go to your file right. Let me just maximize it. You can go to your file right here because I've already installed it, that's why it's saying launch. But if you are installing for the first time, it will show you download. Just click on the button and follow the steps. After downloading, that's need to show you launch after downloading and installing. Then our next software that we need after downloading DI designer is called Comga. Comga as you have noticed before, it was not there on the website. Basically, what Comgia does is that it establishes a communication between your computer and your POC. Whenever you write a program, there's need for you to send that program to the POC. Now Comgia is your intermediator between. Uh, your computer and your PLC. So it's a communication, it's a communication software used for establishing communication between your PLC and your computer. So after installing Comgre and DI designer, you'll be ready to start. So now, what I'm going to do now is I'm going to show you on Installed tab if you click on Installed tab open another window, there you can see all your installed software. So as you can see on my side, I've installed Comgire and I've installed DIA designer, and I've also installed DII screen. Remember, when I say DI screen is for programming or designing the screens and setting it so I've already installed the three software. So if you can also download and install it because we will need it in the future. Then so once everything is installed, you can find it on this window. Then there is also an update page. This is whereby you find the updates for your downloaded and installed software. So currently you can see that there are no updates, so that means we are already up to date. So whenever an update is released, you can directly see it on this tab. So right now, what we're going to need to do now is to start our POC programming. So in this class, I've explained how you can set up and download all your software. So let's just quickly go back to apps, and then I'm going to click Launch. So this is where we start. So before you do anything, you need to first establish the communication between your computer and your PLC. This is required because after writing the program, you're going to need to test it, and you need to simulate it also. So in Com Gia, that's where we will create our communication driver. So after launching it, you can see it opens up this window. So in the next class, we're going to start by creating a new driver. So thank you so much for watching. I'll see you in the next class. Goodbye. 4. Communication Manager Setup: Hello, everyone, and welcome back to our POC programming class. My name is Alan once again and we just getting started with our POC programming. Remember, in our last videos, we were just explaining how POCs work and were also working on installing our all the software that we need to get started. Now that our software is installed, now we can start our PLC programming sessions. And in the last video, I had opened Com garra, which is our communication manager for establishing the communication between the computer and your PLC. Okay. Because the software doesn't really communicate directly with your POC, it just needs an intermediator between for sending software to the POC or extracting software from the POC. Let's say you have written a programming for POC and the machine is running. But in the future, you decide to change the program, you can upload the program that is in the POC and make your changes and then you download it back. So without wasting much of the time, let's get started with creating our driver. This is our communication driver that helps us to communicate with the POC. So if you go to our top left corner here, you can see this Ed, you can see this edition button, the new driver. So you just going to click there. And then after clicking, you can see now in this window, we've got this page and it got quite a number of settings, do not worry. I'll explain each and every setting. Now you can see after adding it added a driver. This is our initial driver and currently you can see in the bracket in the square bracket is Rs two, three, two CO pot comp five. Don't worry about it. I'll explain just now. So on the first tab, you can see now we have the driver and it's saying not yet saved. Meaning to say, we haven't saved our driver yet. So if I click on save driver, you can see that disappears and even our buttons gray. So yeah, so after creating a driver, you definitely need to save it. Okay, so on this part, we're just going to be working on, we're just going to be playing around with these three buttons around here and this tab and this tab as well. So the add new driver is for adding a new driver, delete for deleting, modify for changing something on an existing driver. So now if you go to this table, you can see now we have driver name. Driver name is where you give a name for your driver, is it clearly states. So what we do is maybe we can just name it Skillshare, for interest, let's just name it Skillshare. Basically, you have to name it according to whatever you're working on. For example, let's say we are building a packaging machine, and we're creating a driver to communicate with the PLC that we will be using for that packaging machine. So normally we do this because every time whenever we want to communicate with that setting machine, we don't really need to create a new driver. We just go to the existing one and use it. We don't necessarily need to make a new driver, and it also helps you to keep the settings for your driver. So now after naming it, so we just named it Skillshare, and then we press Enter, right. So after that, then we go to the connection setup. So this is very important now. This part is really important. So the communication setup or let's say the connection setup, this is the connection type that you'll be using to communicate with your POC. So we've got quite a number of communication protocols that are available in the industry. So one, let me just explain the ones that I have on the software currently. So we've called CEO. So CEO, that's our two wire interface like RS two, three, two, RIs 48, five, RIS four, two, two. You can see from there that's our CEO communication. So it also depends on the cable that you have. For CDO communication, you be communicating with a POC that allows you to communicate with it via CDO and you'll be also having the cable for CO communication. Then the next one is USB. So I know most of us we understand USB much better. We use USBs on our day to day basis. So this is where when you're using the USB cable to communicate with your POC. Let me just quickly go back to our browser and show you something. I'm just going to look for maybe do AS 200. Right and go to images, right. So images, where can I I'm just looking for, this is the best picture I'm looking for. So now you can see that we have our POC there, and this here is called it here. Then we've got a small portion here. This is for the USB. So this is I can't remember the name of the type of USB. Is it USB A or B? I'm not really sure. You can just comment in the comment section just to let everyone knows the name of that USB connection name. Okay. So let me just look for a clearer picture. I think this one is quite clear. You can see there is a USB port and then we have ethernet port. So Duta POCs come in different sizes and ranges. So of course, this AS, for example, ASCs range, it's quite high end POC used for complex processes. So there you can see another AS. They come in different types. So this one is a bit more clearer than the previous one. You can see that USB there so let's go back to CGR. Then under USB, before we go to USB, let's just go back to CEO. Under CEO, when you select CEO, then there is the connection type. You can just choose General. Then HMI when you're using HMI. Then, um, these settings normally we just leave them like this but you can change those. The connection retries, it means that it tries three times when it falls. If it fell once it tries again until it reaches the number three, then it no longer tries. Then the connection timeout when you try to connect, within this time, it should establish a connection, but if it doesn't, then within this time, they need to say a connection timeout or fail to connect. Then on these settings we com pot. So whenever you are using ARS 232, when you connect to USB or for ARS 232, it will be allocated a communication pot, so you have to pick it from here. If you don't, you can refresh, and then you can look for it there. So now that I don't have anything, I can't pick anything right now. So yeah, this is where you pick the communication pod that has been assigned to your cable, your RS 232 or RS fight five or 422 cable. Then we've got mode. Mode, this is whereby you select the mode of CO you are using Aski or RTU. Then these are the settings. Bwrate, we've got all the bow rate settings there, data length, parity, and the stop bids and then we've got the ID. So you can set up these settings if you know the settings, but if you don't know them, you can just use the auto Detect. This will automatically detect the settings that are available on your POC and then you can connect. Once you pick the POC, then you can click Save and save your driver. Now we need to move on to USB. USB is my favorite. It's the simplest communication that I prefer because it doesn't come with a lot of things. Okay. So USB you just click USB. As you can see, there's nothing there like the CEO, so it's USB USB standard USB, and we've got our response time, and we have got also the communication pot. When you connect your USB cable to your PLC, it will be also assigned a communication pot, so you need to select it. Or if you don't see it, you can just click Refresh and then it will appear in this drop down textbook. And then you can also set up this depending on if you know the settings, but if you don't know them, you can just also click Auto Detect and then the software will do it for you. After detecting the POC, you need to save. After saving, you have your driver. Then we move on to ent. Ethernet is also my favorite as well. When you're using ent cable, when you have an ent cable. Let me just quickly go back to the image you can see we have an ethnt slot there. So POC don't have that ent slot, but mostly the new AS series going up as they've CT this option for ent and USB even RAS ARs 485 at the bottom, sorry. So yeah, once you're using ethant, you have to pick the enet option there. Then on type, you use general. And then on device type, then you can use what? Delta. But if you're communicating with other alternatives like ethane IP, you can just pick ethntiP. But for us we use Delta because we are communicating directly with our POC. So when you choose the Ethernet, you can go to the Ethernet card. This is whereby you choose the ent card on your computer. So it differs with computer. So for me, my ent card is I use the real TSBFEFamily controller. And so, yeah, this is what I will pick and this one is the IP address for my computer right now. So one thing that you must note when you're communicating with the POC via the ent option, make sure that your POC has got the range is in the same range with the POC that you're using. So if it's not, you can also change it. So let me just quickly show you how you can change the range. So if you press your Windows button and then go to Control Panel, and after Control Panel, you can go to Network and Internet and you go to Network and sharing Center. Then we go to change adapter settings, and we go to the Ethernet. Okay, where is my Okay, there it is just that I'm not connected to any Ethernet cable right now, so you can't see anything. That's why we have an X there. Then we right click and go to properties. Go to IPV or Internet Protocoson. This is the IPV four. And then you select there. You can see now I'm on DHCP, but then you can just use the following IP address. There you enter your IP address, put it in the same range as the POC, you put your subnet in your gateway, and then you click Okay, and that's it. So after doing that, you're supposed to also refresh and yeah, after refreshing, your IP address, yeah will change. So this will be the IP address of your computer, right? So, um, so some of you may say, Okay, how do I know that I'm in the same range the moment let's say you connect your cable to the POC and you now want to connect, you can just say search. When you search, the POC will appear here. After appearing here, you see the IP address there. Then you can compare this address and the address that appears there. And if they are in the same range, there's no need for you to change. But if they are not in the same range, you have to put your computer in the same range as the IP address of the controller so that it becomes easier for you to connect to it. So basically, after searching, it will appear there, then you can select and you can save. So this is pretty much easy. Or you can d manually without searching, you can d manually if you know, right. So once you say d, then this web and you can change and edit, right. So now I'm just going to delete everything. If I say search right now because I'm not connected, then it will give you an error, right. That's it for ent, and then there is direct link. This direct link is used when communicating to the POC via an HMI. When I say via HMI, it means that we have some setup like this. Let's just quickly go back to this page. Let's say computer is directly connected to the HMI. Then from the HMI, it goes to the POC. This whereby you use that direct link. Direct link means you can access the POC but with the HMI in between. What you need to do is to change the settings on your HMI to CDC mode whereby that gives you access to the POC. Once you've done that, then you can be able to to link to your POC. That's when you can use direct link. Let's quickly go back to Comga So now, what you need to do is to select the click directink and then you choose the mode that you are using CDC mode mostly when you're using the HMI, then you pick the options there. So whenever you have in CDC, whenever you have your HMI CDC mode, you will see this list will be occupied. Since I'm not connected to anything now, that's why it's empty. Then we've got the last one, the simulator. This is the most interesting part. So like I said before, I chose Dota because it doesn't require you to have the POC, it doesn't require you to buy the license. So the simulator part allows you to write programs and simulate them without the POC. You use your computer uh, is your simulator. You don't necessarily need to buy a POC. So for those who are thinking, where can I get a POC out? Do I buy a POC? Do I really need a POC to start the POC programming? No, you don't really need it. So you can just use the simulator. This is where we will be doing most of our POC programming, once you click Simulator, this page will show, and under the type, you can see the simulator type. So simulator type, it's a simulator type based on the Delta POC range that you want to simulate for. So we've got the DVP range. You've got the AH range, you've got the AS range. So the DVP range is the AS versions of the Delta POC, and then we've got the AH, which are the high end POC. Then we've got the AS range starts 100-300. This is the AS range. Let me just quickly go then this is the AS range and then we can look for the Delta DVP. There you go, those are the DVP range. They also come in different sizes. We've got these black ones and we've got these white or creamish ones. Right. Then we also have the AH. Let me just show you the Delta AH. So these are the AH CDs. There they are high end POCs for Delta by high end means they've got better processing power and they are a bit advanced. Alright, so let's quickly go back to our com g. And so for us, we will be focusing we'll just focusing on the AS. We can just pick the AS two tranche. This is where the simulator type we will be using. So and then the pot, we just leave it like that. And after picking the simulator type, we can now click Save. All right. So now you can see once I click Save, we have saved Skillshare. Our name is changed here and we have Skillshare on the list. So if you create another driver, it will show underneath this. Let me just quickly create. Then you can see there is our new driver, so we can name it whatever we want. We can say maybe Ethan it. Right. And we can now say maybe let's pick the ethant there, and then we say save so it can show there. Now I'm just going to quickly delete it. Yes. So now we've got our simulator there. Then the other thing that I want that I want you to take note is that this simulator, it's indicating stopped. That means it's not running. It's there, but it's not running. We've created the driver, but it's not active. So what you need to do is to just click on your simulator there and you right click and say start. When you say start, so this is the first time we're creating this driver, so you'll be prompted to also allow for public and private network access. So let's just say allow there we go, and now you can see that it's indicating start, that means it is running now. The next thing we need to do now is to launch our DI designer. Maybe when I say DI designer is whereby a software for writing our programs. So let's just wait for it to launch. It might take some time. Okay. Let me just Search TIA designer that is It's just that it's opening. Okay, so this is what you will see. So now we need to as you can see now, it's in Chinese. You can just change it to English. And so this is the first page that you see when you install your DI designer. There is the wizard, save or wizard. This is for the invaders and the saves. And then we've got the workspace, the basic design, and then we've got this project organization, too. So since we're creating a new project, let's just use this but let's say new project. Okay. You can also see that we've got the project wizard also here. Our settings for setting the language device, repository device list, ETC. This is more advanced options for ADS files and EDS files. We can open En IP, Ether cd ETC, but we'll be just playing around with this for now. We'll explain as we go further with the class. So now we have open project, open example project, new project. So for us, we need to create a new project. So ours will just name it Skillshare again. So there is our project, and then type let's just call it a standard type, and then you can select your fold the way you want to save your project. Then author, this will be maybe the writer of the program. You can just save your name, the company whatever company name that you have let's just say Alan maybe automation. That company. Then you can describe you can just write the description of the program that you're working on. Save noes or anything here. After that, you can say, okay. You can just click. Now after clicking Okay, it opens now this interface. This is the main interface. On this interface, you can see there's quite a number of options, but I will explain a lot of things as we go further. Most of them, we just need to close them since we're not going to really be using them now. You can just click there so that it automatically hides. The options. So now what we need to do now is to start the configurations. So we'll continue in the next class. For now, we'll end this class here. So we'll see you in the next class. Goodbye. 5. Contacts And Coils: Hello, everyone, and welcome back to our previous programming course. As we continue from where we left off, if you're joining us for the first time, please feel free to visit the earlier lessons so that you can also learn what we've discussed before because some of the things we're going to be talking about in this class will be referring from the previous classes. So feel free to go through the previous classes and you can always catch up with us on this tutorial. So in this class, we created our first project in our DI designer software. And in the other class we created the communication driver for our simulations. So now, what we need to do on the projects explorer. So this is the projects explorer section, and on this side, that's where we find find and replace and other libraries in the toolbox. So the next thing that we need to do remember on Com Gia, we created a driver. So let's just quickly go back to the Com gire, and you can see now that we had chosen the H hundred simulation type or the simulator type. So the AS 200 is a POC type that we will be using for simulation. So basically what it means is this simulator is actually simulating the AS 200. So and we already started our driver, you can see now it started. So what we need to do now is to go back to DIA designer and under Projects Explorer, we need to add a device. So for us to add a device, we just click on ED device, double click, and there you can see now there are different kinds of devices that you can add Remember, when I said the DIA designer software or the DIA studio package allows you to work with quite a number of Delta controllers and Delta electronics components. So on this page, you can see that you can add a controller. You can add a Savo drive, you can add an inverter. You can add a temperature controller. So they've got quite a number of temperature controllers that you can add. So our first for this class, we will be focusing on the controllers, the CP, the POCs. So we just click on Controller. Then we go under S 200. Remember, we're using the 200 simulator. So if you picked the S 100 or the S 300 or the DVP when you're creating your simulator, you just make sure that you pick the same type or the same range that is equivalent to the simulator type that you have picked. So for me, I picked the S 200. So what I'm going to do now is I'm going to just pick any of these. So I'll just use the AS 228, P. Okay, I will just pick this one, the aS 228, P. All right. So now, okay, maybe before I pick the POC, I'm just going to go through all of them and show you some of the differences that you can encounter when you're working with the POC. So I'm just going to just click on the first one. So on the first one, if you click, you can see there's a product pit and there's a description. So you can see that there is it gives you the description of the POC. So basically, it's CPU module, and it's a PNP output type, and it has got 18 inputs and outputs, which is eight digital inputs, six digital outputs, and two analog inputs plus two analog outputs. So if you were to add, we've got eight, and then we've got um, 16 and plus the two, then we've got 18, 18 IOs inputs and outputs combined, and it just got up to ten, 24 IOs. I can work up to 1024 IOs and it is the removable terminal blocks. These are the terminal blocks, and three X is output, so you can control three X is maximum with this POC. That means if you are maybe doing motion control, the maximum number of Xs that you can control, that's the X, Y, and Z, that's three. And we've got four highpeed counters. So this can incorporate high speed counting. So that means whenever you want to use them and code as you can use up to four. And it has got a slot for an SD card, and it also allows USB Ken to rise for five pots, and it is one ent pot. If you just go through all of them, you can see the different descriptions all v all these POS is vary depending on whatever the person needs. Remember this one PNP output, the bottom and it has got the really output. Then the third one is gotten NPN. The PNP and NPN outputs are transistor output. So transistors are used for first switching. Let's say you want to switch maybe you want to send pulses to a stepper driver. That's when you use the PNP or NPN output, which are transistor output. Re outputs are basically used for just normal switching, slow switching. But for f switching, you need to use the transistor switching. Then we've got the 228 it is also P&P output, but the difference is that it is 16 digital inputs and 12 digital outputs, it doesn't have any slots for analog inputs or outputs, and it can control up to six Xs. And same applies with the AS two to eight code really outputs 16 and 12, no analog inputs or outputs, and it is a maximum of four high speed counters, but it doesn't say anything about the Xs. Basically, when you want to do motion control, you definitely do not really need to use this POC type. So like I said, I was going to pick this one since we are mostly not going to need to use any of those functions. If need be, we just change to whichever type we need. Which isc whatever we need. So right now, what I'm going to do now is I'm going to just rename our device. So you can have multiple POC types in one project. So each POC can be representing a different section. So sometimes when you're naming these devices, you name it according to the you name it according to the part which the POC is controlling. For example, the setup that I initially showed you where you are maybe designing a label printer. So we've got the packaging, we've got the pecking, you've got the printing. So you can just name it according to the department where it will be operating in this phase for packaging and just name it as packaging POC and packing POC something like that. For our case, I'll just name it Skillshare. I'll just say Skillshare. Sorry about that. Okay. I say, Skillshare and quantity, it's one. Then we say, Okay, Ed. Now then when you press Ed, it's going to try to just load for a few seconds and now you can see that we've got our Skillshare PLC right there. So after adding your PLC, you can even go back and add another one that you now what you need to do now next is to just click this arrow and then you get the drop down page. The next step we need to do now is to establish the communication between our POC referring to our simulator POC and our computer. So currently, since we're not using a physical POC, I will just demonstrate on how you can do it. But the same procedure that we're going to take now is the same procedure that we take when you have an actual PLC. So the next thing is to go to communication settings, double click there, and then you can see that already our driver is already added here. So now what you need to do is to say connect. So this is the driver that we created initially, if you remember, if you say connect, you can see that it indicates connected. If you go to the communication manager, you can see if you go to the communication manager here, you can see that our driver is running and it's named Skillshare. Now let's quickly just go back to DA designer and we close here. All right. So now you can see this is connected in the screen. Now what we need to do next now is to just go to programming. If you go under programming, you can see that we've got Library manager, I've got global variables, and this is where you declare your variables. Global variables are variables that are used anywhere else in the program. So if you declare your variables in there, you can use it wherever you want within this program. So now what we need to do now is to go under program there. So under program, just right click and say Ed program. So when you say ED program, you see this window that pops up. So its name is initially POU one. So what you can do is you can just name it whatever you want. So you can just name it as maybe the main program. So under languages, we've got quite a number of languages whenever when we're programming a POC. So there's ladder logic. There is structure text, the sequential function charts, C language, and we've got continuous function charts. So what we need to do now is to pick the language that we start with. So for now, we will start with ladder logic or the ladder diagram. So we pick the ladder diagram and under type we just leave it as free wheeling task, we leave it at free wheeling and then after that, we click Okay. Now what it does is it creates now the main program. You can see under program, then the Wave code, the main UF also the capability of adding other programs inside. So you can just right click and add another program and then it will be also under this. This is also a way of structuring or organizing your program in your project so that it becomes easy to read. As it becomes organized then we've got this option for function blocks which we will look at the future in the future classes. Then we've got the rest of this we also look at the upcoming in the upcoming classes. Now, what we need to do, let me just quickly drop this down so that we can have a bigger view. Right. So now, what I'm going to show you is how we can now start writing our dology programs. So this is what we call a network. So this is a network one so far. So you can add or delete a network. So if you want to add a network, you can just press Control I. So you can see now we have two network control I, we have three networks. So you can just delete in a network and and for you to add a network on top, you can press Control Shift I at the bottom. Sorry, you press Control Shift I to add a network at the top, you press Control I. That's how you add a network. That's the shortcut for adding networks. Now, if you look here, we've got this part. This is also a place for adding variables. But when you declare variables here, they will only be used within the main function that we've opened. Now what we need to do now is to just start writing our program, and these are the tools that we'll be using. In this first example, first programming class, I think we just start with the contacts and the outputs. And the basic functions that are maybe I can say the fundamentals of POC programming. So if you go to this option, if you just click on the RO, you will see that we have got different types of conduct. I'll just go through all of them and explain what they are and maybe how we can also apply them. So if you can check now on the first one, we've got a conduct. This is like a switch. A conduct is like a switch. So it's a digital called a digital data type. A conduct is like a switch. So it's the first one we've got a normally open conduct. That means this conduct is open. If you were to put this conduct in a circuit, we have an incomplete circuit because this conduct is open. For you to be able to have a complete circuit, you need to close the conduct. Now, um, when you close the circuit, when you close the conduct, you have a complete circuit. So it's like a switch, like I said, and the following is normally closed conduct. A normally closed conduct is it says it's always closed. That means if you edit in your circuit, your circuit is complete because it's always closed and when you press, you open it. So it's the opposite of the normally open. Then the third one is rising edge conduct. A rising edge conduct is also a switch, but the difference is that, during the rising edge, during the switching point, that's when this conduct triggers something. Okay. So now what I'm going to do is let me just quickly open let me just quickly open pin right. So I can show you something about this rising edge. So now I'm just going to pick the pen and let's maybe increase the size. So, let me just drop it a bit. So now, a rising edge. So when you, let's say we have this graph, right? All right. So this is our zero, and this is one. So when you press a conduct, normally, if it's a normally open, it's on zero. When you press a normally open switch, it goes up, right? It goes up. So then it maintains a one. When you close a switch, this is what happens. Now, and then when you switch it off, this is what happens. Right. This is on and off. Remember we said it's binary. It's either a zero or a one. Now when we have when we have rising edge, rising edge means that, during the point when we are changing state 0-1, this is where we trigger. This is a pulse switch. The moment we are changing state 0-1, this is where we trigger. I'm just going to write P right? P here. Okay. So let's go back to DA designer. The moment we're changing 0-1, that's where we switch. Now if you check then below there is what is called the falling edge. A falling edge works the same but in the opposite. So when we are switching 1-0, this is where we've got the this way we've got the falling edge. These are pulses, so you don't need to maintain. If it's normally open, so we need to go up and maintain. This is during this time, that's where we are, that's where the circuit is complete. That's why it's on. But let's say this is normally open, then we have the normally close. So for the normally closed, it's always on here on zero. Then for the normally open, it's always on on one state. So we need to be on zero on normally closed, right. So now let's just quickly go back. So now, um, for you to add this to our run, we just click there and then it adds. So when you click there it adds, and then the next thing that we need is a coil. A coil is an output. So a coil is an output. So this is an output. Let's say we want to write a program for switching on, let's say, maybe a Pb. So what we do is we add a contact. This is our switch and we add the coil. This is our output. So, um, so now that we've added our switch and we need to name, you can see the question marks here. So what we need to do now to name is to give an address for each for each input and even the output. So address is, the addresses are the ones that are used when referencing whatever conduct that you're using or whatever output that are using within the program. Just like our physical home addresses, let's say a letter goes to the post office and it is given your home address. That's how the post office knows that this letter is to come to your address because they've got the address number for your house. The same way the addresses are used here in the program. Get to understand more as we go further with the lesson. So now in Delta programming, and we've got internal addresses and external addresses. So now, if I'm to take you back to our POC, um, if I'm to take you back to our POC our web browser, sorry, and we go to the POC, let me just say Delta since we are using the SPLC right. So now let's quickly look for picture that is a bit more clear because I want to show you something on the right. This one is a bit clear. Now, when we say we have got physical addresses and internal addresses, we mean when I say physical, I mean addresses that can be connected to these ones. This slot you can say it's written in in out out. This is our input side and this is our output side. In reference to our small program here, these are the inputs and these are the outputs, right. So if I go back to the browser, you can see inputs. So we've got 16 inputs 0-15. These are physical inputs. So if it's a physical input, that means you need to connect a physical switch. So for you to reference this, we use X. X, this will be X 0.0. This will be X 0.1 X 0.2 X 0.3 X up to X 0.15. So what do I mean when I say, um, X 0.1 or X 0.2. If let's say this is the format X 0.0, or let me put it like X um, X B, point C. So B refers to the location and C references the point. When I say location, I mean the location on the PLC. What I mean is so remember this PLC can also have modules added to it. Let's say you have this PLC, just got 15 inputs, but you have 30 inputs. How are you going to manage to connect 30 inputs? On the POC, that has got 15 inputs. You need an extension module which you connect on the side. If you look at this POC, it's a POC and it has extension modules that are connected to? For example, this one here, this one it's an output extension module, you can see, it's written out out. You just slide it in on the side of the POC, you can see, there you can slide your module. Now you have an expansion. So now, what it means now in reference to what I was explaining is to say, if you have zero and 0.0, that means this is the location. So if it's zero, it means this input is on the POC itself. And this next value is the address on the POC. So if it's on the POC, let's go back to the browser. Now, if it's located here, if you connect to inputs here, you've got X 0.00 0.10 0.2. Now if you are now connected to this module, let's say you are connected to this first module there. This will be X zero. This will be X one, two, three, four, five, six, seven. Same applies with the outputs. So if it's the output that is on the POC body itself, it could be Y zero point whatever address on the POC, then as it goes, you increase Y one, Y two, Y three, y four. The Y one is referring to the module location from counting from the POC. I hope you get that part. Now I've explained how the addressing works on the physical so we have X 0.1 or even X one point something up to depending on the location of the module on the k. So this is what we call a k when you connect your POC and its modules on maybe it can be a Chassis plate or it could be a general. So this is what we call the wreck it became the reiki disk, but a lot of modules connected to it. So um, as you can see, there is another example. There is another example. All right. So let's move on. Now I'm going to go back to our DI designer. As I was explaining about these addresses, we've got internal addresses and at the same time we also have, um, I was talking about physical addresses, and also we have got what we call internal addresses. So now for internal addresses, we use the, so it can be zero to the maximum it's 9999. Okay. So now, since we don't really have a physical POC, we are not going to name our input for this conduct, maybe to say Xero and zero because we need to switch it physically for it to switch on. Instead, we use internal sing. This internal addressing yelps us whenever we want to switch something internally, which doesn't require a physical switching outside of the PLC. We will use zero. This will be our address zero. Now zero will be switching y00 0.0. Okay. Now, this y 0.0 is our output. What we need to do now is we need to compile to check for errors. So when you compile, you can see we don't have errors. Let me just make a small error. Let's say you make a mistake and then you leave the other part. Let's compile. You will see there we've got an error. What is our error saying? Our error is saying, the QilRgister must be bullan. So Now, let's see, you can see it gives you the network number and where the error is located. Now what we need to do is to just correct that error and add another zero. Now we can compile again. Now the error is gone. The next thing now after compiling and seeing that we don't have error is errors is two, um, download or what we can say download the program. I mean, yes, download the program. Download the program, it means that now we are sending our program into the POC. What we need to do is to say set POC status run to stop all downloading and then we can continue downloading. When you say transmit, click the transmitting, it starts sending the program. Now you indicates that the transmission process was successful, then we can now close. After that, now the program is inside the PLC. Now the thing is we need to switch on and often simulate. What we need to do is to go online. Online function allows you to monitor the program w it's executing within the PLC. So you can see that it's online. Then we've got this indication saying stop. Stop means you are online monitoring, but your POC is in stop mode. So when your POC is in stop mode, what it means is, uh, you the POC is called the program, but the program is not executing. Whenever the POC is in stop mode, it's a program, but it won't execute it. Even if you press the inputs or nothing will be executed. Now what we need to do is to go to run mode. You can see there's run, and then there's stop. We need to change to run mode, say, okay. So now you can see now it's green and we're in run mode. So meaning to say that our POC is in run mode, you can even see even on our communication CGR, you can see now that there is something going on here. You can see that it's indicating that it is a program and it's in run mode. So now the next thing we do now is to try to switch. So you can right click and Say on. When you say on, you can see now our Um, our coil is on. Now if you right click and say, click on the C and say false. You can click or you can click. Left click, it gives you this small window for changing to true or false. But if you right click, it will open this window. So that's it. We've got our input and we've got our output. Let's say you've got a program that has got a lot of inputs and outputs. It becomes difficult if you name them like M zero, one. This is whereby we make use of variable declaration. So before I do that, let's just quickly go offline so that we are able to make changes. Uh let me leave it and run and then we just go offline. Okay. Now we're offline. We go to global declaration. We just say Ed, right click and say Ed global variable table. Now we just say, maybe what can I say variables. Let's just give it the name variables. Variables. Then we say, now after we've created these variables, the next thing that we need to do now is to open within the variables and then we start adding variables. Now, we've got the class and then we've got the name. Our name, remember, let's say, remember that program is for switching on a bulb. We can just say maybe main switch. Sorry, say main switch. Remember when you are spacing, you use an underscore. Main main switch. Let's say main switch. Enter, then it's a bullion. Then the address will give it what zero. Then the next thing we need to do is our bulb. You can just say Bob, let's say Bb A. Bulb A, it's a bullying digital. And then we say, let's just say Y 0.0. So that's our main switch or bulb that we are switching. So this will be the output Y 0.0. So now we need to go to Main. So now you can see there on Main. Let's just quickly go back and check 0.00 main switch. Okay, on main we can say main switch there and we can say can delete there. You can see now it's about there. Sorry about that. Right. So now you can see now we've got our we've got our address on top and we've got our name. This helps us to simplify the program and make it easier for troubleshooting if it's a long program. Now, this is the global declaration. We've got our address and we've got our teg name. This address will be linked to Z soever you write zero will be linked to this name. So we've spoke about the output, and we've spoke about all these inputs. Then this inset parallel is just used for maybe whenever you want to add maybe another conduct, let me just say do. Whenever you want to add another conduct below, what you've selected, you can see now you can add or when you want to add it on top, you can see there. I'm just going to say do and delete all those. Now the next thing that we need to do now is to check on the coils. On the coils, you can see the coil set and coils reset. When we say coil set, we mean that whenever it switches on, it maintains. Let's say this switch it's a momentary switch. A momentary switch is a switch that only closes conduct during the time when it's pressed. When you remove your finger, it opens. So that's a momentary and the maintained is one whereby when you press, it maintains contact, and for it to disengage, you have to press it again. So that's maintained. Now, if you are using a momentary switch, that means you press and release. But let's say this button, this light, you want to switch it on and then it maintains after we release the switch. Now what we need to do is to use what is called the set function. So for us to the set, we just right click and we say set. So what it means is if I compile and let's compile and let's go online, download. Okay. So what set does is whenever it switches on, it maintains it holds, right? Let's say close. So now if I click on the switch and say through, so you can see that it switches on. So if I switch off, you can see that it remains on, right? So meaning to say it's maintaining the conduct since this is a momented button, it only makes whenever it's pressed and releases and denergize whenever it's released. So whenever you're no longer pressing, but when it loses contact. But if you add to set, it will maintain the bulb remain on because its This quel sets it maintains. So now I'm going to go offline and now add. So if you want now to denergiz you have to reset it. So what I'm going to do now is to add a new run at the bottom. So in this lung, we're going to add a contact and give it address one. The next step is for us to add now a reset, this will be a reset. But now since we want to reset this address, we'll give it the same address. Remember when I spoke about addressing, this is where it becomes end because now you are referring to this address because that's the one that you want to reset. Now, this one, morgan just leave it like that, we're not going to declare it. Now the next thing we do is to go online. If you go online without compiling, it will do everything. I will compile first and then it will download and then it will go online. Now we need to start transmission. Downloading done, and we close. So now we are online. Now what I'm going to do is to say true, and then I change to force. Now you can see that our Y zero is on, what we need to do for it to switch off, we need to reset. By resetting, we need to make this one true and we make this one fur now you can see that we have switched on and then we have switched off. In automation terms, they call it latching. Whenever something switches on and it maintains it's called latching. It's a latched circuit. Now by latching, it means that it maintains its contact. There's also another way of doing this, which involves using the normal contacts and the normal coils. Now, what I'm going to do is I quickly go offline and after going offline, the next thing that I'm going to do is to add a different run at the bottom. Now when I add a different run at the bottom, I'm going to add a contact and add a normal coil. Let's just remove that on top of that, let's add a normally closed. Then parallel to this, we add a another m. Now what we need to do is to give this address Y 0.1, Y 0.1, and then we give this one. Let's start with this one. Let's call it two since we already have one, and now we need to add three. Then we give the same address to this conduct, Y 0.1. Right. So now the next thing we need to do is to go online. So when we go straight online, it will remember it will compile and download the same time. So now we need to start transmission. Transmission is successful. Now we need to close. Remember when I said normally closed conduct, it's always on. You can see now this normally closed conduct, it's already on. Let me just quickly drop this down a little bit so that we can clearly see. You can see the normally closed is on. So now what needs to be done is whenever we switch on, right switch on, this becomes on. So when it becomes on, this also becomes on. So that means when this one is on, it's going to maintain. So now we need to switch it off so that this one so that it can switch off. So remember, we switch on and that one is on. So now, this one is on. So now what we need to do is to switch off. So if you switch off there, you can see that this one remains on. So so this portion, it works the same way with this portion. So this is identical. So they normally call this a direct online circuit. So for it to switch on now, we need to either switch off. We need to switch off the mean switch on because this is remember it's normally closed. So if it's off, it's on. So now if you say true, that means it's on now it switches off, then we lose conduct on y is 0.1. So this basically is, um the same. So what I've done on Network three is what is the same as what I've done on Network one and two. It's a set and reset circuit in a different way. So this is how it works. So so far we've talked about normally open, we've talked about normally close. We've talked about the output calls. So what I just want to explain next is or end kits. So if you remember very well, end means that both one and two must be on for something to switch on. What I'm going to do is I'm going to delete this run here. I'm going to quickly go offline, and then I will delete this rung. After deleting that rung, I will also delete this. I will just give it ZL with ZL this address then yes, MZL then on this one, I'll add a contact on the first one and then I'll give it the name two, right. What I'm just trying to achieve here is the end operations and the operations. End remember, on the logic table, end means both one and one must be on it means either this or that right. If you remember very well on the digital electronics. If I switch on zero, I switch on zero here, it's off but here, it's on Y because this is saying zero and two must be on for S to be on. Then on the second network we have M one or M two or zero must be on for this part to be on. Now, if I switch off here, this becomes off. For s4y0 0.0 to be on, both M zero and M two must be on. Now you can see that it's on. Now let's quickly just switch off and we set here so this is one of the applications that we can use the POC for and these are the basic instructions that will be required whenever you're doing dology programming. If you're doing dology programming, these principles must be known. So in this class, we were looking at the contacts. Let me just quickly go offline. We're looking at the contact this first portion in this first portion. We've also added new networks, control I, control shift I for adding on top or below, above or below. Now, we also talked about declaring our variables and we also talked about addressing. We also talked about set and reset coils. In the next classes, we look more, we get deeper with our POC programming and learn new instructions. We'll be going step by step and things will become exciting and also engaging because we'll be working on different examples and different kinds of scenarios where where you can apply your lado logic programming. For this lesson, we're going to end here on the normal contacts and coils. See you again in the next class. Goodbye. 6. Timers And Counters: Hello, everyone, and welcome back to the POC programming class. In this class, we're just going to continue from where we left from in the previous class. So I've shown you how to set up your com gear, and I've also shown you how to create a new project in DIA design. So currently, my communication manager is already running and it started, as you can see, and I have my project open here, the one that we created before, Skillshare, and we still have the same POC that we were using initially. And I still have my main project. So in this class, we're just going to move on to other functions that are required when you're writing PLC programs. So what I'm teaching you in this POC programming course are the most important things that are required from a POC programmer or when you're writing a POC program. So I remember in the previous class, we learned about the contacts, and we looked at the contacts normally open, normally closed in the rising edge, falling edge pulses. And we also looked at the coils, and we looked at the set reset, and how they way and operate. Okay, so in this class, we are going to move on to other functions. So uh, whenever you're writing program, there are certain functions that are required. For example, maybe I can say timing options, maybe you want a motor to run or you want something to take effect after a certain period of time. So in that case, you need to use timers. So timer, a timer is used for counting. So just like a normal stoppage, a normal stoppage counts in seconds. So we also have a timer that is used to count. And, um, for you to use a timer, you need to first enable it. So when a time is enabled, that's when it starts counting. So our enable can be a button or sensor or any kind of digital input or internal. Remember, when you talked about those zero, the internal registers can be also internal conduct that can enable a time so as you can see, currently, we don't have any network in this program, we have our network, but it's blank. So what we're going to do is we're going to add a timer to our program. So for us to add a timer or any functions, you can go to this icon and you can click on the arrow or you can just double click or you can just click on this icon. And after clicking, you can see that we have added something on our network. So on this network, you can see that there's a rectangle box with to with question marks. So now what we need to do now is to assign a function or an operation to this box to this block. So now what we need to do is to click on the question marks, and then you can see that this small box also appears. This is where you can click and wait a bit for it to finish loading. The window must open. There we go. The instruction wizard. So under instructions, we can look for basic instructions or we can just type whatever you are looking for on this box. Timers, we can find them under basic instructions. So under basic instruction, you can see there we go, we've got our timer. The timer we are going to use is this TMR, so you can see the timer, or you can just type timer here. TMR. There we go. There we can see our timer. It's under basic instruction. So you can add any type of functions that you want to use on this block. So there are quite a number of functions that can be used. There are also arithmetic operations or arithmetic functions. Let me just quickly show some of the functions that we might be using in this class. For arithmetic operations here, we've got this operation, you can see this division, there's multiplication, the subtraction addition. It's quite a lot. So we've got F. I'll explain all this as we go further with this class. What I'm going to do in this class is to add a timer for for us to start our example. And then after typing, you can see then our time is there under basic instruction, so I'm going to click on it. So just to explain a bit on the time, how it works on the operations. So we've got the S one variable. S one variable and S two variable. This is the timer. This is the timer address and S two is the word, where we store our timer value. As the timer starts counting, the increments will be stored in this word. What I'm going to do is now I'm going to click Okay. Then we can see there's a one and then there's a two. Then there's this enable, which enables the timer to start running. So if the enable is not energized, your timer will not run. Now, the other thing I would like to show you is something that can help you understand a function. So when you have opened a function like this, let me just click on it. So you can see that is highlighted with red. Meaning to say this is the time that we've selected. If you want an explanation or maybe you might not know the function of this operation of this blog, what you can do is you can just press F. You can just press F two. Click on it. And press F one. So it's F one. So just click on it and press F one. When you press F one, you see that window will pop up. This is basically in sort of a manual of all the operations that are available. So this booklet will help you to understand more on this. I'm not going to show you all these functions, as you can see, there are quite a lot of functions that are available. I'm not going to teach you all of them, but I will just give you the tools that are sufficient for you to navigate on your own. So in case maybe there's a function that you see and you are just curious, so you want to use it. So this is what you can do to help you understand. So you can see you get your explanation and you get the explanation of the block. So we've got enable and we've got S one and S two. So now they're explaining what S one is this timer number, and this is like an address for the time. And then we've got S two, which is like the setting value of the timer. So the setting value of the timer, that means this is where we set our value for our timing variable. So you can never ten second time will never a second time. It depends on the application that you want to use it for. So I'm just going to quickly close this window. So what I'm going to do next now is to start adding functions or adding other stuff to this rank. So what I'm going to do is to add something that will enable time. So in our case, we just use zero just for the purpose of explaining and also for the purpose of just demonstrating how this timer operates. So this is our enabling bit zero, and we've got S one. So remember, S one is the address. So for timers, the required address for timers is so it can be T zero going to 999. So those are the number of timers that you can use within a program. Then our next step is to set the timer. So if we say, remember this time counts in milliseconds. So if we want to count 10 seconds, we write hundred. So there we go. We've got a 10 seconds timer. Now what I'm going to do is to download the program. So let's just quickly go to now you can see that we can't go online or anything. Remember, we didn't connect to the PLC. So now we just click on communication, and then we connect. Then we are connected. Then we close. Now we are able to go online. So click Okay. So if you press this online icon, it allows you to it allows you to compile and run the program at the same time. So rather than compiling and then going to say download and then from download, then you say online. If you just press the online icon or online button once, it will compile your program and then need to download it and then it will automatically go online. But now you can see that our program is in stop mode, so we just need to put the POC in run mode so that we can start executing. So now we are in run mode. The next step is to maybe set this one to two, and you can see our time is counting. So our time is counting. So when we reach 100, it will switch on T zero. So this is the application of the time. So meaning to say whenever we switch on there, you will switch on T Zero. So now we can use this address as an input for something to switch on something. All right. So now let's say we want to let me just quickly go offline now, and let's say we want to switch on another time or let's say let's build a sequence where we have got three time so after 10 seconds, one time switches another for 20 seconds and then after 20 seconds it switches on another one for 10 seconds. What I can do now is I can just copy this run Control C, Control V, Control V again. What we do is whenever we switch on here on zero, time zero start running and after time zero reaches, it must start this second time. After this second time reaches its target, we start this third time. So now what we do is we'll give this conduct the timer address for this first timer so that whenever we reach our target, when it's on, it automatically switches this conduct on, so that will be T zero, right? So now from T zero, we switch we start the time at T one, don't forget to change this address. A multiple addressing is not allowed because if there will be a conflict, if you give this address TZ and also this one address TZ, there will be a conflict. Now we will set this to let's say maybe 20 seconds, that would be 200. Then when T one is on we will also switch one. We will use the address for T one here so that it switches on the third time. This will be T one and T one will enable T two and T two run for the next, um, to run for 10 seconds. Now this is our sequence of timers. Now let me just quickly zoom out so that everything can fit or let me just drag this upwards, so that we can see, right. There we go. So now what I'm going to do now is to go online. And it asks me to compile and check and download. We say, Okay. Then we start transmission. Then we close. Right now we are online and we can start our time. Notice, zero is on and our time is running. We must reach 100 and then T one, T zero will be on. You see zero is on and this time a second time is running. Up to 20 and then T two will start running. Then one is T two is running now for 10 seconds and you can see the elapse time. There we go. So this is sequence of timing. So now you can see that a time can be set to different different times. So I said this one to 100. I said this one to 200. So you can set it however you want, depending on the application you want to use it for. So timers are very important in most of sequential steps in different programs for different machines. So some machines require a delay, some machines require timing within the program for different purposes. So this is where you need to apply timers. So now, I just want to quickly show you another way you can set your timer because if you notice this value cannot be changed, it's fixed. It's a permanent number, so it's not a variable value. What we need to do now is we need to add a register where we uh entering a different value for the time. Now what I'm going to do quickly is to delete all these three, I'm not going to delete them, but I'm going to give them different registers for setting the time. So first, let's go offline. And now we're offline. What I'm going to do is I'm going to give this address D zero. Then we'll give this address D two and then we'll give this address D four. So now we have d0d2 and D four. Let's quickly go back online and compile and download. Now we start transmission, and then we close. So now you can see that we are online and um or POC is in run mode. But now you can see that our set time now is zero. Remember, initially we were having a fixed value there. Now we've got a memory location where we can store a set value. Now this gives me the lib body to set whatever value that I want. Now you can see I can set any value that I want. Maybe, let's say, you can just enter another 100 there. They can enter maybe another 100 or let's just say 200 there. Okay, so now I'm going to switch on this function. You can see now our time is counting until it reaches 100 hundred. Then the second timer starts running. And the third timer starts running. There we go. You can see that now if we use diesel with the liberty or the advantage of changing the set times. If it's a machine or building something that requires you to change time the set time once in a while, what we do is you just use this register, you use a register where you can enter the set time that you require for that specific process and you don't have to fix it within the program. So if you fix it in the program, whenever you want to change the time, it means you have to rewrite. You have to update the program to the specific time that you need to set it for. So now, what I'm going to do is to just change this time, so you can see, let's say 50 and then leave that one as 100 and maybe let's change that to 70. So let me switch on and you can see now our count is running. There we go. We 300. There we go. We've reached seven. So now you can see that now instead of having a fixed time for where we have the advantage of changing to whatever time that we want. So now, this is all about timers. So now, each application has its own it each time has its own function or application. So if you don't need to change the time, then you can fix it. But if there's need or there's a possibility for the time to be changed. That's when we have to incorporate the register so that we can store a value for that set time. So if it's in a practical situation, this time will be entered maybe on the screen. Remember when we talked about an HMI. So this is where it comes in end where an operator will be entering this value on the screen. So that means the screen will be linked to this register so that it can read and write to this time. So now I'm going to quickly go offline. And now we need to delete these ranks. The next function that we're going to look at is the counter. A counter is a function that is also handy in most of the automated machines. So a counter as the name says, it's used for counting. Whenever it's enabled, it counts, so it increments by one. So every time you give it a pulse, it say we are running a production line where you want to count the number of products that we've manufactured per day. Maybe these products will be maybe let's say juice bottles. Let's say you want to count you want to count the bottles that have been produced in a day. You just put your sensor on the conveyor belt where the bottles passes. Every time the sensor picks a bottle, it energizes the count and then the counter will increment. That's one application where you can use. You can make use of a counter. So the same way we add a time, let me just delete this block. It's the same way you add the counter. So you can just click that blue icon there, and then you click on the question marks and then you click on this box. So the next thing now you can do is to search for the counter. So because I've worked with the counters before, I know where to find them. So they are also under basic instructions, so you can see the CNT, so this is the counter that we need. So there we've got counter. Then here, we've got the set amount of time that you set for counting. So this counter now, what it does is it counts up to a certain set value. So when you reach that certain value, it stop it energizes. Right? So that means we can just, sorry, I close instead of, um, instead of pressing Enter. There we go. Same applies with the timer, we've got S one, S two on the counters as well. There with the word and then with the counter address, then we say, Okay, the counter address would be maybe zero. Counters start from C zero to c99 and then this is where we set our set value for the counter. Maybe we can just say three. What I'm going to do now is to quickly go online and then we compile and run so we start transmission. It's successful, then we close. Now we can see that we are online and our POC is in run mode. So what we can do now is we can start by energizing this to see how this calendar operates. Now what I'm going to do is I'm going to enable this on. Then you can see it's one now and switch off. On now we have two, and then we switch off, and then we switch on again. Now we have three. The moment we reach three, it changed to blue. Meaning to say we have reached the set value for the counter, and now we can, the C zero now bit has been enabled. So the same way we did with the counters with the timers, we can also do it with the counters. We can have three consecutive counters that are in series, which will be enabling, which the first counter, we enable the second one and the second one enable the third one, like what we did on the times. So I would like to ask you to also try that and share that program with me or share in the comments below. So this is exactly, this is a type of, of this is one of the examples of account that I can I can give to you. So now what I need to do is to show you because you can see that this value is permanent. So the same way we did with the times now we can also put a function or a register where we can store our set time, our set value for the counter. So what I'm quickly going to do is to go offline there and then I enter a set in address D zero. So this is where we'll be storing our counting value. This means that we will increment until we reach the value that is set here. So now what I'm going to do quickly is to go online, click Okay, and start transmission. And then we close. So now, what I'm going to do now is to set the value we're going to set the value that we can use for this time. Now I'm going to just set it to two. Let me set it to two. There we go. Now I'm going to set on set off set on. There we reach the set time. That means I have the lib body to change this time to any value. So now if I switch off I have to clear before. So if you notice I've changed the value, but now still it maintains. The next thing, if you want to change now, you have to reset so that it also restarts off off on. And then off until we reach five, that's when C zero will be one. There's another function also that works similar to the counter. But now this is an incrementing function which increments, it has no limit. So it's just for the purpose of counting. So every time it's in body it will be counting. So let's just delete the counter, and then we add this function so the other thing is when you know the shortcuts, you can just write CNT there and then you click Okay, so it will automatically add the counter. You don't really need to visit this box every time you want to edit counter or a timer. So if I say TMR, it will show, and I'll just say, Okay, and then it already adds the time. So now I'm just going to do the increment. The increment it is. So increment, now we add register which stores the incremented value. So now or you can just do the same. You click on the question mark, and then you say inc Oh, sorry. There we go in. Then it's on arithmetic operations. There you can see the ink then we say, Okay, it adds. But the reason why it's not edding is because we already have a function. So this is like an invalid operation that I wanted to do. I have to remove this one first. So I just say, Okay, and now we can delete this one. So now what I'm going to do is to quickly go online and we download and compile the changes that we've made. Um And then we were close. So now, I'm going to enable you can see that the moment I say it starts incrementing. This you start counting whenever it's enabled. So you can see that it keeps on incrementing it could only stop incrementing until you denb it, but then maintains the value. The moment you enable it again, it also starts counting. This function can be used maybe when you want to measure running time of a certain machine. The moment you switch it on, this value will increment so this is one of the applications that you can use this increment function for. So it's quite important tool that is really helpful. Let me just quickly go offline now. And what I want to do now is to show you how you can upload a program from the POC. Now I'm going to make changes so that you can see. Now I've just added a time to make this program look different to way it was before. So then I'll add 56 there. So this is our current program that we have. But now we want to take the program that is already in the POC. So what you need to do is to go there project upload. Do you want to close this project? Then we can just say, no, because if you say yes, it will create a new project. When you say upload now you can see it's ready to upload and you can say upload a new device. Then we start transmission. So now it's uploading. Uploading means it's taking the program that is currently available within the CPU, then it's just finished. So what we need to do is to go back to the programs. And you can see we've got the increment, the program that we initially downloaded to the POC. So I remember I deleted this one and I added a time. So now you can see with the program that was initially in the PLC. This is one of the tools that is required. So whenever maybe you've got a breakdown or you've got malfunction on the machine, a good thing is to upload the program that is there and you go online and monitor and try to find where the problem is. So these are the functions, the two functions that I wanted to show you, which are also very helpful whenever you are doing POC programming. Thank you so much for staying until the end of the class. See you in the next class. Goodbye. 7. Arithmetic Operations: Hello, everyone, and welcome back to our POC programming class. My name is Alan, in the past classes we've learned how to create a communication driver and also how to set it up. I already have my communication driver running at the moment. And you can see that it's already started. I also have my DI designer open. So as we continue with our class today, in this class, we'll be looking at the logic arithmetic operations. Arithmetic operations are the functions that are used whenever we are doing functions like addition, subtraction, division and multiplication. So now, what I'm going to do in this class is to delete this previous rung, and we're going to create a new one. So the same way we add functions, it's the same way we add also the arithmetic operations. So you find them on this icon. You click on this icon, or you can write the operation if you know it. So if I say plus, if I type in plus, then it will show, and then I would just say Enter. Okay. Or let me just quickly delete and show you the other way you can do it. So if you click on this icon and then you go to the question marks and then you click on the box that appears, you can also search for the plus sign there. Or you can just scroll down, press this drop down button. You'll see the list of functions. The functions that we're looking for is the addition function there you go. Now you can see on the addition function, we've got S one, S two and D. What this means is S one is our first value that we want to add, then S two is the second value. We add values that are occupying S one and S two and our result will be stored in D. So what I'm going to do now is to click Okay. After clicking Okay, now you can see that we have our addition function. This function only works whenever it is enabled. So for it to add, it tests to be enabled. So normally, it depends on when you want to add. So if you want to add continuously, you can delete the zero and leave it like this, or you can add in a pattern or a signal or a bit that you can set whenever you want to add. So I remember when I showed you how to, um, look for the for help, if you want to look for help, if you want to understand about this function, you can just press F one. This will open a page where you can actually see the explanation of it. So there you can see there is the symbol. These are the types of addition functions that are available. So in our program, we already have this function. So I'm just going to quickly explain to you what these functions mean. So we've got this normal addition, then we've got this D plus and then we've got this plus P and then we've got D plus P. So what they mean is, this is just a normal addition function. So whenever it's in A it adds what is in S one and S two, and it stores the result in D. And the difference between this function and this function is that this one adds whenever it is enabled continuously. But then this function with the P adds on the pulse. Whenever it gets a pulse, that's when it adds, so it doesn't require the enable to be maintained. Then the D plus is for double word. So in the normal plus or addition function, it uses word. So a word it only occupies one storage location, but when it's Dwed it occupies how many it occupies two. So as you can see there we've got word and then we've got Dwed. Dwd is double the storage of a word. So we've got the D plus P. It's a double word, but then it works with the pulse. So anything that is a P, it has a pulse. So you can further read all these explanations for better understand so they are just basically explaining. So on this example one, you can see they've got X 0.1, which is the physical input, digital input, and then we've got D zero and D ten there. So meaning to say, this function we add contents that is in D zero and in D ten and store the result in D 20. So these are all registers for storing the values. Then we've got another function. They've got the double word. So we've got D 30, d 40, and D 50 also doing the same operation. So this you can read and get understanding if you want to if you really want to know exactly what's happening, but I will explain everything. So let's just quickly close this window and open DIA design. So now we can see that we have a normal addition operation. So what I'm going to do now is to start assigning the registers DSL, and I add D two and D four for storing of value. What this function does is whenever I enable M one, M zero, it will add whatever value that is in D zero and D two and stores it in D four. So what you can also do is let me just quickly copy and paste this function copy and paste. You can even put fixed values there. Can write fixed values on S one and S two. What they do is they just add as well. Now what I'm going to quickly do is to quickly go online. Before that, let's just change the address. Remember, there will be a conflict between those two. Let's say D six there, and then we we write one there so that we can just have two separate enabling bids. Now I'm going to quickly go online. Because I didn't compile, it's going to start compiling and then it will also download the program. Now we are transmitting. So our transmission process is complete. Now we can close this and we are already online and our POC is in run mode. So the next thing that I'm going to do now is to test now our function. Remember I said that I'm going to fix this. The expected value in the six must be ten, so I'm going to enable or make this true. Now we can see that we've got ten is the result. The next thing that I'm going to do now is to also enable zero. After enable zero, you can see that we've got zero because we haven't added any value. So what I'm going to do now is to write a value the so you can see that the moment I enter five, it automatically changes because we've already enabled. So now I'm going to quickly disable and I'm going to change the value to six, and then we want to see what happens. Remember, we said this function only works whenever it's enabled. So since now we have not enabled it. So that's why we're not getting any value is the output. Meaning to say we need to enable it to get its out there. Now if I say enable set on, then we get 11. This is our value. So now we have allowed the functions to run because now it is enabled. So the next thing that we're going to do is to also try to change or manipulate these values and see what happens. So now I'm going to add eight, and then you can see automatically it changes the value. So now the difference between what I've done here and what I've done the network two is that here I add I used registers or memory location so that I can be able to manipulate these values to whatever I want. So you can see, I can change any value anytime, but in comparison with the addition function on Network two, I can't really change this value because it's fixed. So this is only applicable whenever you are constantly adding something that you don't really need to change later on. But if it's a variable that needs to be changed time and time again, you need to use registers so that it becomes easy for you to change. So these registers may be linked to the HMI so that we'll be able to enter the values that you want to add. So now moving on, we will look at the subtraction. So we can just edit the functions that we already have here. So what I would do is instead of plus, I would just say negative there and say, Okay, so now we have negative. So it adds on. So remember, it adds on the function right at the bottom because, because we didn't we didn't so we didn't change here where it says in set. So if it's written in set, you can see that I'm changing in set to overwrite. So if it's set to overwrite, it will clear it will change current function that we have and add the new function depending on how you edit it. So for you to change this, you can just click there or you can press the button that is written in set on your keyboard. Now I'm going to double click on the function. Then I will change to negative and say, Okay, you can see now if it's on over to change and then it overrits whatever is there. Now I will also change this value and then I'll double click and then I'll change the sign. Now we've got a negative. Okay. The other way of adding function is to say maybe if you want to divide we say division, and then you space and then you say, D eight, D ten, and 12 and then you say, Okay. Now you can see automatically I have added a function by just writing. These are some of the shortcuts that you need to learn. This is a division operation. Let's just quickly also add a multiplication operation. I'm just going to insert a new run and then I'll enter two. So get two. Then I want to add a multiplication. So say D 40 okay, let's say, D 14. D 16, d 20, and then we say, Okay, so now we've got a multiplication. So subtration division and multiplication. We already tried the addition, so we're not going to repeat that. So now we've got all the three functions. So zero M one, M two, d0d2, d four, D 810, d 12, d 14, d 16, and then 20. So the next thing we will do is co line now. And download the program and compile it as well. Then we start transmission. Okay. So now you can see that we are online and our POC is in run mode. So the next thing that we are going to do now is to next thing that we're going to do now is to enter this value. So what I'm going to do now is to say 89, or let me say I would just say 80 and eight. So I'm not writing anything 80 and maybe ten Right. So because it's not enabled, so we're not going to get a value here. So now you can see that we are subjecting and let me just enable everything. So this is subtraction and then division, let's say 50. Okay. 52, 25. Now, let's multiply 50. Multiplied by five. Sorry, I need to write 50 and there we go with 250. So this is the result. So this is how the arithmetic operations work. So, one other thing that I need to show you is the you know, the online edition function. So this is online edit. So what it does, it allows you to make changes to your program while your program, you are online. You can see now it's saying online edit. So what we can do, you can change the program, you can even delete this these conducts and then after deleting them, now we can even download or update the changes. Now you can say object and program. Online is successful. Now we have updated our program whilst we are online. Now you can see that it's online, but it's in Edit mode. You can even close the edit mode by just saying stop edit. Now you can see everything has been changed with an updated program which was changed whilst online. So these are some of the operations that we have, and I'm just going to quickly go offline and I'm going to delete these. There are the functions that we have is greater than or less than sine you can see greater than or less than. Let me just quickly. Let's just test this phase. Now, what this does is it compares contents of S one and compares contents of S two. Let's say s one is greater than S two. That means the condition is true to give an output. Let's quickly just delete this part and then we enter six there and we enter seven there. Then we add a coil. So this square will be Y 0.0. Now we're just going to quickly go online and see what will happen. I think I made a mistake I uploaded instead of downloading. Is that what happened? And that's it. Yes. Let me just quickly go offline and let's delete. So we write greater than Okay. Greater than sign. And we add our coin 10.0, we have eight is greater than seven. And then we go online. Now we can compile and download. Start transmission. And then we close. So now you can see automatically our Y zero automatically switches on. This means that this condition is true. Let's just quickly edit the program. Now I'm going to make this value less, and then we update. You can see that now we've got a change y00 0.0 is off. Let's just add registers instead so that we can easily manipulate our values. I will put D zero and D two and then I'll update. Now our program has been updated. So what I'm going to do now is to put 70. Then 70 is greater than 79 is greater than zero. Then if I write 80, the condition changes. So this function also is quite tend whenever we are writing our programs, it's very useful. On top of this, we also have let me just quickly stop the online editing, and then we go offline. So on top of these functions, we also have them let me just say in set, not override. We also have the less than sine. We also have the equal sign, sorry, equal sine. These are the functions that we have. We also have greater than or equal. We're going to say greater than or equal. Equal or the less than or equal to or we can have greater than or equal sign. So depending on how you want to use this function. You can even cascade your function like this. All these condition must be met so that this bit Y zero output can be energized. Also these functions available for your applicant. You can even get the explanation of how they operate the same way we did by pressing F one there, you can see the data source, data source one, data source two, where you can operate. These are all instructions that are available for comparison. Equal to less than greater than greater than greater than equal to less than less than or equal to. This is what we have. So you can play around with these examples and try to come up with a project and try to come up with a different sequence that you want. So depending on how you want your machine to operate. So these are the examples that I can show you. So from this tutorial, I can simply say I've shown you from this class, I've shown you most of the things that you require whenever you doing POC programming. So most of the things that I've taught in this class have been helpful, um uh, I can safely say, from this class, you'll be able to write programs on your own, and also develop we can also solve any problem that you have using POC programming. So now what I'm going to just quickly do is to show some of the functions that will be useful whenever you are writing programs. So in DI design, I remember I said it's integrated software for Delta products. So, besides writing POC programs, you can also, um, program what they call the Savo drives. But now, in this case, now I don't have the software installed. So now you can see that the moment I click, I click that icon for the Savo Drive, it directs me to this portion where I need to download the software. So I'm just going to quickly go back to DI designer and show you even for the DII screen. So the moment I click this icon, it will direct me to the DIA screen software, which is used for writing programs for the HMI. So this is our DIS screen used for writing programs for the HMI. So let me just quickly show you how you use it. So if you want to create a new project, you can just go to Create New Project there and then a window will pop up for you to select the type of screen. So these are different models that are available for HMIs in Delta. We've got one oh three BQ, one oh three there is quite a lot. These one oh three is 4 ", one oh seven or 7 ", 110, ten inch, and 112, that will be 12 inch, 115, that will be 15 inch. You can pick any. I'm just picking this ten inch and they all come with different functionality. Some have got e it, some don't, so it depends on the model that you have and the application that you want to use it for. I'll also rename it Skillshare. And click Finish. This is our screen for the HMI, I setup for our window for the DI screen for programming the HMIs. So on your left, you can find your project tree. This is whereby you find the important files and links for your project. I've got the screens, this will be the number of screens that you have and you get communication where you set up the communication for the screen and the PLC. And we've got the TEG. Tegs how you link your functions to the POC. So all these functions are also explained in a class dedicated for Delta DII screen. So in this class, I just wanted to quickly show you that in DIA designer, you can also access your screen and everything. This is the software that you use when you're designing your screen, and you can also download and install it from DI Installer. So I'm just going to quickly close it, and then we revisit this screen in a separate class. So just quickly save and say, yes. Okay. So now, I've shown you some of the things that are required. So remember, when I said you can also declare variables locally. So this is where you add variables locally. So you can see this is inside the main function. So I got the main function and then you can add your variables here. And also you can create another function. Let's just call it let's just call it run time. I'll just call it runtime. So now you can see that we've got runtime open and we've got Main open. So in Maine, you can add a variable and you can just call it B five. Let me just say B five and then we give it address nine. And then we can add another variable. Let's say, and we can just call it BY or we can just say B seven and we give it a different address. Oh, nine we've already used. So let's say six. Okay. Now we've got two different variables that are declared in different programs. Now if I declare variables, that means B seven, I can only use it within this main function, this main function. And then B five, I can only use it within the runtime function. This is how you declare variables. So it depends on whether you want to use it in the entire program or in the entire project, or you want to use it within a certain function. So if you want to use it within a certain function, that means now you can even declare it inside the function or globally. So globally just gives you the advantage that you can use it anyway. So if you make a mistake, maybe you declare it inside the main function, but you really want to use it in all the function, that will be very bad because now you find that your program may not work the way you want it. So just to be safe, it's wiser to declare your variables inside the global variable table here where you can just add. You can also create a separate, maybe you want to structure your program in a way that is understandable. You can also let's say maybe you can also let's say you have digital inputs, you can create a variable table for digital inputs only. Inputs only. Okay. So now you can see, we have a table for digital inputs, and we can also add another for digital outputs. This is just a way to separate to organize your code in a way that will be easy to understand. So we've got digital outputs. Okay. So there we've got the digital outputs. So now this helps when so now this helps to organize, so you know that your digital inputs are all in the variables into digital outputs are there. You can also add, um analog Analog Analog inputs. Okay. And you can also analog outputs. So digital inputs, digital output, analog inputs, and analog output. So now you've organized even in the POU like I showed you, you can create main runtime on a separate. Then we've got what are called function blocks. A function block is a is a function that you create. And so sometimes you write a program that just got a certain sequence. But then at same time, you want to duplicate that sequence. What you do now is to create a function block and then you use that function. You use that same sequence again and again. What you do now, if you want to create a function block is to say you go to functions and then you function block and then you say eight function, then you name your function. Maybe we can just call it maybe sequence. Or you can say maybe it will be a sequence for maybe bottling. So bottling sequence. Wait. So now, there we have the bottling sequence. So you can now start writing the program for the sequence. So when you enter inputs now, you can say maybe start so start, you can now say start, but then you define whether it's supposed to be a variable input variable and output or variable output. By variable, it means it's just a variable that works within the block. But if it's a variable input, it means that it's a variable that will be getting an input outside the block. So if you say a variable input then and say, Okay, now, then we add a coil, then maybe we say motor. For running the motor, then we call it a variable output. This will be an output and say, Okay. Now what we can do now is to go back in the main program, and now we are able to add our block. So we just drag it. Now when you drag it, it will show this window. Now we can define maybe we can say bottling A. This will be maybe the bottling station boating station A. Bootley A, right? Okay. So now we've got start and we've got Motor Stop. Now what we can do now is to say maybe give it an address zero for switching on and then Y 0.0. So now this sequence maybe will be required for three stations. So now we can just copy this run and paste for three sections. So now we can also change. We can't use the same name. Say, then we say bottling C. Then we change these addresses. This will be Y 0.1, and this will be Y 0.2. Then we've got, let me just say M one, M two and three. So you notice that we have got the same function block, bottling sequence, bottling sequence, but we've given them different names so that they can be separate. Also the program that is inside this block is the same, but now we need to use it three times in different applications. But now we don't want to rewrite whatever we already wrote on something. This also helps you to save time and also to save yourself from rewriting, repeating the same thing that you have already done. So when you're now a POC programmer, some of the functions you'll be writing them in books and saving them and you realize that whenever you are doing a different project, you might need to reuse that block. You can easily export it from a different project and reuse it in a different project. Now what I'm going to do. This block also, it is an enabled function. If it's not enabled, you won't be able to use it. Now what I'm going to do now is to go online and compile and download. I'm going to start and successful, then we can see now we are online. So now you can see everything is false. And if I say true, you can see there, of course, true. So if you open inside, you're able to also open. You can see there it's on, but it's in a different block. So if I go back to if I go back to this block, you can see that this block inside this block, everything is off because we didn't switch on anything. But if I try to force, you can see the I can't do anything, but I have to now go back inside the main and then we change the state to true. Then you can see if you go back, you can see now everything is on, but it's the same sequence that we have written, but we just have duplicated the blocks. This is how you can also use what are called function block. They are quite tending. Then we've got if you're good in programming in C, you can also make use of C programming inside the the DIA designer or the DIA designer software. You can create a project Ed program, and then you can choose C, C language and you say, then you can see now it takes you to a C programming setup where you can write or If statements, will you can even see the DL statements are there while for switch statements, everything is there. But I'm just going to quickly close and maybe delete this function so it doesn't give us errors. So this is it, friends. This is how you write programs for the POC. This is what we call POC programming, and there are some certain things that I didn't mention about POC programming. It's called the logic because as you can see, it looks like a ladder and each network is called a run. So these are code runs like the runs that you actually find on a ladder. These are all code runs. Thank you so much for watching and see you in the next video. Goodbye. M. 8. Conclusion: Hello, everyone, and thank you for watching this POC programming class. I really appreciate you joining in. And so we have covered quite a lot of things that needs to be practiced. So for you to be fully, uh, to be fully POC programmer, you need to practice all the things that we've learned. So in conclusion, I just want to quickly show you some of the things that might be helpful and I would like for you to do those project and also send them to me so that it can also go through them. I will just quickly go to the browser and I will show you a document that you can download that can help you. The name of the document is Delta programming examples. To application examples. Let me just quickly scroll down and look for the BLC programming examples. Let's just wait for it to finish loading. So this document has got a lot of programs and examples that you can go through and write. Just after you've written a program, you can just save it as a Zip file, and then you can send it to me. You can see there we got a DVB POC application manual, but don't worry about the DVB part. You can still apply it on the AS POC as we have been learning. So here you can see that we've got the basic principles of programming and we've got the functions. So some of these I've already covered. So what you need to do now is just just go through to the examples so you can see, um, there are some working principles of ladder logic, this is basically what we've gone through inside. But what we need to do now is to just go through some of the examples that are inside the document. So you can just go through it, feel free to go through it and check and look for examples and patterns that you can also try so that you can also practice and become very good POC programmer. So with that, I think you all, please go through the document and also share though the examples that we have also done. There are other examples that you can also get from other documents. For example, you can see this one. I just got examples that you can also try. It's a sequential motor control. You can see problem. In many industries, there are a lot of things. So you can just go through read and then you find the problem solution there and you can also try it. You can see the examples but this can be different from this setup you can see it's different from DI designer, but the concept is the same. You can just also try and copy and try to write the programs on your own. These are some of the examples that can be also useful to you. Thank you so much for watching. Goodbye.