LESSON

About Siemens Addressing

Description

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

Video recorded using: Ignition 8.1

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 focus on the tag browser here. To start, let's create a new OPC tag by clicking on the add icon and highlighting the new standard tag option. And then choosing OPC tag. Let's change the name on this tag here. We'll call this input zero. You'll see why in just a moment. I'm going to leave the data type as an integer. Let's set the OPC server to ignition's OPC UA server. Next, we need to specify the OPC item path. As usual with ignitions drivers, we need to specify the name of the device connection in the square brackets. In the previous video, I named the connection S71200, so let's type that out in square brackets. Now we need to figure out what the rest of the path should look like using the driver syntax.

[01:06] Now, typically the syntax contains an area, a data type and an offset. So for example, I could type I for inputs, W for word, and zero for offset. So in the inputs area, I want to show the value for the word at offset zero. We'll click okay, and in just a moment, the tag comes back with good quality and now we can see the value. For our next example, I already have a string tag created, and you can see the string value is shown as I am a Siemens S71200. 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 DB2 for the data blocks area named DB2. When specifying a data blocks area, we do need to separate the area and the data type with a comma, and I've set this at offset 20. Additionally, I added a dot 23 to specify the string length. Now you don't have to memorize the syntax here.

[02:05] If you take a look at the Siemens section of the ignition user manual, which I've linked below this video, we list the full syntax and show many examples. So make sure to check out the user manual for more information.

You are editing this transcript.

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