Siemens S7 Driver
Not counted towards your tag license limit.
Driver Errors: To learn more about the cause of an error condition, refer to the Driver Summary Report and the Driver Error Report, both of which are available in the Reports page. The Show Stats button will also provide current and last error messages: Show Statistics Button Widget
Siemens S7 drivers will commonly connect to TCP on port # 102, although variations may be found.
For S7-300 and S7-400, the CPU will normally be at slot 2, but for the S7-1200 PLC system the CPU will always be at slot 1, which is different from the default setting.
Reference Notes:
Communication with the PLC is via ISO over TCP.
This driver has the ability to save the last value written to each output tag, and to rewrite those values, either automatically when lost communications are restored, or manually by the press of a button. Carefully review the information in the Options tab to decide whether this feature should be used in your application. If this driver is being used in conjunction with a Driver Multiplexer, then configure the Driver Multiplexer to store the last values, not the drivers connected to the Multiplexer. In this case, only the Multiplexer should be configured to re-write automatically.
When this driver is used in combination with a TCP/IP tag, the standard TCP port is 102.
Required PLC Settings
For both of the following tasks, use the PLC manufacturer’s programming software, not VTScada.
- If using the newer S7 1200 PLCs (possibly others as well), you must select the "Permit access with PUT/GET communication from remote partner" option in the PLC CPU properties.
- When addressing tags using data blocks, you must deselect the "Optimized block access" option on the data blocks and program blocks in order to determine the byte offset of the individual variables in the blocks.
Siemens S7 Driver I/O Addressing
The ID tab of every tag includes the same common elements: Name, Area, Description, and Help ID.
Name:
Uniquely identifies each tag in the application. If the tag is a child of another, the parent names will be displayed in a separate area before the name field.
You may right-click on the tag's name to add or remove a conditional start expression.
Area
The area field is used to group similar tags together. By defining an area, you make it possible to:
- Filter for particular tag groups when searching in the tag browser
- Link dial-out alarm rosters to Alarm tags having a particular area
- Limit the number of tags loaded upon startup.
- Filter the alarm display to show only certain areas.
- Filter tag selection by area when building reports
When working with Parent-Child tag structures, the area property of all child tags will automatically match the configured area of a parent. Naturally, you can change any tag's area as required. In the case of a child tag, the field background will turn yellow to indicate that you have applied an override. (Orange in the case of user-defined types. Refer to Configuration Field Colors)
To use the area field effectively, you might consider setting the same Area for each I/O driver and its related I/O tags to group all the tags representing the equipment processes installed at each I/O device. You might also consider naming the Area property for the physical location of the tag (i.e. a station or name of a landmark near the location of the I/O device). For serial port or Roster tags, you might configure the Area property according to the purpose of each tag, such as System or Communications.
You may define as many areas as you wish and you may leave the area blank for some tags (note that for Modem tags that are to be used with the Alarm Notification System, it is actually required that the area field be left blank).
To define a new area, type the name in the field. It will immediately be added. To use an existing area, use the drop-down list feature. Re-typing an existing area name is not recommended since a typo or misspelling will result in a second area being created.
There is no tool to remove an area name from VTScada since such a tool is unnecessary. An area definition will exist as long as any tag uses it and will stop existing when no tag uses it (following the next re-start).
Description
Tag names tend to be brief. The description field provides a way to give each tag a human-friendly note describing its purpose. While not mandatory, the description is highly recommended.
Tag descriptions are displayed in the tag browser, in the list of tags to be selected for a report and also on-screen when the operator holds the pointer over the tag’s widget. For installations that use the Alarm Notification System, the description will be spoken when identifying the tag that caused the alarm.
The description field will store up to 65,500 characters, but this will exceed the practical limits of what can be displayed on-screen.
This note is relevant only to those with a multilingual user interface:
When editing any textual parameter (description, area, engineering units...) always work in the phrase editor. Any changes made directly to the textual parameter will result in a new phrase being created rather than the existing phrase being changed.
In a unilingual application this makes no difference, but in a multilingual application it is regarded as poor practice.
Help Search Key
Used only by those who have created their own CHM-format context sensitive help files to accompany their application.
Server List
Select (or create) a named server list.
Siemens S7 Driver properties Options tab
The Options tab for the Siemens S7 driver tag properties folder consists of attributes used to identify and establish a connection to the control device to be associated with this driver.
PLC Type
Address parsing differs for the S7-200 device. For all other S7 devices, choose the option, "other".
Priority
Two priority levels are available: OP Mode (low priority) and PG Mode (high priority). Note that there may be a limit on the number of PG mode connections which are available.
Rack and Slot
Specify the CPU position. These can be determined from the hardware configuration. Note that these fields do not apply to the S7-200 CPU.
CP Type
If you are connecting to a Siemens PLC through a communications processor, select it here, otherwise select None.
Options include: CP-243, CP-343 and CP-443.
Store Last Output Values
When selected, the driver will maintain a record of the last value written to each output address. This may be useful in at least two situations:
- For hardware that does not maintain its state during a power loss and must be restored to that state when re-started.
- When failed hardware is replaced by a new device and you would like to start that device with the values last written to the old one.
If the last output values are stored, they may be re-written by either of two methods:
- Automatically, when communication is restored to the device.
- Manually by way of a button press. See, Rewrite Outputs Widget for details.
Changing this value from selected to deselected will cause all stored values to be erased immediately.
If this driver is being used in conjunction with a Driver Multiplexer, then configure the Driver Multiplexer to store the last values, not the drivers connected to the Multiplexer. In this case, only the Multiplexer should be configured to re-write automatically.
Enable Auto Rewrite
If selected, the Store Last Output Values option will also be activated. This option causes the driver to rewrite the last value written to each output, in the event that communications are lost and then restored.
Use this option only if you are certain that you want the last values to be rewritten automatically after an interruption in driver communications.
Siemens S7 Driver properties Serial tab
The Serial tab for the Siemens S7 driver tag properties folder consists of attributes used to identify and establish a connection to the control device to be associated with this driver.
Port
Since the only protocol available is ISO over TCP, you should configure and select a TCP Port.
Time-Out Limit and Retries
A half second time out limit with one retry is recommended as a reasonable value for a Siemens PLC.
Retries
The number of times to retry a message before declaring an error.
Use only if the driver is connected to a device that uses a serial port or a UDP/IP port that is configured to be polled. When connected directly to a device using TCP/IP, this value should normally be set to 0 since TCP/IP is a guaranteed message delivery protocol.
For unreliable communications, such as radio, set to 3 or 4.
Hold
Select this to have I/O tags attached to the driver hold their last value in the event of a communication failure. If not selected, tags will have their value set to invalid on a communication failure.
Protocol Timeout
Timeout period, after which a lack of protocol traffic is considered an error. Default: 30 seconds.
Initial Max Packet Length
Maximum PG/OP packet length used for initial communication with the PLC. This value will not be used after length negotiation with the PLC is complete. Default: 240.
Max. Outstanding Requests
Defines the maximum number of PG/OP packets that may be outstanding. Default: 1 outstanding request.
Max Items Per Request
Defines the maximum number of item addresses to include in a request. Default: 18 items.
Max Requests per Semaphore
Defines the maximum number of requests that can be sent in one semaphore acquisition. Default: 100 requests.
Max Time per Semaphore
Defines the maximum amount of time to hold the semaphore. Default: 1 second.
The following widgets are available to display information about your application’s Siemens S7 driver tags: