Siemens Driver
The Siemens driver supports browsing, symbolic addressing, and access to optimized data blocks when S7-1200 and S7-1500 device types are selected in the connection settings. Symbolic addressing is not supported for S7-300 and S7-400 devices.
Note that the Siemens Driver has a device connection limit of 250 devices.
Connecting to a Siemens Device​
The Siemens S7 Symbolic Driver module requires the OPC UA module to be installed and enabled. If the OPC UA module is not installed or is disabled, this module will fault with a warning in the logs and display the state as "Faulted Missing Dependency" on the Platform > System > Modules page.
Go to the Connections section of the Gateway Webpage.
Select Connections > Devices > Connections.
On the Devices page, click on Create Device Connection +.
On the Select Driver form, select Siemens Driver and click Next.
On the Configure Device form, leave all the default values and type in the following fields:
- Name: S7_Symbolic
- Hostname: Enter the IP address, for example 10.20.4.71.
Under Device Settings, select your Device Type.
- S7-1500
- S7-1200
- S7-300
- S7-400
Select Symbolic or Absolute for the Address Type.
S7-300 and S7-400 AddressingIf your Device Type is either a S7-300 or S7-400, you must select Absolute as your Address Type to establish a connection.
Click Create Device Connection.
The Devices page is displayed showing the Siemens device is successfully created and added to Ignition. The Status will show as Disconnected and then Connected.
Addressing Syntax​
The Siemens Driver supports two addressing types: Absolute and Symbolic. Absolute addressing accepts the same syntax as the Siemens Legacy drivers, as well as a variation that resembles the syntax used in the TIA portal, with the addition of supporting arrays. This variation is described in the Absolute Addressing section. If you've connected with the Symbolic address type, refer to the Symbolic Addressing section.
Absolute Addressing​
Data Type | Syntax Address |
---|---|
Numeric - Inputs, Outputs, Flags | <Area><DataType><Offset>[ArrayDimensions] |
Numeric - Data Blocks | DB<DBnumber>.[DB]<DataType><Offset>[ArrayDimensions] |
Boolean/Bit - Inputs, Outputs, Flags | <Area>X<Offset>[.BitNumber][ArrayDimensions] |
Boolean/Bit - Data Blocks | DB<DBNumber>.[DB]X<Offset>[.BitNumber][ArrayDimensions] |
String - Inputs, Outputs, Flags | <Area>STRING<Offset>[Length] |
String - Data Blocks | DB<DBNumber>.[DB]STRING<Offset>[Length] |
Timer | T<Offset> |
Counter | C<Offset> |
Manual Addressing Examples​
Address | Description |
---|---|
IW0 | 16 bit unsigned integer (Word) from offset 0. |
QI12 | 16 bit signed integer (Int) from offset 12. |
MD5[2] | Array of two 32 bit unsigned integers (DWord) from offset 5. |
IW0[3,2,2] | Multidimensional array (with dimensions [3,2,2]) of Words from offset 0. |
DB500.DBREAL10 | 32-bit floating point number from offset 10. |
DB400.DBDI52[4,8] | Array with 4 rows of 8 columns of 32-bit signed integer (32 Int32 values in total) from offset 52. |
DB1.DBX9.7 | Bit 7 from offset 9 |
DB1.X8 | Bit 0 from offset 8 |
DB1.DBX8[8] | Array of 8 booleans, Bit 0 from offset 8. |
DB500.STRING255[7] | String of up to 7 characters from offset 255. |
T9 | Timer from offset 9. |
C4 | Counter from offset 4. |
Refer to the Configuring Siemens Addressing section of the Siemens Legacy Drivers page for more details on manual addressing.
Data Types​
S7 Data Type | OPC UA Data Type |
---|---|
BOOL | Boolean |
BYTE | Byte |
WORD | UInt16 |
DWORD | UInt32 |
LWORD | UInt64 |
SINT | SByte |
INT | Int16 |
DINT | Int32 |
LINT | Int64 |
USINT | Byte |
UINT | UInt16 |
UDINT | UInt32 |
ULINT | UInt64 |
REAL | Float |
LREAL | Double |
S5TIME | UInt32 Note: Represents some number of milliseconds between 0 and 9990000. |
TIME | Int32 Note: Represents some number of milliseconds between Int32.MIN and Int32.MAX. |
LTIME | Int64 Note: Represents some number of nanoseconds between Int64.MIN and Int64.MAX. |
DATE | UInt16 Note: Represents the number of days since 01-01-1990. |
TIME_OF_DAY (TOD) | UInt32 Note: Represents the number of milliseconds since the beginning of the day. |
LTOD (LTIME_OF_DAY) | UInt64 Note: Represents the number of nanoseconds since the beginning of the day. |
DT (DATE_AND_TIME) | DateTime |
LDT | UInt64 Note: Nanoseconds since epoch (01-01-1970 00:00:00.000000000). |
DTL | N/A Note: Structured representation of a date and time. |
CHAR | String |
WCHAR | String |
STRING | String |
WSTRING | String |
Symbolic Addressing​
The Symbolic address type for S7-1200 and S7-1500 makes tag browsing possible in the Designer.
From the Designer, in the Tag Browser, click the Add
icon.
Select New Standard Tag, then OPC Tag.
In the Tag Editor window, you will need to enter a Name, select a Data Type, and select the Ignition OPC-UA Server as your OPC Server.
For the OPC Item Path field, select the Devices
icon to browse the OPC UA Server. Use the dropdowns to navigate to your desired tag path and click Apply. The OPC Item Path will now be filled.
Click OK. Now you can see your tag in the Tag Browser.
Device Settings​
General​
Setting | Description |
---|---|
Name | The name of the Device Connection. |
Description | A description for the Device Connection. The description will appear on the Devices page on the Gateway. |
Enabled | Whether or not the connection is active. Disabling this setting terminates communication with the device. |
Connectivity​
Setting | Description |
---|---|
Hostname | The hostname or IP address of the device. |
Port | The port to use when connecting to the device. The default is 102. |
Timeout | The maximum amount of time to wait for a response, specified in milliseconds. The default is 3,000. |
Device Settings​
Setting | Description |
---|---|
Device Type | The type of S7 model used for this driver connection. Options include S7-300, S7-400, S7-1200, and S7-1500. |
Address Type | The type of addressing used for this driver connection. Options include Absolute or Symbolic for S7-1200 and S7-1500 devices. S7-300 and S7-400 devices can only use Absolute addressing. |
Rack Number | The number of the rack that the device is positioned in. The default is 0. |
Slot Number | The slot number assigned to the CPU. The default is 0. |
Advanced Settings​
Setting | Description |
---|---|
Optimize Writes | When enabled, tag writes will be batched. |
Force Secure Connection | If this is enabled, only connections that are made over a secure channel will be accepted. Disabled by default. |
Password | The password selections available for the Active Directory. Options include None, Embedded, and Referenced. |