GUIDE TOP Server Hands-On Communication Guide S7-1500 CONNECTIVITY VIA OPC UA Our mission is to provide you with the right software package to solve your industrial operation challenges. Our mission is to provide you with the right software package to solve your industrial operation challenges. Page 2 of 35 Table of Contents INTRODUCTION 3 SIEMENS RECOMMENDED SETTINGS AND LIMITATIONS 4 TIA PORTAL CONFIGURATION 6 Setting up the OPC UA Endpoint 6 Exposing PLC Data through the OPC UA Server 9 TOP SERVER CONFIGURATION 10 CONFIGURATION SCENARIOS 28 Scenario 1 – 1,000 items at the same publishing rate 28 Scenario 2 – 10,000 items split between fast and slow publishing rates 29 Scenario 3 – 5,000 items split between high and low priority subscriptions, at various publish rates, with a subset of tags read at a set interval. 30 Scenario 4 – 2,500 items updated every 30 seconds regardless of value changes 31 Scenario 5 – 7,500 items split between low, medium, high, and critical priorities, with varying publish rates. 32 CONCLUSION 34 APPENDIX A – SIEMENS DOCUMENTATION 35 Page 3 of 35 Introduction Communicating with Siemens PLCs using the TOP Server is not a new feature and has been supported since the early days of the server, in the form of the Siemens TCP Ethernet driver. As the Siemens PLC families have grown and evolved, so have the communication protocols that can be used to extract the data from these units. With the current S7-1500 series of PLCs, Siemens has embedded an OPC UA Server into the controller, opening the door for faster and more efficient communications that are more reliable and secure. The OPC UA interface in the S7-1500 offers a few benefits over the traditional Siemens TCP (RFC1006 ISO over TCP) communication method: 1. 2. Efficiency a. Supports report by exception (RBE) subscription model that allows the PLC to publish only data that has updated without the client having to constantly poll the device. b. OPC UA allows for easy transfer of entire arrays, preventing the TOP Server from having to poll each element of an array individually. c. A larger maximum packet size with a more efficient binary structure allows for faster and more bandwidth-conscious data transfer. Security a. Compared to the ‘security by obscurity’ concept with the Siemens TCP Protocol, OPC UA allows for user authentication, encryption of communications, and endpoint authentication, using TLS Certificates. This document is intended to be a guide on how to set up the TOP Server OPC UA Client driver to communicate with the OPC UA Server embedded in a Siemens S7-1500 series PLC. The document is not intended to be a comprehensive guide on using or programming the S7-1500 series PLCs, using either TIA Portal or STEP7, or using the TOP Server – it is assumed that the reader has a strong working knowledge of TIA Portal, TOP Server, as well as the S7-1500 PLCs. For information beyond anything in this document please refer to the appropriate vendor help file. Page 4 of 35 Siemens Recommended Settings and Limitations Siemens has published documentation that provides the recommended communication loads that the S7-1500 series PLCs have been tested against (by Siemens) and that are officially supported (Original Siemens Documents are included in Appendix A). Given that these guidelines were published by Siemens, this document will configure the TOP Server to match those recommended communication settings – although it is important to note that, with TOP Servers flexibility, there are several ways to set up the TOP Server project. The S7-1500 limits that should be kept in mind when configuring the TOP Server Project are shown below. (These limits are specific to firmware versions 2.0.x and 2.1.x and may change for future firmware revisions. Siemens documentation should be checked for the most current limits) ET200s, 1510, 1511, 1512, 1513 1515, 1516, 1505S 1517, 1518, 1507S Maximum Number of Sessions 32 48 64 Maximum Number of Subscriptions per Session 20 20 20 Recommended Number of Subscriptions with more than 1000 items across ALL sessions 10 10 10 Recommended Number of Subscriptions with at most 1000 items across all sessions 50 50 50 Maximum Number of Items per Request 1000 1000 1000 Maximum Number of Items per subscription 10000 10000 10000 Total Number of (scalar) items (Assuming a 1 second sampling rate with a 1 second publishing rate) 1000 2000 10000 Measured Communication load due to sampling without publishing (Assuming a 1 second sampling rate with a 1 second publishing rate) 10% 14% 10% Support Sampling Intervals (all numbers are in milliseconds) 100, 250, 500, 1000, 2500, 5000 100, 250, 500, 1000, 2500, 5000 50, 100, 250, 500, 1000, 2500, 5000 Smallest possible publishing interval (all numbers are in milliseconds) 500ms 200ms 50ms Where possible, arrays should be used to maximize the efficiency of data transfer. Notice that the recommended total number of items refers specifically to scalar tags. Arrays – which can be retrieved in a single request – allow for much more efficient data transfer because hundreds of values can be retrieved in a single request and – more importantly – as a single item. Page 5 of 35 When looking at the recommended items, subscriptions, and sessions above, it does not matter how the items are distributed. 10000 subscriptions each with one item, and 1 subscription with 10000 items will have the exact same performance, although the additional overhead of managing subscriptions means that the memory usage of 10000 subscriptions – each with one element – would be many times greater than a single subscription with 10,000 elements. It is therefore recommended to distribute items over the smallest number of channels and devices possible. When designing the TOP Server project, the numbers from the previous page will translate to TOP Server components as follows: • The TOP Server OPC UA Client driver creates one OPC UA Session per channel • The TOP Server OPC UA Client driver creates one OPC UA Subscription per device (this means there should never be more than 20 devices configured under a single channel) • The Maximum Items per request can be set directly in the TOP Server UA Client driver device properties and should never exceed 1000. • The Maximum number of items per subscription will depend on the number of devices created under a single channel and the number of items that should be read from the S7-1500. To minimize memory usage the number of subscriptions should be minimized. Page 6 of 35 TIA Portal Configuration Before any data can be accessed in the S7-1500, the OPC UA server must be enabled and configured to expose the data points that will be accessed via the server. For the sake of simplicity of the examples in the document, no endpoint security will be used for setting up the connection between the TOP Server and the S7-1500. For information on configuring endpoint security – including security certificates and or user authentication – please refer to the Siemens documentation on enabling these settings in the TIA Portal Project. Setting up the OPC UA Endpoint In order to enable and configure the OPC UA Server endpoint in the S7-1500 the following steps must be taken: 1. Open the project view and navigate to the device configuration (1) for the CPU (2) and find the OPC UA Section of the configuration (3) Page 7 of 35 2. On the OPC UA > Server > General tab, (1) verify that the OPC UA Server is enabled (2) by checking the “Activate OPC UA Server” Checkbox (if not already checked). Make note of the server address listed in the accessibility section (3) – this will be the endpoint URL to which OPC UA Clients can connect. The <dynamically> portion of the URL will be replaced with the IP Address of the S7-1500 PLC. 3. On the OPC UA > Server > Options tab, (1) the TCP port that will be opened for OCP UA clients to connect to can be set (2) – in this case the port has been changed from the default 4840 to 4844; any TCP port can be specified here, although it is recommended to stay in the ephemeral port range of 1025 or greater. The minimum publishing interval and minimum sampling intervals can also be specified here (3) 4. a. Minimum publishing interval – This is the lowest interval that an OPC UA client can specify when subscribing to tags in the OPC UA Server. If the OPC UA client requests that the S7-1500 publish data faster than the minimum defined here, the OPC UA Server will modify the publish rate to be this minimum value. b. Minimum sampling interval – This is the fastest rate at which the OPC UA Server will retrieve values from the PLC memory. At the default value of 100 ms, the OPC UA Server will check the current value of a point 10 times per second. If an OPC UA Client requests a sampling rate that is faster than the minimum defined here, the OPC UA Server will modify the sampling rate and notify the OPC UA Client of the new sampling interval. On the OPC UA > Server > Security > Secure Channel tab, (1) take note of what security policies are enabled. For the sake of this application note, no security (2) will be used – i.e. the connection will not be encrypted, and endpoints will not be authenticated. To use endpoint authentication and/or encryption please refer to the Siemens documentation on configuring the OPC UA Certificates. Finally verify that the OPC UA Server is Page 8 of 35 set to accept all connecting client certificates automatically (3). In a system where endpoint security is being used, this option should be left unchecked so that all client certificates must be manually added. With the OPC UA Server endpoint now successfully created, enabled, and configured, the PLC Tags must be configured to be accessible via the OPC UA Server. Page 9 of 35 Exposing PLC Data through the OPC UA Server Regulating which PLC items/tags are exposed by the OPC UA Server is easy and can be done through the data blocks in which the items were created. The “Accessible from HMI/OPC UA” checkbox within each data block specifies whether the item should be exposed through the OPC UA Server or not. This checkbox must be checked for all items that the OPC UA client will be reading/writing. This checkbox is checked by default i.e. no changes are needed if all items in the PLC should be exposed through the OPC UA Server. With extremely large projects it is recommended to expose only those tags that will be consumed by the OPC UA Client/HMI – to minimize the CPU load due to the OPC UA Server scanning the PLC tag values. Page 10 of 35 TOP Server Configuration When designing the TOP Server project, a few design considerations must be kept in mind to adhere to the recommended settings published by Siemens and listed in the Siemens Recommended Settings and Limitations section earlier in this document. It is important to note that the TOP Server is capable of more than what is recommended in the table below, and that care should be taken to not overload the S7-1500 by using TOP Server settings that are beyond the supported scope of the S7-1500: ET200s, 1510, 1511, 1512, 1513 1515, 1516, 1505S 1517, 1518, 1507S Maximum Number of TOP Server Channels connected to a single PLC 32 48 64 Maximum Number of TOP Server Devices per Channel 20 20 20 Maximum Number of TOP Server Devices, (across all channels) with more than 1000 items per device, being read from the same PLC. 10 10 10 Maximum Number of TOP Server Devices, (across all channels) with up to 1000 items per device, being read from the same PLC. 50 50 50 Maximum Number of Items per Request 1000 1000 1000 Maximum Number of Items per TOP Server Device 10000 10000 10000 Supported Sampling Rates 100ms – 5000ms 100ms – 5000ms 50ms – 5000ms Supported Publishing Rates 500 ms + 200 ms + 50ms + With the TOP Server OPC UA Client driver – when working with an S7-1500 – the design philosophy behind configuring the TOP Server project changes slightly from other standard drivers (e.g. Modbus, Siemens TCPIP, ControlLogix Ethernet, etc.). While each channel created in the TOP Server still corresponds to an individual thread, and it might seem like a good idea (like with other drivers) to point multiple channels to the same S7-1500 to effectively multi-thread the communications, this would result in significantly higher memory usage in most S7-1500 projects, while not corresponding to a notable improvement in performance. It is, therefore, recommended to not exceed 1000 items per device (so that all items can be read/written in a single transaction), and not exceed 20,000 items (i.e. 20 devices) per channel. Page 11 of 35 To configure the TOP Server for communications: 1. Under the “Connectivity” section of the TOP Server tree view, click to add a new channel to the project. 2. Specify that the channel being created must use the OPC UA Client driver, since the TOP Server will be acting as an OPC UA client to the OPC UA server built into the S7-1500 PLC. 3. Specify a user-friendly name for the channel. This name will be how clients connecting to TOP Server reference the tags that will be read over this session so it should be descriptive of where the data is coming from. Page 12 of 35 4. The Write Optimization settings can be left at their defaults. a. Optimization method – describes how multiple writes to the same data point should be handled. By default only the latest value for the point will be written – as opposed to every intermediate value. b. The Duty Cycle specifies how many writes should be issued per one read. If there are 100 reads pending on a channel and 100 writes, there will be a single read issued per every 10 writes to clear out the queue. This ensures that writes are treated with higher urgency than reads. Page 13 of 35 5. Specify the endpoint of the OPC UA Server to which the TOP Server will be connecting. The Endpoint URL must match the endpoint URL noted in Step 2 of the TIA Portal setup section earlier. 6. Specify the channel level timing settings – these settings will impact the connection to the OPC UA server as a whole. a. Connection Timeout – How long should the TOP Server give the connection to initialize? When working with larger projects, or working on systems where the S7-1500 is under heavy load (and may be slower to process communication requests), this may need to be increased. For most systems, this setting should be left at the default 30 seconds. b. Idle Session Timeout – How long should the TOP Server stay connected to an OPC UA server without any traffic? (i.e. If the ethernet cord between the S7-1500 and the TOP server were to be cut, how long should the TOP Server wait before timing out the connection?) c. Channel Renewal Interval – How often (in minutes) should the TOP Server re-establish a channel. When modifying this setting, the need for security should be weighed against the impact of having the communication performance temporarily reduced. Decreasing this value will improve security at the cost of performance. d. Reconnect Interval – The rate at which the TOP server attempts to reconnect to the OPC UA server if the connection is lost. e. Watchdog Interval – The rate at which the TOP Server reads the OPC UA Server status value (ns=0;i=2259). In most systems, this value should be left at the default; possible reasons for modifying this value might include: Page 14 of 35 i. Needing to very quickly identify that the OPC UA server is no longer available (faster than the 5 second default); in this case the interval value should be decreased. ii. Working with an OPC UA server that is under very heavy load, and might be slow to respond to status read requests. In this case the interval should be increased (quite significantly, if possible, to 30 seconds or more) to avoid the watchdog read timing out, resulting in the connection being broken down and rebuilt – which would add additional load to the server that might already be overloaded. Page 15 of 35 7. If user authentication was configured in the S7-1500 OPC UA server, the credentials must be provided here. Since – for the purposes of this app note – the TOP Server is identifying as an “Anonymous” user, these settings will be left blank. 8. Verify that the channel settings are all correct, and use the Finish button to complete the channel creation. Page 16 of 35 9. Since the S7-1500’s OPC UA Server certificate is not yet trusted, the TOP Server will ask if the certificate should be added to the Trusted Server list. In this demo, since no security is being used, either response would technically work, but it is strongly recommended to select Yes and trust the server certificate. 10. To verify that the server certificate is now imported; right-click on the TOP Server Admin icon in the Windows system tray and launch the OPC UA Configuration utility. Alternatively, this utility can be launched from the Software Toolbox > TOP Server directory in the Start Menu. Page 17 of 35 11. Navigate to the Trusted Servers tab (1) and verify that the S7-1500 OPC UA Server certificate is listed (2). If the choice was made to not trust the server certificate in Step 9, the certificate icon to the left of the Server name will have a red X marking it as a non-trusted server. 12. With the TOP Server channel created, devices can now be added. Where the channel corresponds to an OPC UA Session to the OPC UA server, each device represents a subscription created on that session. Under the OPC UA Client driver channel, click to add a device. Page 18 of 35 13. Give the device a name. This name can be anything, and will be how client applications reference this device when connecting to the TOP Server. 14. For most systems the Scan Mode should be left at the default setting of “Respect Client-Specified Scan Rate” to allow the Client software to specify the scan rate. (Refer to the TOP Server help file for descriptions of the other scan modes.) Unlike most drivers, with the OPC UA Client driver, the Scan rate only affects the rate at which the client application receives updates from the TOP Server, and not the rate at which data is read from the S7-1500. The update rate and scan behavior between the S7-1500 and TOP Server is controlled via the subscription and read settings later in this document. Page 19 of 35 15. Configure how data updates in S7-1500 OPC UA Server should be sent to the TOP Server OPC UA Client driver. a. Publishing Interval – Interval at which the S7-1500 should publish data changes to the TOP Server. b. Max. Notifications per Publish – The maximum number of data change notifications that the S71500 should publish to the TOP Server in a single publish message. If this value is set too low it is possible that the S7-1500 may discard data values that it is not able to immediatley publish ot the TOP Server. A value of 0 means that there is no upper limit to how many data change notificats can be published in a single message. c. Update Mode – How the data – on this subscrption – will be handled. Publish indicates that the S71500 should publish any data changes to the TOP Server. Poll indicates that the TOP Server UA Client driver will manually poll the tags on this subscription. d. Registered Read/Write – Should the TOP Server UA Client driver register items that will be read or written with the OPC UA Server. This will only have an impact if the update mode is set to Poll. Registered reads/writes are more efficient and generally faster, at the cost of an increased overhead and longer connection time when the TOP Server first connects to the S7-1500 OPC UA Server. Page 20 of 35 16. Some further Subscription settings must be specified: a. Lifetime Count – The number of publish intervals that can expire without a publish message from the S7-1500 before the subscription is deleted. This value, mulitplied by the publish interval from the previous page, determines how long a subscription will remain running if communications are disrupted. b. Keep-Alive Count – How many publish intervals must expire without a publish message from the S7-1500 before the TOP Server sends a Keep-Alive message. A lower number will improve how fast the TOP Server OPC UA Client driver identifies a problem should the S7-1500 OPC UA server crash or be slow to respond, at the cost of slower performance. c. Priority – In configurations where there are mutliple subscriptions (devices) on a single session (channel), defines the priority of this subscription. It is recommended that this be kept at the lowest setting, if no special handling is required. Higher priority subscriptions are handled first by the OPC UA Server. Page 21 of 35 17. Specify the read and write settings and timeouts. a. Maximum Items per Read – How many items should be read at a time in polled update mode or when importing items? Since all S7-1500 CPU models have a maximum 1000 items per request this value should never exceed 1000, but should be set as high has possible to optimize communication times. It is recommended to set this value to 1000. b. Maximum Items per Write – How many items should be written at a time? Since all S7-1500 CPU models have a maximum 1000 items per request this value should never exceed 1000, but should be set as high has possible to optimize communication times (since grouped writes are more efficient than writes to invidieual items). It is recommended to set this value to 1000. c. Read Timeout – How long should the TOP Server wait on a read request before abandoning it? In most situations the default value gives the OPC UA Server enough time to respond without unnecessarily delaying a read from timing out. It has been observed that this setting must be increased when working with an S7-1500 under heavy communication load, as the OPC UA Server will not always be able to respond to reads within 1 seconds – a value of at least 5 seconds is recommended. d. Write Timeout – Determines how long the TOP Server should wait on a write request before abandoning it? In most situations the default value gives the OPC UA Server enough time to respond without unnecessarily delaying a write from timing out. It has been observed that this setting must be increased when working with an S7-1500 under heavy communication load, as the OPC UA Server will not always be able to respond to writes within 1 seconds – a value of at least 5 seconds is recommended. e. Read After write – When enabled the TOP Server will follow ever successful write with a read to update the TOP Server cache. When disabled the TOP server will wait for the next publish (after a successful write) before updating the value in cache. It is recommended to keep this value enabled. Page 22 of 35 Page 23 of 35 18. If using a published update mode on this subscription specify the: a. Sample Interval - The sample interval determines how often the S7-1500 OPC UA Server checks the data in the PLC for value changes. The requested value will be modified by the S7-1500 if an unsupported sample rate is requested. A value of -1 sets the sampling interval to be equal to the publishing interval specified in step 15a. A value of 0 lets the S7-1500 set the fastest rate possible. In situations where values are changing faster than the publishing interval it is recommended to use a sampling interval at least half that of the publishing interval to guarantee a value update every with every publish response. b. Queue Size – Determines how many value updates the OPC UA Server should queue for a subscription before overwriting old values. In situations where the sampling interval is much lower than the publishing interval, this makes sure that all sampled values (if the value is changing between samples) are published to the OPC UA Server. It is recommended to keep this value at 1 to disable data queuing. c. Discard Oldest – If queing data values on a subscription, this setting determines which value should be discarded if a new value is sampled when the publish queue is already full. Enabled means the oldest value is discarded, disabled means the newest value is discarded. Page 24 of 35 19. Specify whether a deadband should be applied to value changes. a. None – disables the deadband b. Percent – requires that a value change by a certain percentage of the maximum value of the tag (the deadband value determines what percent change must be exceeded) before the value change is considered significant and is published. c. Absolute – requires that a value change by a certain value between scans (the amount of change required is determined by the deadband value) to be considered significant and be published. Page 25 of 35 20. With the subscription now configured, items can be automatically imported from the S7-1500 OPC UA Server. This step is optional – if using dynamically addressed tags, or if the node IDs are known and the static items will be added to the TOP Server project manually. For the purposes of this demo, the items will be automatically imported since manually adding tags to the TOP Server project is no different than with any other TOP server driver (the address syntax is simply different). If adding tags manually the addres syntax will take the form of: ns=<namespace index>;<node ID type>=<node ID> For S7-1500 CPUs the namespace index is most commonly 3, and most node IDs will be strings (node ID type “s”) To import the items from the S7-1500: a. Press the Select import items… button to browse the S7-1500 OPC UA Server Page 26 of 35 b. Browse the tree view on the left to find the OPC UA nodes in the S7-1500 that will be monitored. When the nodes are found, highlight them and use the Add items button to add them to the TOP Server project. The Add branches button can be used to add entire directories (and all tags contained there-in) to the server. This should be done with care, however, as the S7-1500 OPC UA server can easily be overloaded when attempting to add too many items as once. Once all desired items have been added ot the Import Items list on the right. Press the OK button to add them all to the TOP Server project. 21. Review and finalize the device (subscription) settings, and press Finish to create the device. Page 27 of 35 22. Once the TOP Server UA Client driver is done importing the items that were selected in Step 20, the server will automatically replicate the S7-1500s directory structure when organizing the tags. 23. Open the OPC Quick Client to verify that communications are working, and that the tag quality for all points is “Good” Page 28 of 35 Configuration Scenarios The steps above outline how to configure a single TOP Server channel (OPC UA Session) with a single TOP Server device (OPC UA Subscription) when connecting to an S7-1500 but does not cover how to configure an entire system. To that end, the following scenarios offer design recommendations that adhere to the Siemens recommended settings while maximizing data throughput. These scenarios will not cover every setting described above. Instead, key settings will be highlighted – all others can be left at their default values unless they are known to be different. All scenarios assume that the items are read from a single S7-1510 CPU, and assumes that all items being read are scalar. Scenario 1 – 1,000 items at the same publishing rate Description: 1000 items are being read from a single PLC. All value updates should be published to the TOP Server OPC UA Client driver every one second. Setup: • Since the item count is well below the maximum item count that can be added to a single subscription, and do not exceed the maximum number of items that can be read or written in a single transaction, these items will be added to a single device and channel. • The Poll mode for the device should be set to Exception with a 1000ms publish rate. The maximum read/write item counts should be set to 1000 in case any reads or writes are issued from the client software. • The sampling interval should be set to -1 so that the items are sampled at the same rate that they are published. • The priority level of the subscription, set in the device properties, should be left at the default value of lowest. Page 29 of 35 Scenario 2 – 10,000 items split between fast and slow publishing rates Description: 10000 items are being read from a single PLC. 2000 items should be published every 250ms, while the remaining 8000 items should be published at a slower update rate of 1 second. Setup: • Since the item count does not exceed the number of items that can be added to a single session all items can be added to a single TOP Server channel. • 10,000 items do not exceed the number of items that can be added to a single subscription, however it would take multiple transactions to read or write all 10,000 items if a read/write transaction were to be initiated on all items at the same time. To prevent data queuing the items will be split between 10 devices. • Device 1 will have a poll mode of Exception, a publish rate of 250ms, and a sampling interval of -1 to sample at the same rate that data is being published. Device 1 will be for the first 1000 of 2000 items expected at the 250ms rate. • Device 2 will mirror Device 1 in every way except that it is for the second set of 1000 items of the total 2000 items required at the 250 ms publish rate. • Devices 3, 4, 5, ,6, 7, 8, 9, and 10 will mirror devices 1 and 2 in every way except that the publish rate should be set to 1000ms. Each device is dedicated to a subset of 1000 items of the 8000 total items required at the one second publish rate. • The subscription priority setting for all 10 devices should be left at the default value of lowest Page 30 of 35 Scenario 3 – 5,000 items split between high and low priority subscriptions, at various publish rates, with a subset of tags read at a set interval. Description: 5000 items are being read from a single PLC. 1000 items should be manually polled every 5 seconds, 3500 items are considered low priority and value changes should be published every 1 second, the remaining 500 items are considered high priority and should be published every 250ms. Setup: • Since 5000 items are below the maximum item count per session, they can be added to a single TOP Server Channel but will be distributed over 6 devices to allow for the required scanning behavior. • Device 1 • • o The maximum items per read/write request should both be increased to 1000. o The poll mode should be set to Poll o The poll interval should be set to 5000ms. o The subscription priority should be left at the default value of lowest o This device is for the 1000 items that will be polled every 5 seconds Device 2, 3, 4, and 5 o The maximum items per read/write request should both be increased to 1000. o The poll mode should be set to Exception o The publish interval should be set to 1000ms. o The sampling interval should be set to -1, so that the sampling and publishing intervals are the same. o The subscription priority should be set to low o These 4 devices are for the 3500 low priority items that should be published every 1000ms. Device 2 is for the first 1000 items, Device 3 is for the second set of 1000 items, Device 4 is for the third set of 1000 items, and Device 5 is for the remaining 500 items. Device 6 o The maximum items per read/write request should both be increased to 1000. o The poll mode should be set to Exception o The publish interval should be set to 250ms. o The sampling interval should be set to -1, so that the data is sampled at the same rate that it is published. o The subscription priority should be set to high o This device is for the 500, high priority, items that should be published every 250ms. Page 31 of 35 Scenario 4 – 2,500 items updated every 30 seconds regardless of value changes Description: 2500 items are being read from a single PLC and the S7-1500 should return a value every 30 seconds regardless if the value has changed or not. Setup: • 2500 items are well below the maximum item count allowed per session and should be added under a single channel. • Since 2500 items exceeds the number of items that can be read from the S7-1500 OPC UA Server in a single transaction so the items should be divided between three devices, with 1000 items being read from the first and second devices, and 500 items from the third device. • The maximum items per read/write request should both be increased to 1000 (for all three devices). • The poll mode for all three devices should be set to Poll, with an interval of 30,000ms. Page 32 of 35 Scenario 5 – 7,500 items split between low, medium, high, and critical priorities, with varying publish rates. Description – 7500 items are being read from a single PLC. 150 of those items are critical process values that must be scanned every 250ms and every new value must be guaranteed to be sent to the TOP Server. 5000 items are lower priority and value changes should be published at a 3 second rate, 1350 items are considered medium priority and should be updated every second, and 1000 items are considered high priority with a 250ms publish rate. Setup: • 7500 items are below the maximum item count allowed per session so can be configured under a single TOP Server channel. The items will be split over 9 devices. • Device 1 will be dedicated to the 150 critical process variables • • o The maximum items per read/write request should both be increased to 1000. o The poll mode should be set to Exception o The publish interval should be set to 250ms. o The required sampling interval is 125ms to ensure that every publish has a new sample available, but since the closest supported sampling interval – in the S7-1510 – is 100ms, the sampling interval should just be set to 100ms. o The subscription priority should be set to highest Devices 2, 3, 4, 5, and 6 will be dedicated to the 5000 low priority items. Each device will be dedicated to 1000 items of the total 5000 items. o The maximum items per read/write request should both be increased to 1000. o The poll mode should be set to Exception o The publish interval should be set to 3000ms. o The sampling interval should be set to -1, so that the sampling and publishing intervals are the same. o The subscription priority should be set to low Devices 7 and 8 will be dedicated to the 1350 medium priority tags. Device 7 for the first 1000 items, and Device 8 for the remaining 350 items. o The maximum items per read/write request should both be increased to 1000. o The poll mode should be set to Exception o The publish interval should be set to 1000ms. o The sampling interval should be set to -1, so that the sampling and publishing intervals are the same. o The subscription priority should be set to medium Page 33 of 35 • Device 9 will be dedicated to the 1000 high priority items. o The maximum items per read/write request should both be increased to 1000. o The poll mode should be set to Exception o The publish interval should be set to 250ms. o The sampling interval should be set to -1, so that the sampling and publishing intervals are the same. o The subscription priority should be set to high Page 34 of 35 Conclusion This document has provided a high-level look at how to best configure the TOP Server OPC UA Client driver to communicate with the OPC UA Server embedded in the Siemens S7-1500 PLCs. The OPC UA Server in the S7-1500 offers several benefits over the traditional Industrial Ethernet protocol (RFC1006); namely increased efficiency and security and should be utilized where possible. With the flexibility offered by the TOP Server OPC UA Client driver, and recommended settings published by Siemens, this document is intended to provide an easy-to-use reference to be used not only when designing a new TOP Server project but also when optimizing an existing one. For further information regarding the TOP Server OPC UA Client driver, or the Siemens S7-1500 OPC UA Server, please reference the appropriate help files. If, after reading this document, there are further questions on how to best configure a TOP Server project to read data from an S7-1500 OPC UA server, our experienced staff is more than happy to help. Please reach out to us: Online Support: http://support.softwaretoolbox.com Email Support: [email protected] Phone Support: +1 (704) 849-2773 Fax: +1 (704) 849-6388 Page 35 of 35 Appendix A – Siemens Documentation More information can be found on Siemens’ website here. 888 665 3678 +1 704 849 2773 Charlotte, NC USA www.softwaretoolbox.com TOLL FREE GLOBAL GLOBAL HQ WEB Our mission is to provide you with the right software package to solve your industrial operation challenges.