General

GetVersion

  • The GetVersion Function is useful for an easy check if the OAS Service is started and reachable.
  • Returns – 1 if service is not reachable.
  • Returns positive number of current version if successful.
  • NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.

VB

    Private Sub ButtonGetVersion_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetVersion.Click
        Cursor.Current = Cursors.WaitCursor
        Dim VersionNumber As Int32
        VersionNumber = ModuleNetworkNode.OPCSystemsComponent1.GetVersion(TextBoxNetworkNode.Text)
        If VersionNumber = -1 Then
            LabelGetVersion.Text = "OAS Service not reached"
        Else
            LabelGetVersion.Text = "OAS Service version number " + VersionNumber.ToString("0")
        End If
    End Sub    

C#

	
Private Sub ButtonGetVersion_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetVersion.Click
        Cursor.Current = Cursors.WaitCursor
        Dim VersionNumber As Int32
        VersionNumber = ModuleNetworkNode.OPCSystemsComponent1.GetVersion(TextBoxNetworkNode.Text)
        If VersionNumber = -1 Then
            LabelGetVersion.Text = "OAS Service not reached"
        Else
            LabelGetVersion.Text = "OAS Service version number " + VersionNumber.ToString("0")
        End If
    End Sub   

GetLicenseString

  • The GetLicenseString Function returns a string of the OAS Service license.
  • Returns “OAS Service Not Reachable” if service is not reachable.
  • Returns the license string if successful.
  • NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.

VB

    Private Sub ButtonGetLicenseString_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetLicenseString.Click
        Dim LicenseString As String
        LicenseString = ModuleNetworkNode.OPCSystemsComponent1.GetLicenseString(TextBoxNetworkNode.Text)
        LabelGetLicenseString.Text = LicenseString
    End Sub

C#

	
 Private Sub ButtonGetLicenseString_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetLicenseString.Click
        Dim LicenseString As String
        LicenseString = ModuleNetworkNode.OPCSystemsComponent1.GetLicenseString(TextBoxNetworkNode.Text)
        LabelGetLicenseString.Text = LicenseString
    End Sub   

GetFullyLicensed

  • The GetFullyLicensed Function returns the license status of an OAS Service.
  • Returns -1 if service is not reachable.
  • Returns 0 if the service is not yet fully licensed, running in demo mode or disabled.
  • Returns 1 if the service has been licensed.
  • NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.

VB

    Private Sub ButtonGetFullyLicensed_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetFullyLicensed.Click
        Cursor.Current = Cursors.WaitCursor
        Dim FullyLicensedNumber As Int32
        FullyLicensedNumber = ModuleNetworkNode.OPCSystemsComponent1.GetFullyLicensed(TextBoxNetworkNode.Text)
        If FullyLicensedNumber = -1 Then
            LabelGetFullyLicensed.Text = "OAS Service not reached"
        ElseIf FullyLicensedNumber = 1 Then
            LabelGetFullyLicensed.Text = "OAS Service Fully Licensed"
        Else
            LabelGetFullyLicensed.Text = "OAS Service Not Fully Licensed"
        End If
    End Sub

C#

	
Private Sub ButtonGetFullyLicensed_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetFullyLicensed.Click
        Cursor.Current = Cursors.WaitCursor
        Dim FullyLicensedNumber As Int32
        FullyLicensedNumber = ModuleNetworkNode.OPCSystemsComponent1.GetFullyLicensed(TextBoxNetworkNode.Text)
        If FullyLicensedNumber = -1 Then
            LabelGetFullyLicensed.Text = "OAS Service not reached"
        ElseIf FullyLicensedNumber = 1 Then
            LabelGetFullyLicensed.Text = "OAS Service Fully Licensed"
        Else
            LabelGetFullyLicensed.Text = "OAS Service Not Fully Licensed"
        End If
    End Sub   

InRuntime

  • The InRuntime Function returns the Runtime Status of an OAS Service.
  • Returns -1 if service is not reachable.
  • Returns 0 if service is not in Runtime.
  • Returns 1 if service is in Runtime.
  • NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.

