Configure the interface with PI ICU
- Last UpdatedNov 22, 2022
- 10 minute read
- PI System
- PI Interface for OPC HDA 1.6.2
- Interfaces
Note: PI ICU requires PI 3.3 or later.
The PI Interface Configuration Utility provides a graphical user interface for configuring PI Interfaces. If the interface is configured by the PI ICU, the batch file of the interface (PIOPCHDAInt.bat) will be maintained by the PI ICU and all configuration changes will be kept in that file and the PI Module Database. The procedure below describes the necessary steps for using PI ICU to configure the Interface.
-
From the PI ICU menu, select Interface > New Windows Interface Instance from EXE.
-
Browse to the PIOPCHDAInt.exe executable file.
-
Enter values for Host PI Data Server, Point Source and Interface ID#.
The Configure a New Interface window opens.
Note: Interface name as displayed in the ICU (optional) will have the prefix PI- added to this name and it will be the display name in the services menu.
-
Click Add.
The PI ICU Register Interface window opens.
Click OK to open PI ICU.
Note: In this example, the host PI Data Archive is JMURASKI7440. To configure the interface to communicate with a remote PI Data server, select Connections on the PI ICU Interface menu and select the default server. If the remote node is not present in the list of servers, it can be added. Once the interface is added to PI ICU, near the top of the main PI ICU window, the interface type should be OPCHDAInt. If not, use the drop-down box to change the interface type to OPCHDAInt.
-
Click Apply.
Since the OPCHDAInt interface is a UniInt-based interface, you need to make appropriate selections in the UniInt pages which are shown in the left panel of the ICU, which configures UniInt features through the PI ICU.
To set up the interface as a Windows service, use the Service page.
This page allows configuration of the interface to run as a service as well as starting and stopping of the interface service. The interface can also be run interactively from the PI ICU. To do that, click the Manual radio button in the Startup Type box.
For more detailed information on how to use the above-mentioned and other PI ICU pages and selections, please refer to the PI Interface Configuration Utility user guide. The next section describes the selections that are available from the OPCHDAInt page. Once selections have been made on the PI ICU window, press the Apply button in order for PI ICU to make these changes to the interface's startup file.
-
Make selections in the interface page for PI Interface for OPC HDA that allows you to enter values for the startup (command line) parameters that are particular to the OPC HDA Interface.
-
Configure the interface-specific settings on the General Parameters tab as shown in the following figure.
Note: A yellow field indicates that an invalid value has been entered.
-
OPCHDA Server Node Name
Host name of the node where the OPCHDA Server is located. If the interface is running on the computer where the OPCHDA Server is located then the NodeName:: must be omitted in the command line parameter argument. If the server name has embedded spaces, enclose the name in double quotes. This is a required field and must be filled in. (Command line parameter /Server=NodeName::OPCHDAServerName)
-
Load Available OPCHDA Server Names
Click this button to get a list of available OPCHDA Server names from the OPCHDA Server Node Name entered above. It will populate the OPCHDA Server Node Name drop down box.
-
OPCHDA Server Name
Lists the OPCHDA Servers available at the node specified in OPCHDA Server Node Name. Select the server that the interface will access. (Command line parameter /Server=NodeName::OPCHDAServerName)
-
Current Active Server Tag
The string type PI point into which the name of the currently active OPC HDA Server will be written (Command line parameter /CS=tag).
-
-
Configure the interface-specific settings on the Optional Parameters tab as shown in the following figure.
Note: A yellow field indicates that an invalid value has been entered.
-
History Recovery Only - time range
Specifies a range of history to recover before exiting. Specify the times using PI time string formats with a colon separating the date and the time. For example, if you enter 10-dec-04:10:00:00,10-dec-04:12:00:00, the interface will recover two hours of data from the OPC HDA Server, send the data to the PI System for all points, and then exit. (Command line parameter /HRONLY= dd-mmm-yy:hh:mm:ss,dd-mmm-yy:hh:mm:ss)
-
Use Timestamp String Format
Sets the format for timestamp strings written to the OPCHDA Server. (Command line parameter /TF=format)
-
Use ReadProcessed Call with Flag
Tells the interface to use the OPC HDA ReadProcessed call instead of the ReadRaw call. The ReadProcessed call will return values at an interval based on the scan time of the point's scan class. (Command line parameter /RP=flag. Valid options for the value of flag are:
-
0 - The ReadProcessed call will be made with the OPCHDA_INTERPOLATIVE flag. This will cause the OPC HDA server to return interpolated values at the scan interval.
-
1 - The ReadProcessed call will be made with the OPCHDA_START flag. This will cause the OPC HDA server to return the value and time stamp at the start time of the interval.
-
2 - The ReadProcessed call will be made with the OPCHDA_END flag. This will cause the OPC HDA server to return the value and time stamp at the end time of interval).
-
-
Current Active Server Tag
The string type PI point into which the name of the currently active OPC HDA Server will be written. (Command line parameter /CS=tag)
-
History Recovery Maximum Time
Specifies the maximum amount of time to go back in history at startup. To use, select the check box, enter a value, and choose a unit of measure. (Command line parameter /HI=#c, where # is a number and c is a unit, like D for days, H for hours, M for minutes, or S for seconds)
-
Adjust Timestamp with Offset
Applies an adjustment to the time stamp, to deal with broken servers and broken installations, where the clock for the OPCHDA Server is set incorrectly (for example, the server requires the clock to match the wall clock, but the time zone must be GMT, regardless of where the server is actually located). To use, select the check box, enter a value (which maybe either positive or negative), and choose a unit of measurement. The interface converts the value stored in the batch file to the number of seconds corresponding to the chosen unit of measurement. (Command line parameter /TO=#, where # is either a positive or negative value depending on whether the time must be adjusted forward or backward)
-
Maximum Time Period Per Call
Specifies the maximum amount of time to request data from the OPC HDA per call. Instead of asking for data from last value to current time, interface calls data in chunks of time using the passed in maximum time period. To use, select the check box, enter a value, and choose a unit of measure. (Command line parameter /MP=#x, where # is a number, and x is a number and x is a unit, like D for days, H for hours, M for minutes, or S for seconds)
-
Time delay before reading OPC Tags
Specifies the number of seconds to wait after connecting to the OPCHDA Server before scanning data. This delay provides time for loading points on the OPCHDA Server before scanning. (Command line parameter /SD=#, where # is a number in seconds)
-
MS to pause between History Retrieval
Specifies the number of milliseconds to pause between history recovery of a point. (Command line parameter /HRPAUSE=number of milliseconds)
-
Times Not Adjusted to the PI Server
If the box is checked, the OPCHDA Server provides the time stamp, but the interface does not adjust for any offset between the OPCHDA Server and the PI Server. (Command line Parameter /TSU)
Caution: Use this option with caution. Enabling the /TSU option gets the timestamp from the OPCHDA Server, which could be off from the PI Server time, so the user could end up getting data that is older than current PI time or newer than current PI time. For this reason, users are encouraged to use a timestamp from a data source but with adjustment to PI Server time. The interface calculates time difference between PI Server and the data source and applies that adjustment to the timestamps.
-
Discard Sub-Second Portion of Timestamp
If the box is checked, the interface discards the sub-second portion of the time stamp passed to the Data Archive and only sends whole integer seconds. This parameter can improve performance: The Data Archive will require less space-and possibly less CPU-to store the same amount of data. The interface truncates the fractional part of the time stamp. (Command line parameter /IT)
-
Group Size (# of Tags)
Specifies maximum number of PI points to include in a call to the OPCHDA Server. Within each scan class, the interface calls the OPCHDA server in groups of the specified size, up to the number of points in the scan class. The start time of each data request matches the end time of the previous request. If you do not specify this parameter, the interface calls the OPCHDA Server one point at a time with the start time set to the time stamp of the last value read from the OPCHDA Server. (Command line parameter /GS=#)
Start Time Adjust (sec.)
Used with Group Size, sets the start time of the data call to the previous end time minus the specified seconds. With this parameter, you can provide some overlap in the data call to ensure that you do not miss data that enters the OPCHDA Server after the interface made the read call. If the /GS parameter is not passed in, the /sa parameter has no effect. (Command line parameter /SA=#, where # is a number in seconds.)
-
End Time Adjust (sec.)
Used with Group Size, sets the end time of the data call to the current time minus the specified seconds. With this parameter, you can provide some overlap in the data call to ensure that you do not miss data that enters the OPCHDA Server after the interface made the read call. If the /GS parameter is not passed in, the /ea parameter has no effect. (Command line parameter /EA=#, where # is a number in seconds.)
-
No Timeout
When selected, the interface never writes the digital state I/O Timeout, including when the interface loses connection with the OPCHDA Server. (Command line parameter /NT).
-
Ignore Server Status
The OPC Server should go to the OPCHDA_UP state when it is ready to send data. If it does not, set the interface will try to talk to it anyway if this checkbox is checked. (Command line parameter /IS)
-
Enable Mass Tag Adding
Check this check box to set the interface to verify many points at one time. It is faster to verify many items at once, instead of one by one. (Command line parameter /MA)
-
-
Configure the interface-specific settings on the Backup Parameters tab as shown in the following figure.
Note: A yellow field indicates that an invalid value has been entered.
-
OPCHDA Server Node Name and Server Name
The name of the node and server of the OPC HDA server that you are designating as the backup server. (Command line parameter /backupSERVER=BACKUP Node::BACKUP SERVERNAME
-
Switch to Backup Delay (sec.)
If checked, the number of seconds to try and re-connect before trying to switch to the backup OPC HDA Server. (Command line parameter /FT=#)
-
Wait for RUNNING State
If checked, the number of seconds to wait for UP status, before switching to the backup OPC HDA Server. (Command line parameter /SW=#).
-
-
Configure the interface-specific settings on the Debug Parameters tab as shown in the following figure.
Note: A yellow field indicates that an invalid value has been entered.
Use the parameters on this tab to do minimal debugging when having difficulty determining what data you are receiving from the OPC HDA server.
-
Internal Testing Only
Enable startup logging, including InstrumentTag and ExDesc for each point. (Command line parameter /DB=2)
-
Log of Startup
If checked, the number of seconds to try and re-connect before trying to switch to the backup OPC HDA Server. (Command line parameter /FT=#)
-
Log Write Operation
Enable pipc.log file messages for write operations. (Command line parameter /DB=4)
-
Log Timestamps of Refresh
Log the time that a scan starts and that a scan ends. (Command line parameter /DB=8)
-
Log Timestamps and Data (All Tags)
Log the timestamp with the data, the adjusted times tamp, the PITime, and the scan class for each data value that the interface receives. (Command line parameter /DB=32)
Caution: This setting produces a great deal of data. Do not leave this setting on for more than a few minutes.
-