AddPIDigitalStateSet Class
- Last UpdatedDec 15, 2025
- 3 minute read
Add a PI Digital State Set
The Add-PIDigitalStateSet cmdlet creates a new PI Digital State Set on a PI Data Archive.
The connection parameter specifies which connection to a PI Data Archive to use.
Inheritance Hierarchy
InternalCommand
Cmdlet
PSCmdlet
OSIsoft.PowerShellOSICmdletBase
OSIsoft.PowerShellOSICmdletBaseWithConnection
OSIsoft.PowerShellAddPIDigitalStateSet
Namespace: OSIsoft.PowerShell
Assembly: OSIsoft.PowerShell (in OSIsoft.PowerShell.dll) Version: 3.1.1.0 (3.1.1.466)
Syntax
[CmdletAttribute("Add", "PIDigitalStateSet", SupportsShouldProcess = true)] public class AddPIDigitalStateSet : OSICmdletBaseWithConnection
<CmdletAttribute("Add", "PIDigitalStateSet", SupportsShouldProcess := true)> Public Class AddPIDigitalStateSet Inherits OSICmdletBaseWithConnection Dim instance As AddPIDigitalStateSet
[CmdletAttribute(L"Add", L"PIDigitalStateSet", SupportsShouldProcess = true)] public ref class AddPIDigitalStateSet : public OSICmdletBaseWithConnection
[<CmdletAttribute("Add", "PIDigitalStateSet", SupportsShouldProcess = true)>] type AddPIDigitalStateSet = class inherit OSICmdletBaseWithConnection end
The AddPIDigitalStateSet type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| AddPIDigitalStateSet |
Properties
| Name | Description | |
|---|---|---|
| Connection | Connection to a PI Data Archive from which to add the PI Digital State Set | |
| DigitalStates | Digital states to apply to the new PI Digital State Set The index of the state in the array of passed states is the integral representation of the state. Run "Get-Help Add-PIDigitalStateSet -Examples" for further explanation. | |
| Name | Name of the PI Digital State Set to add |
Examples
Add-PIDigitalStateSet -Name "BoilerState" -DigitalStates "ON","OFF","STARTUP","COOLDOWN" -Connection $con
Where:
$con = Connect-PIDataArchive -PIDataArchiveMachineName "PISRV1"
This example creates the digital state set "BoilerState" on the "PISRV1" PI Data Archive. This state set contains 4 digital states with the following integral representations:
0="ON" : 1="OFF" : 2="STARTUP" : 3="COOLDOWN"