COM09. OPC UA - Siemens S7-1500 (OPC UA Client) and S7-1200 (OPC UA Server) TIA Portal

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello our 1 in this video I would like to show how we can implement OPC ua client in Siemens i7 1500 controller in this video I will use I seven 1500 controller as an OPC you incline and use i7 1200 controller as a OPC ue server to implement OPC UA client in i7 1500 controller there is one important example program so firstly we can go to support the industry to Siemens calm and search the ID number showing here one zero nine seven six to seven seven zero and you can find I seven user block for the OPC weak line of somatic i7 1500 as we know to implement OPC ue server function in i7 1500 oi7 1200 we do not need to program too much so basically we will use OPC ue interface function to implement OPC UA server function into the controller the i7 1200 and 1500 controller in the controller they already beauty in the server function however if one controller running as a OPC ua client that means this controller need to proactively to build up or set up the OPC ue connection and the sent or received the data to the OPC ue server so that means this client a need to program something to set up the connection send the data or receive the data by the program so that means we do need to program something inside the controller fortunately Siemens released that is an example program so that we can use as an example program to implement OPC UA client function but from this attachment file Simmons's supplied ki pot over 250 point one and a word and sixteen two words project also there is one important documents so I highly recommend you download this document and read this document at first so in this video I will use the example program and a briefly implement and demonstrate how we can implement this function and I will use the PLC see MANOWAR's to run as I seven fifteen hundred controller this is the OPC Yui client side so this is a plc seems software is running in my laptop and on the OPC Yui server side I'm using one physical controller that is a CMAs i7 1200 controller so it's running as a OPC Yui sober that is a physical device another important document that is a PLC sim unlost this manual and this manual has a 399 pages it explained the detail function on the i7 PLC sim unwashed so this of chaos is similar one software can basically running as a physical Hardware controller also including the OPC ua e function more importantly this software can communicate with some devices outside the laptop and there are two important information you need to read the detail the first one that is a supported function to implement OPC UE kline function using this PLC seemed at a loss the OPC UA client function provided from this a simulation software it doesn't support security sighting so that means we will only use no security or non security setting inside the controller properties the second issue is that what kind of a firmware of the hardware controller this is POC sim can support so if you fund us is a 2.2 compatibility during upgrade so you will find the POC seemed at once this software currently I'm using version 3.0 so currently this is the least the software support the Hardware firmware word so currently I'm using the version 3.0 update one so it can support from 1.8 to version 2.0 8 there are two example program for this a cute old version 50.1 it is using version 2.6 Hardware firmware and the TI Potter Overton's 16 that is a using version 2.8 Hardware firmware all right let's download those projects and in this video I will use of version fifteen point one as an example and before we implement OPC UA client let's quickly go through the OPC server area because from one video before I showed how we can implement the OPC UA server in i7 1200 controller so you can search the link below so in this video I just to quickly go through the OPC UA server side key sightings in the i7 1200 project currently in this ti pothole it is a ki Patil version 16 update 1 the controller what I'm using that is a i7 1212 15 and is from where that is a Werdum 4.4 keep in mind only Werdum 4.4 up greater than this worden it was support OPC UA server function is this i7 1200 controller and to implement the OPC server we need to go to OPC selection under the CPU properties and we need to activate this OPC UA sewer and check out this controller is IP address that is a 192 168 dot 0 dot 200 and the port number that is this that is a 48 49 here for the test wheel I will select on non-security and keep in mind in this a small controller we will select the Symantec OPC ua a7 1200 basic this OPC UA less s this is the key settings under the CPU properties and then let's shift to the product side and look at the program side in the program side I set up to TBS demonstrated in the servers we have a data from different TBS here I set up they are real number they are float so keep in mind those selection away is a shrink you won't see the detail especially these two columns the other psyching for the specific tax give the permissions to the OPC client to read all right in this a TBS and in this DB I prepare the Sun ax and some why there's two rails they are come from the different TVs other than the D be worried important sighting is here so OPC UA communication here you will see this is the the server interfaces okay double click this one this is a one interface so to allow this OPC GUI interface published our data so there are two columns so from this column right side you can select the DB and the detail the data from the different TB and the tracks is the data to the left side like this way so I track all those data from the DB 100 this DB I track data one to the test of data to attract all of them and from this DB this TB 200 I track the Sun and the skies and the Sun underscore Y here all those data will assign to this a OPC UA server this interface ok we can shrink this and show the detail this is the data name in their interface and this is the actual DB for this an interface is very clear also it's easy for you to troubleshoot if some data doesn't make sense you can check out this interface data and from this interface check out what a detail DB it actually operate all reading from the plc all right this is an OPC UA server-side after this we can compare download after the CPU start so we go to the watch table look at the detail the status of the wearables and now because the PRC has a program to run the sign and a Khakee the same result so that is a running and also move the data to sista test the TE one test the da - so when we test the OPC you we climb the read so we can test those four data the OPC client can read the four days from this area the OPC you incline also can write the data to this a DA one to DA ten okay currently we have a data here once we build up the communication and write successfully we will see the data will be over right by OPC UA client okay so we will leave here keep in mind currently it is an OPC UE server-side that is a TA proto version 16 so after this we will minimize the disapper duct and start the OPC client side and let's turn to our main meal and now in the OPC UE client side I will use the capo - version 50.1 hardware version 2.6 use this example project as a start shift to the project wheel in this sample TI proto projects it has a 207 1500 controllers so why is the OPC ua client why is the OPC UA soar in my video I will delete the OPC you is over only use OPC ua client in this project that's because I'm going to show while OPC UA client projects is communicating with one device from outside from other devices maybe you are using one OPC us are from other prize for example back of oral or other brands is totally outside the TI portal and firstly I will save as this product okay I believe this solar leave this an OPC UA client project only this OPC you inclined project what I'm using that is a tarapoto version 15.1 update full and if you require that i7 1200 controller site that project of what I'm using that is TI put over 1016 they are totally two different the TI portal software this is going to show this OPC you it client is communicating with one OPC us over from other devices if we open there are program here especially this OPC UA client this is the key function block to run the OPC UA connection setup and receive an ascended data is that is controller so inside this a function block it has a lot of a sub function block inside that's why I highly recommend if you try to implement or ties to the OPC UA function you better use this a simple program as a base and a star from this program because they are lot of a potential setting inside this a function block and some implicit a connection between the hardware sighting interface setting and this a function block so it's a highly recommend you start from this a simple rather than start from the scratch project you'd better read this the document size first especially the section 2.2 and 2.3 as a start it basically shows the sequence you decide for example activate a you a client select this purchase license create this interface in the interface will go build up the connection and select this a security sightings and the very important we will build up this read list and write lists and matter list especially here I will demonstrate here so you'd better read this - upon tool and to pon-3 at first okay I need this TI portal virgin 15.1 this sample program the controller it is using this is a version 2.6 and the last change this IP address so OPC UA server that controller IP address is at zero point two hundred and Iowa says this a client that is a 100 which is very clear okay and the details second we need to shift to the OPC ua side i7 1500 controller a support client and the server function and in this video we will implement of the client function so we will leave the server and check without checking this or activate the OPC ua server okay so we will focus on the client side if you look at the detail on the client side there's no other settings there's only one checkbox see so we need to check this a activate OPC ua client that's because to implement the client function actually the more important thing that is a this area this is a sample program provided from CMAs so you must use this to program to implement this is another same as implementing OPC ua server function inside the i7 15 or 1200 controller we activate this and keep in mind in the runtime license area in this OPC you inside this type of the purchased license are we has liked us more for testing well okay this is a CPU cycle so according to the OPC you in client function only two parts one is this checkbox one is at a runtime license and then let's go through the program so if we open the op1 so we can see there is an only one main function block coded from this op1 it looks very simple and a very brief to understand how we can use this a function block how we can set up the communication how we can trigger the reading and trigger the writing we better use the watch table if we open this a watch table look at this controlling OPC UA client using this of watch table is it easier for you to understand how it works how it can be operate so to set up the communication we can turn on this OPC ue connect this tag and to read the data we can trigger the OPC we read this tag this variable to write the data from the OPC UE client to the server we can trigger this tag so OPC you in right also we can read the detail from the status of tax and if you look at this controlling interface so this all those data come from the DB from here controlling interface if you open this controlling interface this DB is just a global TB you can write something here it just to provide some default tags you can use you can turn down the connection or you can trigger the read on trigger the right oh look at the detail busy down on arrow or status or diagnosis all right so under this folder OPC UA client they are the core of the OPC UA client for this controller so the function block rp1 that is a the key function block the PPS 3 this is an instance TB of this IP one so basically you - no need to change anything here happy one and the tb-3 only thing you need to take care that is this TB 1 and the TB 2 so look at this name OPC UE client interface and the squirrel configuration and the data if we open this data double-click you will see inside this a TB there has a three lists one is a rate list wise the right list why is the method list so if we open this a verbal reading list we will see there are three data here we can now rename or add the data here just because those data in the ready list or the data in the right list here actually they are controlled by a datatype okay see you in client interface dot read list the right list here so who is controlling this they are here OPC ue communication and the dist client interfaces and if you look at this name OPC ue client interface so this actually control this interface name actually is controlling all those data type all right keep in mind currently they are looks like this we will compare we change something after so if we open this OPC UA client interface so this is a key function to set up a 1 OPC client interface and set up the communication to the OPC UA server and once you open this keep in mind there are three columns sometimes the right column could be like this for the new starter they will forgot this or they will skip that so keep in mind there are three columns here so interface data SS and server interface this actually they are running very important role here so currently because this is the sample program so the sample program the sim has already set up the three data in the released and the in the right list there are two data here and in the Middle East they are one data here to build up the communication or implement function I will not use this preset data I will delete them and set up the communication by my own so from this type actually is this our actual step we need to do based on the example program so firstly I will delete this data in the released delete those two data in the right list after we delete this currently this interface is empty okay so from here the falling videos that is the core to implement your customized of product okay so this V interface will run a row to setup the OPC UE connection how we can set up the OPC UA connection how we can assign which OPC UA server this client need to read so actually they are here if we open the bottom this is the properties of this OPC UA client interface you need to ship to this our configuration keep in mind it is here you double-click and in this Astra : bottom he leaves them up and the shift to desert configuration and from here us see this is a client side and here that assigned where is a server and he our project my server that is a one ninety two dot one sixty eight dot zero dot two hundred and the port is a forty eight forty and this this is a full name of the server address so this client we are going to find out this a server and to double check out currently this is the client side if we compare this is the i7 1200 OPC you is server that side project so if I go to the CPU properties look at the OPC you inside this is the OPC ua server address here if we compare so you will see this address must be the same as here this allows this allows this client ago to find out this OPC ue server where it is okay and the security let's double check security as I introduced because we are going to run in the PRC seemed at a loss from test will I will select no security and the user operation I was selected guests check out this automatica accept the certificate and language that is the English language so that's the default we don't touch anything here so just need to check we will select this and no security and we were saliva cast so because this configuration is under this interface so this interface will use this configuration to find out they saw OPC usually server and once this interface found this of OPC us over so the next things is what the data we can exchange right so that data read and write we will build up the tag list here how we can build up so personally I think this is a wearable things in this video because as I remember the documents doesn't explain too much on how we can assign this released to define the specific data in the released and in ArrayList we can connect an OPC UA server / also the actual data the OPC server is sharing or we can click the import and import the list by offline so if you hisses a import interface it will allows you to select a one data list another way or maybe in a common way that is a we go Iraq the browse the OPC you is over browse the actual data we can read or we can write and track data the process the data into our released on the right list and let me show how to do that so from this top list let's select the online and after select online let's hit this small button connect to the online server Jesus connect and then he is online access currently this area is running as a OPC ua client and this client is funding the data from the OPC ua server so from this list let's type in the address 192 168 0 248 40 under search find the selected server now this OPC client found this OPC us over and if you recall on the OPC us over I seven twelve hundred side we said a non security so is showing the non-security okay so from here we will leave this as certificated location now and our user setting here we'll select the ghast okay from here let's click this connect it shows do you want to trust as a certificate of the OPC UA server yes okay so once you hit the connect it shows like this that means the OPC UA client in the sake iPod or software found this or OPC us server so this is server shows that the devices status and the west side we can see the detailed versions and here it shows a couple data's and strains here and more importantly this is a server interface and those are the data we dragged into that interface and this is an actual node ID from this OPC us over and keep in mind it is a server interface underscore i7 twelve hundred and one that that we start from the seven twelve hundred controller side if we require this is a TI Patil virgin sixteen and if you require we set this right and here okay and from this type so what I'm doing so the reason why we are doing here just because we can drag the data to this read or write list so keep in mind currently we haven't download the program yet all the things currently we are configurating the data in offline and config the data in the read list an ArrayList okay so like we introduced so the read least we were to act attach the data one two and a sign and a why here we will track those food data into this on read list let's go to the right list and attract the data one to ten track them to the right list we believe the measure list here okay an author will finish this or track and after we confirm the second here and we can do a come here let's do a compare here it shows OPC us over activate and currently lessons we are using small so if you look at this if your check out here you will see this compelling actually is taken for a while I will explain why the reason why the compelling taken for wow that's because the TP on this uh configuration and ounces of data t b1 and the TB tool they are synchronized based on our configuration because if we go to open this up TB tool from this read list an ArrayList this time we'll open this will see so this read list and then write list the TB already automatically updated according to our configuration right that's because this TV one and the TB tool they are synchronized by this the sighting inside the interface here under this client interfaces and in this a op1 where is running so if you look at the detail all those data interface for this IP one so all the connections set up that data come from those 2d B's so OPC you incline the interface underscore or something here you will see here here and that's the actual read data so and after we convict inside this interface and the dual compiled so the data like this this released at all wearable it is here so that is a TB tool here so this is read the list will automatic updated by this interface configuration to show those data let's go to the watch table okay control the OPC you a client a watch table so the reason why I shall try that because we delete that example data which is fine we can delete them at a role and here I will let this read I will track those for data to this list okay and delete this track those data this is a write the list drag those data into here okay delete this right okay we will leave this existing watch table and do a save and here we are ready to download our controller okay save and a compare again okay so to download the controller as I introduced I will use the PLC seemed at a loss okay let's open the PLC seemed at a loss currently I'm using version 3.0 update one open this a POC seem ok so from here I will select a PLC seem virtual Ethernet adapter select this a local area connection okay so once we install this a POC seem at once and we'll build out one connection here here the gray were shows a Siemens PLC sim and make sure the Ethernet setting here for this connection the IP address you must be the same range you must be the same range so our PLC that is 192 168 dot 0 or something so in this connection I select the 19 I was as a computer right keep in mind this all right and from here we will set up one instant PLC and we can set up the name i 7 1500 OPC UE client ok so it's our trust that is a 192 168 0 to 100 so basically what I'm doing that is a we are using POC sim on one software to build up one virtual controller ok we will select this unspecified CPU 1500 select this once we hit the start and it will transfer those connection build up one POC instance here select start okay currently we haven't done oh yes so this controller is an in stop mode okay and then let's shift back to the project wheel from here let's download download OPC ua client project download the controller that is a zero point 100 download is a cpu program in a configuration to the POC seem at once so here rather than select the actual connection we will select the PLC seem virtual Ethernet adapter if you recall from this appeal cesium we selected here PLC seen virtual Ethernet adapter and here we select the interface if we hit is a start search but it was search the PLC we setup so you will see this if you see the address showing the right you need to check out action this Siemens PLC seemed virtual connection the pier and the IP address should be the same range with your virtual PLC here keep in mind s so currently we can download ok load controller low finish okay currently we download the project and if we go back here click this a start CPU you watch this status you're sure the one who change the CPU to Ramon yes okay now our were show controller is running okay and currently this OPC UE client is running inside this PLC seem a la software and I'm using the virtual machine and I'm using one Ethernet cable connect my laptop to this uh i7 1200 controller a7 1200 controller that is an OPC ue server there so one is a physical server running there one is a one software simulated the controller running as a OPC ua client alright if we go to this watch table list and click this online firstly we need to set up the connection so from here was a hisses are modified on so currently we turn down this OPC UA connect and this OPC we connected the feedback it shows a two that means the connection we already build up the connection if we check out this OPC UA status that is a seven thousand and this is a ue diagnostic status status of 87 33 so what does mean for this so we can go back to the documents go back to the website and download this of manual and then we can search firstly let's search of 7000 so the 7000 after the busy done so this is 7000 that means a client connected and ready for the job because currently we haven't turned on the read and write so that status shows a7 Sultan that means correct what does mean for this attack Gnostic status 87 33 so last search so this Coast means the error in the status list after the registration of a major list because currently I am not using the method list but I lacked the configuration before so if we go back to the client interface and this method that come from the example before but current OPC us over that side it doesn't have added state time so that's why it shows an error it is fine because in this video we just want to show or demonstrate the read and write how to do that you can use this as an example and input the data after and you can see that so we can see if I trigger this read look at this status now if I trigger the read so once i trigger the read you can see the status goes zero that means no arrow and once I turn it off it shows a seven and if I trigger this right so it goes zero if I leave here it shows us 7000 so it doesn't mean some arrow it just show a current status if we trigger the read you will see the data read from the OPC us over every time you trigger the data will read one time right in actual case you can use the one taco beat to trigger this read command okay and we can write something in the OPC ua server side let's go there this is a server side and I'm using the watch table okay now let's write the data to this a tester data one and the test data to 110 and a 200 right and from here let's shift it here let's trigger read so you will see the read so we will see the data read from the OPC UA server okay and now let's try something here so we transfer prepare the data one two three those data are used to write the data from the client to the server and currently you will see on the server side the state of one two three they are 11 12 13 okay and from this client side let's trigger trigger this OPC UA right that's right okay so and then let's go back to the server side you will see the client already wrote the data to the server side 91 92 93 right and now we have a full data read from the server and a right turn data to the OPC UA server and in case you want to add some data after so how we can add the data into this interface right currently in this really is the way our for data and write list we have this data in case we need to add something or change the current data here so what will be and before we change anything here I want to show here and currently if I go offline open this a DB to look at this and as I introduced so this OPC UA client interface that is the same name here so this underscore data this DB actually follows the configuration from this interface now and now the actual data is showing in the DB e looks like this so in case we need to change the data here you cannot insert data you can now insert the data here there's no way to allows you to insert data director from this you have to do the configuration inside this interface rather than change the data direct from this DB because if you look at this actually this verbal list that controlled by this data type here and this States type controlled by this interface and how we can change this a interface firstly we need to go offline and then let's do online direct same way okay okay so in this read least in this released currently we only have a full data here if I increased theta one to four just a for demonstration and drag here and keep in mind currently we are doing the offline configuration with drag here alright and then we can disconnect this connection and once we track here and was a heat is a safe if I double click this DB tool you will see without there's a compel currently this really stays showing here right but now if I'm doing the come hell oh you'll see this where bulliest is changed right is updated by this interface so currently if I go online direct so you will see the db2 and DB one got a change because this interface cause change through this online offline compare so we can see after the reconfiguration the interface so the DB one the db2 gotta change it will show the difference so let's do a download I'm gonna go offline so I'm going to download so what I'm going to do the download and only download the DB and well note so the program will now stop the CPU if we watch this as status here so with this selection we just need when you initialize to the DB rather than stop the CPU totally so this is a very perfect feature so if we kisses re initialized we will see the status of the CPU well I'm downloading so actually the CPU will not stop right see the CPU will not stop so that means the only things it can change this is the DB only because the DB updated by this interface and this also means if you already set up the project and after that you need to add some tags so you only need to do is online download so your controller will now start so the only update is that GB you can add a wearables inside that interface flax fully that's all that's the key function I like to show in this video and keep in mind you'd better read the detail inside these documents it just the foodie pages but actually explain a lot of information to implement this OPC ua client function in the i7 1500 controller and highly recommend you start the project and task using this example so let's do a quick wrap-up so in this video I'm using i7 1200 controller as an OPC ue client and to implement this line I'm using T of C seemed at once to run the worst show I seven 1500 controller run as a OPC ue client and from the server side and using a7 1200 controller a physical controller outside the laptop and the use of one cable connect the laptop to the i7 1200 controller internet connection and from the project wheel I'm using TI proto version 50 point 1 and version 16 so the reason why is the two different version basically show this OPC you inclined so once we implement this function this client can communicate any other OPC ua server all right this is everything I would like to show in this video thank you for watching videos in my channel please subscribe see you in next video
Info
Channel: Electrical Automation Hands-On
Views: 22,353
Rating: undefined out of 5
Keywords: OPC UA, SIEMENS, TIA Portal, S71500, S71200
Id: oChVcRaUt9M
Channel Id: undefined
Length: 47min 51sec (2871 seconds)
Published: Mon Jun 01 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.