hello and welcome to a new video for the channel this time how can appreciate we will be opening a space to program a raspberry pi 3 model b plus with Codesys 3.5.16 the objective is to explain step by step how install the operating system of our raspberry pi and finally is achieve create a project and download it to our raspberry is to say we will use with functions as if it were a PLC that’s the goal let’s talk about some concepts very general and then we will move on to perform the corresponding steps raspberry pi is a board computer reduced and low cost that together with Codesys it is presented as a very interesting for training and learning automation sequential industrial processes and plc-based continuous is thanks to its versatility it opens many options for conducting projects and practices and one of the main objectives of the channel is to go integrating different teams and developing projects with the rush barry these are some of the devices with which we we can go working also mention that we can use different protocols communication such as the CanOpen, Ethercat, modbus TCP RTU profinet too as a scanner or ethernet / ip adapter then the truth is like here We mentioned it is very versatile and we open up many opportunities by using the raspberry pi of the hardware At the top we have what I know known as the GPIO that correspond general purpose input output y they come being some pin are 40 pins some are already defined for some specific communication protocol there are also some that are for some voltage that have outputs of 5 volts and others of 3.3 volts and also grounds and there are some others than us directly in codesys we can define as digital inputs and outputs on the left part we must place our micro sd here nothing else mention this is the model that I am using it is recommended to use minimum 16 gigabytes and at least there are several micro sd versions i am using hc which corresponds to high capacity and It will also be a matter of each one the micro sd model that you want use I only tell you that this is the one i’m using in the bottom part we must connect source voltage that has been a connector also microusb and when I bought raspberry came to me with a 5 volts 3 amper charger is just as data we also have a hdmi port is where we go to connect with a monitor we have the rj45 ethernet port this is where we are going to connect and communicate with the raspberry with the computer and finally we have 4 usb ports where do we stop for this process we are going to connect a keyboard and mouse the end of the GPIO and me as we mentioned so roughly we have some pins with voltage in this case 5 balls also 3.3 volts other than they are large or 0 volts the greens that appear here are pins that we we can configure in codesys like inputs as outputs and there are some that are already for some protocol defined in this case here we have the y square ce and we also have the one wire already more forward we will be entering more to detail in each of these the process now yes the process as we mentioned from scratch install the operating system until creating a project first we have to install the operating system raspberry pi on microsd card then we must configure our raspberry we have to enable some options and define an ip the third step is to download and install the package Codesys control for raspberry pi sl in codesys 3.5 point 16 we must install the package in the raspberry pi here just comment one thing is to download and install the package in the software and then yes we must also install the package a haunt on the raspberry pi after

we have to develop a project and download it then let’s get started with step number 1 we are going to download the operating system then we will download also the raspberry pi and mayer what is this executable and it is with the that will help us to do this system installation process operative we have to insert the microsd card to our computer only mention some computers have a card reader only you need to use an adapter in in case your computer does not have a reader then be there if they should get any reader this usb an adapter this or then with the help of someone you know family member who has a computer that if you have a reader this would already be that you download the files and when they have time give them one opportunity then do this step in specific the truth is very simple this wouldn’t be much of a problem so this well there is a recommendation later we have to delete the information on the card with this same executable and finally we will install the operating system also with this executable here already we are on the official page of the raspberry pi this only also mention the date is January 9, 2021 then maybe with the days with the months can change a little the interface or the versions of what we are using the same and will try to leave is updating and in case of Any questions, do not hesitate to comment and the way we can support each other then here we are going to download raspberry pi imager here we have this button in this case my operating system It is windows because I pressed it and in the below the bar appears download and I’m going to cancel it because because I already installed it and well download sorry and then let’s download the operating system we go to go below where it says manually install good operating system on the picture we are going to see all the options download press and here it appears this option here we are going to select the raspberry pi os option with the stop we are going to put it in download and here we will appear at the bottom of our download process I will too cancel in this case it tells me is 1.1 gigabytes I’m going to cancel it because download then more than anything to not to enlarge now what are we going to do then they told us the steps we have to open back barry and may and we give you install we select this option so that finish us open the executable here now We have it, I already have it installed ok insert my card first we have to delete it in case we have some information or this one that they have used for something else then first let’s delete let’s format the card later we have to select which card we want it to be the one that I have installed in this case sdhc card 15 points 5 gb and finally let’s press the write button here they mention a warning message that everything will be erased that if we wanted continue we say yes and we wait and he says that I can remove it now, let’s remove it and I will reinsert and now we are going to select the option use costume and we are going to find where we we have placed or downloaded our OS just mention that this is so we download compressed they will have to right click and select the option to extract well here in this case is called 2020 12 02 rapid dash booster script armhf then unzip it is the folder we open it and now we have to select our card and here we go to give him write tells us that everything will be erased that if we want to continue we say yes and there is already preparing the process is a

