Search

User Manual

Getting Started


Modules and Platform


Appendix


Tutorials & Helpful Tricks


Glossary


Strategic Partner Links

Sepasoft - MES Modules
Cirrus Link - MQTT Modules

Resources

Inductive University
Ignition Demo Project
Knowledge Base Articles
Forum
IA Support
SDK Documentation
SDK Examples

All Manual Versions

Ignition 8
Ignition 7.9
Ignition 7.8

Deprecated Pages

Skip to end of metadata
Go to start of metadata



 

Overview

The Siemens drivers in Ignition support basic connections to S7 devices. Ignition connects to these PLCs via TCP/IP using the S7 protocol. Similar to Modbus and some Allen Bradley connections, the Siemens S7 devices do not support tag browsing. You can create S7 Tags manually in Ignition, or use Ignition's Tag import/export to create all of your Tags quickly in Excel or another spreadsheet program. Currently, Ignition has drivers for the following Siemens PLCs:

  • S7-300
  • S7-400
  • S7-1200
  • S7-1500 

Considerations for 1200 and 1500 Devices

The following considerations and configurations changes must be made when using the S7-1200 and S7-1500 drivers:

  1. Only global DBs can be accessed.
  2. The optimized block access must be turned off.
  3. The access level must be "full" and the "connection mechanism" must allow GET/PUT.
  4. Reads and Writes can not be used in TM/CT areas.

 

Connection to a Siemens Device

  1. Go to the Configure section of the Gateway webpage.
     
  2. Scroll down and select OPC-UA Server > Devices.
     
  3. On the Devices page, find the blue arrow and click on Create new Device.
     
  4. On the Add Device Step 1: Choose Type page, select Siemens S7-1200, and click Next.

    There are four modules to choose from

    • Siemens S7-1500
      Which connects to Siemens S7-1500 PLCs over Ethernet.
    • Siemens S7-1200 
      Which connects to Siemens S7-1200 PLCs over Ethernet.
    • Siemens S7-300
      Which connects to Siemens S7-300 PLCs over Ethernet.
    • Siemens S7-400
       Which connects to Siemens S7-400 PLCs over Ethernet.
  5. On the New Device page, leave all the default values and type in the following fields:
    Name: S71200
    Hostname: type the IP address, for example 10.20.4.71
  6. You can check the box for Show advanced properties? to see the additional settings, but you can keep all the defaults.
  7. Click Create New Device.
    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.

Siemens devices do not support browsing, therefore you can not browse the tags by going to the OPC Connections > Quick Client in the Configure section of the Gateway. To see and browse the tags, you need to create the tags manually as described in the Configuring Siemens Addressing section.


IULocgo


Connecting to S7 Devices

 

Configuring Siemens Addressing

The S7 protocol does not support tag browsing. Therefore, you must configure all tags in the Designer. This can be done either manually, as needed, or by importing bulk using the Tags CSV import functionality.

To manually specify each address

  1. From the Designer, in the Tag Browser, right-click on Tags folder, and then go to New Tag > OPC Tag.
  2. In the Tag Editor window, as an example, you can set the following values:
    Name: Tag
    Data Type: Int4
    OPC Server: choose Ignition OPC-UA Server with the edit button on the right.
    OPC Item Path: [S71200]IW0, the S71200 device name goes in the square brackets then you give the address to PLC which in this example is IW0 (Word at Offset 0 in the Inputs area). The Configuring Siemens Addressing section, explains how your can construct these addresses.
  3. Click OK.
    Now you can see the Temp tag in the Tag Browser.
     

Address Syntax

You need a device name plus a tag address to create a tag. The device name is a known, but the tag address needs to be configured. Once you have both the device name and tag address you enter them in the in the OPC Item Path field of the Tag Editor window using the [device_name]address format, where device_name is the name of the device and address is the configured tag address which is described here.

Tag addresses are made up of three different components: AreaDataType, and Offset.

 

Area Syntax

 
DataBlocks DBn 
Inputs I 
Outputs Q 
Flags M 
TimersT 
Counters C 
 

Data Type Syntax

Signedness

BitXN/A
ByteBUnsigned
CharCSigned
WordWUnsigned
IntISigned
DWordDUnsigned
DIntDISigned
RealREALSigned
StringSTRING or STRING.LENN/A

To form an address, you combine syntax for the desired Area and DataType with an Offset into that area.

Examples

 

Area+Data Type+Offset

 
IB0Byte at Offset 0 in the Inputs area
IW0Word at Offset 0 in the Inputs area
DB500,DI8DInt at Offset 8 in DataBlock 500
ISTRING24.50A String of length 50 starting at offset 24 in the
Inputs area
IX20.3Bit 3 of the Byte at Offset 20 in the Inputs area
T0Timer at offset 0 (No DataType is specified for
Timers)
C0Counter at offset 0 (No DataType is specified for
Counters)

Offsets 

It is important to note that offsets are absolute. IW0 and IW1 share a byte. To get two consecutive, non-overlapping words you need to address IW0 and IW2.

Bits 

Bits are addressed by using the Bit DataType (X) and appending .bit to the end, where bit is in the range [0-7]. When addressing a bit at a given offset, that offset is always treated as a Byte. 

Strings 

Strings are assumed to be in the S7 string format and have a max length of 210. 

Timers 

Timers are scaled up to a DWord and converted from S5 time format so they can represent the time in milliseconds without requiring any multipliers. When you write to a timer it is automatically converted from milliseconds into S5 time format for you. A DataType is not specified when accessing timers. 

Counters 

Counters in the PLC are stored in BCD. The driver automatically converts to/from BCD for you and exposes any counter tags as UInt16 values. A DataType is not specified when accessing counters.


IULocgo


About Siemens Addressing

 

Device Settings

General
NameThe name of the Device Connection
DescriptionA description for the Device Connection. The description will appear on the Devices page on the Gateway.
EnabledWhether or not the connection is active. Disabling this setting terminates communication with the device.
Connectivity
HostnameThe hostname or IP address of the device.
TimeoutThe request timeout, specified in milliseconds. The default is 2,000.
Advanced
PortThe port to use when connecting to the device. The default is 102.
PDU SizeNumber of bytes to fit into PDU block of a single packet. Increasing this number can improve request throughput only if the processor supports a higher PDU Size. Varies from 240 and up to 960 depending on the device. The default is 240.
Rack NumberThe number of the rack that the device is positioned in. The default is 0.
CPU Slot NumberThe slot number assigned to the CPU. The default is 2.
Reconnect After Consecutive TimeoutsAfter several consecutive timeouts, the Device Connection will attempt to reconnect to the device. This setting determines how many consecutive timeouts must occur before reconnecting.



 

 

  • No labels