VB

 
    Private Sub ButtonInRuntime_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonInRuntime.Click
        Cursor.Current = Cursors.WaitCursor
        Dim InRuntimeNumber As Int32
        InRuntimeNumber = ModuleNetworkNode.OPCSystemsComponent1.InRuntime(TextBoxNetworkNode.Text)
        If InRuntimeNumber = -1 Then
            LabelInRuntime.Text = "OAS Service not reached"
        ElseIf InRuntimeNumber = 1 Then
            LabelInRuntime.Text = "OAS Service Is In Runtime Mode"
        Else
            LabelInRuntime.Text = "OAS Service Is Stopped"
        End If
    End Sub

C#

	
 Private Sub ButtonInRuntime_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonInRuntime.Click
        Cursor.Current = Cursors.WaitCursor
        Dim InRuntimeNumber As Int32
        InRuntimeNumber = ModuleNetworkNode.OPCSystemsComponent1.InRuntime(TextBoxNetworkNode.Text)
        If InRuntimeNumber = -1 Then
            LabelInRuntime.Text = "OAS Service not reached"
        ElseIf InRuntimeNumber = 1 Then
            LabelInRuntime.Text = "OAS Service Is In Runtime Mode"
        Else
            LabelInRuntime.Text = "OAS Service Is Stopped"
        End If
    End Sub   

StartRuntime

  • The StartRuntime Subroutine Starts the OAS Service Runtime Mode.
  • If the Service is already in Runtime Mode no method occurs.
  • NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.
  • Optional ErrorString will be set to Success when function is successful and an error message when in error.

VB

    Private Sub ButtonStartRuntime_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonStartRuntime.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.StartRuntime(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub
 

C#

	
 Private Sub ButtonStartRuntime_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonStartRuntime.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.StartRuntime(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub   

StopRuntime

  • The StopRuntime Subroutine Stops the OAS Service Runtime Mode.
  • If the Service is not in Runtime Mode no method occurs.
  • NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.
  • Optional ErrorString will be set to Success when function is successful and an error message when in error.

VB

    Private Sub ButtonStopRuntime_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonStopRuntime.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.StopRuntime(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub
     

C#

 Private Sub ButtonStopRuntime_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonStopRuntime.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.StopRuntime(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub	   

GetMaintenanceExpiration

  • The GetMaintenanceExpiration Function returns the maintenance expiration date within the service.
  • Please note that the actual maintenance expiration is retained by the company records of Open Automation Software and the value returned may be out of date.
  • Returns string Month / Day / Year in the format of 00/00/0000.
  • Returns blank if a failure occurs.
  • NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.
  • ErrorString will be set to Success when function is successful and an error message when in error.
  • RemoteSCADAHostingName is the name of the Live Data Cloud OAS Service to connect to.

VB

    Private Sub ButtonGetMaintenanceExpiration_Click(sender As System.Object, e As System.EventArgs) Handles ButtonGetMaintenanceExpiration.Click
        Dim LicenseString As String
        Dim ErrorString As String = ""
        LicenseString = ModuleNetworkNode.OPCSystemsComponent1.GetMaintenanceExpiration(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
        LabelGetMaintenanceExpiration.Text = LicenseString
    End Sub

C#

	
 Private Sub ButtonGetMaintenanceExpiration_Click(sender As System.Object, e As System.EventArgs) Handles ButtonGetMaintenanceExpiration.Click
        Dim LicenseString As String
        Dim ErrorString As String = ""
        LicenseString = ModuleNetworkNode.OPCSystemsComponent1.GetMaintenanceExpiration(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
        LabelGetMaintenanceExpiration.Text = LicenseString
    End Sub   

GetClientUsers

  • The GetClientUsers Function returns a list of users that are currently connected to the service.
  • If there was no username specified in the client connection the string is blank for the client connection.
  • The same user may be logged in to multiple clients.
  • Returns Empty String Array if service is not reachable.
  • NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.
  • ErrorString will be set to Success when function is successful and an error message when in error.
  • RemoteSCADAHostingName is the name of the Live Data Cloud OAS Service to connect to.