TIA Portal: OPC UA Client Interface Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in previous videos one and two the opcua server configuration as well as user management of connections has been performed this video 3 in the series now aims to align the use of an opcua client in the S7 PLC using instructions from the Native Library these will be used to read and write to an opcua server licensing is enabled in the PLC properties and resource structures available are determined based on the PLC type pause to see the table above for client resources licensing is based on the server and not the client so this is why we must activate the opcua client for use of the interface and instructions gate to OPC UA client client interfaces OPC UA communication client interfaces in the project tree and TI portal and double-click on add new client interface now it's time to configure the properties of the connection parameters enter a server name the address and the port of the server in the inspector window under properties configuration connection parameters also assign a useful session timeout and desired monitoring time in the inspector window under properties configuration security select the required security mode and the security policy also create a client certificate if you want to use and establish a signed or encrypted connection and configure the required user authentication both user management and certificates play an important role in securing network communications user Management Systems can prevent unauthorized access to network resources while certificates can verify Communications in the Tia portal workspace navigate to data access read list in the left Pane and double-click add renew read list you now have two options for filling the reading list via an imported server interface as an XML file or be in an online connection directly to the server in the source of server data drop down list on the right side of the workspace select one of the two options as a troubleshooting step make sure that the OPC UA server is accessible from your engineering station before establishing an online connection the previous the previously configured username and password for user authentication had been established in the OPC UA server do know there is a common misconception of having to place the port number in the server address of this pop-up dialog this is assumed here in this configuration area as it has already been included in the connection parameters placing it twice in both places will result in a server not being found find the selected server band and select no security just for this example now I'll go ahead and hit connect and I'll be prompted to see the certificate that's enforced since we're using no security I'll just go ahead and accept it and then yeah we can start to browse the opcy server interface where I can find tags and quickly drag and drop them to the read list for examples of configuring the server interface please reference the previous videos if you use for example a right list but try to drag in a read-only tag you will be prompted with an error drag and drop from either single tags or complex structures this feature is what makes OPC UA so powerful we're tag browsing and we can use structures the errors in this consistency check would need to be remedied if you are finding this content beneficial please hit the like button at the bottom and subscribe to keep up with future videos if you can do this it would help me know where to place my future focus on new content download and go online for the first time the Tia portal stores this information in two automatically generated data blocks the interface configuration this data block consists of the data connection information node IDs and data types and the interface data the values read or to be written to are stored in this DB the DB also contains a status list for the individual variables I don't know if you noticed but there weren't any values being updated use the configuration to help us pre-generate the connections for example the tags for the server endpoint URI will use the configuration and generate Force here if we just simply point to the client interface that we've already configured we do need to be offline in order to configure these now we can select client interface one move along to data access where we select read list one and then finally we can look through the block parameters each one of these areas are tags that were generated and filled in for us last but not least the connection configuration we do need to go into the security area where you can see that what we configured already after the completion of the opcua read list compact block go ahead and download to the plc going online we can see that the blocks generating a dawn bit busy then also we get some status back for further details about the status please reference the manual here you can press F1 on the Block then you can also scroll till you find status information towards the bottom with an additional click here on status parameter if you are having errors or issues it's really nice to come here and look going on when we are now online with the server if we change server values then comes a change too from the client's perspective within the respective DBS there is now an update to the tags in both places while we are here now is a great time to spruce up the code with some great comments we now have the hang of an OPC UA read instruction let's now configure the OPC UA right compact instruction in a similar fashion attaching values to the request and maintaining the session input parameters is suggested here place a false here to close the connection each time a True Value would maintain the connection without disconnecting at the end of each request cycle for demonstrating a later principle we will place a false here which is also the default value in general maintaining the session is a better idea of planning to pull the same data constantly opening of the property area will allow the client interface to be selected and configured follow the same selection of the data access and review the connection settings now it's time to download and set the code to run well here's the test we will want to see a value update this time in the other direction when we created these interfaces the namespace that was configured will become available in the standard code area in the form of a client interface data Block in the OPC UA server this array will become updated by the OPC UA client in the client we have matching data structures but more importantly we directed this connection in the previous configuration of the interface so go ahead and change a value in the right list then we can go ahead and check the read list where the value is already updated next in code this example shows moving the OPC UA client's clock byte into the OPC UA servers data space this is an easy way to see values being continuously updated on either side of the connection make similar changes and download the network of logic code now if we go look at the OPC UA server we should see an update to the value representing the OPC UA client's clock byte for the next example both the client and server clock byte will be written to a digital output card in the local backplane first we can create tags that align with the output addressing of the digital output card and then use a move command to move data around for displaying on the output card percent QB 10 and 11 will align the address for the area we want to point at note that in the digital output cards tag area it's now clear to see the tag assignment also another alternative design could have just aligned these tags directly through the OPC UA interface also instead of the following method where I will just move values around use move instructions here to align but what is nice also is the ability to view the tag value in line with the code downloaded now here is a live view of the front of the et200 SP CPU pretty clear to see the digital output card flashing based on what we just configured now that we have clearly demonstrated OPC UA reading and writing with Native instructions the next step is to understand how we can utilize OPC UA server methods OPC UA server methods can be very helpful in many operational or informational environments an OPC UA server method can be defined as a way for clients to invoke specific functions or methods on the server from remote devices or systems this provides a powerful way to interact with and control the overall system enabling operators to perform tasks such as starting or stopping equipment configuring production parameters or retrieving data from the system all while receiving values quality of the signal and time stamping here we'll perform the task of setting the PLC time but this is really so we can talk about the next Progressive video in that step 4 a server method will be created and used to update the plc's system time based on the client's call of the OPC UA servers method please join me in the following step 4 where server methods will be demonstrated then in the final step 5 we can explore the requirements for optimization of an OPC UA client and OPC UA server
Info
Channel: System-Restored
Views: 13,144
Rating: undefined out of 5
Keywords: TIA Portal, Siemens, SiOME, OPC UA, OPCUA, Modeling Editor, OPC, S7-1500, OPC UA sever, OPC UA Client, OPC Modeling, OPC DA, OPC A&E, OPC AE, PLC
Id: nXUsnkgHsGk
Channel Id: undefined
Length: 15min 14sec (914 seconds)
Published: Mon Apr 17 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.