Ofsopc: With Citect SCADA 2016
Ofsopc: With Citect SCADA 2016
Ofsopc: With Citect SCADA 2016
Martin Lalanne
OFSOPC with Citect SCADA 2016
Summary
I. Introduction 3
1.1 Architecture Overview 3
1.2 SCADA Project 4
1.3 Computer Selection 4
1.4 PAC Selection 4
1.5 PAC Sizing 5
1.6 PAC Scan Cycle 6
VI. Performance 32
6.1 SCADA Redundancy 32
6.2 PAC Redundancy 33
6.3 PAC Scantime 33
6.1 OFS Server communication modes 34
2
OFSOPC with Citect SCADA 2016
I. Introduction
Applies to:
Citect SCADA 2016
OFS 3.60 SP2
OFSOPC V2.05.46
Modicon M340, M580 and M580 HSBY
Unity Pro v11.1
Summary:
This document will illustrate how to set up Citect SCADA, the OFSOPC driver and OFS to communicate
with Schneider PACs.
This document will also describe the Citect SCADA best practices, OFSOPC driver configuration, OFS
setup as well as the communication capabilities of Schneider Electric PACs; M340 (BMX P34 2020),
M580 (BME H58 4040), M580 Hot Standby (BME H58 6040).
3
OFSOPC with Citect SCADA 2016
4
OFSOPC with Citect SCADA 2016
For all controllers the server processes the requests at the beginning of the scan. The resources
available to process requests depend on the controller model.
The server communication resource of a PAC can be adjusted using the system word %SW90. Adjusting
this parameter will adjust the maximum number of requests the PAC can handle per CPU scan.
5
OFSOPC with Citect SCADA 2016
The figure above illustrates the synchronous scan cycle of the PAC. It can be seen that communications
processing occurs at the start of scan. This information should be taken in the context of the number of
requests the CPU can process per scan. It is also important to note that the PAC scan time can impact
the communications performance and throughput.
6
OFSOPC with Citect SCADA 2016
The current architecture of the OFSOPC driver only supports having Citect SCADA and OFS on the
same physical machine. It is therefore important to note that most communication delays and
optimization will be on the link between the OFS Server and the PACs. We advise that the channel
between OFS and the PAC should therefore first be analysed and optimized, before modifying any
SCADA parameters.
The first diagram focuses on the Primary SCADA Server and the second diagram focuses on the Standby
SCADA Server.
Important:
One port is recommended to host several I/O Devices with the OFSOPC Driver
7
OFSOPC with Citect SCADA 2016
8
OFSOPC with Citect SCADA 2016
Note: This example demonstrates the configuration for a single redundant I/O Device.
Detailed information about individual communications configuration properties can be found in the
online help.
9
OFSOPC with Citect SCADA 2016
Two additional groups are created by OFS for PAC Status and data dictionary management:
On the controller communication side (COM Handler), three groups will be created with update rates of
400ms, 1s and 3s. The communications for each group period will be calculated and optimized in order
to send the minimum number of requests to the controller.
10
OFSOPC with Citect SCADA 2016
Each time an item is activated or deactivated the request optimization will re-evaluate the communication
requests. Within the created groups the items added by the OFSOPC driver will be either active or
inactive depending on the need of the SCADA system.
In general, the alarm and trend items will always be active, while for visualization only the displayed
items are active. Other items that are not requested are not exchanged between the OFS and the
controller. This mechanism optimizes the communication between OFS and the controller, sending the
minimum amount of data to satisfy all requests.
When a new page is displayed on the SCADA system, the OFSOPC driver activates the item and
promotes it into the group with the required update rate. It then disables any items that were previously
displayed but no longer required. The deactivation time is five (5) seconds.
The OFSOPC driver defines three groups per I/O device. These groups are polled at a rate defined by
the [OFSOPC]Group<i>UpdateRate parameter in citect.ini.
Group1UpdateRate = 400ms
Group2UpdateRate = 1000ms
Group3UpdateRate = 3000ms
The minimum group update rate is 50ms in OFS 3.60 SP2. This parameter is fixed and can’t be changed.
Each requested tag will be added in the group which provides the lowest (e.g. fastest) update rate and
the one that is faster than the requested rate. For example, a tag with a request rate of 2s will be activated
in Group 2 if the default values are being used.
If no group provides such a rate, then Group 1 (the fastest group) is used. For example, tags requested
at 200ms with default configuration will be put in the 400ms group.
Usually Group 1 is associated with variable tags in the active display page and alarms. Group 2 is
typically targeted for use by trends and Group 3 is there for slow trends if they are configured.
11
OFSOPC with Citect SCADA 2016
The groups are initially in the inactive state except for the Status group.
Once all items are added, the OFSOPC driver enables the group for primary devices.
On the standby machine the groups are in the inactive (disabled) state.
During a redundancy switchover event, the OFSOPC driver on the Standby I/O Server sets the
groups active, which enables communications to the controller.
12
OFSOPC with Citect SCADA 2016
The following section details the OFS configuration used in this example and makes some
recommendations regarding key parameter settings for better performance.
In the OFS Configuration Tool, create a New Device Alias in the Device overview section.
Define a name. This name will be use in Citect SCADA for the IO Devices communication.
Define the IP address of the PAC in Device address A for a single communications channel.
13
OFSOPC with Citect SCADA 2016
OFS can support two communication channels to each PAC. In this example, the M580 PAC has an
additional channel with the NOR communication module. In OFS one address is defined for the M580
CPU module and one for the NOR communication module. Both modules are connected to the Plant
Network which provides a redundant link to communicate between the M580 PAC and OFS (which
serves the Citect SCADA system). This removes complexity from the Citect SCADA configuration as
you only define a single I/O device, while OFS handles the dual channel communication.
For dual channel configuration in OFS, enter the second IP address in Device address B.
If Device address A is not available, OFS will automatically switch to Device address B
14
OFSOPC with Citect SCADA 2016
Once Device address A is available again, it will be the Primary address for OFS only if Device
address B is shutdown or the OFS Server is restarted.
The OFS configuration with Hot Standby Controller (M580 HSBY) only needs a unique Main IP
Address. It should be noted that the Standby PAC address corresponds to the Main IP +1.
The SCADA system must not use the Standby PAC address (Main IP+1), since no control commands
are processed. Only the Main can handle control commands and manages synchronisation with the
Standby.
Note:
Do not use the Standby PAC IP address for communication with SCADA
Define the Main IP address for the PAC in the first field in IPConfig tab in Unity. This address is
used by the SCADA system for communications. The IP+1 is created automatically for the
redundant PAC (Standby).
15
OFSOPC with Citect SCADA 2016
16
OFSOPC with Citect SCADA 2016
In Unity Pro, open Project Settings and select the Data dictionary option.
Select “Only HMI variables” when variables are configured with the HMI variable option. This
allows OFS to load only the HMI variables from the PAC. It also optimises the size of the Data
Dictionary that is then stored in the PAC memory.
In the OFS Configuration Tool, select Using Data Dictionary and No Communication Break
options. If No Communication Break is set, While OFS server is copying the new data
dictionary, OFS will continue to use old one.
17
OFSOPC with Citect SCADA 2016
To generate XVM file, export Variables in Unity Pro on the XVM format.
18
OFSOPC with Citect SCADA 2016
Note: It is possible to combine Data Dictionary and Symbol table file. More details about the performance can be
found in section 6.1.
Figure 21: OFS configuration with Symbol Table XVM and Data Dictionary
19
OFSOPC with Citect SCADA 2016
- Strict Mode: OFS will stop communicating to the controller when there is any mismatch between the
controller and XVM signatures. Once XVM signatures match, it starts communicating.
- Debug Mode: OFS will ignore any minor changes like changed code, comment added, Tag added in
the controller
The key parameters to adjust communication with the controller are the Max Channels and Max Pending
parameters.
Max Pending – the number of requests that are allowed to be sent in parallel to the controller
Max Channels – the maximum number of TCP/IP connections that OFS will open with the
controller
By default, MaxChannels = 1 and MaxPending = 0
MaxPending: Number of requests that are allowed to be sent in parallel to the controller
A setting of MaxPending=0 means the OFS server automatically detects the PAC’s target
communications port and decide how many parallel requests may be sent at the same time. OFS will
choose the appropriate MaxPending value using a predefined table of communication modules. It is
preferable to let OFS choose the value of the MaxPending parameter, unless a new release of a PAC
firmware changes the capability of the device.
20
OFSOPC with Citect SCADA 2016
In case of multiple OFS connections to the same PAC (redundant IO Server), it is recommended to set
MaxPending to the capacity of the channel (refer to Table 1: PAC Details). This number depends on
the PAC type and the number of channels the user wants to configure on the PAC for OFS.
Max Channels: Maximum number of TCP/IP connections that OFS will open with the controller
It should be considered that for Unity devices (frame length = 1023 Bytes) the TCP/IP stack is able to
buffer up to 4 KB. Therefore, it is possible to configure
MaxChannels = MaxPending / 4
By increasing the number of channels, it increases the communications "fault tolerance" if a connection
becomes unavailable. It also makes it possible to send parallel requests and increases the reliability of
the communication by distributing the load.
From OFS, it is possible to view the number of requests needed to refresh items from a specific group.
When OFS is running, in the General menu, select Network Window and then select the
appropriate device.
21
OFSOPC with Citect SCADA 2016
Net Request gives you the number of requests needed for each group. In this example we can see that
27 requests (Total of Net Request across all groups) are needed to retrieve all data from the controller.
Information for this controller in terms of response times is also available. Average Access Time is the
time typically taken for the controller to respond to OFS requests (12 ms).
Max Channels and Max Pending parameters configuration with the M580 system:
To fully exploit the bandwidth of the M580 PAC, the following OFS configuration is recommended.
For the M580 PAC in our test system, two channels with different communications capabilities are
present. The CPU channel is capable of processing 24 requests per CPU scan, while the NOR channel
is capable of processing 16 requests per CPU scan. We must set the number of pending requests
such that the channel capability is not exceeded. Therefore, the Max Pending value of 16 is selected.
From OFS diagnostics, it can be seen that 27 requests will be processed in two (2) CPU cycles if we
consider that 16 requests are processed per CPU cycle.
In this example it is recommended that the Max Channels is set to 4 and Max Pending is set to 16 for
the Alias configuration in OFS.
Given the details above the following OFS configuration is used for each controller:
22
OFSOPC with Citect SCADA 2016
The following figures detail the M340 which is used in the example calculation above.
Figure 26: OFS network window for M340 PAC Figure 27: OFS Configuration adjustment for M340 PAC
Figure 28: OFS network window for M580 HSBY PAC Figure 29: OFS Configuration adjustment for M580 HSBY
23
OFSOPC with Citect SCADA 2016
In a heavily loaded system, it may be possible that a default group rate is too fast for OFS and overrun
errors may occur (“polling rate overrun for …”). For example, Citect SCADA is trying to poll the device
faster than it can provide data. In this case, it would be recommended to increase the OFSOPC group
rate value.
Figure 30: OFS network window for M580 PAC Figure 31: OFS Configuration adjustment for M580 PAC
AverageAccessTime = 12 ms
NetRequests = 8 (for group 1 at 400ms)
MaxPending = 16
The data from the controller for the group 1 will be read in average after 6 ms time scan.
The group period must be longer than this ‘minimum’ time. A general rule is to have group rate at least
twice the value of OFS group scan time. The default group 1 update rate setting of 400 ms is suitable
for this example.
24
OFSOPC with Citect SCADA 2016
Quick Item Validation: An OPC Method is available to validate an item when it is requested from OFS.
By default, OFS checks if the value is reachable in the controller and this requires a request to be sent.
When Quick Item Validation is enabled, OFS does not run the ‘IsValid’ method.
Quick SetActive State: This parameter refreshes the OPC Client as soon as the value is known without
waiting for the notification period, as the OPC specification defines.
Communication Overrun: This parameter defines whether a communications overrun in OFS should
be notified to the SCADA as ‘bad quality’ or if the OFS server should instead try to auto-adapt its own
polling rate. It is recommended to set this parameter to ‘rate adapt’ to avoid potential false ‘bad quality’
readings when the load on OFS or the PAC is high.
25
OFSOPC with Citect SCADA 2016
OFS is set to CPU 0 and Citect processes are set to use other available CPUs.
For the Citect Project, unselect CPU 0 in Setup Wizard in CPU Setup
26
OFSOPC with Citect SCADA 2016
If you link to the PAC database, Citect SCADA is updated with any changes made to the PAC when a
refresh is performed.
Note:
OFS has to be configured and ready to run before importing the PAC tags.
Step 1: Use the Express Communications Wizard to Link your I/O Device to the PAC tag database.
27
OFSOPC with Citect SCADA 2016
Step 3: Select the PAC branch to import and finalize the express communication wizard procedure.
You can find the I/O Device configuration in the I/O Devices form in Topology >> IO Devices
28
OFSOPC with Citect SCADA 2016
Refresh tags manually using Refresh tags button in I/O Devices section
Select Automatic Refresh option to True for automatic updates
29
OFSOPC with Citect SCADA 2016
Use the same methodology to add, modify and delete tag across the PACs and Citect SCADA:
Note:
OFS has to be configured and ready to run before refreshing the PAC tags.
In Citect SCADA, Refresh tags in Topology view for the selected IO device.
30
OFSOPC with Citect SCADA 2016
31
OFSOPC with Citect SCADA 2016
VI. Performance
6.1 SCADA Redundancy
The following tests were performed using Citect SCADA 2016 with the 20,000 IO tag SCADA project (
Project 2) and Schneider PACs.
Time measurements were made by monitoring a trend tag in Process Analyst and using a cicode
function to check the connection status of the IO Devices.
Measured startup time to get I/O Device online:
Note: A registry change was set in Windows on the Citect Server machine to improve redundancy
switchover performance in the case of a network isolation.
M340 PAC:
Mode of Failure Switchover time
Primary IO Server shutdown 2.0 sec
Primary IO Server interruption (end task) 2.0 sec
Primary IO Server network isolation 13 sec
Table 5: Redundancy switchover time with M580 PAC
M580 PAC:
Mode of Failure Switchover time
Primary IO Server shutdown 1.8 sec
Primary IO Server interruption (end task) 2.0 sec
Primary IO Server network isolation 14 sec
Table 6: Redundancy switchover time with M580 PAC
32
OFSOPC with Citect SCADA 2016
A total of 10 tests were run for each scantime per controller type, with the average and max times
recorded.
M340 PAC:
CPU Scantime Avg Time (ms) Max Time (ms)
10 518 615
50 600 707
100 678 719
Table 8: M580 PAC round trip time
M580 PAC:
CPU Scantime Avg Time (ms) Max Time (ms)
10 469 511
50 708 869
100 770 856
Table 9: M580 PAC round trip time
It can be seen from the above tables that a lower CPU scantime value will have a direct impact on the
responsiveness of the SCADA communications.
33
OFSOPC with Citect SCADA 2016
34
OFSOPC with Citect SCADA 2016
Schneider Electric
78 Waterloo Road
Macquarie Park NSW 2113
Phone: + 61 (0) 1300 369 233 April 2017
www.schneider-electric.com
35