Home / FactoryTalk Optix / Optix for Edge
Description
This video looks at how to create and configure an OPC UA client in FactoryTalk Optix. We also look at how we can now configure a Logix controller to be an OPC UA server starting with Studio 5000 v36.
Software used for the demonstration:
– FactoryTalk Optix v1.7
– Studio 5000 Logix Designer v37
– United Automation UAExpert v2.0.1
Transcript
(00:02) Okay, my previous video we looked at factory talk optics and using OPCUA server how to how to make u an opcua server uh inside of optics to serve out data to OPCUA clients. This video I want to look at how do we use optics as an OPCUA client. How do we bring in OPCUA data from a server? And in this demonstration, I’m actually going to kind of demonstrate two pieces.
(00:31) One, of course, is optics and how do we configure that and two is the fact that we can use our uh compact logics and our control logics controllers to be an OPCUA server. Now, so our L8 family and our L9 family of CPUs such as the Compact Logix L8 and the Control Logix L8 and L9 CPUs. Starting with version 36 of Studio 5000, uh you can enable them to to do OPC away communications out of the embedded Ethernet port on the CPU.
(01:08) To do that, um you would have to come into your project, and again, we have to be at version 36 or higher. Um and we’re going to go to the properties of the controller itself. And there is a OPCUA tab um available now. and it is not enabled by default. We do need to choose. Now, for this example, I’m using a compact logix controller that has the two ports on board.
(01:39) Um, and this is the the um the project we use in our opcua server example where we’re pulling in power monitor data um from uh from a power monitor and bringing it into the compact logics here. And then of course we’re bringing that data into optics. The um so to do this we’re going to enable essentially one of those ports. In this case we’re going to enable port one.
(02:04) And we will say okay. Now when you do that the next step is to go to the controller tags. Um and if you go to the edit tag column and it’s going to be over here um off to the side. We now have an opcua access column that’s added and by default everything is turned off none even though we just enabled it. So we would want to enable you know the particular tags or the UDT structure or whatever we want um to give it access to the OPC way you know server.
(02:44) Uh so uh this was our power monitor data which happens to be you know just an array of um some parameters. So if I come up here to the uh you know to the kind of the root of the uh of the UDT I can choose you know read write or read only or no access whatsoever. And we’ll go ahead and make it read right and hit enter.
(03:13) Now when I do that, it automatically changed it for all of the elements uh underneath that uh UDT. And that’s it. We’ll save that to the controller and then um and then uh it’ll be uh now the controller itself will be an OPCUA server. Now if I go to UA uh expert just to show that that data is there. We can add a new server and I will um just give it a name compact logs.
(03:46) We’ll come to the advanced. We’ll go to uh we’ll type in the server which is going to be OPC.tcp TCP colon slash and it’s going to be the IP address that I have for my controller in the lab which is going to be 192.168.254.11 254.11 and the uh the key is knowing the port that the the logix controllers use and they use port 4840 and that is documented in um Rockwell’s knowledge base.
(04:29) All right. Looks like uh let’s see. I did my slashes the wrong way. Now it’s happy. So I’d uh mistyped my slashes and I did not have a green. Okay. Now I have a green. Okay. So um now we will just connect just again to prove that we’re getting OPC UA data out of this um compact logix. So here’s my compact logics.
(05:05) Here’s my module PM1000 that I had uh uh put onto the OPCUA and there are the parameters that were inside that UDT. So I just kind of bring one of those over here. We see that we are getting data from that controller. So I’m going to uh disconnect from this and let’s go to optics. So here’s the the project we had for the opcua server. We already have our opcua server added here.
(05:34) To make optics into an opcua client, it’s again pretty straightforward. We will right click on the opcua node, say new, and we’ll say opcua client. And we get client one which we can rename of course. Now uh by default it put the local host 59 uh 100 um here but we need to change it to that um one we just typed a minute ago. And this time making sure that we do our slashes in the proper way.
(06:07) It was 192.168.254.11. 254.11 colon 4840. We do want to um we do want to make sure that we’re not using any security because again for our just demonstration purposes we have the security turned off and no certificates to have to um work through for the quick example. Now that’s all there is to do it to it, right? We’re going to put in the server uh endpoint URL and we would uh set up any security if if it exists.
(06:48) Um now to actually browse that client and import those tags from that client or from that server, we’re going to rightclick on this uh OPCA client. We’re going to say uh we’re going to choose new and then OPCUA tag importer. and we’re going to double click on the tag importer. This will open up the uh tag importer u here in the um in the canvas area.
(07:17) And this is very similar to when we import tags from a from a controller. Uh we can do offline or we can browse online. And assuming our path is properly set, it will find the the server at that address and list all the tags here. And this is a similar structure we saw in the UA explore tool we had a minute ago that validated our communications.
(07:43) Here we see our compact logics. And I think I can bring that over a little bit. So here’s our compact logix. There’s our module PM1000. And there are the tags that are inside of that UDT that we made available on OPCUA. So let’s go ahead and click that box right there. And now we can import these tags. When we do that, uh over here um we will have objects and then here is that tag structure that we just saw a few minutes ago.
(08:19) Now it’s not listing all the subtags, you know, expanding them out right here. Uh but they are uh shown here. So if we want to come to um a screen such as we want to create a new screen, let’s create a new screen and let’s say we want to put some data on this screen. Um we’ll write we’ll put a uh let’s just put a a label.
(08:44) If I were to point my dynamic link for this label, I can now come down to the OPC UA client. Scrolling down a bit. And here’s my tag importer. Sorry. Objects. Um, there’s my PM100. And now I can expand it and actually point to the the uh one of the variables that is inside that UDT in that structure.
(09:20) So, it’s pointing to parameter 6. So that’s all we got to do for an OPCUA client. We would simply um add the client, point to the URL, and then uh bring in the tag importer and import the tags. And then now those tags are usable inside the optics application to uh to link to base objects or for data logging.
Tutorial List
- Optix as a Headless Data Gateway
- Using the NetLogic VariableSynchronizer
- Configuring OPC UA Server in FT Optix
- Configuring OPC UA Client in FT Optix
- Extending View SE with FactoryTalk Linx OPC UA Connector
- MQTT Embedded Broker
- MQTT Client Publisher and Subscriber
- Optix with Multiple MQTT Subscriptions
- MQTT to SQL with FT Optix
- FT Optix Datalogger to MQTT
