This lesson is part of the Tags in Ignition course. You can browse the rest of the lessons below.

LESSON LIST

Autoplay Off
Take topic challenge

LESSON

Creating OPC Tags Manually

Description

It is possible to create OPC Tags manually when you can't find them using the OPC Browser.

Video recorded using: Ignition 7.7

Transcript

(open in window)

[00:00] If you remember from the earlier lesson, there are two ways to create OPC tags in Ignition, and the second is to basically browse for the tag using Ignition's OPC browser, and that only works if PLC support browsing, and Ignition, the Modbus driver, as well as the Siemens drivers, they don't support browsing, so we'll have to use the first method, and that is to create those tags manually. To do this, it's not so hard, we right-click on the Tags folder in the designer and the Tag Browser and select New Tag, OPC Tag. Because we're developing this tag from scratch, we have to provide the name and the data type, as well as the OPC server and the item path, to wherever it'll grab that value from the PLC. The first thing I'll do here is specify the name, so I'm going to call this tag Temperature, it's going to be an int for data type, and there's different data types that we can work with, and then down here, I'ma specify which OPC server it's going to come from. So I know in this case, I want it to come from the Ignition OPC-UA Server, then we have to specify the OPC item path. The item path is going to be different for every OPC server as far as how they start out, in addition, our item path has to start out with open square bracket, the name of the device, and then end square bracket, that signifies Ignition, says as to which device we're going to grab the information from. After that, we have to specify the address to the value and the PLC, and so this is depending on the driver you're using, the address will be different, so a Modbus, let's say I want to read holding register one, I'm going to type it HR1, and all the information for the different addresses that are possible for Modbus, as well as for Siemens, are available in our user manual if you want to see those a little bit further, but as long as you have that path correct, then Ignition's going to be able to read it. It's really important that the path you're referencing, that the data type of that value must match the data type of the tag or you can have some problems, but as long as you have all the information in there, you press OK, if everything's good, the value will come through correctly and the quality will be good. If you're something was wrong, the quality of the tag will be bad and you can expand that to see if there was a configuration error, or what issues existed there. So mine came through okay, I now have an OPC tag created manually for my Modbus device. I can also do the same thing for my Siemens, right-click Create a new OPC tag, I'm going to call this one Pressure, again, another integer, I'm going to go into my Ignition OPC-UA Server, sort out the item path as open square bracket, now Siemens, that's the name of that device in Ignition, end square bracket, and then the address to that value in the Siemens PLC, in this case, I want to read from the inputs area, I want to read the first word, so I'm going to type IW0. So again, the address scheme is available in the user manual so you can see exactly what areas you want to read from. Once you have this, remember, the datatype of that must match data type of the tag here, once you have that specified, you press OK, again, if everything's okay, you'll see the value coming through in Ignition. The same thing is also true if you wanted to go and connect to a tag in a third party OPC server. You have to specify the correct OPC item path, and I'll give you one example, in Kepware, the item path will start out with the channel name dot device name, and then the actual address to the value in the PLC so it's not something maybe like this would be what Kepware does. So they're all slightly different, it's how they start out, but the end, the address to the value that PLC is dependent on which PLC you're using. Now if you went and browsed for OPC tags, and you brought them in, you would see the exact same thing happen here. So if I took N7-0 and N7-1 from MicroLogix into Ignition, and I went to edit those tags, you will see that it puts the information there for it automatically, the same structure that we just looked at. And that's really all that there is to creating OPC tags manually.

You are editing this transcript.

Make any corrections to improve this transcript. We'll review any changes before posting them.

close

Share this video