a little late will also depend on your computer and then let’s wait I’ll to fast forward the video when it ends well we will continue well here it’s over tell us what the operating system image has been written on our micro sd and that now we can now remove this the reader then we are going to put him on continue and we are going to remove it from our computer well it’s here since it would stay finished step number 1 now let’s continue with step number 2 configure the raspberry pi insert microsd card on raspberry pi then we will connect the monitor by the hdmi port and keyboard and mouse we’ll turn on our raspberry pi obviously already with the monitor on and we will enable the ssh option and we will define a static ip well here we already have the raspberry as you can see according to the presentation in the top part we have GPIO and de this side we have this the slot that we must place our microsd we are going to remove it from the computer I used this adapter here we have the micro sd and then we go to install in the slot simply the we place and insert it to the bottom very important to verify that later let’s install our hdmi cable hdmi we put our cable feeding here very important should not be connected still or if it is a cable bring a switch like mine just verify that this stand still then we will insert this is the mouse it’s a wireless mouse and then this keyboard cable keyboard cable and next step is it would be to turn it on the raspberry but first you have to verify that our our monitor our screen by example this is a television that is lit there you can see that it says no there is a signal then now if I am going to press very button see how it already turns on and in fact the fan also starts now we will wait for our start desktop of our raspberry here and at the beginning a message of welcome we will give you following us ask the country we will select good in my case I am in Mexico I’m going to put here in Mexico the Spanish language in the monterrey time zone and we give in next ask us if we change our password I recommend that you do so Let’s leave the default user pi and the password by default raspberry like this we are going to leave it we are going to give next here it tells us 0 screen this screen shows black edges is going to put that if they are those edges that appear to the sides Well how can you see it from this side and left side then the next me he asks to configure the wifi network and I will to put skip and finally one software authorization I will also to put jump and setup complete I’m going to put here restart so that already what the settings we just made have effects we expect nothing more here restart our raspberry and we are going to proceed to enable two options which is ssh and also VNC for to be able to connect remotely to our

raspberry well here it is already started again in our raspberry like here at the top there is a option that is like the taskbar but it won’t let me see the network icon from Rspberry then we can here at right click on any work area with our mouse desktop preferences and we are going to put here the bar bar menu of menus we are going to put very large and here as it is already appreciated a little our icon so we are going to leave it I say If you want, you can improve it you to your taste here right click panel settings is up we can put in the height we can go growing It is already a matter of everyone’s taste he does it here in the corner part it should show us the network icon raspberry and then press on preferences and settings raspberry pi let’s go to the interfaces interface in ssh we are going to enable this option active and VNC we are also going to put an asset we give in accept let’s set our this ours our ip of our network port ethernet let’s put network reference here is already set the interface we are going to select eth0 and let’s disable this option and let’s to enable this to enable them ip v6 here in ipv4 address we will put our ip that we we need in this case and we will put it at 24 what does he mean he is 24 good with this we are setting the sub mask network and we are indicating that it is 255 points 255 points 255 zero point now in router we are going to write down the ip 192 168 points 0.1 and in the dns server also 192 168 point 0.1 finally we are going to apply the changes and We are going to close it, now we are going to go here to the terminal let’s write sudo nano space etc/ /dhcpcd.conf and then enter this is a configuration file and yes we go to the bottom would be the changes that we just made perform interface eth0 we already have a static ip and also in the router and the dns then here already we’re just going out now let’s give it a restart let’s get out a reboot to our raspberry to verify that what we just did actually has this updated here I restart and as you can see already shows us that the option we had selected enabled ssh tells us that is enabled then no change that we have already done and we also mentions that the password for the user as it is the default that we had not changed we are going to accept it says that there is a security risk but well let’s continue like this now here let’s just go right click wireless unwired network we select eth0 and see how the options we have left and then the next step I get the computer now I have it configured in the same of the ip that we put to the raspberry let’s do this let’s connect the ethernet cable is the cable ethernet let’s connect it And this is going to be a way of check and this is a way to check if our ip is incommunicado and our ip is already well configured and is communicating with our computer here we can see that it is already configured ok these little lines in blue tell us that it’s ok as you want right now let’s show how to change ip in computer

well, up to here we finished the second step as we mentioned let’s verify anything else we had communication with raspberry connecting we already had the ethernet cable in the raspberry and also connect the cable ethernet the other end into the port ethernet of our computer first for this we would have to and configure the ip of our computer we’re going to go here in this case I am using windows 10 if you have another windows version then just check how to change the ip of your computer is very similar to What am I going to do? I get to give here to where the wifi option appears but i I’m going to go to the part where it says network and internet settings I click it then I go here where says ethernet change with options of adapter the one I have here is the one I’m going to use is this realtek and in this in this case I have turned off raspberry I’m going to turn it on green and they’ll see how is going to enable is going to start popping up a message connecting or something for the style while we are going to give double click and let’s measure ourselves identifying after protocol internet version 4 tcp / ip v4 let’s double click and this is where we must configure the ip as you can see I already have configured 192 168 point 0 points 198 these three numbers the first three let’s call them that they must be the same to our raspberry the fourth is the one that must be different raspberry and remember it was 200 and we choose the 198 and simply we accept to accept and then here we just get out we can use He too cmd command prompt we are going to send you a ping 192 points 168 points 0.200 we give enter and we see that we already have communication with our raspberry then up to here step 2 already we conclude now let’s go to step 3 download and install the co package Codesys control for raspberry pi sl in coesys 3.5 points 16 and here is the link as you want I’ll leave them in the description and that’s what we have to is the goal we have to arrive no longer should our package at the college is very good let’s go to continue well here we are already in crisis and here very important we need to start session here as I can see the hello carlos vargas initialization like this is how I put in my account and in this part here the download appears here more below there are also more versions here in this tab all versions in case you want some in specific because they just look for it and the I’m going to use this here appears to us is the most current 4.0 point 0.0 we simply click on download although here we see 50 euros in reality this what we are going to download we are a version let’s say that of test and what is and has the restriction that he is going to cut us after two hours we can be online with the device for two hours and then it just goes to cut it goes to stop this the program because then because we need this license we would need to buy this license right now we are not going to buy it it is already if you want to use it for some end of having it turned on raspberry for longer than two hours well they would have to buy it there this the license for now we we are going to select the option download we go down and we will give nothing more accept I already downloaded it but nothing here more is fast already depends on the speed from the internet that you have I will cancel because I already have it and now we are going to open Codesys 3.5.16 we open it and when we open we will close this window in tools manager packages we are going to put the option of installing it fix here no I don’t have it I’m going to put installing and we will look for it here

I have an option where the libraries but also create another folder call him Codesys this raspberry and here there is the one that downloads the one that is the one we just saw in in the link on the page I will give to open let’s put that we have read everything here the conditions we are going to give next I recommend that it be an installation complete, here we see the directory will save them I will put next you want to allow this app make changes to the device I’m going to say yes and nothing more in remaining wait and the message appears that the package has already been successfully installed we are going to give in next and finish that here already then we installed our package in coesys 3.5 points 16 now we are going to close and as a recommendation we close the program now let’s return to our presentation that we He says package manager and you should have our package we already managed to do that now we would go to the fourth step install the package on the raspberry pi 3b we already verify we already have link we already connect the cable ethernet on the rj45 port of our raspberry and also in our computer we already sent you a ping then we already have communication let’s proceed to this step we reopen co you say we wait for it to load we close this window and here in tools appears this update option raspberry update raspberry give click here on password we had said it’s raspberry let’s look for the ip address we put scan already found us 192 168 0 200 let’s put ok the update here we have to select the package that we we want to install because because as we saw on the page we can install multiple packages here in the package manager downloaded from the official page and we can install several here and nothing else is here we the list of all those who we have select the one we we need in this case because we are going to install the only one we have 4.0 points 0.0 we are going to install here we are going to select the option standard apply we wait and we give it ok and at the bottom we are going to put on route and we are going to put start ok up to here we would already be ours raspberry with the package installed and the last step was to create a project then here directly we are going to go to new project we will select the project projects option here standard let’s put it back Raspberry we will give you want to accept the folder wherever you want to store here we select codesys control for raspberry pi sl we also have mc but we are going to select what says sl the program let’s do the ladder again we are going to accept and well here we are already created our our project is now we have to establish the link with the raspberry we are going to give it here double click device here in gateway we are going to double click and it will try look for it if for you the first time So find that good and nothing else selected here should appear in the bottom in case you don’t appear let’s click here and let’s go to put the option to add device we already know the ip of our raspberry then here we will notice it 192 points 168 points 0.200 and we are going to accept it already appears to us here now if our raspberry saw him we double click and now we go in

login line tells us the application application that has been that does not exist in the control device create the application and load it we are going to put yes we already wait for it to load and start in stop now we are going to put in play or start and here we are in line with our raspberry as they can see then we already have our program everything is green is running then we already have this communication we downloaded a program in our raspberry pi let’s create a project very easy we are going to put Suscribe to and finally two contacts in series that energizes a coil it is called channel then here we already let’s go online we accept we double click here true double click here control F 7 subscribe to the channel well this would be all this of this video is a little long but well well I wanted to put everything from scratch from how you see install the operating system until then achieve this create the project install it and download it on our raspberry pi I repeat the idea is with time to go adding work with the different or different properties options offered by the raspberry pi in case they are not subscribed then I would ask them to support me subscribing to the channel and so they are well thank you very much