This lesson is part of the OPC-UA and Devices in Ignition course. You can browse the rest of the lessons below.

LESSON LIST

Autoplay Off
Take topic challenge

Description

Learn how to address values in Siemens S7-1500, S7-1200, S7-400, and S7-300 devices.

Video recorded using: Ignition 7.9

Transcript

(open in window)

[00:00] In this video, we'll take a look at manually creating tags from an S7 device connection. The S7 protocol does not support browsing, but we can manually create tags easily. We'll start in the designer and in my tag browser here I'm going to click on the tags folder. We'll come into this dropdown on the top. And let's create an OPC tag. I'm going to change the name on this tag here. We'll call this input0. You'll see why in just a moment. I'm going to leave the data type as an integer. I'm going to change the OPC server to ignitions OPC-UA server. Next, we need to specify the OPC item path. As usual with Ignition's drivers, we need to specify the name of the device connection in the square brackets. So I've typed out S71200. Now, we need to figure out what the rest of the path should look like using the driver syntax. Now, typically the syntax contains area, a data type, and an offset. So for example, I could type 'I' for inputs, 'W' for word, and '0' for offset. So in the inputs area, I want to show the value for the word at offset 0. We'll click 'OK'. And in just a moment, the tag comes back with good quality, and now we can see the value. For our next example, I have a string tag already created. I'll double click on it. And let's take a look at the item path. So in this case, I'm trying to fetch a string, so I've changed the data type to a string. I'm saying 'I' for inputs again in the inputs area. There's a string data type string at offset 24. And in this case I can add a .20 to specify the string length. Now you don't have to memorize the syntax here. If you take a look at the Siemens section of the Ignition user manual, we list the full syntax and show many examples. So make sure to check out the manual for more information.

You are editing this transcript.

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

close

Share this video