Output Points
- Last UpdatedNov 22, 2022
- 4 minute read
- PI System
- PI Interface for OPC HDA 1.6.2
- Interfaces
Output points control the flow of data from the Data Archive to any destination that is external to the Data Archive, such as a PLC or a third-party database. For example, to write a value to a register in a PLC, use an output point. Each interface has its own rules for determining whether a given point is an input point or an output point. For PI Interface for OPC HDA output points, the point attribute for Location3 should be set to 2. For further explanation see Location3 (input or output).
Note: If outputs to the data source device are not needed, specify a database user with read-only privileges and reference it through the /User_ODBC start-up parameter. Alternatively, implement an explicit output point whitelist, which provides a defense against accidental or malicious changes to a database.
Outputs are triggered for UniInt-based interfaces. That is, outputs are not scheduled to occur on a periodic basis. There are two mechanisms for triggering an output.
As of UniInt 3.3.4, event conditions can be placed on triggered outputs. The conditions are specified using the same event condition keywords in the extended descriptor as described as trigger-based inputs in the ExDesc (extended descriptor) topic, as described in the following sections. The only difference is that the trigger point is specified with the SourceTag attribute instead of with the "event" or "trig" keywords. Otherwise, the behavior of event conditions described under Trigger-based Inputs in the ExDesc topic is identical for output points. For output points, event conditions are specified in the extended descriptor as follows:
event_condition
Trigger method 1 (recommended)
For trigger method 1, a separate trigger point must be configured. The output point must have the same point source as the interface. The trigger point can be associated with any point source, including the point source of the interface. Also, the point type of the trigger point does not need to be the same as the point type of the output point
The output point is associated with the trigger point by setting the SourceTag attribute of the output point equal to the tag name of the trigger point. An output is triggered when a new value is sent to the Snapshot of the trigger point. The new value does not need to be different than the previous value that was sent to the Snapshot to trigger an output, but the timestamp of the new value must be more recent than the previous value. If no error is indicated, then the value that was sent to the trigger point is also written to the output point. If the output is unsuccessful, then an appropriate digital state that is indicative of the failure is usually written to the output point. If an error is not indicated, the output still may not have succeeded because the interface may not be able to tell with certainty that an output has failed.
Trigger method 2
For trigger method 2, a separate trigger point is not configured. To trigger an output, write a new value to the Snapshot of the output point itself. The new value does not need to be different than the previous value to trigger an output, but the timestamp of the new value must be more recent than the previous value.
Trigger method 2 may be easier to configure than trigger method 1, but trigger method 2 has a significant disadvantage. If the output is unsuccessful, there is no point to receive a digital state that is indicative of the failure, which is very important for troubleshooting.
Output time stamps
If you need to write the timestamp of an output value to one ItemID and the output value itself to another, you can get the timestamp by specifying the ItemID in the ExDesc field. In this case, you must specify whether the ItemID is to be written as a VT_DATE or as a VT_BSTR (string value). To write as a string value, define the /TF parameter in the startup file, so the interface knows what format to use to create the string. See the sections on ExDesc (extended descriptor) and Command line parameters for more details on settings.
Output point whitelist
For enhanced security, create a whitelist of output points. When this feature is enabled, the interface verifies that an output point is in the whitelist before updating the data source. The whitelist file is a .csv (comma-separated values) file that contains a list of approved output PI points and the attributes that associate the PI point with a writable value in the data source. For this interface, the following attributes must be in the whitelist file to secure the output points:
-
Tag
-
InstrumentTag
-
ExDesc
-
Location2
-
Location3
The whitelist feature also supports range checking of output values. The Zero and Span attributes in the whitelist file specify the minimum (zero) and maximum (sum of zero and span) allowed for the output value.
To create and configure an output point whitelist, see the PI Universal Interface (UniInt) User Guide.