Security Groups

GetSecurityGroupNames

  • The GetSecurityGroupNames Function returns a list of the Security Groups.
  • 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.
  • Optional ErrorString will be set to Success when function is successful and an error message when in error.

VB

    Private Sub ButtonGetSecurityGroupNames_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetSecurityGroupNames.Click
        Cursor.Current = Cursors.WaitCursor
        ComboBoxGetSecurityGroupNames.Items.Clear()
        Dim Groups() As String
        Dim Group As String
        Dim ErrorString As String = ""
        Groups = ModuleNetworkNode.OPCSystemsComponent1.GetSecurityGroupNames(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            For Each Group In Groups
                ComboBoxGetSecurityGroupNames.Items.Add(Group)
            Next
            If ComboBoxGetSecurityGroupNames.Items.Count > 0 Then
                ComboBoxGetSecurityGroupNames.SelectedIndex = 0
            End If
        Else
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub
 
     Private Sub ComboBoxGetSecurityGroupNames_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBoxGetSecurityGroupNames.SelectedIndexChanged
        TextBoxSecurityGroup.Text = ComboBoxGetSecurityGroupNames.SelectedItem
    End Sub

C#

	      private void ButtonGetSecurityGroupNames_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     ComboBoxGetSecurityGroupNames.Items.Clear();
                     string[] Groups = null;
//INSTANT C# NOTE: Commented this declaration since looping variables in 'foreach' loops are declared in the 'foreach' header in C#:
//                   string Group = null;
                     string ErrorString = "";
                     Groups = ModuleNetworkNode.OPCSystemsComponent1.GetSecurityGroupNames(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           foreach (string Group in Groups)
                           {
                                  ComboBoxGetSecurityGroupNames.Items.Add(Group);
                           }
                           if (ComboBoxGetSecurityGroupNames.Items.Count > 0)
                           {
                                  ComboBoxGetSecurityGroupNames.SelectedIndex = 0;
                           }
                     }
                     else
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }
 
              private void ComboBoxGetSecurityGroupNames_SelectedIndexChanged(object sender, System.EventArgs e)
              {
                     TextBoxSecurityGroup.Text = ComboBoxGetSecurityGroupNames.SelectedItem.ToString();
              }

AddSecurityGroup

  • The AddSecurityGroup Function adds a Security Group to the existing Security configuration.
  • Returns -1 if service is not reachable.
  • Returns 1 if successful.
  • Returns 0 if the Group already exists or adding the Group failed.
  • Group is the name of the Group to add.
  • 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 ButtonAddSecurityGroup_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonAddSecurityGroup.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ResultInt32 As Int32
        Dim ErrorString As String = ""
        ResultInt32 = ModuleNetworkNode.OPCSystemsComponent1.AddSecurityGroup(TextBoxSecurityGroup.Text, TextBoxNetworkNode.Text, ErrorString)
        If ResultInt32 = -1 Then
            LabelAddSecurityGroupResult.Text = "OAS Service not reached."
        ElseIf ResultInt32 = 1 Then
            LabelAddSecurityGroupResult.Text = "Group successfully added."
        Else
            LabelAddSecurityGroupResult.Text = ErrorString
        End If
    End Sub
 

C#

	      private void ButtonAddSecurityGroup_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     Int32 ResultInt32 = 0;
                     string ErrorString = "";
                     ResultInt32 = ModuleNetworkNode.OPCSystemsComponent1.AddSecurityGroup(TextBoxSecurityGroup.Text, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ResultInt32 == -1)
                     {
                           LabelAddSecurityGroupResult.Text = "OAS Service not reached.";
                     }
                     else if (ResultInt32 == 1)
                     {
                           LabelAddSecurityGroupResult.Text = "Group successfully added.";
                     }
                     else
                     {
                           LabelAddSecurityGroupResult.Text = ErrorString;
                     }
              }

GetSecurityParameterStrings

  • The RemoveSecurityGroup Function removes a Security Group from the existing Security configuration.
  • Returns -1 if service is not reachable.
  • Returns 1 if successful.
  • Returns 0 if the Group does not exist or removing the Group failed.
  • Group is the name of the Group to remove.
  • 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 ButtonRemoveSecurityGroup_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonRemoveSecurityGroup.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ResultInt32 As Int32
        Dim ErrorString As String = ""
        ResultInt32 = ModuleNetworkNode.OPCSystemsComponent1.RemoveSecurityGroup(TextBoxSecurityGroup.Text, TextBoxNetworkNode.Text, ErrorString)
        If ResultInt32 = -1 Then
            LabelRemoveSecurityGroupResult.Text = "OAS Service not reached."
        ElseIf ResultInt32 = 1 Then
            LabelRemoveSecurityGroupResult.Text = "Group successfully removed."
        Else
            LabelRemoveSecurityGroupResult.Text = ErrorString
        End If
    End Sub
 

C#

	    

GetSecurityParameterStrings

  • The GetSecurityParameterStrings Function returns an array of Strings containing all property types available for each Security Group.
  • Returns Empty String Array if service is not reachable.
  • Returns a String Array of property types for all possible Parameters for a Security Group.
  • NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.

VB

    Private Sub ButtonGetSecurityParameterStrings_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetSecurityParameterStrings.Click
        Cursor.Current = Cursors.WaitCursor
        ComboBoxGetSecurityParameterStrings.Items.Clear()
        Dim Parameters() As String
        Dim Parameter As String
        Parameters = ModuleNetworkNode.OPCSystemsComponent1.GetSecurityParameterStrings(TextBoxNetworkNode.Text)
        For Each Parameter In Parameters
            ComboBoxGetSecurityParameterStrings.Items.Add(Parameter)
        Next
        If ComboBoxGetSecurityParameterStrings.Items.Count > 0 Then
            ComboBoxGetSecurityParameterStrings.SelectedIndex = 1
        End If
    End Sub
     Private Sub ComboBoxGetSecurityParameterStrings_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBoxGetSecurityParameterStrings.SelectedIndexChanged
        TextBoxParameter.Text = ComboBoxGetSecurityParameterStrings.SelectedItem
    End Sub

C#

	     private void ButtonGetSecurityParameterStrings_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     ComboBoxGetSecurityParameterStrings.Items.Clear();
                     string[] Parameters = null;
//INSTANT C# NOTE: Commented this declaration since looping variables in 'foreach' loops are declared in the 'foreach' header in C#:
//                   string Parameter = null;
                     Parameters = ModuleNetworkNode.OPCSystemsComponent1.GetSecurityParameterStrings(TextBoxNetworkNode.Text);
                     foreach (string Parameter in Parameters)
                     {
                           ComboBoxGetSecurityParameterStrings.Items.Add(Parameter);
                     }
                     if (ComboBoxGetSecurityParameterStrings.Items.Count > 0)
                     {
                           ComboBoxGetSecurityParameterStrings.SelectedIndex = 1;
                     }
              }
 
              private void ComboBoxGetSecurityParameterStrings_SelectedIndexChanged(object sender, System.EventArgs e)
              {
                     TextBoxParameter.Text = ComboBoxGetSecurityParameterStrings.SelectedItem.ToString();
              }

GetSecurity_Parameter_Value

  • The GetSecurity_Parameter_Value Function returns an object value for the Security Group and Parameter specified.
  • Returns nothing if service is not reachable.
  • Parameter is a String of the Parameter Type desired of the Security Group.
  • Group is a String of the Security Group desired.
  • 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 ButtonGetSecurity_Parameter_Value_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetSecurity_Parameter_Value.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ResultObject As Object
        Dim ErrorString As String = ""
        ResultObject = ModuleNetworkNode.OPCSystemsComponent1.GetSecurity_Parameter_Value(TextBoxParameter.Text, TextBoxSecurityGroup.Text, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            Try
                LabelGetSecurity_Parameter_ValueResult.Text = ResultObject
                TextBoxValueToSet.Text = ResultObject
            Catch ex As Exception
                LabelGetSecurity_Parameter_ValueResult.Text = "Error converting value to string."
                TextBoxValueToSet.Text = ""
            End Try
        Else
            LabelGetSecurity_Parameter_ValueResult.Text = ErrorString
            TextBoxValueToSet.Text = ""
        End If
    End Sub

C#

	       private void ButtonGetSecurity_Parameter_Value_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     object ResultObject = null;
                     string ErrorString = "";
                     ResultObject = ModuleNetworkNode.OPCSystemsComponent1.GetSecurity_Parameter_Value(TextBoxParameter.Text, TextBoxSecurityGroup.Text, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           try
                           {
                                  LabelGetSecurity_Parameter_ValueResult.Text = ResultObject.ToString();
                                  TextBoxValueToSet.Text = ResultObject.ToString();
                           }
                           catch (Exception ex)
                           {
                                  LabelGetSecurity_Parameter_ValueResult.Text = "Error converting value to string.";
                                  TextBoxValueToSet.Text = "";
                           }
                     }
                     else
                     {
                           LabelGetSecurity_Parameter_ValueResult.Text = ErrorString;
                           TextBoxValueToSet.Text = "";
                     }
              }

GetSecurity_Parameter_Values

  • The GetSecurity_Parameter_Values Function returns an array of object values for the Security Group specified.
  • The order of the array corresponds with the GetSecurityParameterStrings Function order.
  • Returns empty array if service is not reachable.
  • Group is a String of the Security Group desired.
  • 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 ButtonGetSecurity_Parameter_Values_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetSecurity_Parameter_Values.Click
        Cursor.Current = Cursors.WaitCursor
        ComboBoxGetSecurity_Parameter_Values.Items.Clear()
        Dim ResultObjects() As Object
        Dim ResultObject As Object
        Dim ResultString As String
        Dim ErrorString As String = ""
        ResultObjects = ModuleNetworkNode.OPCSystemsComponent1.GetSecurity_Parameter_Values(TextBoxSecurityGroup.Text, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            For Each ResultObject In ResultObjects
                Try
                    If ResultObject Is Nothing Then
                        ResultString = ""
                    Else
                        ResultString = ResultObject
                    End If
                    ComboBoxGetSecurity_Parameter_Values.Items.Add(ResultString)
                Catch ex As Exception
                    ComboBoxGetSecurity_Parameter_Values.Items.Add("Error Converting Object")
                End Try
            Next
            If ComboBoxGetSecurity_Parameter_Values.Items.Count > 0 Then
                ComboBoxGetSecurity_Parameter_Values.SelectedIndex = 1
            End If
        Else
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	     private void ButtonGetSecurity_Parameter_Values_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     ComboBoxGetSecurity_Parameter_Values.Items.Clear();
                     object[] ResultObjects = null;
//INSTANT C# NOTE: Commented this declaration since looping variables in 'foreach' loops are declared in the 'foreach' header in C#:
//                   object ResultObject = null;
                     string ResultString = null;
                     string ErrorString = "";
                     ResultObjects = ModuleNetworkNode.OPCSystemsComponent1.GetSecurity_Parameter_Values(TextBoxSecurityGroup.Text, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           foreach (object ResultObject in ResultObjects)
                           {
                                  try
                                  {
                                         if (ResultObject == null)
                                         {
                                                ResultString = "";
                                         }
                                         else
                                         {
                                                ResultString = ResultObject.ToString();
                                         }
                                         ComboBoxGetSecurity_Parameter_Values.Items.Add(ResultString);
                                  }
                                  catch (Exception ex)
                                  {
                                         ComboBoxGetSecurity_Parameter_Values.Items.Add("Error Converting Object");
                                  }
                           }
                           if (ComboBoxGetSecurity_Parameter_Values.Items.Count > 0)
                           {
                                  ComboBoxGetSecurity_Parameter_Values.SelectedIndex = 1;
                           }
                     }
                     else
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

SetSecurity_Parameter_Value

  • The SetSecurity_Parameter_Value Function sets an object value for the Security Group and Parameter specified.
  • Returns -1 if service is not reachable.
  • Returns 0 if the Group does not exist or the value did not get set correctly.
  • Returns 1 if the function was successful.
  • Parameter is a String of the Parameter Type desired of the Security Group.
  • Value is the desired value to set.
  • Group is a String of the Security Group desired.
  • 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 ButtonSetSecurity_Parameter_Value_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetSecurity_Parameter_Value.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ResultInt32 As Int32
        Dim ErrorString As String = ""
        ResultInt32 = ModuleNetworkNode.OPCSystemsComponent1.SetSecurity_Parameter_Value(TextBoxParameter.Text, TextBoxValueToSet.Text, TextBoxSecurityGroup.Text, TextBoxNetworkNode.Text, ErrorString)
        If ResultInt32 = -1 Then
            LabelSetSecurity_Parameter_ValueResult.Text = "OAS Service not reached."
        ElseIf ResultInt32 = 1 Then
            LabelSetSecurity_Parameter_ValueResult.Text = "Parameter Successfully Updated."
        Else
            LabelSetSecurity_Parameter_ValueResult.Text = ErrorString
        End If
    End Sub

C#

	       private void ButtonSetSecurity_Parameter_Value_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     Int32 ResultInt32 = 0;
                     string ErrorString = "";
                     ResultInt32 = ModuleNetworkNode.OPCSystemsComponent1.SetSecurity_Parameter_Value(TextBoxParameter.Text, TextBoxValueToSet.Text, TextBoxSecurityGroup.Text, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ResultInt32 == -1)
                     {
                           LabelSetSecurity_Parameter_ValueResult.Text = "OAS Service not reached.";
                     }
                     else if (ResultInt32 == 1)
                     {
                           LabelSetSecurity_Parameter_ValueResult.Text = "Parameter Successfully Updated.";
                     }
                     else
                     {
                           LabelSetSecurity_Parameter_ValueResult.Text = ErrorString;
                     }
              }
 

GetSecurityUserNames

  • The GetSecurityUserNames Function returns a list of the Security User Names.
  • 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.
  • Optional ErrorString will be set to Success when function is successful and an error message when in error.

VB

    Private Sub GetSecurityUserNames_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetSecurityUserNames.Click
        Cursor.Current = Cursors.WaitCursor
        ComboBoxGetSecurityUserNames.Items.Clear()
        Dim Users() As String
        Dim User As String
        Dim ErrorString As String = ""
        Users = ModuleNetworkNode.OPCSystemsComponent1.GetSecurityUserNames(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            For Each User In Users
                ComboBoxGetSecurityUserNames.Items.Add(User)
            Next
            If ComboBoxGetSecurityUserNames.Items.Count > 0 Then
                ComboBoxGetSecurityUserNames.SelectedIndex = 0
            End If
        Else
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub
     Private Sub ComboBoxGetSecurityUserNames_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBoxGetSecurityUserNames.SelectedIndexChanged
        TextBoxSecurityUserName.Text = ComboBoxGetSecurityUserNames.SelectedItem
    End Sub

C#

	      private void GetSecurityUserNames_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     ComboBoxGetSecurityUserNames.Items.Clear();
                     string[] Users = null;
//INSTANT C# NOTE: Commented this declaration since looping variables in 'foreach' loops are declared in the 'foreach' header in C#:
//                   string User = null;
                     string ErrorString = "";
                     Users = ModuleNetworkNode.OPCSystemsComponent1.GetSecurityUserNames(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           foreach (string User in Users)
                           {
                                  ComboBoxGetSecurityUserNames.Items.Add(User);
                           }
                           if (ComboBoxGetSecurityUserNames.Items.Count > 0)
                           {
                                  ComboBoxGetSecurityUserNames.SelectedIndex = 0;
                           }
                     }
                     else
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }
 
              private void ComboBoxGetSecurityUserNames_SelectedIndexChanged(object sender, System.EventArgs e)
              {
                     TextBoxSecurityUserName.Text = ComboBoxGetSecurityUserNames.SelectedItem.ToString();
              }

AddSecurityUser

  • The AddSecurityUser Function adds a Security User to the existing Security configuration.
  • Returns -1 if service is not reachable.
  • Returns 1 if successful.
  • Returns 0 if the User already exists or adding the User failed.
  • UserName is the name of the User to add.
  • 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 ButtonAddSecurityUser_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonAddSecurityUser.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ResultInt32 As Int32
        Dim ErrorString As String = ""
        ResultInt32 = ModuleNetworkNode.OPCSystemsComponent1.AddSecurityUser(TextBoxSecurityUserName.Text, TextBoxNetworkNode.Text, ErrorString)
        If ResultInt32 = -1 Then
            LabelAddSecurityUserResult.Text = "OAS Service not reached."
        ElseIf ResultInt32 = 1 Then
            LabelAddSecurityUserResult.Text = "User successfully added."
        Else
            LabelAddSecurityUserResult.Text = ErrorString
        End If
    End Sub

C#

	      private void ButtonAddSecurityUser_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     Int32 ResultInt32 = 0;
                     string ErrorString = "";
                     ResultInt32 = ModuleNetworkNode.OPCSystemsComponent1.AddSecurityUser(TextBoxSecurityUserName.Text, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ResultInt32 == -1)
                     {
                           LabelAddSecurityUserResult.Text = "OAS Service not reached.";
                     }
                     else if (ResultInt32 == 1)
                     {
                           LabelAddSecurityUserResult.Text = "User successfully added.";
                     }
                     else
                     {
                           LabelAddSecurityUserResult.Text = ErrorString;
                     }
              }

RemoveSecurityUser

  • The RemoveSecurityUser Function removes a Security User from the existing Security configuration.
  • Returns -1 if service is not reachable.
  • Returns 1 if successful.
  • Returns 0 if the User does not exist or removing the User failed.
  • UserName is the name of the User to remove.
  • 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 ButtonRemoveSecurityUser_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonRemoveSecurityUser.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ResultInt32 As Int32
        Dim ErrorString As String = ""
        ResultInt32 = ModuleNetworkNode.OPCSystemsComponent1.RemoveSecurityUser(TextBoxSecurityUserName.Text, TextBoxNetworkNode.Text, ErrorString)
        If ResultInt32 = -1 Then
            LabelRemoveSecurityUserResult.Text = "OAS Service not reached."
        ElseIf ResultInt32 = 1 Then
            LabelRemoveSecurityUserResult.Text = "User successfully removed."
        Else
            LabelRemoveSecurityUserResult.Text = ErrorString
        End If
    End Sub

C#

	      private void ButtonRemoveSecurityUser_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     Int32 ResultInt32 = 0;
                     string ErrorString = "";
                     ResultInt32 = ModuleNetworkNode.OPCSystemsComponent1.RemoveSecurityUser(TextBoxSecurityUserName.Text, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ResultInt32 == -1)
                     {
                           LabelRemoveSecurityUserResult.Text = "OAS Service not reached.";
                     }
                     else if (ResultInt32 == 1)
                     {
                           LabelRemoveSecurityUserResult.Text = "User successfully removed.";
                     }
                     else
                     {
                           LabelRemoveSecurityUserResult.Text = ErrorString;
                     }
              }

GetSecurityUserParameterStrings

  • The GetSecurityUserParameterStrings Function returns an array of Strings containing all property types available for each Security User.
  • Returns Empty String Array if service is not reachable.
  • Returns a String Array of property types for all possible Parameters for a Security User.
  • NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.

VB

    Private Sub ButtonGetSecurityUserParameterStrings_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetSecurityUserParameterStrings.Click
        Cursor.Current = Cursors.WaitCursor
        ComboBoxGetSecurityUserParameterStrings.Items.Clear()
        Dim Parameters() As String
        Dim Parameter As String
        Parameters = ModuleNetworkNode.OPCSystemsComponent1.GetSecurityUserParameterStrings(TextBoxNetworkNode.Text)
        For Each Parameter In Parameters
            ComboBoxGetSecurityUserParameterStrings.Items.Add(Parameter)
        Next
        If ComboBoxGetSecurityUserParameterStrings.Items.Count > 0 Then
            ComboBoxGetSecurityUserParameterStrings.SelectedIndex = 1
        End If
    End Sub
 
     Private Sub ComboBoxGetSecurityUserParameterStrings_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBoxGetSecurityUserParameterStrings.SelectedIndexChanged
        TextBoxUserParameter.Text = ComboBoxGetSecurityUserParameterStrings.SelectedItem
    End Sub

C#

	     private void ButtonGetSecurityUserParameterStrings_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     ComboBoxGetSecurityUserParameterStrings.Items.Clear();
                     string[] Parameters = null;
//INSTANT C# NOTE: Commented this declaration since looping variables in 'foreach' loops are declared in the 'foreach' header in C#:
//                   string Parameter = null;
                     Parameters = ModuleNetworkNode.OPCSystemsComponent1.GetSecurityUserParameterStrings(TextBoxNetworkNode.Text);
                     foreach (string Parameter in Parameters)
                     {
                           ComboBoxGetSecurityUserParameterStrings.Items.Add(Parameter);
                     }
                     if (ComboBoxGetSecurityUserParameterStrings.Items.Count > 0)
                     {
                           ComboBoxGetSecurityUserParameterStrings.SelectedIndex = 1;
                     }
              }
 
              private void ComboBoxGetSecurityUserParameterStrings_SelectedIndexChanged(object sender, System.EventArgs e)
              {
                     TextBoxUserParameter.Text = ComboBoxGetSecurityUserParameterStrings.SelectedItem.ToString();
              }

GetSecurityUser_Parameter_Value

  • The GetSecurityUser_Parameter_Value Function returns an object value for the Security User and Parameter specified.
  • Returns nothing if service is not reachable.
  • Parameter is a String of the Parameter Type desired of the Security User.
  • UserName is a String of the Security User desired.
  • 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 ButtonGetSecurityUser_Parameter_Value_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetSecurityUser_Parameter_Value.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ResultObject As Object
        Dim ErrorString As String = ""
        ResultObject = ModuleNetworkNode.OPCSystemsComponent1.GetSecurityUser_Parameter_Value(TextBoxUserParameter.Text, TextBoxSecurityUserName.Text, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            Try
                LabelGetSecurityUser_Parameter_ValueResult.Text = ResultObject
                TextBoxUserValueToSet.Text = ResultObject
            Catch ex As Exception
                LabelGetSecurityUser_Parameter_ValueResult.Text = "Error converting value to string."
                TextBoxUserValueToSet.Text = ""
            End Try
        Else
            LabelGetSecurityUser_Parameter_ValueResult.Text = ErrorString
            TextBoxUserValueToSet.Text = ""
        End If
    End Sub

C#

	      private void ButtonGetSecurityUser_Parameter_Value_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     object ResultObject = null;
                     string ErrorString = "";
                     ResultObject = ModuleNetworkNode.OPCSystemsComponent1.GetSecurityUser_Parameter_Value(TextBoxUserParameter.Text, TextBoxSecurityUserName.Text, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           try
                           {
                                  LabelGetSecurityUser_Parameter_ValueResult.Text = ResultObject.ToString();
                                  TextBoxUserValueToSet.Text = ResultObject.ToString();
                           }
                           catch (Exception ex)
                           {
                                  LabelGetSecurityUser_Parameter_ValueResult.Text = "Error converting value to string.";
                                  TextBoxUserValueToSet.Text = "";
                           }
                     }
                     else
                     {
                           LabelGetSecurityUser_Parameter_ValueResult.Text = ErrorString;
                           TextBoxUserValueToSet.Text = "";
                     }
              }

GetSecurityUser_Parameter_Values

  • The GetSecurityUser_Parameter_Values Function returns an array of object values for the Security User specified.
  • The order of the array corresponds with the GetSecurityUserParameterStrings Function order.
  • Returns empty array if service is not reachable.
  • UserName is a String of the Security User desired.
  • 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 ButtonGetSecurityUser_Parameter_Values_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetSecurityUser_Parameter_Values.Click
        Cursor.Current = Cursors.WaitCursor
        ComboBoxGetSecurityUser_Parameter_Values.Items.Clear()
        Dim ResultObjects() As Object
        Dim ResultObject As Object
        Dim ResultString As String
        Dim ErrorString As String = ""
        ResultObjects = ModuleNetworkNode.OPCSystemsComponent1.GetSecurityUser_Parameter_Values(TextBoxSecurityUserName.Text, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            For Each ResultObject In ResultObjects
                Try
                    If ResultObject Is Nothing Then
                        ResultString = ""
                    Else
                        ResultString = ResultObject
                    End If
                    ComboBoxGetSecurityUser_Parameter_Values.Items.Add(ResultString)
                Catch ex As Exception
                    ComboBoxGetSecurityUser_Parameter_Values.Items.Add("Error Converting Object")
                End Try
            Next
            If ComboBoxGetSecurityUser_Parameter_Values.Items.Count > 0 Then
                ComboBoxGetSecurityUser_Parameter_Values.SelectedIndex = 1
            End If
        Else
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	      private void ButtonGetSecurityUser_Parameter_Values_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     ComboBoxGetSecurityUser_Parameter_Values.Items.Clear();
                     object[] ResultObjects = null;
//INSTANT C# NOTE: Commented this declaration since looping variables in 'foreach' loops are declared in the 'foreach' header in C#:
//                   object ResultObject = null;
                     string ResultString = null;
                     string ErrorString = "";
                     ResultObjects = ModuleNetworkNode.OPCSystemsComponent1.GetSecurityUser_Parameter_Values(TextBoxSecurityUserName.Text, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           foreach (object ResultObject in ResultObjects)
                           {
                                  try
                                  {
                                         if (ResultObject == null)
                                         {
                                                ResultString = "";
                                         }
                                         else
                                         {
                                                ResultString = ResultObject.ToString();
                                         }
                                         ComboBoxGetSecurityUser_Parameter_Values.Items.Add(ResultString);
                                  }
                                  catch (Exception ex)
                                  {
                                         ComboBoxGetSecurityUser_Parameter_Values.Items.Add("Error Converting Object");
                                  }
                           }
                           if (ComboBoxGetSecurityUser_Parameter_Values.Items.Count > 0)
                           {
                                  ComboBoxGetSecurityUser_Parameter_Values.SelectedIndex = 1;
                           }
                     }
                     else
                     {
                            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

SetSecurityUser_Parameter_Value

  • The SetSecurityUser_Parameter_Value Function sets an object value for the Security User and Parameter specified.
  • Returns -1 if service is not reachable.
  • Returns 0 if the User does not exist or the value did not get set correctly.
  • Returns 1 if the function was successful.
  • Parameter is a String of the Parameter Type desired of the Security User.
  • Value is the desired value to set.
  • UserName is a String of the Security User desired.
  • 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 ButtonSetSecurityUser_Parameter_Value_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetSecurityUser_Parameter_Value.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ResultInt32 As Int32
        Dim ErrorString As String = ""
        ResultInt32 = ModuleNetworkNode.OPCSystemsComponent1.SetSecurityUser_Parameter_Value(TextBoxUserParameter.Text, TextBoxUserValueToSet.Text, TextBoxSecurityUserName.Text, TextBoxNetworkNode.Text, ErrorString)
        If ResultInt32 = -1 Then
            LabelSetSecurityUser_Parameter_ValueResult.Text = "OAS Service not reached."
        ElseIf ResultInt32 = 1 Then
            LabelSetSecurityUser_Parameter_ValueResult.Text = "Parameter Successfully Updated."
        Else
            LabelSetSecurityUser_Parameter_ValueResult.Text = ErrorString
        End If
    End Sub

C#

	      private void ButtonSetSecurityUser_Parameter_Value_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     Int32 ResultInt32 = 0;
                     string ErrorString = "";
                     ResultInt32 = ModuleNetworkNode.OPCSystemsComponent1.SetSecurityUser_Parameter_Value(TextBoxUserParameter.Text, TextBoxUserValueToSet.Text, TextBoxSecurityUserName.Text, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ResultInt32 == -1)
                     {
                           LabelSetSecurityUser_Parameter_ValueResult.Text = "OAS Service not reached.";
                     }
                     else if (ResultInt32 == 1)
                     {
                           LabelSetSecurityUser_Parameter_ValueResult.Text = "Parameter Successfully Updated.";
                     }
                     else
                     {
                           LabelSetSecurityUser_Parameter_ValueResult.Text = ErrorString;
                     }
              }

SaveSecurityConfiguration

  • The SaveSecurityConfiguration Subroutine saves the current Security configuration to the specified file path.
  • 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 ButtonSaveSecurityConfiguration_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSaveSecurityConfiguration.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SaveSecurityConfiguration(TextBoxFilePath.Text, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	       private void ButtonSaveSecurityConfiguration_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SaveSecurityConfiguration(TextBoxFilePath.Text, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

LoadSecurityConfiguration

  • The LoadSecurityConfiguration Subroutine saves the current Security configuration to the specified file path.
  • 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 ButtonLoadSecurityConfiguration_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonLoadSecurityConfiguration.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.LoadSecurityConfiguration(TextBoxFilePath.Text, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	       private void ButtonLoadSecurityConfiguration_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.LoadSecurityConfiguration(TextBoxFilePath.Text, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

Report Groups

GetReportNames

  • The GetReportNames Function returns a list of the Report Groups.
  • 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.
  • Optional ErrorString will be set to Success when function is successful and an error message when in error.

VB

 

    Private Sub ButtonGetReportNames_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetReportNames.Click
        Cursor.Current = Cursors.WaitCursor
        ComboBoxGetReportNames.Items.Clear()
        Dim Groups() As String
        Dim Group As String
        Dim ErrorString As String = ""
        Groups = ModuleNetworkNode.OPCSystemsComponent1.GetReportNames(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            For Each Group In Groups
                ComboBoxGetReportNames.Items.Add(Group)
            Next
            If ComboBoxGetReportNames.Items.Count > 0 Then
                ComboBoxGetReportNames.SelectedIndex = 0
            End If
        Else
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub
 
        Private Sub ComboBoxGetReportNames_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBoxGetReportNames.SelectedIndexChanged
        TextBoxReportGroup.Text = ComboBoxGetReportNames.SelectedItem
    End Sub
 

C#

	     private void ButtonGetReportNames_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     ComboBoxGetReportNames.Items.Clear();
                     string[] Groups = null;
//INSTANT C# NOTE: Commented this declaration since looping variables in 'foreach' loops are declared in the 'foreach' header in C#:
//                   string Group = null;
                     string ErrorString = "";
                     Groups = ModuleNetworkNode.OPCSystemsComponent1.GetReportNames(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           foreach (string Group in Groups)
                           {
                                  ComboBoxGetReportNames.Items.Add(Group);
                           }
                           if (ComboBoxGetReportNames.Items.Count > 0)
                           {
                                  ComboBoxGetReportNames.SelectedIndex = 0;
                           }
                     }
                     else
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }
 
              private void ComboBoxGetReportNames_SelectedIndexChanged(object sender, System.EventArgs e)
              {
                     TextBoxReportGroup.Text = ComboBoxGetReportNames.SelectedItem.ToString();
              }
   

AddReportGroup

  • The AddReportGroup Function adds a Report Group to the existing Report configuration.
  • Returns -1 if service is not reachable.
  • Returns 1 if successful.
  • Returns 0 if the Group already exists or adding the Group failed.
  • Group is the name of the Group to add.
  • 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 ButtonAddReportGroup_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonAddReportGroup.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ResultInt32 As Int32
        Dim ErrorString As String = ""
        ResultInt32 = ModuleNetworkNode.OPCSystemsComponent1.AddReportGroup(TextBoxReportGroup.Text, TextBoxNetworkNode.Text, ErrorString)
        If ResultInt32 = -1 Then
            LabelAddReportGroupResult.Text = "OAS Service not reached."
        ElseIf ResultInt32 = 1 Then
            LabelAddReportGroupResult.Text = "Group successfully added."
        Else
            LabelAddReportGroupResult.Text = ErrorString
        End If
    End Sub

C#

	       private void ButtonAddReportGroup_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     Int32 ResultInt32 = 0;
                     string ErrorString = "";
                     ResultInt32 = ModuleNetworkNode.OPCSystemsComponent1.AddReportGroup(TextBoxReportGroup.Text, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ResultInt32 == -1)
                     {
                           LabelAddReportGroupResult.Text = "OAS Service not reached.";
                     }
                     else if (ResultInt32 == 1)
                     {
                           LabelAddReportGroupResult.Text = "Group successfully added.";
                     }
                     else
                     {
                           LabelAddReportGroupResult.Text = ErrorString;
                     }
              }   

RemoveReportGroup

  • The RemoveReportGroup Function removes a Report Group from the existing Report configuration.
  • Returns -1 if service is not reachable.
  • Returns 1 if successful.
  • Returns 0 if the Group does not exist or removing the Group failed.
  • Group is the name of the Group to remove.
  • 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 ButtonRemoveReportGroup_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonRemoveReportGroup.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ResultInt32 As Int32
        Dim ErrorString As String = ""
        ResultInt32 = ModuleNetworkNode.OPCSystemsComponent1.RemoveReportGroup(TextBoxReportGroup.Text, TextBoxNetworkNode.Text, ErrorString)
        If ResultInt32 = -1 Then
            LabelRemoveReportGroupResult.Text = "OAS Service not reached."
        ElseIf ResultInt32 = 1 Then
            LabelRemoveReportGroupResult.Text = "Group successfully removed."
        Else
            LabelRemoveReportGroupResult.Text = ErrorString
        End If
    End Sub

C#

	      private void ButtonRemoveReportGroup_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     Int32 ResultInt32 = 0;
                     string ErrorString = "";
                     ResultInt32 = ModuleNetworkNode.OPCSystemsComponent1.RemoveReportGroup(TextBoxReportGroup.Text, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ResultInt32 == -1)
                     {
                           LabelRemoveReportGroupResult.Text = "OAS Service not reached.";
                     }
                     else if (ResultInt32 == 1)
                     {
                           LabelRemoveReportGroupResult.Text = "Group successfully removed.";
                     }
                     else
                     {
                           LabelRemoveReportGroupResult.Text = ErrorString;
                     }
              }
  

GetReportParameterStrings

  • The GetReportParameterStrings Function returns an array of Strings containing all property types available for each Report Group.
  • Returns Empty String Array if service is not reachable.
  • Returns a String Array of property types for all possible Parameters for a Report Group.
  • NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.

VB

    Private Sub ButtonGetReportParameterStrings_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetReportParameterStrings.Click
        Cursor.Current = Cursors.WaitCursor
        ComboBoxGetReportParameterStrings.Items.Clear()
        Dim Parameters() As String
        Dim Parameter As String
        Parameters = ModuleNetworkNode.OPCSystemsComponent1.GetReportParameterStrings(TextBoxNetworkNode.Text)
        For Each Parameter In Parameters
            ComboBoxGetReportParameterStrings.Items.Add(Parameter)
        Next
        If ComboBoxGetReportParameterStrings.Items.Count > 0 Then
            ComboBoxGetReportParameterStrings.SelectedIndex = 1
        End If
    End Sub
 
     Private Sub ComboBoxGetReportParameterStrings_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBoxGetReportParameterStrings.SelectedIndexChanged
        TextBoxParameter.Text = ComboBoxGetReportParameterStrings.SelectedItem
    End Sub

C#

	     private void ButtonGetReportParameterStrings_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     ComboBoxGetReportParameterStrings.Items.Clear();
                     string[] Parameters = null;
//INSTANT C# NOTE: Commented this declaration since looping variables in 'foreach' loops are declared in the 'foreach' header in C#:
//                   string Parameter = null;
                     Parameters = ModuleNetworkNode.OPCSystemsComponent1.GetReportParameterStrings(TextBoxNetworkNode.Text);
                     foreach (string Parameter in Parameters)
                     {
                           ComboBoxGetReportParameterStrings.Items.Add(Parameter);
                     }
                     if (ComboBoxGetReportParameterStrings.Items.Count > 0)
                     {
                           ComboBoxGetReportParameterStrings.SelectedIndex = 1;
                     }
              }
 
              private void ComboBoxGetReportParameterStrings_SelectedIndexChanged(object sender, System.EventArgs e)
              {
                     TextBoxParameter.Text = ComboBoxGetReportParameterStrings.SelectedItem.ToString();
              }

GetReport_Parameter_Value

  • The GetReport_Parameter_Value Function returns an object value for the Report Group and Parameter specified.
  • Returns nothing if service is not reachable.
  • Parameter is a String of the Parameter Type desired of the Report Group.
  • Group is a String of the Report Group desired.
  • 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 ButtonGetReport_Parameter_Value_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetReport_Parameter_Value.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ResultObject As Object
        Dim ErrorString As String = ""
        ResultObject = ModuleNetworkNode.OPCSystemsComponent1.GetReport_Parameter_Value(TextBoxParameter.Text, TextBoxReportGroup.Text, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            Try
                LabelGetReport_Parameter_ValueResult.Text = ResultObject
                TextBoxValueToSet.Text = ResultObject
            Catch ex As Exception
                LabelGetReport_Parameter_ValueResult.Text = "Error converting value to string."
                TextBoxValueToSet.Text = ""
            End Try
        Else
            LabelGetReport_Parameter_ValueResult.Text = ErrorString
            TextBoxValueToSet.Text = ""
        End If
    End Sub
 

C#

	       private void ButtonGetReport_Parameter_Value_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     object ResultObject = null;
                     string ErrorString = "";
                     ResultObject = ModuleNetworkNode.OPCSystemsComponent1.GetReport_Parameter_Value(TextBoxParameter.Text, TextBoxReportGroup.Text, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           try
                           {
                                  LabelGetReport_Parameter_ValueResult.Text = ResultObject.ToString();
                                  TextBoxValueToSet.Text = ResultObject.ToString();
                           }
                           catch (Exception ex)
                           {
                                  LabelGetReport_Parameter_ValueResult.Text = "Error converting value to string.";
                                  TextBoxValueToSet.Text = "";
                           }
                     }
                     else
                     {
                           LabelGetReport_Parameter_ValueResult.Text = ErrorString;
                           TextBoxValueToSet.Text = "";
                     }
              }

GetReport_Parameter_Values

  • The GetReport_Parameter_Values Function returns an array of object values for the Report Group specified.
  • The order of the array corresponds with the GetReportParameterStrings Function order.
  • Returns empty array if service is not reachable.
  • Group is a String of the Report Group desired.
  • 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 ButtonGetReport_Parameter_Values_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetReport_Parameter_Values.Click
        Cursor.Current = Cursors.WaitCursor
        ComboBoxGetReport_Parameter_Values.Items.Clear()
        Dim ResultObjects() As Object
        Dim ResultObject As Object
        Dim ResultString As String
        Dim ErrorString As String = ""
        ResultObjects = ModuleNetworkNode.OPCSystemsComponent1.GetReport_Parameter_Values(TextBoxReportGroup.Text, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            For Each ResultObject In ResultObjects
                Try
                    If ResultObject Is Nothing Then
                        ResultString = ""
                    Else
                        ResultString = ResultObject
                    End If
                    ComboBoxGetReport_Parameter_Values.Items.Add(ResultString)
                Catch ex As Exception
                    ComboBoxGetReport_Parameter_Values.Items.Add("Error Converting Object")
                End Try
            Next
            If ComboBoxGetReport_Parameter_Values.Items.Count > 0 Then
                ComboBoxGetReport_Parameter_Values.SelectedIndex = 1
            End If
        Else
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	       private void ButtonGetReport_Parameter_Values_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     ComboBoxGetReport_Parameter_Values.Items.Clear();
                     object[] ResultObjects = null;
//INSTANT C# NOTE: Commented this declaration since looping variables in 'foreach' loops are declared in the 'foreach' header in C#:
//                   object ResultObject = null;
                     string ResultString = null;
                     string ErrorString = "";
                     ResultObjects = ModuleNetworkNode.OPCSystemsComponent1.GetReport_Parameter_Values(TextBoxReportGroup.Text, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           foreach (object ResultObject in ResultObjects)
                           {
                                  try
                                  {
                                         if (ResultObject == null)
                                         {
                                                ResultString = "";
                                         }
                                         else
                                         {
                                                ResultString = ResultObject.ToString();
                                         }
                                         ComboBoxGetReport_Parameter_Values.Items.Add(ResultString);
                                  }
                                  catch (Exception ex)
                                  {
                                         ComboBoxGetReport_Parameter_Values.Items.Add("Error Converting Object");
                                  }
                           }
                           if (ComboBoxGetReport_Parameter_Values.Items.Count > 0)
                           {
                                  ComboBoxGetReport_Parameter_Values.SelectedIndex = 1;
                           }
                     }
                     else
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

SetReport_Parameter_Value

  • The SetReport_Parameter_Value Function sets an object value for the Report Group and Parameter specified.
  • Returns -1 if service is not reachable.
  • Returns 0 if the Group does not exist or the value did not get set correctly.
  • Returns 1 if the function was successful.
  • Parameter is a String of the Parameter Type desired of the Report Group.
  • Value is the desired value to set.
  • Group is a String of the Report Group desired.
  • 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 ButtonSetReport_Parameter_Value_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetReport_Parameter_Value.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ResultInt32 As Int32
        Dim ErrorString As String = ""
        ResultInt32 = ModuleNetworkNode.OPCSystemsComponent1.SetReport_Parameter_Value(TextBoxParameter.Text, TextBoxValueToSet.Text, TextBoxReportGroup.Text, TextBoxNetworkNode.Text, ErrorString)
        If ResultInt32 = -1 Then
            LabelSetReport_Parameter_ValueResult.Text = "OAS Service not reached."
        ElseIf ResultInt32 = 1 Then
            LabelSetReport_Parameter_ValueResult.Text = "Parameter Successfully Updated."
        Else
            LabelSetReport_Parameter_ValueResult.Text = ErrorString
        End If
    End Sub

C#

	          private void ButtonSetReport_Parameter_Value_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     Int32 ResultInt32 = 0;
                     string ErrorString = "";
                     ResultInt32 = ModuleNetworkNode.OPCSystemsComponent1.SetReport_Parameter_Value(TextBoxParameter.Text, TextBoxValueToSet.Text, TextBoxReportGroup.Text, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ResultInt32 == -1)
                     {
                           LabelSetReport_Parameter_ValueResult.Text = "OAS Service not reached.";
                     }
                     else if (ResultInt32 == 1)
                     {
                           LabelSetReport_Parameter_ValueResult.Text = "Parameter Successfully Updated.";
                     }
                     else
                     {
                           LabelSetReport_Parameter_ValueResult.Text = ErrorString;
                     }
              }
 

SaveReportConfiguration

  • The SaveReportConfiguration Subroutine saves the current Report configuration to the specified file path.
  • 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 ButtonSaveReportConfiguration_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSaveReportConfiguration.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SaveReportConfiguration(TextBoxFilePath.Text, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	      private void ButtonSaveReportConfiguration_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SaveReportConfiguration(TextBoxFilePath.Text, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

LoadReportConfiguration

  • The LoadReportConfiguration Subroutine saves the current Report configuration to the specified file path.
  • 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 ButtonLoadReportConfiguration_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonLoadReportConfiguration.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.LoadReportConfiguration(TextBoxFilePath.Text, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	      private void ButtonLoadReportConfiguration_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.LoadReportConfiguration(TextBoxFilePath.Text, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

Recipe Groups

GetRecipeNames

  • The GetRecipeNames Function returns a list of the Recipe Groups.
  • 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.
  • Optional ErrorString will be set to Success when function is successful and an error message when in error.

VB

    Private Sub ButtonGetRecipeNames_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetRecipeNames.Click
        Cursor.Current = Cursors.WaitCursor
        ComboBoxGetRecipeNames.Items.Clear()
        Dim Groups() As String
        Dim Group As String
        Dim ErrorString As String = ""
        Groups = ModuleNetworkNode.OPCSystemsComponent1.GetRecipeNames(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            For Each Group In Groups
                ComboBoxGetRecipeNames.Items.Add(Group)
            Next
            If ComboBoxGetRecipeNames.Items.Count > 0 Then
                ComboBoxGetRecipeNames.SelectedIndex = 0
            End If
        Else
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub
 
    Private Sub ComboBoxGetRecipeNames_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBoxGetRecipeNames.SelectedIndexChanged
        TextBoxRecipeGroup.Text = ComboBoxGetRecipeNames.SelectedItem
    End Sub
 

C#

	  private void ButtonGetRecipeNames_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     ComboBoxGetRecipeNames.Items.Clear();
                     string[] Groups = null;
//INSTANT C# NOTE: Commented this declaration since looping variables in 'foreach' loops are declared in the 'foreach' header in C#:
//                   string Group = null;
                     string ErrorString = "";
                     Groups = ModuleNetworkNode.OPCSystemsComponent1.GetRecipeNames(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           foreach (string Group in Groups)
                           {
                                  ComboBoxGetRecipeNames.Items.Add(Group);
                           }
                           if (ComboBoxGetRecipeNames.Items.Count > 0)
                           {
                                  ComboBoxGetRecipeNames.SelectedIndex = 0;
                           }
                     }
                     else
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }
 
              private void ComboBoxGetRecipeNames_SelectedIndexChanged(object sender, System.EventArgs e)
              {
                     TextBoxRecipeGroup.Text = ComboBoxGetRecipeNames.SelectedItem.ToString();
              }
  

AddRecipeGroup

  • The AddRecipeGroup Function adds a Recipe Group to the existing Recipe configuration.
  • Returns -1 if service is not reachable.
  • Returns 1 if successful.
  • Returns 0 if the Group already exists or adding the Group failed.
  • Group is the name of the Group to add.
  • 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 ButtonAddRecipeGroup_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonAddRecipeGroup.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ResultInt32 As Int32
        Dim ErrorString As String = ""
        ResultInt32 = ModuleNetworkNode.OPCSystemsComponent1.AddRecipeGroup(TextBoxRecipeGroup.Text, TextBoxNetworkNode.Text, ErrorString)
        If ResultInt32 = -1 Then
            LabelAddRecipeGroupResult.Text = "OAS Service not reached."
        ElseIf ResultInt32 = 1 Then
            LabelAddRecipeGroupResult.Text = "Group successfully added."
        Else
            LabelAddRecipeGroupResult.Text = ErrorString
        End If
    End Sub

C#

    private void ButtonAddRecipeGroup_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     Int32 ResultInt32 = 0;
                     string ErrorString = "";
                     ResultInt32 = ModuleNetworkNode.OPCSystemsComponent1.AddRecipeGroup(TextBoxRecipeGroup.Text, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ResultInt32 == -1)
                     {
                           LabelAddRecipeGroupResult.Text = "OAS Service not reached.";
                     }
                     else if (ResultInt32 == 1)
                     {
                           LabelAddRecipeGroupResult.Text = "Group successfully added.";
                     }
                     else
                     {
                           LabelAddRecipeGroupResult.Text = ErrorString;
                     }
              }	 

RemoveRecipeGroup

  • The RemoveRecipeGroup Function removes a Recipe Group from the existing Recipe configuration.
  • Returns -1 if service is not reachable.
  • Returns 1 if successful.
  • Returns 0 if the Group does not exist or removing the Group failed.
  • Group is the name of the Group to remove.
  • 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 ButtonRemoveRecipeGroup_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonRemoveRecipeGroup.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ResultInt32 As Int32
        Dim ErrorString As String = ""
        ResultInt32 = ModuleNetworkNode.OPCSystemsComponent1.RemoveRecipeGroup(TextBoxRecipeGroup.Text, TextBoxNetworkNode.Text, ErrorString)
        If ResultInt32 = -1 Then
            LabelRemoveRecipeGroupResult.Text = "OAS Service not reached."
        ElseIf ResultInt32 = 1 Then
            LabelRemoveRecipeGroupResult.Text = "Group successfully removed."
        Else
            LabelRemoveRecipeGroupResult.Text = ErrorString
        End If
    End Sub

C#

	       private void ButtonRemoveRecipeGroup_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     Int32 ResultInt32 = 0;
                     string ErrorString = "";
                     ResultInt32 = ModuleNetworkNode.OPCSystemsComponent1.RemoveRecipeGroup(TextBoxRecipeGroup.Text, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ResultInt32 == -1)
                     {
                           LabelRemoveRecipeGroupResult.Text = "OAS Service not reached.";
                     }
                     else if (ResultInt32 == 1)
                     {
                           LabelRemoveRecipeGroupResult.Text = "Group successfully removed.";
                     }
                     else
                     {
                           LabelRemoveRecipeGroupResult.Text = ErrorString;
                     }
              }

GetRecipeParameterStrings

  • The GetRecipeParameterStrings Function returns an array of Strings containing all property types available for each Recipe Group.
  • Returns Empty String Array if service is not reachable.
  • Returns a String Array of property types for all possible Parameters for a Recipe Group.
  • NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.

VB

   Private Sub ButtonGetRecipeParameterStrings_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetRecipeParameterStrings.Click
        Cursor.Current = Cursors.WaitCursor
        ComboBoxGetRecipeParameterStrings.Items.Clear()
        Dim Parameters() As String
        Dim Parameter As String
        Parameters = ModuleNetworkNode.OPCSystemsComponent1.GetRecipeParameterStrings(TextBoxNetworkNode.Text)
        For Each Parameter In Parameters
            ComboBoxGetRecipeParameterStrings.Items.Add(Parameter)
        Next
        If ComboBoxGetRecipeParameterStrings.Items.Count > 0 Then
            ComboBoxGetRecipeParameterStrings.SelectedIndex = 1
        End If
    End Sub
 
    Private Sub ComboBoxGetRecipeParameterStrings_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBoxGetRecipeParameterStrings.SelectedIndexChanged
        TextBoxParameter.Text = ComboBoxGetRecipeParameterStrings.SelectedItem
    End Sub

C#

	  private void ButtonGetRecipeParameterStrings_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     ComboBoxGetRecipeParameterStrings.Items.Clear();
                     string[] Parameters = null;
//INSTANT C# NOTE: Commented this declaration since looping variables in 'foreach' loops are declared in the 'foreach' header in C#:
//                   string Parameter = null;
                     Parameters = ModuleNetworkNode.OPCSystemsComponent1.GetRecipeParameterStrings(TextBoxNetworkNode.Text);
                     foreach (string Parameter in Parameters)
                     {
                           ComboBoxGetRecipeParameterStrings.Items.Add(Parameter);
                     }
                     if (ComboBoxGetRecipeParameterStrings.Items.Count > 0)
                     {
                           ComboBoxGetRecipeParameterStrings.SelectedIndex = 1;
                     }
              }
 
              private void ComboBoxGetRecipeParameterStrings_SelectedIndexChanged(object sender, System.EventArgs e)
              {
                     TextBoxParameter.Text = ComboBoxGetRecipeParameterStrings.SelectedItem.ToString();
              }

GetRecipe_Parameter_Value

  • The GetRecipe_Parameter_Value Function returns an object value for the Recipe Group and Parameter specified.
  • Returns nothing if service is not reachable.
  • Parameter is a String of the Parameter Type desired of the Recipe Group.
  • Group is a String of the Recipe Group desired.
  • 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

  P Private Sub ButtonGetRecipe_Parameter_Value_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetRecipe_Parameter_Value.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ResultObject As Object
        Dim ErrorString As String = ""
        ResultObject = ModuleNetworkNode.OPCSystemsComponent1.GetRecipe_Parameter_Value(TextBoxParameter.Text, TextBoxRecipeGroup.Text, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            Try
                LabelGetRecipe_Parameter_ValueResult.Text = ResultObject
                TextBoxValueToSet.Text = ResultObject
            Catch ex As Exception
                LabelGetRecipe_Parameter_ValueResult.Text = "Error converting value to string."
                TextBoxValueToSet.Text = ""
            End Try
        Else
            LabelGetRecipe_Parameter_ValueResult.Text = ErrorString
            TextBoxValueToSet.Text = ""
        End If
    End Sub

C#

	     private void ButtonGetRecipe_Parameter_Value_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     object ResultObject = null;
                     string ErrorString = "";
                     ResultObject = ModuleNetworkNode.OPCSystemsComponent1.GetRecipe_Parameter_Value(TextBoxParameter.Text, TextBoxRecipeGroup.Text, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           try
                           {
                                  LabelGetRecipe_Parameter_ValueResult.Text = ResultObject.ToString();
                                  TextBoxValueToSet.Text = ResultObject.ToString();
                           }
                           catch (Exception ex)
                           {
                                  LabelGetRecipe_Parameter_ValueResult.Text = "Error converting value to string.";
                                  TextBoxValueToSet.Text = "";
                           }
                     }
                     else
                     {
                           LabelGetRecipe_Parameter_ValueResult.Text = ErrorString;
                           TextBoxValueToSet.Text = "";
                     }
              } 

GetRecipe_Parameter_Values

  • The GetRecipe_Parameter_Values Function returns an array of object values for the Recipe Group specified.
  • The order of the array corresponds with the GetRecipeParameterStrings Function order.
  • Returns empty array if service is not reachable.
  • Group is a String of the Recipe Group desired.
  • 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 ButtonGetRecipe_Parameter_Values_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetRecipe_Parameter_Values.Click
        Cursor.Current = Cursors.WaitCursor
        ComboBoxGetRecipe_Parameter_Values.Items.Clear()
        Dim ResultObjects() As Object
        Dim ResultObject As Object
        Dim ResultString As String
        Dim ErrorString As String = ""
        ResultObjects = ModuleNetworkNode.OPCSystemsComponent1.GetRecipe_Parameter_Values(TextBoxRecipeGroup.Text, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            For Each ResultObject In ResultObjects
                Try
                    If ResultObject Is Nothing Then
                        ResultString = ""
                    Else
                        ResultString = ResultObject
                    End If
                    ComboBoxGetRecipe_Parameter_Values.Items.Add(ResultString)
                Catch ex As Exception
                    ComboBoxGetRecipe_Parameter_Values.Items.Add("Error Converting Object")
                End Try
            Next
            If ComboBoxGetRecipe_Parameter_Values.Items.Count > 0 Then
                ComboBoxGetRecipe_Parameter_Values.SelectedIndex = 1
            End If
        Else
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	  private void ButtonGetRecipe_Parameter_Values_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     ComboBoxGetRecipe_Parameter_Values.Items.Clear();
                     object[] ResultObjects = null;
//INSTANT C# NOTE: Commented this declaration since looping variables in 'foreach' loops are declared in the 'foreach' header in C#:
//                   object ResultObject = null;
                     string ResultString = null;
                     string ErrorString = "";
                     ResultObjects = ModuleNetworkNode.OPCSystemsComponent1.GetRecipe_Parameter_Values(TextBoxRecipeGroup.Text, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           foreach (object ResultObject in ResultObjects)
                           {
                                  try
                                  {
                                         if (ResultObject == null)
                                         {
                                                ResultString = "";
                                         }
                                         else
                                         {
                                                ResultString = ResultObject.ToString();
                                         }
                                         ComboBoxGetRecipe_Parameter_Values.Items.Add(ResultString);
                                  }
                                  catch (Exception ex)
                                  {
                                         ComboBoxGetRecipe_Parameter_Values.Items.Add("Error Converting Object");
                                  }
                           }
                           if (ComboBoxGetRecipe_Parameter_Values.Items.Count > 0)
                           {
                                  ComboBoxGetRecipe_Parameter_Values.SelectedIndex = 1;
                           }
                     }
                     else
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              } 

SetRecipe_Parameter_Value

  • The SetRecipe_Parameter_Value Function sets an object value for the Recipe Group and Parameter specified.
  • Returns -1 if service is not reachable.
  • Returns 0 if the Group does not exist or the value did not get set correctly.
  • Returns 1 if the function was successful.
  • Parameter is a String of the Parameter Type desired of the Recipe Group.
  • Value is the desired value to set.
  • Group is a String of the Recipe Group desired.
  • 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 ButtonSetRecipe_Parameter_Value_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetRecipe_Parameter_Value.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ResultInt32 As Int32
        Dim ErrorString As String = ""
        ResultInt32 = ModuleNetworkNode.OPCSystemsComponent1.SetRecipe_Parameter_Value(TextBoxParameter.Text, TextBoxValueToSet.Text, TextBoxRecipeGroup.Text, TextBoxNetworkNode.Text, ErrorString)
        If ResultInt32 = -1 Then
            LabelSetRecipe_Parameter_ValueResult.Text = "OAS Service not reached."
        ElseIf ResultInt32 = 1 Then
            LabelSetRecipe_Parameter_ValueResult.Text = "Parameter Successfully Updated."
        Else
            LabelSetRecipe_Parameter_ValueResult.Text = ErrorString
        End If
    End Sub 

C#

	    private void ButtonSetRecipe_Parameter_Value_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     Int32 ResultInt32 = 0;
                     string ErrorString = "";
                     ResultInt32 = ModuleNetworkNode.OPCSystemsComponent1.SetRecipe_Parameter_Value(TextBoxParameter.Text, TextBoxValueToSet.Text, TextBoxRecipeGroup.Text, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ResultInt32 == -1)
                     {
                           LabelSetRecipe_Parameter_ValueResult.Text = "OAS Service not reached.";
                     }
                     else if (ResultInt32 == 1)
                     {
                           LabelSetRecipe_Parameter_ValueResult.Text = "Parameter Successfully Updated.";
                     }
                     else
                     {
                           LabelSetRecipe_Parameter_ValueResult.Text = ErrorString;
                     }
              }

SaveRecipeConfiguration

  • The SaveRecipeConfiguration Subroutine saves the current Recipe configuration to the specified file path.
  • 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 ButtonSaveRecipeConfiguration_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSaveRecipeConfiguration.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SaveRecipeConfiguration(TextBoxFilePath.Text, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	   private void ButtonSaveRecipeConfiguration_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SaveRecipeConfiguration(TextBoxFilePath.Text, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

LoadRecipeConfiguration

  • The LoadRecipeConfiguration Subroutine saves the current Recipe configuration to the specified file path.
  • 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 ButtonLoadRecipeConfiguration_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonLoadRecipeConfiguration.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.LoadRecipeConfiguration(TextBoxFilePath.Text, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub    

C#

	  private void ButtonLoadRecipeConfiguration_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.LoadRecipeConfiguration(TextBoxFilePath.Text, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

Options

Article Contents

SaveOptions

  • The SaveOptions Subroutine saves the current Option configuration.
  • 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 ButtonSaveOptions_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSaveOptions.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SaveOptions(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	 private void ButtonSaveOptions_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SaveOptions(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

LoadOptions

  • The LoadOptions Subroutine loads the current Option configuration from the default Options file.
  • 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 ButtonLoadOptions_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonLoadOptions.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.LoadOptions(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	private void ButtonLoadOptions_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.LoadOptions(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

GetLoadDefaultTagConfiguration

  • GetLoadDefaultTagConfiguration Function is to obtain automatic loading of the DefaultTagConfigurationFile.
  • Returns a boolean, True for enabled, False for disabled.
  • 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 ButtonLoadDefaultTagConfiguration_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonLoadDefaultTagConfiguration.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        Dim CurrentValue As Boolean = ModuleNetworkNode.OPCSystemsComponent1.GetLoadDefaultTagConfiguration(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            If CurrentValue Then
                LabelLoadDefaultTagConfigurationResult.Text = "Enabled"
            Else
                LabelLoadDefaultTagConfigurationResult.Text = "Disabled"
            End If
        Else
            LabelLoadDefaultTagConfigurationResult.Text = ErrorString
        End If
    End Sub

C#

	 private void ButtonLoadDefaultTagConfiguration_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     bool CurrentValue = ModuleNetworkNode.OPCSystemsComponent1.GetLoadDefaultTagConfiguration(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           if (CurrentValue)
                           {
                                  LabelLoadDefaultTagConfigurationResult.Text = "Enabled";
                           }
                           else
                           {
                                  LabelLoadDefaultTagConfigurationResult.Text = "Disabled";
                           }
                     }
                     else
                     {
                           LabelLoadDefaultTagConfigurationResult.Text = ErrorString;
                     }
              }
 

SetLoadDefaultTagConfiguration

  • SetLoadDefaultTagConfiguration Subroutine sets automatic loading of the DefaultTagConfigurationFile.
  • 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 ButtonSetLoadDefaultTagConfiguration_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetLoadDefaultTagConfiguration.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetLoadDefaultTagConfiguration(True, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub 
    
    Private Sub ButtonResetLoadDefaultTagConfiguration_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonResetLoadDefaultTagConfiguration.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetLoadDefaultTagConfiguration(False, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	  private void ButtonSetLoadDefaultTagConfiguration_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetLoadDefaultTagConfiguration(true, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }
 
              private void ButtonResetLoadDefaultTagConfiguration_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetLoadDefaultTagConfiguration(false, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }
 

GetDefaultTagConfigurationFile

  • GetDefaultTagConfigurationFile Function returns Default Tag Configuration file to load when LoadDefaultTagConfiguration is enabled.
  • Returns a String of the default Tag configuration file to load when the Service first starts.
  • 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 ButtonGetDefaultTagConfigurationFile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetDefaultTagConfigurationFile.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        TextBoxDefaultTagConfigurationFile.Text = ModuleNetworkNode.OPCSystemsComponent1.GetDefaultTagConfigurationFile(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	   private void ButtonGetDefaultTagConfigurationFile_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     TextBoxDefaultTagConfigurationFile.Text = ModuleNetworkNode.OPCSystemsComponent1.GetDefaultTagConfigurationFile(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }
 

SetDefaultTagConfigurationFile

  • SetDefaultTagConfigurationFile Subroutine sets the Default Tag Configuration file to load when LoadDefaultTagConfiguration is enabled.
  • 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 ButtonSetDefaultTagConfigurationFile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetDefaultTagConfigurationFile.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetDefaultTagConfigurationFile(TextBoxDefaultTagConfigurationFile.Text, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
 
    End Sub

C#

	  private void ButtonSetDefaultTagConfigurationFile_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetDefaultTagConfigurationFile(TextBoxDefaultTagConfigurationFile.Text, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
 
              }

GetLoadDefaultDataLoggingConfiguration

  • GetLoadDefaultDataLoggingConfiguration Function returns automatic loading of the DefaultDataLoggingConfigurationFile.
  • Returns a Boolean, True for enabled, False for disabled.
  • 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 ButtonLoadDefaultDataLoggingConfiguration_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonLoadDefaultDataLoggingConfiguration.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        Dim CurrentValue As Boolean = ModuleNetworkNode.OPCSystemsComponent1.GetLoadDefaultDataLoggingConfiguration(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            If CurrentValue Then
                LabelLoadDefaultDataLoggingConfigurationResult.Text = "Enabled"
            Else
                LabelLoadDefaultDataLoggingConfigurationResult.Text = "Disabled"
            End If
        Else
            LabelLoadDefaultDataLoggingConfigurationResult.Text = ErrorString
        End If
    End Sub

C#

	     private void ButtonLoadDefaultDataLoggingConfiguration_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     bool CurrentValue = ModuleNetworkNode.OPCSystemsComponent1.GetLoadDefaultDataLoggingConfiguration(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           if (CurrentValue)
                           {
                                  LabelLoadDefaultDataLoggingConfigurationResult.Text = "Enabled";
                           }
                           else
                           {
                                  LabelLoadDefaultDataLoggingConfigurationResult.Text = "Disabled";
                           }
                     }
                     else
                     {
                           LabelLoadDefaultDataLoggingConfigurationResult.Text = ErrorString;
                     }
              }

SetLoadDefaultDataLoggingConfiguration

  • SetLoadDefaultDataLoggingConfiguration Subroutine sets automatic loading of the DefaultDataLoggingConfigurationFile.
  • 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 ButtonSetLoadDefaultDataLoggingConfiguration_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetLoadDefaultDataLoggingConfiguration.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetLoadDefaultDataLoggingConfiguration(True, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub 
    
    Private Sub ButtonResetLoadDefaultDataLoggingConfiguration_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonResetLoadDefaultDataLoggingConfiguration.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetLoadDefaultDataLoggingConfiguration(False, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	 private void ButtonSetLoadDefaultDataLoggingConfiguration_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetLoadDefaultDataLoggingConfiguration(true, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }
 
              private void ButtonResetLoadDefaultDataLoggingConfiguration_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetLoadDefaultDataLoggingConfiguration(false, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

GetDefaultDataLoggingConfigurationFile

  • GetDefaultDataLoggingConfigurationFile Function returns the default Data Logging Configuration file to load when LoadDefaultDataLoggingConfiguration is enabled.
  • Returns a String of the default Data Logging configuration file to load when the Service first starts.
  • 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 ButtonGetDefaultDataLoggingConfigurationFile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetDefaultDataLoggingConfigurationFile.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        TextBoxDefaultDataLoggingConfigurationFile.Text = ModuleNetworkNode.OPCSystemsComponent1.GetDefaultDataLoggingConfigurationFile(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	   private void ButtonGetDefaultDataLoggingConfigurationFile_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     TextBoxDefaultDataLoggingConfigurationFile.Text = ModuleNetworkNode.OPCSystemsComponent1.GetDefaultDataLoggingConfigurationFile(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }
 
              // SetDefaultDataLoggingConfigurationFile Subroutine sets the default Data Logging Configuration file to load when LoadDefaultDataLoggingConfiguration is enabled.
              // 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.
              private void ButtonSetDefaultDataLoggingConfigurationFile_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetDefaultDataLoggingConfigurationFile(TextBoxDefaultDataLoggingConfigurationFile.Text, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }
 

SetDefaultDataLoggingConfigurationFile

  • SetDefaultDataLoggingConfigurationFile Subroutine sets the default Data Logging Configuration file to load when LoadDefaultDataLoggingConfiguration is enabled.
  • 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 ButtonSetDefaultDataLoggingConfigurationFile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetDefaultDataLoggingConfigurationFile.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetDefaultDataLoggingConfigurationFile(TextBoxDefaultDataLoggingConfigurationFile.Text, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	   private void ButtonSetDefaultDataLoggingConfigurationFile_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetDefaultDataLoggingConfigurationFile(TextBoxDefaultDataLoggingConfigurationFile.Text, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

GetLoadDefaultAlarmLoggingConfiguration

  • GetLoadDefaultAlarmLoggingConfiguration Function returns automatic loading of the DefaultAlarmLoggingConfigurationFile.
  • Returns a Boolean, True for enabled, False for disabled.
  • 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 ButtonLoadDefaultAlarmLoggingConfiguration_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonLoadDefaultAlarmLoggingConfiguration.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        Dim CurrentValue As Boolean = ModuleNetworkNode.OPCSystemsComponent1.GetLoadDefaultAlarmLoggingConfiguration(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            If CurrentValue Then
                LabelLoadDefaultAlarmLoggingConfigurationResult.Text = "Enabled"
            Else
                LabelLoadDefaultAlarmLoggingConfigurationResult.Text = "Disabled"
            End If
        Else
            LabelLoadDefaultAlarmLoggingConfigurationResult.Text = ErrorString
        End If
    End Sub

C#

	  private void ButtonLoadDefaultAlarmLoggingConfiguration_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     bool CurrentValue = ModuleNetworkNode.OPCSystemsComponent1.GetLoadDefaultAlarmLoggingConfiguration(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           if (CurrentValue)
                           {
                                  LabelLoadDefaultAlarmLoggingConfigurationResult.Text = "Enabled";
                           }
                           else
                           {
                                  LabelLoadDefaultAlarmLoggingConfigurationResult.Text = "Disabled";
                           }
                     }
                     else
                     {
                           LabelLoadDefaultAlarmLoggingConfigurationResult.Text = ErrorString;
                     }
              }
 

SetLoadDefaultAlarmLoggingConfiguration

  • SetLoadDefaultAlarmLoggingConfiguration Subroutine sets automatic loading of the DefaultAlarmLoggingConfigurationFile.
  • Returns a Boolean, True for enabled, False for disabled.
  • 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 ButtonSetLoadDefaultAlarmLoggingConfiguration_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetLoadDefaultAlarmLoggingConfiguration.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetLoadDefaultAlarmLoggingConfiguration(True, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub 
    
    Private Sub ButtonResetLoadDefaultAlarmLoggingConfiguration_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonResetLoadDefaultAlarmLoggingConfiguration.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetLoadDefaultAlarmLoggingConfiguration(False, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	  private void ButtonSetLoadDefaultAlarmLoggingConfiguration_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetLoadDefaultAlarmLoggingConfiguration(true, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }
 
              private void ButtonResetLoadDefaultAlarmLoggingConfiguration_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetLoadDefaultAlarmLoggingConfiguration(false, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

GetDefaultAlarmLoggingConfigurationFile

  • GetDefaultAlarmLoggingConfigurationFile Function returns the default Tag Configuration file to load when LoadDefaultAlarmLoggingConfiguration is enabled.
  • Returns a String of the default Data Logging configuration file to load when the Service first starts.
  • 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 ButtonGetDefaultAlarmLoggingConfigurationFile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetDefaultAlarmLoggingConfigurationFile.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        TextBoxDefaultAlarmLoggingConfigurationFile.Text = ModuleNetworkNode.OPCSystemsComponent1.GetDefaultAlarmLoggingConfigurationFile(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	  private void ButtonGetDefaultAlarmLoggingConfigurationFile_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     TextBoxDefaultAlarmLoggingConfigurationFile.Text = ModuleNetworkNode.OPCSystemsComponent1.GetDefaultAlarmLoggingConfigurationFile(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

SetDefaultAlarmLoggingConfigurationFile

  • SetDefaultAlarmLoggingConfigurationFile Subroutine sets the default Tag Configuration file to load when LoadDefaultAlarmLoggingConfiguration is enabled.
  • Returns a String of the default Data Logging configuration file to load when the Service first starts.
  • 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 ButtonSetDefaultAlarmLoggingConfigurationFile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetDefaultAlarmLoggingConfigurationFile.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetDefaultAlarmLoggingConfigurationFile(TextBoxDefaultAlarmLoggingConfigurationFile.Text, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	 private void ButtonSetDefaultAlarmLoggingConfigurationFile_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetDefaultAlarmLoggingConfigurationFile(TextBoxDefaultAlarmLoggingConfigurationFile.Text, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

GetLoadDefaultAlarmNotificationConfiguration

  • GetLoadDefaultAlarmNotificationConfiguration Function returns automatic loading of the DefaultAlarmNotificationConfigurationFile.
  • Returns a Boolean, True for enabled, False for disabled.
  • 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 ButtonLoadDefaultAlarmNotificationConfiguration_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonLoadDefaultAlarmNotificationConfiguration.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        Dim CurrentValue As Boolean = ModuleNetworkNode.OPCSystemsComponent1.GetLoadDefaultAlarmNotificationConfiguration(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            If CurrentValue Then
                LabelLoadDefaultAlarmNotificationConfigurationResult.Text = "Enabled"
            Else
                LabelLoadDefaultAlarmNotificationConfigurationResult.Text = "Disabled"
            End If
        Else
            LabelLoadDefaultAlarmNotificationConfigurationResult.Text = ErrorString
        End If
    End Sub

C#

	  private void ButtonLoadDefaultAlarmNotificationConfiguration_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     bool CurrentValue = ModuleNetworkNode.OPCSystemsComponent1.GetLoadDefaultAlarmNotificationConfiguration(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           if (CurrentValue)
                           {
                                  LabelLoadDefaultAlarmNotificationConfigurationResult.Text = "Enabled";
                           }
                           else
                           {
                                  LabelLoadDefaultAlarmNotificationConfigurationResult.Text = "Disabled";
                            }
                     }
                     else
                     {
                           LabelLoadDefaultAlarmNotificationConfigurationResult.Text = ErrorString;
                     }
              }

SetLoadDefaultAlarmNotificationConfiguration

  • SetLoadDefaultAlarmNotificationConfiguration Subroutine sets automatic loading of the DefaultAlarmNotificationConfigurationFile.
  • Returns a Boolean, True for enabled, False for disabled.
  • 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 ButtonSetLoadDefaultAlarmNotificationConfiguration_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetLoadDefaultAlarmNotificationConfiguration.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetLoadDefaultAlarmNotificationConfiguration(True, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub 
    
    Private Sub ButtonResetLoadDefaultAlarmNotificationConfiguration_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonResetLoadDefaultAlarmNotificationConfiguration.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetLoadDefaultAlarmNotificationConfiguration(False, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	  private void ButtonSetLoadDefaultAlarmNotificationConfiguration_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetLoadDefaultAlarmNotificationConfiguration(true, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }
 
              private void ButtonResetLoadDefaultAlarmNotificationConfiguration_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetLoadDefaultAlarmNotificationConfiguration(false, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

GetDefaultAlarmNotificationConfigurationFile

  • GetDefaultAlarmNotificationConfigurationFile Function returns the default Tag Configuration file to load when LoadDefaultAlarmNotificationConfiguration is enabled.
  • Returns a String of the default Data Logging configuration file to load when the Service first starts.
  • 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 ButtonGetDefaultAlarmNotificationConfigurationFile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetDefaultAlarmNotificationConfigurationFile.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        TextBoxDefaultAlarmNotificationConfigurationFile.Text = ModuleNetworkNode.OPCSystemsComponent1.GetDefaultAlarmNotificationConfigurationFile(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	 private void ButtonGetDefaultAlarmNotificationConfigurationFile_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     TextBoxDefaultAlarmNotificationConfigurationFile.Text = ModuleNetworkNode.OPCSystemsComponent1.GetDefaultAlarmNotificationConfigurationFile(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }
 

SetDefaultAlarmNotificationConfigurationFile

  • SetDefaultAlarmNotificationConfigurationFile Subroutine sets the default Tag Configuration file to load when LoadDefaultAlarmNotificationConfiguration is enabled.
  • Returns a String of the default Data Logging configuration file to load when the Service first starts.
  • 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 ButtonSetDefaultAlarmNotificationConfigurationFile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetDefaultAlarmNotificationConfigurationFile.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetDefaultAlarmNotificationConfigurationFile(TextBoxDefaultAlarmNotificationConfigurationFile.Text, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	 private void ButtonSetDefaultAlarmNotificationConfigurationFile_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetDefaultAlarmNotificationConfigurationFile(TextBoxDefaultAlarmNotificationConfigurationFile.Text, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

GetLoadDefaultReportConfiguration

  • GetLoadDefaultReportConfiguration Function returns automatic loading of the DefaultReportConfigurationFile.
  • Returns a Boolean, True for enabled, False for disabled.
  • 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 ButtonLoadDefaultReportConfiguration_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonLoadDefaultReportConfiguration.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        Dim CurrentValue As Boolean = ModuleNetworkNode.OPCSystemsComponent1.GetLoadDefaultReportConfiguration(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            If CurrentValue Then
                LabelLoadDefaultReportConfigurationResult.Text = "Enabled"
            Else
                LabelLoadDefaultReportConfigurationResult.Text = "Disabled"
            End If
        Else
            LabelLoadDefaultReportConfigurationResult.Text = ErrorString
        End If
    End Sub

C#

	  private void ButtonLoadDefaultReportConfiguration_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     bool CurrentValue = ModuleNetworkNode.OPCSystemsComponent1.GetLoadDefaultReportConfiguration(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           if (CurrentValue)
                           {
                                  LabelLoadDefaultReportConfigurationResult.Text = "Enabled";
                           }
                           else
                           {
                                  LabelLoadDefaultReportConfigurationResult.Text = "Disabled";
                           }
                     }
                     else
                     {
                           LabelLoadDefaultReportConfigurationResult.Text = ErrorString;
                     }
              }

SetLoadDefaultReportConfiguration

  • SetLoadDefaultReportConfiguration Subroutine sets automatic loading of the DefaultReportConfigurationFile.
  • 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 ButtonSetLoadDefaultReportConfiguration_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetLoadDefaultReportConfiguration.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetLoadDefaultReportConfiguration(True, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub 
    
    Private Sub ButtonResetLoadDefaultReportConfiguration_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonResetLoadDefaultReportConfiguration.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetLoadDefaultReportConfiguration(False, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	 private void ButtonSetLoadDefaultReportConfiguration_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetLoadDefaultReportConfiguration(true, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }
 
              private void ButtonResetLoadDefaultReportConfiguration_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetLoadDefaultReportConfiguration(false, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

GetDefaultReportConfigurationFile

  • GetDefaultReportConfigurationFile Function returns the default Report Configuration file to load when LoadDefaultReportConfiguration is enabled.
  • Returns a String of the default Report configuration file to load when the Service first starts.
  • 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 ButtonGetDefaultReportConfigurationFile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetDefaultReportConfigurationFile.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        TextBoxDefaultReportConfigurationFile.Text = ModuleNetworkNode.OPCSystemsComponent1.GetDefaultReportConfigurationFile(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	 private void ButtonGetDefaultReportConfigurationFile_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     TextBoxDefaultReportConfigurationFile.Text = ModuleNetworkNode.OPCSystemsComponent1.GetDefaultReportConfigurationFile(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

SetDefaultReportConfigurationFile

  • SetDefaultReportConfigurationFile Function sets the default Report Configuration file to load when LoadDefaultReportConfiguration is enabled.
  • 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 ButtonSetDefaultReportConfigurationFile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetDefaultReportConfigurationFile.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetDefaultReportConfigurationFile(TextBoxDefaultReportConfigurationFile.Text, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	private void ButtonSetDefaultReportConfigurationFile_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetDefaultReportConfigurationFile(TextBoxDefaultReportConfigurationFile.Text, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

GetLoadDefaultRecipeConfiguration

  • GetLoadDefaultRecipeConfiguration Function returns automatic loading of the DefaultRecipeConfigurationFile.
  • Returns a Boolean, True for enabled, False for disabled.
  • 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 ButtonLoadDefaultRecipeConfiguration_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonLoadDefaultRecipeConfiguration.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        Dim CurrentValue As Boolean = ModuleNetworkNode.OPCSystemsComponent1.GetLoadDefaultRecipeConfiguration(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            If CurrentValue Then
                LabelLoadDefaultRecipeConfigurationResult.Text = "Enabled"
            Else
                LabelLoadDefaultRecipeConfigurationResult.Text = "Disabled"
            End If
        Else
            LabelLoadDefaultRecipeConfigurationResult.Text = ErrorString
        End If
    End Sub

C#

	  private void ButtonLoadDefaultRecipeConfiguration_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     bool CurrentValue = ModuleNetworkNode.OPCSystemsComponent1.GetLoadDefaultRecipeConfiguration(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           if (CurrentValue)
                           {
                                  LabelLoadDefaultRecipeConfigurationResult.Text = "Enabled";
                           }
                           else
                           {
                                  LabelLoadDefaultRecipeConfigurationResult.Text = "Disabled";
                           }
                     }
                     else
                     {
                           LabelLoadDefaultRecipeConfigurationResult.Text = ErrorString;
                     }
              }

SetLoadDefaultRecipeConfiguration

  • SetLoadDefaultRecipeConfiguration Function sets automatic loading of the DefaultRecipeConfigurationFile.
  • 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 ButtonSetLoadDefaultRecipeConfiguration_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetLoadDefaultRecipeConfiguration.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetLoadDefaultRecipeConfiguration(True, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub 
    
    Private Sub ButtonResetLoadDefaultRecipeConfiguration_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonResetLoadDefaultRecipeConfiguration.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetLoadDefaultRecipeConfiguration(False, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

 private void ButtonSetLoadDefaultRecipeConfiguration_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetLoadDefaultRecipeConfiguration(true, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }
 
              private void ButtonResetLoadDefaultRecipeConfiguration_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetLoadDefaultRecipeConfiguration(false, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }	

GetDefaultRecipeConfigurationFile

  • GetDefaultRecipeConfigurationFile Function returns the default Recipe Configuration file to load when LoadDefaultRecipeConfiguration is enabled.
  • Returns a String of the default Recipe configuration file to load when the Service first starts.
  • 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 ButtonGetDefaultRecipeConfigurationFile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetDefaultRecipeConfigurationFile.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        TextBoxDefaultRecipeConfigurationFile.Text = ModuleNetworkNode.OPCSystemsComponent1.GetDefaultRecipeConfigurationFile(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	 private void ButtonGetDefaultRecipeConfigurationFile_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     TextBoxDefaultRecipeConfigurationFile.Text = ModuleNetworkNode.OPCSystemsComponent1.GetDefaultRecipeConfigurationFile(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }
 

SetDefaultRecipeConfigurationFile

  • SetDefaultRecipeConfigurationFile Subroutine sets the default Recipe Configuration file to load when LoadDefaultRecipeConfiguration is enabled.
  • Returns a String of the default Recipe configuration file to load when the Service first starts.
  • 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 ButtonSetDefaultRecipeConfigurationFile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetDefaultRecipeConfigurationFile.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetDefaultRecipeConfigurationFile(TextBoxDefaultRecipeConfigurationFile.Text, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

  private void ButtonSetDefaultRecipeConfigurationFile_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetDefaultRecipeConfigurationFile(TextBoxDefaultRecipeConfigurationFile.Text, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }	

GetLoadDefaultSecurityConfiguration

  • GetLoadDefaultSecurityConfiguration Function returns automatic loading of the DefaultSecurityConfigurationFile.
  • Returns a Boolean, True for enabled, False for disabled.
  • 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 ButtonLoadDefaultSecurityConfiguration_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonLoadDefaultSecurityConfiguration.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        Dim CurrentValue As Boolean = ModuleNetworkNode.OPCSystemsComponent1.GetLoadDefaultSecurityConfiguration(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            If CurrentValue Then
                LabelLoadDefaultSecurityConfigurationResult.Text = "Enabled"
            Else
                LabelLoadDefaultSecurityConfigurationResult.Text = "Disabled"
            End If
        Else
            LabelLoadDefaultSecurityConfigurationResult.Text = ErrorString
        End If
    End Sub

C#

	  private void ButtonLoadDefaultSecurityConfiguration_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     bool CurrentValue = ModuleNetworkNode.OPCSystemsComponent1.GetLoadDefaultSecurityConfiguration(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           if (CurrentValue)
                           {
                                  LabelLoadDefaultSecurityConfigurationResult.Text = "Enabled";
                           }
                           else
                           {
                                  LabelLoadDefaultSecurityConfigurationResult.Text = "Disabled";
                           }
                     }
                     else
                     {
                           LabelLoadDefaultSecurityConfigurationResult.Text = ErrorString;
                     }
              }
 

SetLoadDefaultSecurityConfiguration

  • SetLoadDefaultSecurityConfiguration Function sets automatic loading of the DefaultSecurityConfigurationFile.
  • 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 ButtonSetLoadDefaultSecurityConfiguration_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetLoadDefaultSecurityConfiguration.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetLoadDefaultSecurityConfiguration(True, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub 
    
    Private Sub ButtonResetLoadDefaultSecurityConfiguration_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonResetLoadDefaultSecurityConfiguration.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetLoadDefaultSecurityConfiguration(False, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	  private void ButtonSetLoadDefaultSecurityConfiguration_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetLoadDefaultSecurityConfiguration(true, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }
 
              private void ButtonResetLoadDefaultSecurityConfiguration_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetLoadDefaultSecurityConfiguration(false, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }
 

GetDefaultSecurityConfigurationFile

  • GetDefaultSecurityConfigurationFile Function returns the default Security Configuration file to load when LoadDefaultSecurityConfiguration is enabled.
  • Returns a String of the default Security configuration file to load when the Service first starts.
  • 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 ButtonGetDefaultSecurityConfigurationFile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetDefaultSecurityConfigurationFile.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        TextBoxDefaultSecurityConfigurationFile.Text = ModuleNetworkNode.OPCSystemsComponent1.GetDefaultSecurityConfigurationFile(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	  private void ButtonGetDefaultSecurityConfigurationFile_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     TextBoxDefaultSecurityConfigurationFile.Text = ModuleNetworkNode.OPCSystemsComponent1.GetDefaultSecurityConfigurationFile(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

SetDefaultSecurityConfigurationFile

  • SetDefaultSecurityConfigurationFile Subroutine sets the default Security Configuration file to load when LoadDefaultSecurityConfiguration is enabled.
  • 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 ButtonSetDefaultSecurityConfigurationFile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetDefaultSecurityConfigurationFile.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetDefaultSecurityConfigurationFile(TextBoxDefaultSecurityConfigurationFile.Text, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	   private void ButtonSetDefaultSecurityConfigurationFile_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetDefaultSecurityConfigurationFile(TextBoxDefaultSecurityConfigurationFile.Text, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

GetAutoRuntime

  • GetAutoRuntime Function returns automatic Start of Runtime Mode when the Service first Starts.
  • Returns a Boolean, True for enabled, False for disabled.
  • 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 ButtonAutoRuntime_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonAutoRuntime.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        Dim CurrentValue As Boolean = ModuleNetworkNode.OPCSystemsComponent1.GetAutoRuntime(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            If CurrentValue Then
                LabelAutoRuntimeResult.Text = "Enabled"
            Else
                LabelAutoRuntimeResult.Text = "Disabled"
            End If
        Else
            LabelAutoRuntimeResult.Text = ErrorString
        End If
    End Sub

C#

	   private void ButtonAutoRuntime_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     bool CurrentValue = ModuleNetworkNode.OPCSystemsComponent1.GetAutoRuntime(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           if (CurrentValue)
                           {
                                  LabelAutoRuntimeResult.Text = "Enabled";
                           }
                           else
                           {
                                  LabelAutoRuntimeResult.Text = "Disabled";
                           }
                     }
                     else
                     {
                           LabelAutoRuntimeResult.Text = ErrorString;
                     }
              }

SetAutoRuntime

  • SetAutoRuntime Subroutine sets automatic Start of Runtime Mode when the Service first Starts.
  • 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 ButtonSetAutoRuntime_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetAutoRuntime.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetAutoRuntime(True, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub 
    
    Private Sub ButtonResetAutoRuntime_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonResetAutoRuntime.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetAutoRuntime(False, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	  private void ButtonSetAutoRuntime_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetAutoRuntime(true, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }
 
              private void ButtonResetAutoRuntime_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetAutoRuntime(false, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }
 

GetStartRuntimeDelay

  • GetStartRuntimeDelay Function returns the amount of time in seconds that will delay the starting Runtime Mode when the Service first Starts if the AutoRuntime property is enabled.
  • Returns an Int32.
  • 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 ButtonGetStartRuntimeDelay_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetStartRuntimeDelay.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        Dim CurrentValue As Int32
        CurrentValue = ModuleNetworkNode.OPCSystemsComponent1.GetStartRuntimeDelay(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            TextBoxStartRuntimeDelay.Text = CurrentValue.ToString
        Else
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	 private void ButtonGetStartRuntimeDelay_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     Int32 CurrentValue = 0;
                     CurrentValue = ModuleNetworkNode.OPCSystemsComponent1.GetStartRuntimeDelay(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           TextBoxStartRuntimeDelay.Text = CurrentValue.ToString();
                     }
                     else
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

SetStartRuntimeDelay

  • SetStartRuntimeDelay Subroutine sets the amount of time in seconds that will delay the starting Runtime Mode when the Service first Starts if the AutoRuntime property is enabled.
  • 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 ButtonSetStartRuntimeDelay_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetStartRuntimeDelay.Click
        Cursor.Current = Cursors.WaitCursor
        If IsNumeric(TextBoxStartRuntimeDelay.Text) Then
            Dim ValueInt32 As Int32
            ValueInt32 = System.Convert.ToInt32(TextBoxStartRuntimeDelay.Text)
            If ValueInt32 < 0 Then
                MessageBox.Show("0 is the lowest number possible", "Error setting StartRuntimeDelay", MessageBoxButtons.OK, MessageBoxIcon.Error)
                Exit Sub
            End If
            Dim ErrorString As String = ""
            ModuleNetworkNode.OPCSystemsComponent1.SetStartRuntimeDelay(ValueInt32, TextBoxNetworkNode.Text, ErrorString)
            If ErrorString <> "Success" Then
                MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
            End If
        Else
            MessageBox.Show("StartRuntimeDelay value is invalid", "Error setting StartRuntimeDelay", MessageBoxButtons.OK, MessageBoxIcon.Error)
            Exit Sub
        End If
    End Sub

C#

	  private void ButtonSetStartRuntimeDelay_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     if (Simulate.IsNumeric(TextBoxStartRuntimeDelay.Text))
                     {
                           Int32 ValueInt32 = 0;
                           ValueInt32 = System.Convert.ToInt32(TextBoxStartRuntimeDelay.Text);
                           if (ValueInt32 < 0)
                           {
                                  MessageBox.Show("0 is the lowest number possible", "Error setting StartRuntimeDelay", MessageBoxButtons.OK, MessageBoxIcon.Error);
                                  return;
                           }
                            string ErrorString = "";
                           ModuleNetworkNode.OPCSystemsComponent1.SetStartRuntimeDelay(ValueInt32, TextBoxNetworkNode.Text, ref ErrorString);
                           if (ErrorString != "Success")
                           {
                                  MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                           }
                     }
                     else
                     {
                           MessageBox.Show("StartRuntimeDelay value is invalid", "Error setting StartRuntimeDelay", MessageBoxButtons.OK, MessageBoxIcon.Error);
                           return;
                     }
              }

GetOPCServerWatchDogRate

  • GetOPCServerWatchDogRate Function returns the amount of time in seconds that wait for new data from each OPC Server Group before disconnecting and reconnecting the OPC Server Group.
  • Returns an Int32.
  • 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 ButtonGetOPCServerWatchDogRate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetOPCServerWatchDogRate.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        Dim CurrentValue As Int32
        CurrentValue = ModuleNetworkNode.OPCSystemsComponent1.GetOPCServerWatchDogRate(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            TextBoxOPCServerWatchDogRate.Text = CurrentValue.ToString
        Else
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	     private void ButtonGetOPCServerWatchDogRate_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     Int32 CurrentValue = 0;
                     CurrentValue = ModuleNetworkNode.OPCSystemsComponent1.GetOPCServerWatchDogRate(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           TextBoxOPCServerWatchDogRate.Text = CurrentValue.ToString();
                     }
                     else
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

SetOPCServerWatchDogRate

  • SetOPCServerWatchDogRate Subroutine sets the amount of time in seconds that wait for new data from each OPC Server Group before disconnecting and reconnecting the OPC Server Group.
  • Set to 0 to disable the OPC Server Watchdog.
  • 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 ButtonSetOPCServerWatchDogRate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetOPCServerWatchDogRate.Click
        Cursor.Current = Cursors.WaitCursor
        If IsNumeric(TextBoxOPCServerWatchDogRate.Text) Then
            Dim ValueInt32 As Int32
            ValueInt32 = System.Convert.ToInt32(TextBoxOPCServerWatchDogRate.Text)
            If ValueInt32 < 0 Then
                MessageBox.Show("0 is the lowest number possible", "Error setting OPCServerWatchDogRate", MessageBoxButtons.OK, MessageBoxIcon.Error)
                Exit Sub
            End If
            Dim ErrorString As String = ""
            ModuleNetworkNode.OPCSystemsComponent1.SetOPCServerWatchDogRate(ValueInt32, TextBoxNetworkNode.Text, ErrorString)
            If ErrorString <> "Success" Then
                MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
            End If
        Else
            MessageBox.Show("OPCServerWatchDogRate value is invalid", "Error setting OPCServerWatchDogRate", MessageBoxButtons.OK, MessageBoxIcon.Error)
            Exit Sub
        End If
    End Sub

C#

	  private void ButtonSetOPCServerWatchDogRate_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     if (Simulate.IsNumeric(TextBoxOPCServerWatchDogRate.Text))
                     {
                           Int32 ValueInt32 = 0;
                           ValueInt32 = System.Convert.ToInt32(TextBoxOPCServerWatchDogRate.Text);
                           if (ValueInt32 < 0)
                           {
                                  MessageBox.Show("0 is the lowest number possible", "Error setting OPCServerWatchDogRate", MessageBoxButtons.OK, MessageBoxIcon.Error);
                                  return;
                           }
                           string ErrorString = "";
                           ModuleNetworkNode.OPCSystemsComponent1.SetOPCServerWatchDogRate(ValueInt32, TextBoxNetworkNode.Text, ref ErrorString);
                           if (ErrorString != "Success")
                           {
                                  MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                           }
                     }
                     else
                     {
                           MessageBox.Show("OPCServerWatchDogRate value is invalid", "Error setting OPCServerWatchDogRate", MessageBoxButtons.OK, MessageBoxIcon.Error);
                           return;
                     }
              }
 

GetTimeStampFromOPC

  • GetTimeStampFromOPC Function returns TimeStamp from OPC Servers which enables setting the TimeStamp of when all Tag Parameters with OPC as the data source to the TimeStamp from the OPC Server.
  • When set to False the TimeStamp comes for the CPU clock of the OAS Service containing the Tag.
  • Returns a Boolean, True for enabled, False for disabled.
  • 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 ButtonTimeStampFromOPC_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonTimeStampFromOPC.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        Dim CurrentValue As Boolean = ModuleNetworkNode.OPCSystemsComponent1.GetTimeStampFromOPC(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            If CurrentValue Then
                LabelTimeStampFromOPC.Text = "Enabled"
            Else
                LabelTimeStampFromOPC.Text = "Disabled"
            End If
        Else
            LabelTimeStampFromOPC.Text = ErrorString
        End If
    End Sub

C#

	   private void ButtonTimeStampFromOPC_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     bool CurrentValue = ModuleNetworkNode.OPCSystemsComponent1.GetTimeStampFromOPC(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           if (CurrentValue)
                           {
                                  LabelTimeStampFromOPC.Text = "Enabled";
                           }
                           else
                           {
                                  LabelTimeStampFromOPC.Text = "Disabled";
                           }
                     }
                     else
                     {
                           LabelTimeStampFromOPC.Text = ErrorString;
                     }
              }

SetTimeStampFromOPC

  • SetTimeStampFromOPC Subroutine sets TimeStamp from OPC Servers which enables setting the TimeStamp of when all Tag Parameters with OPC as the data source to the TimeStamp from the OPC Server.
  • When set to False the TimeStamp comes for the CPU clock of the OAS Service containing the Tag.
  • Returns a Boolean, True for enabled, False for disabled.
  • 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 ButtonSetTimeStampFromOPC_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetTimeStampFromOPC.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetTimeStampFromOPC(True, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub 
    
    Private Sub ButtonResetTimeStampFromOPC_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonResetTimeStampFromOPC.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetTimeStampFromOPC(False, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	 private void ButtonSetTimeStampFromOPC_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetTimeStampFromOPC(true, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }
 
              private void ButtonResetTimeStampFromOPC_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetTimeStampFromOPC(false, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

GetLogErrors

  • GetLogErrors Function returns the Log Errors mode.
  • Returns a Boolean, True for enabled, False for disabled.
  • 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 ButtonLogErrors_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetLogErrors.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        Dim CurrentValue As Boolean = ModuleNetworkNode.OPCSystemsComponent1.GetLogErrors(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            If CurrentValue Then
                LabelLogErrorsResult.Text = "Enabled"
            Else
                LabelLogErrorsResult.Text = "Disabled"
            End If
        Else
            LabelLogErrorsResult.Text = ErrorString
        End If
    End Sub

C#

	 private void ButtonLogErrors_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     bool CurrentValue = ModuleNetworkNode.OPCSystemsComponent1.GetLogErrors(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           if (CurrentValue)
                           {
                                  LabelLogErrorsResult.Text = "Enabled";
                           }
                           else
                           {
                                  LabelLogErrorsResult.Text = "Disabled";
                           }
                     }
                     else
                     {
                           LabelLogErrorsResult.Text = ErrorString;
                     }
              }

SetLogErrors

  • SetLogErrors Subroutine sets the Log Errors mode.
  • 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 ButtonSetLogErrors_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetLogErrors.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetLogErrors(True, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub 
	    
	    Private Sub ButtonResetLogErrors_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonResetLogErrors.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetLogErrors(False, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	
              private void ButtonSetLogErrors_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetLogErrors(true, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }
 
              private void ButtonResetLogErrors_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetLogErrors(false, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

GetLogErrorsPath

  • GetLogErrorsPath Function returns the Error Log Path.
  • Returns a String of the path to log errors to when LogErrors is enabled.
  • 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 ButtonGetLogErrorsPath_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetLogErrorsPath.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        TextBoxLogErrorsPath.Text = ModuleNetworkNode.OPCSystemsComponent1.GetLogErrorsPath(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	
 private void ButtonGetLogErrorsPath_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     TextBoxLogErrorsPath.Text = ModuleNetworkNode.OPCSystemsComponent1.GetLogErrorsPath(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

SetLogErrorsPath

  • SetLogErrorsPath Subroutine sets the Error Log Path.
  • 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 ButtonSetLogErrorsPath_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetLogErrorsPath.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetLogErrorsPath(TextBoxLogErrorsPath.Text, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	   private void ButtonGetLogErrorsPath_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     TextBoxLogErrorsPath.Text = ModuleNetworkNode.OPCSystemsComponent1.GetLogErrorsPath(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }
 

GetDeleteLogErrors

  • GetDeleteLogErrors Function returns state of automatic deleting of error log.
  • Returns a Boolean, True for enabled, False for disabled.
  • 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 ButtonDeleteLogErrors_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetDeleteLogErrors.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        Dim CurrentValue As Boolean = ModuleNetworkNode.OPCSystemsComponent1.GetDeleteLogErrors(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            If CurrentValue Then
                LabelDeleteLogErrorsResult.Text = "Enabled"
            Else
                LabelDeleteLogErrorsResult.Text = "Disabled"
            End If
        Else
            LabelDeleteLogErrorsResult.Text = ErrorString
        End If
    End Sub

C#

	    private void ButtonDeleteLogErrors_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     bool CurrentValue = ModuleNetworkNode.OPCSystemsComponent1.GetDeleteLogErrors(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           if (CurrentValue)
                           {
                                  LabelDeleteLogErrorsResult.Text = "Enabled";
                           }
                           else
                           {
                                  LabelDeleteLogErrorsResult.Text = "Disabled";
                           }
                     }
                     else
                     {
                           LabelDeleteLogErrorsResult.Text = ErrorString;
                     }
              }

SetDeleteLogErrors

  • SetDeleteLogErrors Subroutine sets automatic deleting of error log.
  • 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 ButtonSetDeleteLogErrors_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetDeleteLogErrors.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetDeleteLogErrors(True, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub 
	    
	    Private Sub ButtonResetDeleteLogErrors_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonResetDeleteLogErrors.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetDeleteLogErrors(False, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	private void ButtonGetDeleteLogErrorsDays_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     Int32 CurrentValue = 0;
                     CurrentValue = ModuleNetworkNode.OPCSystemsComponent1.GetDeleteLogErrorsDays(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           TextBoxDeleteLogErrorsDays.Text = CurrentValue.ToString();
                     }
                     else
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }

GetDeleteLogErrorsDays

  • GetDeleteLogErrorsDays Function returns the Number of Days for Automatic Deletion of the Error Log.
  • Returns an Int32 for the number of days when the Error Log files will be kept.
  • 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 ButtonGetDeleteLogErrorsDays_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetDeleteLogErrorsDays.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        Dim CurrentValue As Int32
        CurrentValue = ModuleNetworkNode.OPCSystemsComponent1.GetDeleteLogErrorsDays(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            TextBoxDeleteLogErrorsDays.Text = CurrentValue.ToString
        Else
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	  private void ButtonGetDeleteLogErrorsDays_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     Int32 CurrentValue = 0;
                     CurrentValue = ModuleNetworkNode.OPCSystemsComponent1.GetDeleteLogErrorsDays(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           TextBoxDeleteLogErrorsDays.Text = CurrentValue.ToString();
                     }
                     else
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

SetDeleteLogErrorsDays

  • SetDeleteLogErrorsDays Subroutine sets the Number of Days for Automatic Deletion of the Error Log.
  • 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 ButtonSetDeleteLogErrorsDays_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetDeleteLogErrorsDays.Click
        Cursor.Current = Cursors.WaitCursor
        If IsNumeric(TextBoxDeleteLogErrorsDays.Text) Then
            Dim ValueInt32 As Int32
            ValueInt32 = System.Convert.ToInt32(TextBoxDeleteLogErrorsDays.Text)
            If ValueInt32 < 0 Then
                MessageBox.Show("0 is the lowest number possible", "Error setting DeleteLogErrorsDays", MessageBoxButtons.OK, MessageBoxIcon.Error)
                Exit Sub
            End If
            Dim ErrorString As String = ""
            ModuleNetworkNode.OPCSystemsComponent1.SetDeleteLogErrorsDays(ValueInt32, TextBoxNetworkNode.Text, ErrorString)
            If ErrorString <> "Success" Then
                MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
            End If
        Else
            MessageBox.Show("DeleteLogErrorsDays value is invalid", "Error setting DeleteLogErrorsDays", MessageBoxButtons.OK, MessageBoxIcon.Error)
            Exit Sub
        End If
    End Sub

C#

	 private void ButtonSetDeleteLogErrorsDays_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     if (Simulate.IsNumeric(TextBoxDeleteLogErrorsDays.Text))
                     {
                           Int32 ValueInt32 = 0;
                           ValueInt32 = System.Convert.ToInt32(TextBoxDeleteLogErrorsDays.Text);
                           if (ValueInt32 < 0)
                           {
                                  MessageBox.Show("0 is the lowest number possible", "Error setting DeleteLogErrorsDays", MessageBoxButtons.OK, MessageBoxIcon.Error);
                                  return;
                           }
                           string ErrorString = "";
                           ModuleNetworkNode.OPCSystemsComponent1.SetDeleteLogErrorsDays(ValueInt32, TextBoxNetworkNode.Text, ref ErrorString);
                           if (ErrorString != "Success")
                           {
                                  MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                           }
                     }
                     else
                     {
                           MessageBox.Show("DeleteLogErrorsDays value is invalid", "Error setting DeleteLogErrorsDays", MessageBoxButtons.OK, MessageBoxIcon.Error);
                           return;
                     }
              }

GetLogTransactions

  • GetLogTransactions Function returns the Log Transactions mode.
  • Returns a Boolean, True for enabled, False for disabled.
  • 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 ButtonLogTransactions_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetLogTransactions.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        Dim CurrentValue As Boolean = ModuleNetworkNode.OPCSystemsComponent1.GetLogTransactions(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            If CurrentValue Then
                LabelLogTransactionsResult.Text = "Enabled"
            Else
                LabelLogTransactionsResult.Text = "Disabled"
            End If
        Else
            LabelLogTransactionsResult.Text = ErrorString
        End If
    End Sub

C#

	 private void ButtonSetLogTransactions_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetLogTransactions(true, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }
 
              private void ButtonResetLogTransactions_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetLogTransactions(false, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

SetLogTransactions

  • SetLogTransactions Subroutine sets the Log Transactions mode.
  • 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 ButtonSetLogTransactions_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetLogTransactions.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetLogTransactions(True, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub 
	    
	  Private Sub ButtonResetLogTransactions_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonResetLogTransactions.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetLogTransactions(False, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	
  private void ButtonGetLogErrorsPath_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     TextBoxLogErrorsPath.Text = ModuleNetworkNode.OPCSystemsComponent1.GetLogErrorsPath(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

GetLogTransactionsPath

  • GetLogTransactionsPath Function returns the Transaction Log Path.
  • Returns a String of the path to log transaction to when LogTransactions is enabled.
  • 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 ButtonGetLogTransactionsPath_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetLogTransactionsPath.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        TextBoxLogTransactionsPath.Text = ModuleNetworkNode.OPCSystemsComponent1.GetLogTransactionsPath(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	 private void ButtonGetLogTransactionsPath_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     TextBoxLogTransactionsPath.Text = ModuleNetworkNode.OPCSystemsComponent1.GetLogTransactionsPath(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }
 

SetLogTransactionsPath

  • SetLogTransactionsPath Subroutine sets the Transaction Log Path.
  • 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 ButtonSetLogTransactionsPath_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetLogTransactionsPath.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetLogTransactionsPath(TextBoxLogTransactionsPath.Text, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	  private void ButtonSetLogTransactionsPath_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetLogTransactionsPath(TextBoxLogTransactionsPath.Text, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

GetServiceUserName

  • GetServiceUserName Function returns the User Name assigned to the Service.
  • Returns a String of the User Name assigned to the Service.
  • 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 ButtonGetServiceUserName_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetServiceUserName.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        TextBoxServiceUserName.Text = ModuleNetworkNode.OPCSystemsComponent1.GetServiceUserName(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	  private void ButtonGetServiceUserName_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     TextBoxServiceUserName.Text = ModuleNetworkNode.OPCSystemsComponent1.GetServiceUserName(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }
	

SetServiceUserName

  • SetServiceUserName Subroutine sets the User Name assigned to the Service.
  • 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 ButtonSetServiceUserName_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetServiceUserName.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetServiceUserName(TextBoxServiceUserName.Text, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	  private void ButtonSetServiceUserName_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetServiceUserName(TextBoxServiceUserName.Text, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }

GetServicePassword

  • GetServicePassword Function returns the Password assigned to the Service.
  • Returns a String of the Password assigned to the Service.
  • 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 ButtonGetServicePassword_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetServicePassword.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        TextBoxServicePassword.Text = ModuleNetworkNode.OPCSystemsComponent1.GetServicePassword(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	  private void ButtonGetServicePassword_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     TextBoxServicePassword.Text = ModuleNetworkNode.OPCSystemsComponent1.GetServicePassword(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

SetServicePassword

  • SetServicePassword Subroutine sets the Password assigned to the Service.
  • 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 ButtonSetServicePassword_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetServicePassword.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetServicePassword(TextBoxServicePassword.Text, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	 private void ButtonSetServicePassword_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetServicePassword(TextBoxServicePassword.Text, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

GetStoreDataLogBufferToDisk

  • GetStoreDataLogBufferToDisk Function returns the Store Data Log Buffer to Disk state.
  • Returns a Boolean, True for enabled, False for disabled.
  • 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 ButtonStoreDataLogBufferToDisk_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetStoreDataLogBufferToDisk.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        Dim CurrentValue As Boolean = ModuleNetworkNode.OPCSystemsComponent1.GetStoreDataLogBufferToDisk(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            If CurrentValue Then
                LabelStoreDataLogBufferToDiskResult.Text = "Enabled"
            Else
                LabelStoreDataLogBufferToDiskResult.Text = "Disabled"
            End If
        Else
            LabelStoreDataLogBufferToDiskResult.Text = ErrorString
        End If
    End Sub

C#

	  private void ButtonStoreDataLogBufferToDisk_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     bool CurrentValue = ModuleNetworkNode.OPCSystemsComponent1.GetStoreDataLogBufferToDisk(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           if (CurrentValue)
                           {
                                  LabelStoreDataLogBufferToDiskResult.Text = "Enabled";
                           }
                           else
                           {
                                  LabelStoreDataLogBufferToDiskResult.Text = "Disabled";
                           }
                     }
                     else
                     {
                           LabelStoreDataLogBufferToDiskResult.Text = ErrorString;
                     }
              }
	

SetStoreDataLogBufferToDisk

  • SetStoreDataLogBufferToDisk Subroutine sets Store Data Log Buffer to Disk.
  • 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 ButtonSetStoreDataLogBufferToDisk_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetStoreDataLogBufferToDisk.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetStoreDataLogBufferToDisk(True, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub 
    
    Private Sub ButtonResetStoreDataLogBufferToDisk_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonResetStoreDataLogBufferToDisk.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetStoreDataLogBufferToDisk(False, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	 private void ButtonSetStoreDataLogBufferToDisk_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetStoreDataLogBufferToDisk(true, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }
 
              private void ButtonResetStoreDataLogBufferToDisk_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetStoreDataLogBufferToDisk(false, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

GetStoreDataLogBufferPath

  • GetStoreDataLogBufferPath Function returns the Data Log Buffer Path.
  • Returns a String of the path to buffer data logging data on error to when StoreDataLogBufferToDisk is enabled.
  • 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 ButtonGetStoreDataLogBufferPath_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetStoreDataLogBufferPath.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        TextBoxStoreDataLogBufferPath.Text = ModuleNetworkNode.OPCSystemsComponent1.GetStoreDataLogBufferPath(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	 private void ButtonGetStoreDataLogBufferPath_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     TextBoxStoreDataLogBufferPath.Text = ModuleNetworkNode.OPCSystemsComponent1.GetStoreDataLogBufferPath(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

SetStoreDataLogBufferPath

  • SetStoreDataLogBufferPath Subroutine sets the Data Log Buffer Path.
  • 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 ButtonSetStoreDataLogBufferPath_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetStoreDataLogBufferPath.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetStoreDataLogBufferPath(TextBoxStoreDataLogBufferPath.Text, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	  private void ButtonSetStoreDataLogBufferPath_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetStoreDataLogBufferPath(TextBoxStoreDataLogBufferPath.Text, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

GetLimitDiskBuffering

  • GetLimitDiskBuffering Function returns Limit Disk Buffering.
  • Returns a Boolean, True for enabled, False for disabled.
  • 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 ButtonLimitDiskBuffering_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetLimitDiskBuffering.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        Dim CurrentValue As Boolean = ModuleNetworkNode.OPCSystemsComponent1.GetLimitDiskBuffering(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            If CurrentValue Then
                LabelLimitDiskBufferingResult.Text = "Enabled"
            Else
                LabelLimitDiskBufferingResult.Text = "Disabled"
            End If
        Else
            LabelLimitDiskBufferingResult.Text = ErrorString
        End If
    End Sub

C#

	
	  private void ButtonLimitDiskBuffering_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     bool CurrentValue = ModuleNetworkNode.OPCSystemsComponent1.GetLimitDiskBuffering(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           if (CurrentValue)
                           {
                                  LabelLimitDiskBufferingResult.Text = "Enabled";
                           }
                           else
                           {
                                  LabelLimitDiskBufferingResult.Text = "Disabled";
                           }
                     }
                     else
                     {
                           LabelLimitDiskBufferingResult.Text = ErrorString;
                     }
              }
	

SetLimitDiskBuffering

  • SetLimitDiskBuffering Subroutine sets Limit Disk Buffering.
  • 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 ButtonSetLimitDiskBuffering_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetLimitDiskBuffering.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetLimitDiskBuffering(True, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub 
	    
	    Private Sub ButtonResetLimitDiskBuffering_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonResetLimitDiskBuffering.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetLimitDiskBuffering(False, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	
	 private void ButtonSetLimitDiskBuffering_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetLimitDiskBuffering(true, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }
 
              private void ButtonResetLimitDiskBuffering_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetLimitDiskBuffering(false, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     } 
	

GetLimitDiskBufferingTime

  • GetLimitDiskBufferingTime Function returns the Limit Disk Buffering Time in hours.
  • Returns an Int32 for the number of hours to buffer data logging to disk when in error.
  • 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 ButtonGetLimitDiskBufferingTime_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetLimitDiskBufferingTime.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        Dim CurrentValue As Int32
        CurrentValue = ModuleNetworkNode.OPCSystemsComponent1.GetLimitDiskBufferingTime(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            TextBoxLimitDiskBufferingTime.Text = CurrentValue.ToString
        Else
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	  private void ButtonGetLimitDiskBufferingTime_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     Int32 CurrentValue = 0;
                     CurrentValue = ModuleNetworkNode.OPCSystemsComponent1.GetLimitDiskBufferingTime(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           TextBoxLimitDiskBufferingTime.Text = CurrentValue.ToString();
                     }
                     else
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

SetLimitDiskBufferingTime

  • SetLimitDiskBufferingTime Subroutine sets the Limit Disk Buffering Time in hours.
  • 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 ButtonSetLimitDiskBufferingTime_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetLimitDiskBufferingTime.Click
        Cursor.Current = Cursors.WaitCursor
        If IsNumeric(TextBoxLimitDiskBufferingTime.Text) Then
            Dim ValueInt32 As Int32
            ValueInt32 = System.Convert.ToInt32(TextBoxLimitDiskBufferingTime.Text)
            If ValueInt32 < 0 Then
                MessageBox.Show("0 is the lowest number possible", "Error setting LimitDiskBufferingTime", MessageBoxButtons.OK, MessageBoxIcon.Error)
                Exit Sub
            End If
            Dim ErrorString As String = ""
            ModuleNetworkNode.OPCSystemsComponent1.SetLimitDiskBufferingTime(ValueInt32, TextBoxNetworkNode.Text, ErrorString)
            If ErrorString <> "Success" Then
                MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
            End If
        Else
            MessageBox.Show("LimitDiskBufferingTime value is invalid", "Error setting LimitDiskBufferingTime", MessageBoxButtons.OK, MessageBoxIcon.Error)
            Exit Sub
        End If
    End Sub

C#

	  private void ButtonSetLimitDiskBufferingTime_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     if (Simulate.IsNumeric(TextBoxLimitDiskBufferingTime.Text))
                     {
                           Int32 ValueInt32 = 0;
                           ValueInt32 = System.Convert.ToInt32(TextBoxLimitDiskBufferingTime.Text);
                           if (ValueInt32 < 0)
                           {
                                  MessageBox.Show("0 is the lowest number possible", "Error setting LimitDiskBufferingTime", MessageBoxButtons.OK, MessageBoxIcon.Error);
                                  return;
                           }
                           string ErrorString = "";
                           ModuleNetworkNode.OPCSystemsComponent1.SetLimitDiskBufferingTime(ValueInt32, TextBoxNetworkNode.Text, ref ErrorString);
                           if (ErrorString != "Success")
                           {
                                  MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                           }
                     }
                     else
                     {
                            MessageBox.Show("LimitDiskBufferingTime value is invalid", "Error setting LimitDiskBufferingTime", MessageBoxButtons.OK, MessageBoxIcon.Error);
                           return;
                     }
              }

GetMaximumDataLoggingRecords

  • GetMaximumDataLoggingRecords Function returns the Maximum Data Logging Records to buffer to RAM when in error.
  • Returns an Int32 for the number of records to buffer data logging to RAM in error.
  • 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 ButtonGetMaximumDataLoggingRecords_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetMaximumDataLoggingRecords.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        Dim CurrentValue As Int32
        CurrentValue = ModuleNetworkNode.OPCSystemsComponent1.GetMaximumDataLoggingRecords(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            TextBoxMaximumDataLoggingRecords.Text = CurrentValue.ToString
        Else
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	  private void ButtonGetMaximumDataLoggingRecords_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     Int32 CurrentValue = 0;
                     CurrentValue = ModuleNetworkNode.OPCSystemsComponent1.GetMaximumDataLoggingRecords(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           TextBoxMaximumDataLoggingRecords.Text = CurrentValue.ToString();
                     }
                     else
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

SetMaximumDataLoggingRecords

  • SetMaximumDataLoggingRecords Subroutine sets the Maximum Data Logging Records to buffer to RAM when in error.
  • Value is the desired value for the Maximum Data Logging Records to buffer to RAM when in error
  • 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 ButtonSetMaximumDataLoggingRecords_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetMaximumDataLoggingRecords.Click
        Cursor.Current = Cursors.WaitCursor
        If IsNumeric(TextBoxMaximumDataLoggingRecords.Text) Then
            Dim ValueInt32 As Int32
            ValueInt32 = System.Convert.ToInt32(TextBoxMaximumDataLoggingRecords.Text)
            If ValueInt32 < 100 Then
                MessageBox.Show("100 is the lowest number possible", "Error setting MaximumDataLoggingRecords", MessageBoxButtons.OK, MessageBoxIcon.Error)
                Exit Sub
            End If
            Dim ErrorString As String = ""
            ModuleNetworkNode.OPCSystemsComponent1.SetMaximumDataLoggingRecords(ValueInt32, TextBoxNetworkNode.Text, ErrorString)
            If ErrorString <> "Success" Then
                MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
            End If
        Else
            MessageBox.Show("MaximumDataLoggingRecords value is invalid", "Error setting StartRuntimeDelay", MessageBoxButtons.OK, MessageBoxIcon.Error)
            Exit Sub
        End If
    End Sub

C#

	  private void ButtonSetMaximumDataLoggingRecords_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     if (Simulate.IsNumeric(TextBoxMaximumDataLoggingRecords.Text))
                     {
                           Int32 ValueInt32 = 0;
                           ValueInt32 = System.Convert.ToInt32(TextBoxMaximumDataLoggingRecords.Text);
                           if (ValueInt32 < 100)
                           {
                                  MessageBox.Show("100 is the lowest number possible", "Error setting MaximumDataLoggingRecords", MessageBoxButtons.OK, MessageBoxIcon.Error);
                                  return;
                           }
                           string ErrorString = "";
                           ModuleNetworkNode.OPCSystemsComponent1.SetMaximumDataLoggingRecords(ValueInt32, TextBoxNetworkNode.Text, ref ErrorString);
                           if (ErrorString != "Success")
                           {
                                  MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                           }
                     }
                     else
                     {
                           MessageBox.Show("MaximumDataLoggingRecords value is invalid", "Error setting StartRuntimeDelay", MessageBoxButtons.OK, MessageBoxIcon.Error);
                           return;
                     }
              }

GetMaximumAlarmLoggingRecords

  • GetMaximumAlarmLoggingRecords Function returns the Maximum Alarm Logging Records to buffer to RAM when in error.
  • Returns an Int32 for the number of records to buffer Alarm logging to RAM in error.
  • 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 ButtonGetMaximumAlarmLoggingRecords_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetMaximumAlarmLoggingRecords.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        Dim CurrentValue As Int32
        CurrentValue = ModuleNetworkNode.OPCSystemsComponent1.GetMaximumAlarmLoggingRecords(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            TextBoxMaximumAlarmLoggingRecords.Text = CurrentValue.ToString
        Else
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	 private void ButtonGetMaximumAlarmLoggingRecords_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     Int32 CurrentValue = 0;
                     CurrentValue = ModuleNetworkNode.OPCSystemsComponent1.GetMaximumAlarmLoggingRecords(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           TextBoxMaximumAlarmLoggingRecords.Text = CurrentValue.ToString();
                     }
                     else
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

SetMaximumAlarmLoggingRecords

  • SetMaximumAlarmLoggingRecords Subroutine sets the Maximum Alarm Logging Records to buffer to RAM when in error.
  • Value is the desired value for the Maximum Alarm Logging Records to buffer to RAM when in error
  • 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 ButtonSetMaximumAlarmLoggingRecords_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetMaximumAlarmLoggingRecords.Click
        Cursor.Current = Cursors.WaitCursor
        If IsNumeric(TextBoxMaximumAlarmLoggingRecords.Text) Then
            Dim ValueInt32 As Int32
            ValueInt32 = System.Convert.ToInt32(TextBoxMaximumAlarmLoggingRecords.Text)
            If ValueInt32 < 100 Then
                MessageBox.Show("100 is the lowest number possible", "Error setting MaximumAlarmLoggingRecords", MessageBoxButtons.OK, MessageBoxIcon.Error)
                Exit Sub
            End If
            Dim ErrorString As String = ""
            ModuleNetworkNode.OPCSystemsComponent1.SetMaximumAlarmLoggingRecords(ValueInt32, TextBoxNetworkNode.Text, ErrorString)
            If ErrorString <> "Success" Then
                MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
            End If
        Else
            MessageBox.Show("MaximumAlarmLoggingRecords value is invalid", "Error setting StartRuntimeDelay", MessageBoxButtons.OK, MessageBoxIcon.Error)
            Exit Sub
        End If
    End Sub

C#

	 private void ButtonSetMaximumAlarmLoggingRecords_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     if (Simulate.IsNumeric(TextBoxMaximumAlarmLoggingRecords.Text))
                     {
                           Int32 ValueInt32 = 0;
                           ValueInt32 = System.Convert.ToInt32(TextBoxMaximumAlarmLoggingRecords.Text);
                           if (ValueInt32 < 100)
                           {
                                  MessageBox.Show("100 is the lowest number possible", "Error setting MaximumAlarmLoggingRecords", MessageBoxButtons.OK, MessageBoxIcon.Error);
                                  return;
                           }
                           string ErrorString = "";
                            ModuleNetworkNode.OPCSystemsComponent1.SetMaximumAlarmLoggingRecords(ValueInt32, TextBoxNetworkNode.Text, ref ErrorString);
                           if (ErrorString != "Success")
                           {
                                  MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                           }
                     }
                     else
                     {
                           MessageBox.Show("MaximumAlarmLoggingRecords value is invalid", "Error setting StartRuntimeDelay", MessageBoxButtons.OK, MessageBoxIcon.Error);
                            return;
                     }
              }

GetRetainAllRealtimeAlarms

  • GetRetainAllRealtimeAlarms Function returns Retain All Realtime Alarms.
  • Returns a Boolean, True for enabled, False for disabled.
  • 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 ButtonRetainAllRealtimeAlarms_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetRetainAllRealtimeAlarms.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        Dim CurrentValue As Boolean = ModuleNetworkNode.OPCSystemsComponent1.GetRetainAllRealtimeAlarms(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            If CurrentValue Then
                LabelRetainAllRealtimeAlarmsResult.Text = "Enabled"
            Else
                LabelRetainAllRealtimeAlarmsResult.Text = "Disabled"
            End If
        Else
            LabelRetainAllRealtimeAlarmsResult.Text = ErrorString
        End If
    End Sub

C#

	  private void ButtonRetainAllRealtimeAlarms_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     bool CurrentValue = ModuleNetworkNode.OPCSystemsComponent1.GetRetainAllRealtimeAlarms(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           if (CurrentValue)
                           {
                                  LabelRetainAllRealtimeAlarmsResult.Text = "Enabled";
                           }
                           else
                           {
                                  LabelRetainAllRealtimeAlarmsResult.Text = "Disabled";
                           }
                     }
                     else
                     {
                           LabelRetainAllRealtimeAlarmsResult.Text = ErrorString;
                     }
              }

SetRetainAllRealtimeAlarms

  • SetRetainAllRealtimeAlarms Subroutine sets Retain All Realtime Alarms.
  • 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 ButtonSetRetainAllRealtimeAlarms_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetRetainAllRealtimeAlarms.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetRetainAllRealtimeAlarms(True, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub 
    
    Private Sub ButtonResetRetainAllRealtimeAlarms_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonResetRetainAllRealtimeAlarms.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetRetainAllRealtimeAlarms(False, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	  private void ButtonSetRetainAllRealtimeAlarms_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetRetainAllRealtimeAlarms(true, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }
 
              private void ButtonResetRetainAllRealtimeAlarms_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetRetainAllRealtimeAlarms(false, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

GetRemoveOldAlarmsHours

  • GetRemoveOldAlarmsHours Function returns Remove Old Alarms Hours
  • Returns an Int32 for the number of hours to keep alarms, set to 0 to keep all alarms.
  • 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 ButtonGetRemoveOldAlarmsHours_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetRemoveOldAlarmsHours.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        Dim CurrentValue As Int32
        CurrentValue = ModuleNetworkNode.OPCSystemsComponent1.GetRemoveOldAlarmsHours(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            TextBoxRemoveOldAlarmsHours.Text = CurrentValue.ToString
        Else
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	 private void ButtonGetRemoveOldAlarmsHours_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     Int32 CurrentValue = 0;
                     CurrentValue = ModuleNetworkNode.OPCSystemsComponent1.GetRemoveOldAlarmsHours(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           TextBoxRemoveOldAlarmsHours.Text = CurrentValue.ToString();
                     }
                     else
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

SetRemoveOldAlarmsHours

  • SetRemoveOldAlarmsHours Subroutine sets Remove Old Alarms Hours.
  • Value is the desired value for Remove Old Alarms Hours, set to 0 to keep all alarms.
  • 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 ButtonSetRemoveOldAlarmsHours_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetRemoveOldAlarmsHours.Click
        Cursor.Current = Cursors.WaitCursor
        If IsNumeric(TextBoxRemoveOldAlarmsHours.Text) Then
            Dim ValueInt32 As Int32
            ValueInt32 = System.Convert.ToInt32(TextBoxRemoveOldAlarmsHours.Text)
            If ValueInt32 < 0 Then
                MessageBox.Show("0 is the lowest number possible", "Error setting RemoveOldAlarmsHours", MessageBoxButtons.OK, MessageBoxIcon.Error)
                Exit Sub
            End If
            Dim ErrorString As String = ""
            ModuleNetworkNode.OPCSystemsComponent1.SetRemoveOldAlarmsHours(ValueInt32, TextBoxNetworkNode.Text, ErrorString)
            If ErrorString <> "Success" Then
                MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
            End If
        Else
            MessageBox.Show("RemoveOldAlarmsHours value is invalid", "Error setting RemoveOldAlarmsHours", MessageBoxButtons.OK, MessageBoxIcon.Error)
            Exit Sub
        End If
    End Sub

C#

	  private void ButtonSetRemoveOldAlarmsHours_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     if (Simulate.IsNumeric(TextBoxRemoveOldAlarmsHours.Text))
                     {
                           Int32 ValueInt32 = 0;
                           ValueInt32 = System.Convert.ToInt32(TextBoxRemoveOldAlarmsHours.Text);
                           if (ValueInt32 < 0)
                           {
                                  MessageBox.Show("0 is the lowest number possible", "Error setting RemoveOldAlarmsHours", MessageBoxButtons.OK, MessageBoxIcon.Error);
                                  return;
                           }
                           string ErrorString = "";
                           ModuleNetworkNode.OPCSystemsComponent1.SetRemoveOldAlarmsHours(ValueInt32, TextBoxNetworkNode.Text, ref ErrorString);
                           if (ErrorString != "Success")
                           {
                                  MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                           }
                     }
                     else
                     {
                           MessageBox.Show("RemoveOldAlarmsHours value is invalid", "Error setting RemoveOldAlarmsHours", MessageBoxButtons.OK, MessageBoxIcon.Error);
                           return;
                     }
              }

GetDelayForAlarmLoggingAndNotification

  • GetDelayForAlarmLoggingAndNotification Function returns Delay For Alarm Logging And Notification On Startup in seconds
  • Returns an Int32 for the Delay For Alarm Logging And Notification On Startup, set to 0 to disable delay
  • 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 ButtonGetDelayForAlarmLoggingAndNotification_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetDelayForAlarmLoggingAndNotification.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        Dim CurrentValue As Int32
        CurrentValue = ModuleNetworkNode.OPCSystemsComponent1.GetDelayForAlarmLoggingAndNotification(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            TextBoxDelayForAlarmLoggingAndNotification.Text = CurrentValue.ToString
        Else
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	  private void ButtonGetDelayForAlarmLoggingAndNotification_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     Int32 CurrentValue = 0;
                     CurrentValue = ModuleNetworkNode.OPCSystemsComponent1.GetDelayForAlarmLoggingAndNotification(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           TextBoxDelayForAlarmLoggingAndNotification.Text = CurrentValue.ToString();
                     }
                     else
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

SetDelayForAlarmLoggingAndNotification

  • SetDelayForAlarmLoggingAndNotification Subroutine sets Delay For Alarm Logging And Notification On Startup
  • Value is the desired value for Delay For Alarm Logging And Notification On Startup, set to 0 to disable delay.
  • 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 ButtonSetDelayForAlarmLoggingAndNotification_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetDelayForAlarmLoggingAndNotification.Click
        Cursor.Current = Cursors.WaitCursor
        If IsNumeric(TextBoxDelayForAlarmLoggingAndNotification.Text) Then
            Dim ValueInt32 As Int32
            ValueInt32 = System.Convert.ToInt32(TextBoxDelayForAlarmLoggingAndNotification.Text)
            If ValueInt32 < 0 Then
                MessageBox.Show("0 is the lowest number possible", "Error setting DelayForAlarmLoggingAndNotification", MessageBoxButtons.OK, MessageBoxIcon.Error)
                Exit Sub
            End If
            Dim ErrorString As String = ""
            ModuleNetworkNode.OPCSystemsComponent1.SetDelayForAlarmLoggingAndNotification(ValueInt32, TextBoxNetworkNode.Text, ErrorString)
            If ErrorString <> "Success" Then
                MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
            End If
        Else
            MessageBox.Show("DelayForAlarmLoggingAndNotification value is invalid", "Error setting DelayForAlarmLoggingAndNotification", MessageBoxButtons.OK, MessageBoxIcon.Error)
            Exit Sub
        End If
    End Sub

C#

	 private void ButtonSetDelayForAlarmLoggingAndNotification_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     if (Simulate.IsNumeric(TextBoxDelayForAlarmLoggingAndNotification.Text))
                     {
                           Int32 ValueInt32 = 0;
                           ValueInt32 = System.Convert.ToInt32(TextBoxDelayForAlarmLoggingAndNotification.Text);
                           if (ValueInt32 < 0)
                           {
                                  MessageBox.Show("0 is the lowest number possible", "Error setting DelayForAlarmLoggingAndNotification", MessageBoxButtons.OK, MessageBoxIcon.Error);
                                  return;
                           }
                           string ErrorString = "";
                            ModuleNetworkNode.OPCSystemsComponent1.SetDelayForAlarmLoggingAndNotification(ValueInt32, TextBoxNetworkNode.Text, ref ErrorString);
                           if (ErrorString != "Success")
                           {
                                  MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                           }
                     }
                     else
                     {
                           MessageBox.Show("DelayForAlarmLoggingAndNotification value is invalid", "Error setting DelayForAlarmLoggingAndNotification", MessageBoxButtons.OK, MessageBoxIcon.Error);
                           return;
                     }
              }

GetClearHiAndLoAlarms

  • GetClearHiAndLoAlarms Function returns Clear Hi And Lo Alarms when HiHi or LoLo Alarm Occurs.
  • Returns a Boolean, True for enabled, False for disabled.
  • 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 ButtonClearHiAndLoAlarms_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetClearHiAndLoAlarms.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        Dim CurrentValue As Boolean = ModuleNetworkNode.OPCSystemsComponent1.GetClearHiAndLoAlarms(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            If CurrentValue Then
                LabelClearHiAndLoAlarmsResult.Text = "Enabled"
            Else
                LabelClearHiAndLoAlarmsResult.Text = "Disabled"
            End If
        Else
            LabelClearHiAndLoAlarmsResult.Text = ErrorString
        End If
    End Sub

C#

	   private void ButtonClearHiAndLoAlarms_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     bool CurrentValue = ModuleNetworkNode.OPCSystemsComponent1.GetClearHiAndLoAlarms(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           if (CurrentValue)
                           {
                                  LabelClearHiAndLoAlarmsResult.Text = "Enabled";
                           }
                           else
                           {
                                  LabelClearHiAndLoAlarmsResult.Text = "Disabled";
                           }
                     }
                     else
                     {
                           LabelClearHiAndLoAlarmsResult.Text = ErrorString;
                     }
              }

SetClearHiAndLoAlarms

  • SetClearHiAndLoAlarms Subroutine sets Clear Hi And Lo Alarms when HiHi or LoLo Alarm Occurs.
  • Value is the desired value for Clear Hi And Lo Alarms when HiHi or LoLo Alarm 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 ButtonSetClearHiAndLoAlarms_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetClearHiAndLoAlarms.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetClearHiAndLoAlarms(True, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub 
    
    Private Sub ButtonResetClearHiAndLoAlarms_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonResetClearHiAndLoAlarms.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetClearHiAndLoAlarms(False, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	  private void ButtonSetClearHiAndLoAlarms_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetClearHiAndLoAlarms(true, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }
 
              private void ButtonResetClearHiAndLoAlarms_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetClearHiAndLoAlarms(false, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }
	

GetWriteWhenBad

  • GetWriteWhenBad Function returns the current state of writing to OPC Items when bad with OPC Tunnel.
  • Returns a Boolean, True for enabled, False for disabled.
  • 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 ButtonWriteWhenBad_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetWriteWhenBad.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        Dim CurrentValue As Boolean = ModuleNetworkNode.OPCSystemsComponent1.GetWriteWhenBad(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            If CurrentValue Then
                LabelWriteWhenBadResult.Text = "Enabled"
            Else
                LabelWriteWhenBadResult.Text = "Disabled"
            End If
        Else
            LabelWriteWhenBadResult.Text = ErrorString
        End If
    End Sub

C#

	 private void ButtonWriteWhenBad_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     bool CurrentValue = ModuleNetworkNode.OPCSystemsComponent1.GetWriteWhenBad(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           if (CurrentValue)
                           {
                                  LabelWriteWhenBadResult.Text = "Enabled";
                           }
                           else
                           {
                                  LabelWriteWhenBadResult.Text = "Disabled";
                           }
                     }
                     else
                     {
                           LabelWriteWhenBadResult.Text = ErrorString;
                     }
              }

SetWriteWhenBad

  • SetWriteWhenBad Subroutine sets the current state of allowing writing to OPC Items when bad with OPC Tunnel.
  • Value is the desired value for Allow Writes to OPC Items When Bad with OPC Tunnel.
  • 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 ButtonSetWriteWhenBad_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetWriteWhenBad.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetWriteWhenBad(True, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub 
	    
	    Private Sub ButtonResetWriteWhenBad_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonResetWriteWhenBad.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetWriteWhenBad(False, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	 private void ButtonSetWriteWhenBad_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetWriteWhenBad(true, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }
 
              private void ButtonResetWriteWhenBad_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetWriteWhenBad(false, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

GetOEMCode

  • GetOEMCode Function returns the OEM Code.
  • Returns a String containing the OEM Code.
  • 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 ButtonGetOEMCode_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetOEMCode.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        TextBoxOEMCode.Text = ModuleNetworkNode.OPCSystemsComponent1.GetOEMCode(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	 private void ButtonGetOEMCode_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     TextBoxOEMCode.Text = ModuleNetworkNode.OPCSystemsComponent1.GetOEMCode(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

SetOEMCode

  • SetOEMCode Subroutine sets the OEM Code.
  • Value is the desired value for OEM Code.
  • 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 ButtonSetOEMCode_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetOEMCode.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetOEMCode(TextBoxOEMCode.Text, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	  private void ButtonSetOEMCode_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetOEMCode(TextBoxOEMCode.Text, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

GetClientPacketRate

  • GetClientPacketRate Function returns Client Packet Rate in milliseconds.
  • Returns an Int32 for the Client Packet Rate.
  • 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 ButtonGetClientPacketRate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetClientPacketRate.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        Dim CurrentValue As Int32
        CurrentValue = ModuleNetworkNode.OPCSystemsComponent1.GetClientPacketRate(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            TextBoxClientPacketRate.Text = CurrentValue.ToString
        Else
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	 private void ButtonGetClientPacketRate_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     Int32 CurrentValue = 0;
                     CurrentValue = ModuleNetworkNode.OPCSystemsComponent1.GetClientPacketRate(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           TextBoxClientPacketRate.Text = CurrentValue.ToString();
                     }
                     else
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

SetClientPacketRate

  • SetClientPacketRate Subroutine sets the Client Packet Rate.
  • Value is the desired Client Packet Rate in milliseconds, range is 10 ms to 10,000 ms.
  • 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 ButtonSetClientPacketRate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetClientPacketRate.Click
        Cursor.Current = Cursors.WaitCursor
        If IsNumeric(TextBoxClientPacketRate.Text) Then
            Dim ValueInt32 As Int32
            ValueInt32 = System.Convert.ToInt32(TextBoxClientPacketRate.Text)
            If ValueInt32 < 10 Then MessageBox.Show("10 is the lowest number possible", "Error setting ClientPacketRate", MessageBoxButtons.OK, MessageBoxIcon.Error) Exit Sub End If If ValueInt32 > 10000 Then
                MessageBox.Show("10,000 is the highest number possible", "Error setting ClientPacketRate", MessageBoxButtons.OK, MessageBoxIcon.Error)
                Exit Sub
            End If
            Dim ErrorString As String = ""
            ModuleNetworkNode.OPCSystemsComponent1.SetClientPacketRate(ValueInt32, TextBoxNetworkNode.Text, ErrorString)
            If ErrorString <> "Success" Then
                MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
            End If
        Else
            MessageBox.Show("ClientPacketRate value is invalid", "Error setting ClientPacketRate", MessageBoxButtons.OK, MessageBoxIcon.Error)
            Exit Sub
        End If
    End Sub

C#

	  private void ButtonSetClientPacketRate_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     if (Simulate.IsNumeric(TextBoxClientPacketRate.Text))
                     {
                           Int32 ValueInt32 = 0;
                           ValueInt32 = System.Convert.ToInt32(TextBoxClientPacketRate.Text);
                           if (ValueInt32 < 10) { MessageBox.Show("10 is the lowest number possible", "Error setting ClientPacketRate", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } if (ValueInt32 > 10000)
                           {
                                  MessageBox.Show("10,000 is the highest number possible", "Error setting ClientPacketRate", MessageBoxButtons.OK, MessageBoxIcon.Error);
                                  return;
                           }
                           string ErrorString = "";
                           ModuleNetworkNode.OPCSystemsComponent1.SetClientPacketRate(ValueInt32, TextBoxNetworkNode.Text, ref ErrorString);
                           if (ErrorString != "Success")
                           {
                                  MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                           }
                     }
                     else
                     {
                           MessageBox.Show("ClientPacketRate value is invalid", "Error setting ClientPacketRate", MessageBoxButtons.OK, MessageBoxIcon.Error);
                           return;
                     }
              }
 

GetIncludeOPCErrorsInAlarms

  • GetIncludeOPCErrorsInAlarms Function returns Include OPC Errors In Alarms.
  • Returns a Boolean, True for enabled, False for disabled.
  • 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 ButtonIncludeOPCErrorsInAlarms_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetIncludeOPCErrorsInAlarms.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        Dim CurrentValue As Boolean = ModuleNetworkNode.OPCSystemsComponent1.GetIncludeOPCErrorsInAlarms(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            If CurrentValue Then
                LabelIncludeOPCErrorsInAlarmsResult.Text = "Enabled"
            Else
                LabelIncludeOPCErrorsInAlarmsResult.Text = "Disabled"
            End If
        Else
            LabelIncludeOPCErrorsInAlarmsResult.Text = ErrorString
        End If
    End Sub

C#

	  private void ButtonIncludeOPCErrorsInAlarms_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     bool CurrentValue = ModuleNetworkNode.OPCSystemsComponent1.GetIncludeOPCErrorsInAlarms(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           if (CurrentValue)
                           {
                                  LabelIncludeOPCErrorsInAlarmsResult.Text = "Enabled";
                           }
                           else
                           {
                                  LabelIncludeOPCErrorsInAlarmsResult.Text = "Disabled";
                           }
                     }
                     else
                     {
                           LabelIncludeOPCErrorsInAlarmsResult.Text = ErrorString;
                     }
              }
 

SetIncludeOPCErrorsInAlarms

  • SetIncludeOPCErrorsInAlarms Subroutine sets Include OPC Errors In Alarms.
  • Value is the desired value for Include OPC Errors In Alarms.
  • 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 ButtonSetIncludeOPCErrorsInAlarms_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetIncludeOPCErrorsInAlarms.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetIncludeOPCErrorsInAlarms(True, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub 
    
    Private Sub ButtonResetIncludeOPCErrorsInAlarms_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonResetIncludeOPCErrorsInAlarms.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetIncludeOPCErrorsInAlarms(False, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	   private void ButtonSetIncludeOPCErrorsInAlarms_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetIncludeOPCErrorsInAlarms(true, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }
 
              private void ButtonResetIncludeOPCErrorsInAlarms_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetIncludeOPCErrorsInAlarms(false, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }
 

GetIncludeOPCErrorsInErrorLog

  • GetIncludeOPCErrorsInErrorLog Function returns Include OPC Errors In Error Log.
  • Returns a Boolean, True for enabled, False for disabled.
  • 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 ButtonIncludeOPCErrorsInErrorLog_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetIncludeOPCErrorsInErrorLog.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        Dim CurrentValue As Boolean = ModuleNetworkNode.OPCSystemsComponent1.GetIncludeOPCErrorsInErrorLog(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            If CurrentValue Then
                LabelIncludeOPCErrorsInErrorLogResult.Text = "Enabled"
            Else
                LabelIncludeOPCErrorsInErrorLogResult.Text = "Disabled"
            End If
        Else
            LabelIncludeOPCErrorsInErrorLogResult.Text = ErrorString
        End If
    End Sub

C#

	 private void ButtonIncludeOPCErrorsInErrorLog_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     bool CurrentValue = ModuleNetworkNode.OPCSystemsComponent1.GetIncludeOPCErrorsInErrorLog(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           if (CurrentValue)
                           {
                                  LabelIncludeOPCErrorsInErrorLogResult.Text = "Enabled";
                           }
                           else
                           {
                                  LabelIncludeOPCErrorsInErrorLogResult.Text = "Disabled";
                           }
                     }
                     else
                     {
                           LabelIncludeOPCErrorsInErrorLogResult.Text = ErrorString;
                     }
              }

SetIncludeOPCErrorsInErrorLog

  • SetIncludeOPCErrorsInErrorLog Subroutine sets Include OPC Errors In Error Log.
  • Value is the desired value for Include OPC Errors In Error Log.
  • 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 ButtonSetIncludeOPCErrorsInErrorLog_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetIncludeOPCErrorsInErrorLog.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetIncludeOPCErrorsInErrorLog(True, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub 
    
    Private Sub ButtonResetIncludeOPCErrorsInErrorLog_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonResetIncludeOPCErrorsInErrorLog.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetIncludeOPCErrorsInErrorLog(False, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	  private void ButtonSetIncludeOPCErrorsInErrorLog_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetIncludeOPCErrorsInErrorLog(true, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }
 
              private void ButtonResetIncludeOPCErrorsInErrorLog_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetIncludeOPCErrorsInErrorLog(false, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

GetIncludeTagErrorsInAlarms

  • GetIncludeTagErrorsInAlarms Function returns Include Tag Errors In Alarms.
  • Returns a Boolean, True for enabled, False for disabled.
  • 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 ButtonIncludeTagErrorsInAlarms_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetIncludeTagErrorsInAlarms.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        Dim CurrentValue As Boolean = ModuleNetworkNode.OPCSystemsComponent1.GetIncludeTagErrorsInAlarms(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            If CurrentValue Then
                LabelIncludeTagErrorsInAlarmsResult.Text = "Enabled"
            Else
                LabelIncludeTagErrorsInAlarmsResult.Text = "Disabled"
            End If
        Else
            LabelIncludeTagErrorsInAlarmsResult.Text = ErrorString
        End If
    End Sub

C#

	  private void ButtonIncludeTagErrorsInAlarms_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     bool CurrentValue = ModuleNetworkNode.OPCSystemsComponent1.GetIncludeTagErrorsInAlarms(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           if (CurrentValue)
                           {
                                  LabelIncludeTagErrorsInAlarmsResult.Text = "Enabled";
                           }
                           else
                           {
                                  LabelIncludeTagErrorsInAlarmsResult.Text = "Disabled";
                           }
                     }
                     else
                     {
                           LabelIncludeTagErrorsInAlarmsResult.Text = ErrorString;
                     }
              }

SetIncludeTagErrorsInAlarms

  • SetIncludeTagErrorsInAlarms Subroutine sets Include Tag Errors In Alarms.
  • Value is the desired value for Include Tag Errors In Alarms.
  • 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 ButtonSetIncludeTagErrorsInAlarms_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetIncludeTagErrorsInAlarms.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetIncludeTagErrorsInAlarms(True, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub 
    
    Private Sub ButtonResetIncludeTagErrorsInAlarms_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonResetIncludeTagErrorsInAlarms.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetIncludeTagErrorsInAlarms(False, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	  private void ButtonSetIncludeTagErrorsInAlarms_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetIncludeTagErrorsInAlarms(true, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }
 
              private void ButtonResetIncludeTagErrorsInAlarms_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetIncludeTagErrorsInAlarms(false, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

GetIncludeTagErrorsInErrorLog

  • GetIncludeTagErrorsInErrorLog Function returns Include Tag Errors In Error Log.
  • Returns a Boolean, True for enabled, False for disabled.
  • 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 ButtonIncludeTagErrorsInErrorLog_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetIncludeTagErrorsInErrorLog.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        Dim CurrentValue As Boolean = ModuleNetworkNode.OPCSystemsComponent1.GetIncludeTagErrorsInErrorLog(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            If CurrentValue Then
                LabelIncludeTagErrorsInErrorLogResult.Text = "Enabled"
            Else
                LabelIncludeTagErrorsInErrorLogResult.Text = "Disabled"
            End If
        Else
            LabelIncludeTagErrorsInErrorLogResult.Text = ErrorString
        End If
    End Sub

C#

	  private void ButtonIncludeTagErrorsInErrorLog_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     bool CurrentValue = ModuleNetworkNode.OPCSystemsComponent1.GetIncludeTagErrorsInErrorLog(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           if (CurrentValue)
                           {
                                  LabelIncludeTagErrorsInErrorLogResult.Text = "Enabled";
                           }
                           else
                           {
                                  LabelIncludeTagErrorsInErrorLogResult.Text = "Disabled";
                           }
                     }
                     else
                     {
                           LabelIncludeTagErrorsInErrorLogResult.Text = ErrorString;
                     }
              }

SetIncludeTagErrorsInErrorLog

  • SetIncludeTagErrorsInErrorLog Subroutine sets Include Tag Errors In Error Log.
  • Value is the desired value for Include Tag Errors In Error Log.
  • 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 ButtonSetIncludeTagErrorsInErrorLog_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetIncludeTagErrorsInErrorLog.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetIncludeTagErrorsInErrorLog(True, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub 
    
    Private Sub ButtonResetIncludeTagErrorsInErrorLog_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonResetIncludeTagErrorsInErrorLog.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetIncludeTagErrorsInErrorLog(False, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	   private void ButtonSetIncludeTagErrorsInErrorLog_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetIncludeTagErrorsInErrorLog(true, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }
 
              private void ButtonResetIncludeTagErrorsInErrorLog_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetIncludeTagErrorsInErrorLog(false, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

GetEnableTimeOnAndCountFile

  • GetEnableTimeOnAndCountFile Function returns Enable Time On And Count File.
  • Returns a Boolean, True for enabled, False for disabled.
  • 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 ButtonEnableTimeOnAndCountFile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetEnableTimeOnAndCountFile.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        Dim CurrentValue As Boolean = ModuleNetworkNode.OPCSystemsComponent1.GetEnableTimeOnAndCountFile(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            If CurrentValue Then
                LabelEnableTimeOnAndCountFileResult.Text = "Enabled"
            Else
                LabelEnableTimeOnAndCountFileResult.Text = "Disabled"
            End If
        Else
            LabelEnableTimeOnAndCountFileResult.Text = ErrorString
        End If
    End Sub

C#

	  private void ButtonEnableTimeOnAndCountFile_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     bool CurrentValue = ModuleNetworkNode.OPCSystemsComponent1.GetEnableTimeOnAndCountFile(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           if (CurrentValue)
                           {
                                  LabelEnableTimeOnAndCountFileResult.Text = "Enabled";
                           }
                           else
                           {
                                  LabelEnableTimeOnAndCountFileResult.Text = "Disabled";
                           }
                     }
                     else
                     {
                           LabelEnableTimeOnAndCountFileResult.Text = ErrorString;
                     }
              }

SetEnableTimeOnAndCountFile

  • SetEnableTimeOnAndCountFile Subroutine sets Enable Time On And Count File.
  • Value is the desired value for Enable Time On And Count File.
  • 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 ButtonSetEnableTimeOnAndCountFile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetEnableTimeOnAndCountFile.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetEnableTimeOnAndCountFile(True, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub 
    
    Private Sub ButtonResetEnableTimeOnAndCountFile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonResetEnableTimeOnAndCountFile.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetEnableTimeOnAndCountFile(False, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	 private void ButtonSetEnableTimeOnAndCountFile_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetEnableTimeOnAndCountFile(true, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }
 
              private void ButtonResetEnableTimeOnAndCountFile_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetEnableTimeOnAndCountFile(false, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

GetTimeOnAndCountFilePath

  • GetTimeOnAndCountFilePath Function returns the Time On And Count File Path.
  • Returns a String containing the Time On And Count File Path.
  • 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 ButtonGetTimeOnAndCountFilePath_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetTimeOnAndCountFilePath.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        TextBoxTimeOnAndCountFilePath.Text = ModuleNetworkNode.OPCSystemsComponent1.GetTimeOnAndCountFilePath(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	 private void ButtonGetTimeOnAndCountFilePath_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     TextBoxTimeOnAndCountFilePath.Text = ModuleNetworkNode.OPCSystemsComponent1.GetTimeOnAndCountFilePath(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

SetTimeOnAndCountFilePath

  • SetTimeOnAndCountFilePath Subroutine sets the Time On And Count File Path.
  • Value is the desired value for Time On And Count File Path
  • 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 ButtonSetTimeOnAndCountFilePath_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetTimeOnAndCountFilePath.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetTimeOnAndCountFilePath(TextBoxTimeOnAndCountFilePath.Text, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	  private void ButtonSetTimeOnAndCountFilePath_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetTimeOnAndCountFilePath(TextBoxTimeOnAndCountFilePath.Text, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

GetEnableRetainTrendsFile

  • GetEnableRetainTrendsFile Function returns Enable Trend File.
  • Returns a Boolean, True for enabled, False for disabled.
  • 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 ButtonEnableRetainTrendsFile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetEnableRetainTrendsFile.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        Dim CurrentValue As Boolean = ModuleNetworkNode.OPCSystemsComponent1.GetEnableRetainTrendsFile(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            If CurrentValue Then
                LabelEnableRetainTrendsFileResult.Text = "Enabled"
            Else
                LabelEnableRetainTrendsFileResult.Text = "Disabled"
            End If
        Else
            LabelEnableRetainTrendsFileResult.Text = ErrorString
        End If
    End Sub

C#

	 private void ButtonEnableRetainTrendsFile_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     bool CurrentValue = ModuleNetworkNode.OPCSystemsComponent1.GetEnableRetainTrendsFile(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           if (CurrentValue)
                           {
                                  LabelEnableRetainTrendsFileResult.Text = "Enabled";
                           }
                           else
                           {
                                  LabelEnableRetainTrendsFileResult.Text = "Disabled";
                           }
                     }
                     else
                     {
                           LabelEnableRetainTrendsFileResult.Text = ErrorString;
                     }
              }

SetEnableRetainTrendsFile

  • SetEnableRetainTrendsFile Subroutine sets Enable Trend File.
  • Value is the desired value for Enable Trend File.
  • 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 ButtonSetEnableRetainTrendsFile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetEnableRetainTrendsFile.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetEnableRetainTrendsFile(True, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub 
    
    Private Sub ButtonResetEnableRetainTrendsFile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonResetEnableRetainTrendsFile.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetEnableRetainTrendsFile(False, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	   private void ButtonSetEnableRetainTrendsFile_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetEnableRetainTrendsFile(true, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }
 
              private void ButtonResetEnableRetainTrendsFile_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetEnableRetainTrendsFile(false, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

GetRetainTrendsFilePath

  • GetRetainTrendsFilePath Function returns the Retain Trends File Path.
  • Returns a String containing the Retain Trends File Path.
  • 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 ButtonGetRetainTrendsFilePath_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetRetainTrendsFilePath.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        TextBoxRetainTrendsFilePath.Text = ModuleNetworkNode.OPCSystemsComponent1.GetRetainTrendsFilePath(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	  private void ButtonGetRetainTrendsFilePath_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     TextBoxRetainTrendsFilePath.Text = ModuleNetworkNode.OPCSystemsComponent1.GetRetainTrendsFilePath(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

SetRetainTrendsFilePath

  • SetRetainTrendsFilePath Subroutine sets the Retain Trends File Path.
  • Value is the desired value for Retain Trends File Path.
  • 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 ButtonSetRetainTrendsFilePath_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetRetainTrendsFilePath.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetRetainTrendsFilePath(TextBoxRetainTrendsFilePath.Text, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	 private void ButtonSetRetainTrendsFilePath_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetRetainTrendsFilePath(TextBoxRetainTrendsFilePath.Text, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

GetEnableRetainAlarmsFile

  • GetEnableRetainAlarmsFile Function returns Enable Alarms File.
  • Returns a Boolean, True for enabled, False for disabled.
  • 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 ButtonEnableRetainAlarmsFile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetEnableRetainAlarmsFile.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        Dim CurrentValue As Boolean = ModuleNetworkNode.OPCSystemsComponent1.GetEnableRetainAlarmsFile(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            If CurrentValue Then
                LabelEnableRetainAlarmsFileResult.Text = "Enabled"
            Else
                LabelEnableRetainAlarmsFileResult.Text = "Disabled"
            End If
        Else
            LabelEnableRetainAlarmsFileResult.Text = ErrorString
        End If
    End Sub

C#

	 private void ButtonEnableRetainAlarmsFile_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     bool CurrentValue = ModuleNetworkNode.OPCSystemsComponent1.GetEnableRetainAlarmsFile(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           if (CurrentValue)
                           {
                                  LabelEnableRetainAlarmsFileResult.Text = "Enabled";
                           }
                           else
                           {
                                  LabelEnableRetainAlarmsFileResult.Text = "Disabled";
                           }
                     }
                     else
                     {
                           LabelEnableRetainAlarmsFileResult.Text = ErrorString;
                     }
              }

SetEnableRetainAlarmsFile

  • SetEnableRetainAlarmsFile Subroutine sets Enable Alarms File.
  • Value is the desired value for Enable Alarms File.
  • 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 ButtonSetEnableRetainAlarmsFile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetEnableRetainAlarmsFile.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetEnableRetainAlarmsFile(True, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub 
	    
	    Private Sub ButtonResetEnableRetainAlarmsFile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonResetEnableRetainAlarmsFile.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetEnableRetainAlarmsFile(False, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	 private void ButtonSetEnableRetainAlarmsFile_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetEnableRetainAlarmsFile(true, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }
 
              private void ButtonResetEnableRetainAlarmsFile_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetEnableRetainAlarmsFile(false, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }
	

GetRetainAlarmsFilePath

  • GetRetainAlarmsFilePath Function returns the Retain Alarms File Path.
  • Returns a String containing the Retain Alarms File Path.
  • 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 ButtonGetRetainAlarmsFilePath_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetRetainAlarmsFilePath.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        TextBoxRetainAlarmsFilePath.Text = ModuleNetworkNode.OPCSystemsComponent1.GetRetainAlarmsFilePath(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	  private void ButtonGetRetainAlarmsFilePath_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     TextBoxRetainAlarmsFilePath.Text = ModuleNetworkNode.OPCSystemsComponent1.GetRetainAlarmsFilePath(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

SetRetainAlarmsFilePath

  • SetRetainAlarmsFilePath Subroutine sets the Retain Alarms File Path.
  • Value is the desired value for Retain Alarms File Path.
  • 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 ButtonSetRetainAlarmsFilePath_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetRetainAlarmsFilePath.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SetRetainAlarmsFilePath(TextBoxRetainAlarmsFilePath.Text, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	 private void ButtonSetRetainAlarmsFilePath_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ErrorString = "";
                     ModuleNetworkNode.OPCSystemsComponent1.SetRetainAlarmsFilePath(TextBoxRetainAlarmsFilePath.Text, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString != "Success")
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

OPC Browsing

GetListOfOPCServers

  • The GetListOfOPCServers Function returns a list of Registered OPC Servers from the Network Node as a String Array.
  • Returns empty String Array if no Registered Servers are found.
  • Returns Nothing if the OAS Service is not reachable.
  • 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 ButtonGetListOfOPCServers_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetListOfOPCServers.Click
        Cursor.Current = Cursors.WaitCursor
        Dim OPCServers() As String
        Dim OPCServer As String
        Dim ErrorString As String = ""
        ListBoxListOfOPCServers.Items.Clear()
        OPCServers = ModuleNetworkNode.OPCSystemsComponent1.GetListOfOPCServers(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            If OPCServers.GetLength(0) < 1 Then
                ListBoxListOfOPCServers.Items.Add("No OPC Servers Found")
            Else
                For Each OPCServer In OPCServers
                    ListBoxListOfOPCServers.Items.Add(OPCServer)
                Next
            End If
        Else
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub 
    
   Private Sub ListBoxListOfOPCServers_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBoxListOfOPCServers.SelectedIndexChanged
        TextBoxOPCServer.Text = ListBoxListOfOPCServers.SelectedItem
        TextBoxReferencePath.Text = ""
    End Sub

C#

 private void ButtonGetListOfOPCServers_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string[] OPCServers = null;
//INSTANT C# NOTE: Commented this declaration since looping variables in 'foreach' loops are declared in the 'foreach' header in C#:
//                   string OPCServer = null;
                     string ErrorString = "";
                     ListBoxListOfOPCServers.Items.Clear();
                     OPCServers = ModuleNetworkNode.OPCSystemsComponent1.GetListOfOPCServers(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           if (OPCServers.GetLength(0) < 1)
                           {
                                  ListBoxListOfOPCServers.Items.Add("No OPC Servers Found");
                           }
                           else
                           {
                                  foreach (string OPCServer in OPCServers)
                                  {
                                         ListBoxListOfOPCServers.Items.Add(OPCServer);
                                  }
                           }
                     }
                     else
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }
 
              private void ListBoxListOfOPCServers_SelectedIndexChanged(object sender, System.EventArgs e)
              {
                     TextBoxOPCServer.Text = ListBoxListOfOPCServers.SelectedItem.ToString();
                     TextBoxReferencePath.Text = "";
              }
              

GetOPCBranches

  • The GetOPCBranches Function returns a list of Branches from the OPC Servers as a String Array.
  • Returns empty String Array if no Branches are found.
  • Returns Nothing if the OAS Service is not reachable.
  • NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.
  • OPCServer is the name of the OPC Server to browse.
  • ReferencePath is a string of the branches path to browse.
  • Optional ErrorString will be set to Success when function is successful and an error message when in error.

VB

 Private Sub ButtonGetOPCBranches_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetOPCBranches.Click
        Cursor.Current = Cursors.WaitCursor
        Dim OPCBranches() As String
        Dim OPCBranch As String
        Dim ErrorString As String = ""
        ListBoxOPCBranches.Items.Clear()
        OPCBranches = ModuleNetworkNode.OPCSystemsComponent1.GetOPCBranches(TextBoxOPCServer.Text, TextBoxReferencePath.Text, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            If OPCBranches.GetLength(0) < 1 Then
                
 "No OPC Branches Found"
            Else
                For Each OPCBranch In OPCBranches
                    ListBoxOPCBranches.Items.Add(OPCBranch)
                Next
            End If
        Else
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
 
    End Sub 
 
    
 Private Sub ListBoxOPCBranches_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBoxOPCBranches.SelectedIndexChanged
        TextBoxReferencePath.Text = ListBoxOPCBranches.SelectedItem
    End Sub

C#

  private void ButtonGetOPCBranches_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string[] OPCBranches = null;
//INSTANT C# NOTE: Commented this declaration since looping variables in 'foreach' loops are declared in the 'foreach' header in C#:
//                   string OPCBranch = null;
                     string ErrorString = "";
                     ListBoxOPCBranches.Items.Clear();
                     OPCBranches = ModuleNetworkNode.OPCSystemsComponent1.GetOPCBranches(TextBoxOPCServer.Text, TextBoxReferencePath.Text, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           if (OPCBranches.GetLength(0) < 1)
                           {
                                  // "No OPC Branches Found"
                           }
                           else
                           {
                                  foreach (string OPCBranch in OPCBranches)
                                  {
                                         ListBoxOPCBranches.Items.Add(OPCBranch);
                                  }
                           }
                     }
                     else
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
 
              }
 
              private void ListBoxOPCBranches_SelectedIndexChanged(object sender, System.EventArgs e)
              {
                     TextBoxReferencePath.Text = ListBoxOPCBranches.SelectedItem.ToString();
              }

GetOPCBranchesWithDisplayNames

  • The GetOPCBranchesWithDisplayNames Function returns a list of Branches from the OPC Servers both Display Names and Actual Names as a String Array.
  • Returns empty String Array if no Branches are found or if the OAS Service is not reachable.
  • OPCServer is the name of the OPC Server to browse.
  • ReferencePath is a string of the branches path to browse.
  • 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 ButtonGetOPCBranchesWithDisplayNames_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetOPCBranchesWithDisplayNames.Click
        Cursor.Current = Cursors.WaitCursor
        Dim OPCBranches() As String
        Dim OPCBranch As String
        Dim ErrorString As String = ""
        ListBoxOPCBranchesWithDisplayName.Items.Clear()
        OPCBranches = ModuleNetworkNode.OPCSystemsComponent1.GetOPCBranchesWithDisplayNames(TextBoxOPCServer.Text, TextBoxReferencePath.Text, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            If OPCBranches.GetLength(0) < 1 Then
                
 "No OPC Branches Found"
            Else
                For Each OPCBranch In OPCBranches
                    ListBoxOPCBranchesWithDisplayName.Items.Add(OPCBranch)
                Next
            End If
        Else
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
 
    End Sub 
 
 Private Sub ListBoxOPCBranchesWithDisplayName_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBoxOPCBranchesWithDisplayName.SelectedIndexChanged
        TextBoxReferencePath.Text = ListBoxOPCBranchesWithDisplayName.SelectedItem
    End Sub

C#

                 private void ButtonGetOPCBranchesWithDisplayNames_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string[] OPCBranches = null;
//INSTANT C# NOTE: Commented this declaration since looping variables in 'foreach' loops are declared in the 'foreach' header in C#:
//                   string OPCBranch = null;
                     string ErrorString = "";
                     ListBoxOPCBranchesWithDisplayName.Items.Clear();
                     OPCBranches = ModuleNetworkNode.OPCSystemsComponent1.GetOPCBranchesWithDisplayNames(TextBoxOPCServer.Text, TextBoxReferencePath.Text, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           if (OPCBranches.GetLength(0) < 1)
                           {
                                  // "No OPC Branches Found"
                           }
                           else
                           {
                                  foreach (string OPCBranch in OPCBranches)
                                  {
                                         ListBoxOPCBranchesWithDisplayName.Items.Add(OPCBranch);
                                  }
                            }
                     }
                     else
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
 
              }
 
              private void ListBoxOPCBranchesWithDisplayName_SelectedIndexChanged(object sender, System.EventArgs e)
              {
                     TextBoxReferencePath.Text = ListBoxOPCBranchesWithDisplayName.SelectedItem.ToString();
              }

GetOPCItems

  • The GetOPCItems Function returns a list of Items from the OPC Servers as a String Array.
  • Returns both the Display Name and Qualified Item Path of each OPC Item.
  • Returns empty String Array if no Items are found.
  • Returns Nothing if the OAS Service is not reachable.
  • NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.
  • OPCServer is the name of the OPC Server to browse.
  • ReferencePath is a string of the branches path to browse.
  • Optional ErrorString will be set to Success when function is successful and an error message when in error.

VB

 Private Sub ButtonGetOPCItems_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetOPCItems.Click
        Cursor.Current = Cursors.WaitCursor
        Dim OPCItems() As String
        Dim ErrorString As String = ""
        ListBoxOPCItems.Items.Clear()
        OPCItems = ModuleNetworkNode.OPCSystemsComponent1.GetOPCItems(TextBoxOPCServer.Text, TextBoxReferencePath.Text, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            If OPCItems.GetLength(0) < 1 Then
                ListBoxOPCItems.Items.Add("No OPC Items Found")
            Else
                ListBoxOPCItems.Items.AddRange(OPCItems)
            End If
        Else
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

    private void ButtonGetOPCItems_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string[] OPCItems = null;
                     string ErrorString = "";
                     ListBoxOPCItems.Items.Clear();
                     OPCItems = ModuleNetworkNode.OPCSystemsComponent1.GetOPCItems(TextBoxOPCServer.Text, TextBoxReferencePath.Text, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           if (OPCItems.GetLength(0) < 1)
                           {
                                  ListBoxOPCItems.Items.Add("No OPC Items Found");
                           }
                           else
                           {
                                  ListBoxOPCItems.Items.AddRange(OPCItems);
                           }
                     }
                     else
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }
              

GetOPCItemsAll

  • The GetOPCItemsAll Function returns a list of all OPC Items from an OPC Server from the starting branch as a String Array.
  • Returns both the Display Name and the Qualified Item Path of each OPC Item.
  • Returns empty String Array if no Items are found or the OAS Service is not reachable.
  • OPCServer is the name of the OPC Server to browse.
  • ReferencePath is a string of the starting branch to browse. Leave blank if you want all items from the OPC Server
  • 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 ButtonGetOPCItemsAll_Click(sender As System.Object, e As System.EventArgs) Handles ButtonGetOPCItemsAll.Click
        Cursor.Current = Cursors.WaitCursor
        If TextBoxOPCServer.Text = "OPCSystems.NET" Then
            If MessageBox.Show("Continue with Getting All Items from OPCSystems.NET OPC Server?", "DirectOPC with OPCSystems.NET OPC Server browse all OPC Servers", MessageBoxButtons.YesNo, MessageBoxIcon.Question) <> Windows.Forms.DialogResult.Yes Then
                Exit Sub
            End If
        End If
        Dim OPCItems() As String
        Dim ErrorString As String = ""
        ListBoxAllOPCItems.Items.Clear()
        OPCItems = ModuleNetworkNode.OPCSystemsComponent1.GetOPCItemsAll(TextBoxOPCServer.Text, TextBoxReferencePath.Text, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            If OPCItems.GetLength(0) < 1 Then
                ListBoxAllOPCItems.Items.Add("No OPC Items Found")
            Else
                ListBoxAllOPCItems.Items.AddRange(OPCItems)
            End If
        Else
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub 
	    
	    Private Sub ListBoxOPCItems_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ListBoxOPCItems.SelectedIndexChanged
        TextBoxOPCItem.Text = ListBoxOPCItems.SelectedItem.ToString
    End Sub

C#

 private void ButtonGetOPCItemsAll_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     if (TextBoxOPCServer.Text == "OPCSystems.NET")
                     {
                           if (MessageBox.Show("Continue with Getting All Items from OPCSystems.NET OPC Server?", "DirectOPC with OPCSystems.NET OPC Server browse all OPC Servers", MessageBoxButtons.YesNo, MessageBoxIcon.Question) != System.Windows.Forms.DialogResult.Yes)
                           {
                                  return;
                           }
                     }
                     string[] OPCItems = null;
                     string ErrorString = "";
                     ListBoxAllOPCItems.Items.Clear();
                     OPCItems = ModuleNetworkNode.OPCSystemsComponent1.GetOPCItemsAll(TextBoxOPCServer.Text, TextBoxReferencePath.Text, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           if (OPCItems.GetLength(0) < 1)
                           {
                                  ListBoxAllOPCItems.Items.Add("No OPC Items Found");
                           }
                           else
                           {
                                  ListBoxAllOPCItems.Items.AddRange(OPCItems);
                            }
                     }
                     else
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }
 
              private void ListBoxOPCItems_SelectedIndexChanged(object sender, System.EventArgs e)
              {
                     TextBoxOPCItem.Text = ListBoxOPCItems.SelectedItem.ToString();
              }
 

GetOPCItemProperties

  • The GetOPCItemProperties Function returns the values for the properties of the OPC Item specified as an Object Array.
  • Returns the array of values for the properties specified.
  • The length of the array returned is always 6. The values returned within the array depend on if the property attributes are set to be returned.
  • Element 0 = Data Type.
    • 0 = Double Float
    • 1 = Single Float
    • 2 = Signed Byte
    • 3 = Unsigned Byte
    • 4 = Short Integer
    • 5 = Unsigned Short Integer
    • 6 = Integer
    • 7 = Unsigned Integer
    • 8 = Long Integer
    • 9 = Unsigned Long Integer
    • 10 = Boolean
    • 11 = String
    • 12 = Array Double
    • 13 = Array Integer
    • 14 = Array String
    • 15 = Array Single
    • 16 = Array Byte
    • 17 = Array Bool
    • 18 = Object Type
  • Element 1 = Scan Rate.
  • Element 2 = Description.
  • Element 3 = Units.
  • Element 4 = Enumated Value.
  • Element 5 = Enumartion Strings, each one seperated by semicolon.
  • Returns empty Object Array if the OPC Item is not found or the OAS Service is not reachable.
  • OPCItem is the name of the OPC Server and OPC Item to get the properties from. The syntax is OPCServerOPCItem.
  • ReturnDataType should be set to True to return the Data Type
  • ReturnScanRate should be set to True to return the Scan Rate
  • ReturnDescription should be set to True to return the Description
  • ReturnUnits should be set to True to return the Units
  • ReturnEnumeratedValue should be set to True to return the Is Enemurated Value and the Enumerated Strings
  • 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 ButtonGetOPCItemProperties_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetOPCItemProperties.Click
        Cursor.Current = Cursors.WaitCursor
        Dim OPCItemProperties() As Object
        Dim OPCItem As String = TextBoxOPCItem.Text
        Dim ErrorString As String = ""
        TextBoxDataType.Text = ""
        TextBoxScanRate.Text = ""
        TextBoxDescription.Text = ""
        TextBoxUnits.Text = ""
        TextBoxEnumeratedValue.Text = ""
        TextBoxEnumeratedValues.Text = ""
        OPCItemProperties = ModuleNetworkNode.OPCSystemsComponent1.GetOPCItemProperties(OPCItem, CheckBoxDataType.Checked, CheckBoxScanRate.Checked, CheckBoxDescription.Checked, CheckBoxUnits.Checked, CheckBoxEnumeratedValue.Checked, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            If OPCItemProperties.GetLength(0) < 6 Then
                MessageBox.Show("Invalid Length of Properties Array", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
            Else
                If CheckBoxDataType.Checked Then
                    Try
                        TextBoxDataType.Text = OPCItemProperties(0).ToString
                    Catch ex As Exception
                        MessageBox.Show("Cannot convert Data Type to String", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
                    End Try
                End If
                If CheckBoxScanRate.Checked Then
                    Try
                        TextBoxScanRate.Text = OPCItemProperties(1).ToString
                    Catch ex As Exception
                        MessageBox.Show("Cannot convert Scan Rate to String", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
                    End Try
                End If
                If CheckBoxDescription.Checked Then
                    Try
                        TextBoxDescription.Text = OPCItemProperties(2).ToString
                    Catch ex As Exception
                        MessageBox.Show("Cannot convert Description to String", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
                    End Try
                End If
                If CheckBoxUnits.Checked Then
                    Try
                        TextBoxUnits.Text = OPCItemProperties(3).ToString
                    Catch ex As Exception
                        MessageBox.Show("Cannot convert Units to String", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
                    End Try
                End If
                If CheckBoxEnumeratedValue.Checked Then
                    Try
                        TextBoxEnumeratedValue.Text = OPCItemProperties(4).ToString
                    Catch ex As Exception
                        MessageBox.Show("Cannot convert Enumerated Value to String", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
                    End Try
                    Try
                        TextBoxEnumeratedValues.Text = OPCItemProperties(5).ToString
                    Catch ex As Exception
                        MessageBox.Show("Cannot convert Enumerated Values to String", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
                    End Try
                End If
            End If
        Else
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

         
                  private void ButtonGetOPCItemProperties_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     object[] OPCItemProperties = null;
                     string OPCItem = TextBoxOPCItem.Text;
                     string ErrorString = "";
                     TextBoxDataType.Text = "";
                     TextBoxScanRate.Text = "";
                     TextBoxDescription.Text = "";
                     TextBoxUnits.Text = "";
                     TextBoxEnumeratedValue.Text = "";
                     TextBoxEnumeratedValues.Text = "";
                     OPCItemProperties = ModuleNetworkNode.OPCSystemsComponent1.GetOPCItemProperties(OPCItem, CheckBoxDataType.Checked, CheckBoxScanRate.Checked, CheckBoxDescription.Checked, CheckBoxUnits.Checked, CheckBoxEnumeratedValue.Checked, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           if (OPCItemProperties.GetLength(0) < 6)
                           {
                                  MessageBox.Show("Invalid Length of Properties Array", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                           }
                           else
                           {
                                  if (CheckBoxDataType.Checked)
                                  {
                                         try
                                         {
                                                TextBoxDataType.Text = OPCItemProperties[0].ToString();
                                         }
                                         catch (Exception ex)
                                         {
                                                MessageBox.Show("Cannot convert Data Type to String", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                                         }
                                  }
                                  if (CheckBoxScanRate.Checked)
                                  {
                                         try
                                         {
                                                TextBoxScanRate.Text = OPCItemProperties[1].ToString();
                                         }
                                         catch (Exception ex)
                                         {
                                                MessageBox.Show("Cannot convert Scan Rate to String", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                                         }
                                  }
                                  if (CheckBoxDescription.Checked)
                                  {
                                         try
                                         {
                                                TextBoxDescription.Text = OPCItemProperties[2].ToString();
                                         }
                                         catch (Exception ex)
                                         {
                                                MessageBox.Show("Cannot convert Description to String", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                                         }
                                  }
                                  if (CheckBoxUnits.Checked)
                                  {
                                         try
                                         {
                                                TextBoxUnits.Text = OPCItemProperties[3].ToString();
                                         }
                                         catch (Exception ex)
                                         {
                                                MessageBox.Show("Cannot convert Units to String", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                                         }
                                  }
                                  if (CheckBoxEnumeratedValue.Checked)
                                  {
                                         try
                                         {
                                                TextBoxEnumeratedValue.Text = OPCItemProperties[4].ToString();
                                         }
                                         catch (Exception ex)
                                         {
                                                MessageBox.Show("Cannot convert Enumerated Value to String", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                                         }
                                         try
                                         {
                                                TextBoxEnumeratedValues.Text = OPCItemProperties[5].ToString();
                                         }
                                         catch (Exception ex)
                                         {
                                                MessageBox.Show("Cannot convert Enumerated Values to String", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                                         }
                                  }
                           }
                     }
                     else
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

Tag Groups

GetGroupNames

  • The GetGroupNames Function returns a list of Groups in the specified ReferenceGroup path.
  • Returns Empty String Array if service is not reachable.
  • Returns a String Array of Groups in the ReferenceGroup.
  • ReferenceGroup is a string of the Group path to retrieve the Groups from.
  • 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 ButtonGetGroupNames_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetGroupNames.Click
        Cursor.Current = Cursors.WaitCursor
        ComboBoxGetGroupNames.Items.Clear()
        Dim GroupNames() As String
        Dim GroupName As String
        Dim ErrorString As String = ""
        GroupNames = ModuleNetworkNode.OPCSystemsComponent1.GetGroupNames(TextBoxReferenceGroup.Text, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            For Each GroupName In GroupNames
                ComboBoxGetGroupNames.Items.Add(GroupName)
            Next
            If ComboBoxGetGroupNames.Items.Count > 0 Then
                ComboBoxGetGroupNames.SelectedIndex = 0
            End If
        Else
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub 
 
    
Private Sub ComboBoxGetGroupNames_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBoxGetGroupNames.SelectedIndexChanged
        TextBoxGroup.Text = ComboBoxGetGroupNames.SelectedItem
    End Sub

C#

 

	   private void ButtonGetGroupNames_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     ComboBoxGetGroupNames.Items.Clear();
                     string[] GroupNames = null;
//INSTANT C# NOTE: Commented this declaration since looping variables in 'foreach' loops are declared in the 'foreach' header in C#:
//                   string GroupName = null;
                     string ErrorString = "";
                     GroupNames = ModuleNetworkNode.OPCSystemsComponent1.GetGroupNames(TextBoxReferenceGroup.Text, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           foreach (string GroupName in GroupNames)
                           {
                                  ComboBoxGetGroupNames.Items.Add(GroupName);
                           }
                           if (ComboBoxGetGroupNames.Items.Count > 0)
                           {
                                  ComboBoxGetGroupNames.SelectedIndex = 0;
                           }
                     }
                     else
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }
 
              private void ComboBoxGetGroupNames_SelectedIndexChanged(object sender, System.EventArgs e)
              {
                     TextBoxGroup.Text = ComboBoxGetGroupNames.SelectedItem.ToString();
              }
	

AddGroup

  • The AddGroup Function adds a Group to the existing Tag configuration.
  • Returns -1 if service is not reachable.
  • Returns 1 if successful.
  • Returns 0 if the Group already exists or adding the Group failed.
  • Group is the name of the Group to add.
  • ReferenceGroup is a string of the Group path to add the Group to.
  • 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 ButtonAddGroup_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonAddGroup.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ResultInt32 As Int32
        Dim ErrorString As String = ""
        ResultInt32 = ModuleNetworkNode.OPCSystemsComponent1.AddGroup(TextBoxGroup.Text, TextBoxReferenceGroup.Text, TextBoxNetworkNode.Text, ErrorString)
        If ResultInt32 = -1 Then
            LabelAddGroupResult.Text = "OAS Service not reached."
        ElseIf ResultInt32 = 1 Then
            LabelAddGroupResult.Text = "Group successfully added."
        Else
            LabelAddGroupResult.Text = ErrorString
        End If
 
    End Sub

C#

 

	
	   private void ButtonAddGroup_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     Int32 ResultInt32 = 0;
                     string ErrorString = "";
                     ResultInt32 = ModuleNetworkNode.OPCSystemsComponent1.AddGroup(TextBoxGroup.Text, TextBoxReferenceGroup.Text, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ResultInt32 == -1)
                     {
                           LabelAddGroupResult.Text = "OAS Service not reached.";
                     }
                     else if (ResultInt32 == 1)
                     {
                           LabelAddGroupResult.Text = "Group successfully added.";
                     }
                     else
                     {
                           LabelAddGroupResult.Text = ErrorString;
                     }
 
              }

RemoveGroup

  • The RemoveGroup Function removes a Group to the existing Tag configuration.
  • Returns -1 if service is not reachable.
  • Returns 1 if successful.
  • Returns 0 if the Group does not exist or removing the Group failed.
  • Group is the name of the Group to remove.
  • ReferenceGroup is a string of the Group path to remove the Group from.
  • 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 ButtonRemoveGroup_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonRemoveGroup.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ResultInt32 As Int32
        Dim ErrorString As String = ""
        ResultInt32 = ModuleNetworkNode.OPCSystemsComponent1.RemoveGroup(TextBoxGroup.Text, TextBoxReferenceGroup.Text, TextBoxNetworkNode.Text, ErrorString)
        If ResultInt32 = -1 Then
            LabelRemoveGroupResult.Text = "OAS Service not reached."
        ElseIf ResultInt32 = 1 Then
            LabelRemoveGroupResult.Text = "Group successfully removed."
        Else
            LabelRemoveGroupResult.Text = ErrorString
        End If
 
    End Sub

C#

 

	  private void ButtonRemoveGroup_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     Int32 ResultInt32 = 0;
                     string ErrorString = "";
                     ResultInt32 = ModuleNetworkNode.OPCSystemsComponent1.RemoveGroup(TextBoxGroup.Text, TextBoxReferenceGroup.Text, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ResultInt32 == -1)
                     {
                           LabelRemoveGroupResult.Text = "OAS Service not reached.";
                     }
                     else if (ResultInt32 == 1)
                     {
                            LabelRemoveGroupResult.Text = "Group successfully removed.";
                     }
                     else
                     {
                           LabelRemoveGroupResult.Text = ErrorString;
                     }
 
              }
	

RenameGroup

  • The RenameGroup Function renames an existing Group in the Tag configuration.
  • Returns -1 if service is not reachable.
  • Returns 1 if successful.
  • Returns 0 if the Old Group does not exist, the New Group already exists, or renaming the Group failed.
  • OldGroup is the name of the existing Group to rename.
  • NewGroup is the name to change the Group to.
  • ReferenceGroup is a string of the Group path to rename the Group in.
  • 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 ButtonRenameGroup_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonRenameGroup.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ResultInt32 As Int32
        Dim ErrorString As String = ""
        ResultInt32 = ModuleNetworkNode.OPCSystemsComponent1.RenameGroup(TextBoxGroup.Text, TextBoxNewGroupName.Text, TextBoxReferenceGroup.Text, TextBoxNetworkNode.Text, ErrorString)
        If ResultInt32 = -1 Then
            LabelRenameGroupResult.Text = "OAS Service not reached."
        ElseIf ResultInt32 = 1 Then
            LabelRenameGroupResult.Text = "Group successfully renamed."
        Else
            LabelRenameGroupResult.Text = ErrorString
        End If
    End Sub

C#

 

	     private void ButtonRenameGroup_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     Int32 ResultInt32 = 0;
                     string ErrorString = "";
                     ResultInt32 = ModuleNetworkNode.OPCSystemsComponent1.RenameGroup(TextBoxGroup.Text, TextBoxNewGroupName.Text, TextBoxReferenceGroup.Text, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ResultInt32 == -1)
                     {
                           LabelRenameGroupResult.Text = "OAS Service not reached.";
                     }
                     else if (ResultInt32 == 1)
                     {
                           LabelRenameGroupResult.Text = "Group successfully renamed.";
                     }
                     else
                     {
                           LabelRenameGroupResult.Text = ErrorString;
                     }
              }
	

GetAllAlarmGroups

  • The GetAllAlarmGroups Function returns a list of Alarm Groups in the current Tag Configuration.
  • 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.
  • Optional ErrorString will be set to Success when function is successful and an error message is in error.

VB

Private Sub ButtonGetAllAlarmGroups_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetAllAlarmGroups.Click
        Cursor.Current = Cursors.WaitCursor
        ComboBoxGetAllAlarmGroups.Items.Clear()
        Dim GroupNames() As String
        Dim GroupName As String
        Dim ErrorString As String = ""
        GroupNames = ModuleNetworkNode.OPCSystemsComponent1.GetAllAlarmGroups(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            For Each GroupName In GroupNames
                ComboBoxGetAllAlarmGroups.Items.Add(GroupName)
            Next
            If ComboBoxGetAllAlarmGroups.Items.Count > 0 Then
                ComboBoxGetAllAlarmGroups.SelectedIndex = 0
            End If
        Else
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

 

	  private void ButtonGetAllAlarmGroups_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     ComboBoxGetAllAlarmGroups.Items.Clear();
                     string[] GroupNames = null;
//INSTANT C# NOTE: Commented this declaration since looping variables in 'foreach' loops are declared in the 'foreach' header in C#:
//                   string GroupName = null;
                     string ErrorString = "";
                     GroupNames = ModuleNetworkNode.OPCSystemsComponent1.GetAllAlarmGroups(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           foreach (string GroupName in GroupNames)
                           {
                                  ComboBoxGetAllAlarmGroups.Items.Add(GroupName);
                           }
                           if (ComboBoxGetAllAlarmGroups.Items.Count > 0)
                           {
                                  ComboBoxGetAllAlarmGroups.SelectedIndex = 0;
                           }
                     }
                     else
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

	

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.

Driver Interfaces

Please note that the most efficient way to add tags and set their properties programmatically is using the DriverInterfaceCSVImport method.

GetDriverInterfaceNames

  • The GetDriverInterfaceNames Function returns a list of the Driver Interfaces.
  • 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.

VB

    Private Sub ButtonGetDriverIntefaceNames_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetDriverIntefaceNames.Click
        Cursor.Current = Cursors.WaitCursor
        ComboBoxGetDriverInterfaceNames.Items.Clear()
        Dim Groups() As String
        Dim Group As String
        Dim ErrorString As String = ""
        Groups = ModuleNetworkNode.OPCSystemsComponent1.GetDriverInterfaceNames(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            For Each Group In Groups
                ComboBoxGetDriverInterfaceNames.Items.Add(Group)
            Next
            If ComboBoxGetDriverInterfaceNames.Items.Count > 0 Then
                ComboBoxGetDriverInterfaceNames.SelectedIndex = 0
            End If
        Else
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub
 
    Private Sub ComboBoxGetDriverInterfaceNames_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBoxGetDriverInterfaceNames.SelectedIndexChanged
        TextBoxDriverInterface.Text = ComboBoxGetDriverInterfaceNames.SelectedItem
    End Sub

C#

 Private Sub ButtonGetDriverIntefaceNames_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetDriverIntefaceNames.Click
        Cursor.Current = Cursors.WaitCursor
        ComboBoxGetDriverInterfaceNames.Items.Clear()
        Dim Groups() As String
        Dim Group As String
        Dim ErrorString As String = ""
        Groups = ModuleNetworkNode.OPCSystemsComponent1.GetDriverInterfaceNames(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            For Each Group In Groups
                ComboBoxGetDriverInterfaceNames.Items.Add(Group)
            Next
            If ComboBoxGetDriverInterfaceNames.Items.Count > 0 Then
                ComboBoxGetDriverInterfaceNames.SelectedIndex = 0
            End If
        Else
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub
 
    Private Sub ComboBoxGetDriverInterfaceNames_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBoxGetDriverInterfaceNames.SelectedIndexChanged
        TextBoxDriverInterface.Text = ComboBoxGetDriverInterfaceNames.SelectedItem
    End Sub



RemoveDriverInterface

  • The RemoveDriverInterface Function removes a Driver Interface Group from the existing Driver Interface configuration.
  • Returns -1 if service is not reachable.
  • Returns 1 if successful.
  • Returns 0 if the Driver Interface does not exist or removing the Driver Interface failed.
  • Name is the name of the Driver Interface to remove.
  • 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 ButtonRemoveDriverInterface_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonRemoveDriverInterface.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ResultInt32 As Int32
        Dim ErrorString As String = ""
        ResultInt32 = ModuleNetworkNode.OPCSystemsComponent1.RemoveDriverInterface(TextBoxDriverInterface.Text, TextBoxNetworkNode.Text, ErrorString)
        If ResultInt32 = -1 Then
            LabelRemoveDriverInterfaceResult.Text = "OAS Service not reached."
        ElseIf ResultInt32 = 1 Then
            LabelRemoveDriverInterfaceResult.Text = "Driver Interface successfully removed."
        Else
            LabelRemoveDriverInterfaceResult.Text = ErrorString
        End If
    End Sub

C#


 Private Sub ButtonRemoveDriverInterface_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonRemoveDriverInterface.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ResultInt32 As Int32
        Dim ErrorString As String = ""
        ResultInt32 = ModuleNetworkNode.OPCSystemsComponent1.RemoveDriverInterface(TextBoxDriverInterface.Text, TextBoxNetworkNode.Text, ErrorString)
        If ResultInt32 = -1 Then
            LabelRemoveDriverInterfaceResult.Text = "OAS Service not reached."
        ElseIf ResultInt32 = 1 Then
            LabelRemoveDriverInterfaceResult.Text = "Driver Interface successfully removed."
        Else
            LabelRemoveDriverInterfaceResult.Text = ErrorString
        End If
    End Sub

GetDriverInterfaceParameterStrings

  • The GetDriverInterfaceParameterStrings Function returns an array of Strings containing all property types available for each Driver Interface Group.
  • Returns Empty String Array if service is not reachable.
  • Returns a String Array of property types for all possible Parameters for a Driver Interface Group.
  • NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.
  • RemoteSCADAHostingName is the name of the Live Data Cloud OAS Service to connect to.

VB

    Private Sub ButtonGetDriverInterfaceParameterStrings_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetDriverInterfaceParameterStrings.Click
        Cursor.Current = Cursors.WaitCursor
        ComboBoxGetDriverInterfaceParameterStrings.Items.Clear()
        Dim Parameters() As String
        Dim Parameter As String
        Parameters = ModuleNetworkNode.OPCSystemsComponent1.GetDriverInterfaceParameterStrings(TextBoxNetworkNode.Text)
        For Each Parameter In Parameters
            ComboBoxGetDriverInterfaceParameterStrings.Items.Add(Parameter)
        Next
        If ComboBoxGetDriverInterfaceParameterStrings.Items.Count > 0 Then
            ComboBoxGetDriverInterfaceParameterStrings.SelectedIndex = 0
        End If
    End Sub
 
    Private Sub ComboBoxGetDriverInterfaceParameterStrings_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBoxGetDriverInterfaceParameterStrings.SelectedIndexChanged
        TextBoxParameter.Text = ComboBoxGetDriverInterfaceParameterStrings.SelectedItem
    End Sub

C#

Private Sub ButtonGetDriverInterfaceParameterStrings_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetDriverInterfaceParameterStrings.Click
        Cursor.Current = Cursors.WaitCursor
        ComboBoxGetDriverInterfaceParameterStrings.Items.Clear()
        Dim Parameters() As String
        Dim Parameter As String
        Parameters = ModuleNetworkNode.OPCSystemsComponent1.GetDriverInterfaceParameterStrings(TextBoxNetworkNode.Text)
        For Each Parameter In Parameters
            ComboBoxGetDriverInterfaceParameterStrings.Items.Add(Parameter)
        Next
        If ComboBoxGetDriverInterfaceParameterStrings.Items.Count > 0 Then
            ComboBoxGetDriverInterfaceParameterStrings.SelectedIndex = 0
        End If
    End Sub
 
    Private Sub ComboBoxGetDriverInterfaceParameterStrings_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBoxGetDriverInterfaceParameterStrings.SelectedIndexChanged
        TextBoxParameter.Text = ComboBoxGetDriverInterfaceParameterStrings.SelectedItem
    End Sub
 

GetDriverInterface_Parameter_Value

  • The GetDriverInterface_Parameter_Value Function returns an object value for the Driver Interface Group and Parameter specified.
  • Returns nothing if service is not reachable.
  • Parameter is a String of the Parameter Type desired of the Driver Interface Group.
  • Name is a String of the Driver Interface Group desired.
  • 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 ButtonGetDriverInterface_Parameter_Value_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetDriverInterface_Parameter_Value.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ResultObject As Object
        Dim ErrorString As String = ""
        ResultObject = ModuleNetworkNode.OPCSystemsComponent1.GetDriverInterface_Parameter_Value(TextBoxParameter.Text, TextBoxDriverInterface.Text, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            Try
                LabelGetDriverInterface_Parameter_ValueResult.Text = ResultObject
                TextBoxValueToSet.Text = ResultObject
            Catch ex As Exception
                LabelGetDriverInterface_Parameter_ValueResult.Text = "Error converting value to string."
                TextBoxValueToSet.Text = ""
            End Try
        Else
            LabelGetDriverInterface_Parameter_ValueResult.Text = ErrorString
            TextBoxValueToSet.Text = ""
        End If
    End Sub

C#


  Private Sub ButtonGetDriverInterface_Parameter_Value_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetDriverInterface_Parameter_Value.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ResultObject As Object
        Dim ErrorString As String = ""
        ResultObject = ModuleNetworkNode.OPCSystemsComponent1.GetDriverInterface_Parameter_Value(TextBoxParameter.Text, TextBoxDriverInterface.Text, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            Try
                LabelGetDriverInterface_Parameter_ValueResult.Text = ResultObject
                TextBoxValueToSet.Text = ResultObject
            Catch ex As Exception
                LabelGetDriverInterface_Parameter_ValueResult.Text = "Error converting value to string."
                TextBoxValueToSet.Text = ""
            End Try
        Else
            LabelGetDriverInterface_Parameter_ValueResult.Text = ErrorString
            TextBoxValueToSet.Text = ""
        End If
    End Sub

GetDriverInterface_Parameter_Values

  • The GetDriverInterface_Parameter_Values Function returns an array of object values for the Driver Interface Group specified.
  • The order of the array corresponds with the GetDataLoggingParameterStrings Function order.
  • Returns empty array if service is not reachable.
  • Name is a String of the Driver Interface Group desired.
  • 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 ButtonGetDriverInterface_Parameter_Values_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetDriverInterface_Parameter_Values.Click
        Cursor.Current = Cursors.WaitCursor
        ComboBoxGetDriverInterface_Parameter_Values.Items.Clear()
        Dim ResultObjects() As Object
        Dim ResultObject As Object
        Dim ResultString As String = ""
        Dim ParameterIndex As Int32 = 0
        Dim ErrorString As String = ""
        ResultObjects = ModuleNetworkNode.OPCSystemsComponent1.GetDriverInterface_Parameter_Values(TextBoxDriverInterface.Text, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            For Each ResultObject In ResultObjects
                Try
                    If ResultObject Is Nothing Then
                        ResultString = ""
                    Else
                        ResultString = System.Convert.ToString(ResultObject)
                    End If
                    ComboBoxGetDriverInterface_Parameter_Values.Items.Add(ResultString)
                Catch ex As Exception
                    ComboBoxGetDriverInterface_Parameter_Values.Items.Add("Error Converting Object")
                End Try
                ParameterIndex += 1
            Next
            If ComboBoxGetDriverInterface_Parameter_Values.Items.Count > 0 Then
                ComboBoxGetDriverInterface_Parameter_Values.SelectedIndex = 0
            End If
        Else
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#


Private Sub ButtonGetDriverInterface_Parameter_Values_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetDriverInterface_Parameter_Values.Click
        Cursor.Current = Cursors.WaitCursor
        ComboBoxGetDriverInterface_Parameter_Values.Items.Clear()
        Dim ResultObjects() As Object
        Dim ResultObject As Object
        Dim ResultString As String = ""
        Dim ParameterIndex As Int32 = 0
        Dim ErrorString As String = ""
        ResultObjects = ModuleNetworkNode.OPCSystemsComponent1.GetDriverInterface_Parameter_Values(TextBoxDriverInterface.Text, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            For Each ResultObject In ResultObjects
                Try
                    If ResultObject Is Nothing Then
                        ResultString = ""
                    Else
                        ResultString = System.Convert.ToString(ResultObject)
                    End If
                    ComboBoxGetDriverInterface_Parameter_Values.Items.Add(ResultString)
                Catch ex As Exception
                    ComboBoxGetDriverInterface_Parameter_Values.Items.Add("Error Converting Object")
                End Try
                ParameterIndex += 1
            Next
            If ComboBoxGetDriverInterface_Parameter_Values.Items.Count > 0 Then
                ComboBoxGetDriverInterface_Parameter_Values.SelectedIndex = 0
            End If
        Else
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

SetDriverInterface_Parameter_Value

  • The SetDriverInterface_Parameter_Value Function sets an object value for the Driver Interface Group and Parameter specified.
  • If the Driver Interface specified does not exist it will be added.
  • Returns -1 if service is not reachable.
  • Returns 0 if the value did not get set correctly.
  • Returns 1 if the function was successful.
  • Parameter is a String of the Parameter Type desired of the Driver Interface Group.
  • Value is the desired value to set.
  • Name is a String of the Driver Interface Group desired.
  • 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 ButtonSetDriverInterface_Parameter_Value_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetDriverInterface_Parameter_Value.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ResultInt32 As Int32
        Dim ErrorString As String = ""
 
        ResultInt32 = ModuleNetworkNode.OPCSystemsComponent1.SetDriverInterface_Parameter_Value(TextBoxParameter.Text, TextBoxValueToSet.Text, TextBoxDriverInterface.Text, TextBoxNetworkNode.Text, ErrorString)
 
        If ResultInt32 = -1 Then
            LabelSetDataLogging_Parameter_ValueResult.Text = "OAS Service not reached."
        ElseIf ResultInt32 = 1 Then
            LabelSetDataLogging_Parameter_ValueResult.Text = "Parameter Successfully Updated."
        Else
            LabelSetDataLogging_Parameter_ValueResult.Text = ErrorString
        End If
    End Sub

C#


 Private Sub ButtonGetDriverInterface_Parameter_Values_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetDriverInterface_Parameter_Values.Click
        Cursor.Current = Cursors.WaitCursor
        ComboBoxGetDriverInterface_Parameter_Values.Items.Clear()
        Dim ResultObjects() As Object
        Dim ResultObject As Object
        Dim ResultString As String = ""
        Dim ParameterIndex As Int32 = 0
        Dim ErrorString As String = ""
        ResultObjects = ModuleNetworkNode.OPCSystemsComponent1.GetDriverInterface_Parameter_Values(TextBoxDriverInterface.Text, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            For Each ResultObject In ResultObjects
                Try
                    If ResultObject Is Nothing Then
                        ResultString = ""
                    Else
                        ResultString = System.Convert.ToString(ResultObject)
                    End If
                    ComboBoxGetDriverInterface_Parameter_Values.Items.Add(ResultString)
                Catch ex As Exception
                    ComboBoxGetDriverInterface_Parameter_Values.Items.Add("Error Converting Object")
                End Try
                ParameterIndex += 1
            Next
            If ComboBoxGetDriverInterface_Parameter_Values.Items.Count > 0 Then
                ComboBoxGetDriverInterface_Parameter_Values.SelectedIndex = 0
            End If
        Else
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub
 

Data Logging Groups

GetDataLoggingNames

  • The GetDataLoggingNames Function returns a list of the Data Logging Groups.
  • 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.
  • Optional ErrorString will be set to Success when function is successful and an error message when in error.

VB

Private Sub ButtonGetDataLoggingNames_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetDataLoggingNames.Click
 Cursor.Current = Cursors.WaitCursor
 ComboBoxGetDataLoggingNames.Items.Clear()
 Dim Groups() As String
 Dim Group As String
 Dim ErrorString As String = ""
 Groups = ModuleNetworkNode.OPCSystemsComponent1.GetDataLoggingNames(TextBoxNetworkNode.Text, ErrorString)
 If ErrorString = "Success" Then
 For Each Group In Groups
 ComboBoxGetDataLoggingNames.Items.Add(Group)
 Next
 If ComboBoxGetDataLoggingNames.Items.Count > 0 Then
 ComboBoxGetDataLoggingNames.SelectedIndex = 0
 End If
 Else
 MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
 End If
 End Sub

Private Sub ComboBoxGetDataLoggingNames_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBoxGetDataLoggingNames.SelectedIndexChanged
 TextBoxDataLoggingGroup.Text = ComboBoxGetDataLoggingNames.SelectedItem
 End Sub

C#

Private Sub ButtonGetDataLoggingNames_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetDataLoggingNames.Click
        Cursor.Current = Cursors.WaitCursor
        ComboBoxGetDataLoggingNames.Items.Clear()
        Dim Groups() As String
        Dim Group As String
        Dim ErrorString As String = ""
        Groups = ModuleNetworkNode.OPCSystemsComponent1.GetDataLoggingNames(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            For Each Group In Groups
                ComboBoxGetDataLoggingNames.Items.Add(Group)
            Next
            If ComboBoxGetDataLoggingNames.Items.Count > 0 Then
                ComboBoxGetDataLoggingNames.SelectedIndex = 0
            End If
        Else
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub
 
    Private Sub ComboBoxGetDataLoggingNames_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBoxGetDataLoggingNames.SelectedIndexChanged
        TextBoxDataLoggingGroup.Text = ComboBoxGetDataLoggingNames.SelectedItem
    End Sub

AddDataLoggingGroup

  • The AddDataLoggingGroup Function adds a Data Logging Group to the existing Data Logging configuration.
  • Returns -1 if service is not reachable.
  • Returns 1 if successful.
  • Returns 0 if the Group already exists or adding the Group failed.
  • Group is the name of the Group to add.
  • 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 ButtonAddDataLoggingGroup_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonAddDataLoggingGroup.Click
 Cursor.Current = Cursors.WaitCursor
 Dim ResultInt32 As Int32
 Dim ErrorString As String = ""
 ResultInt32 = ModuleNetworkNode.OPCSystemsComponent1.AddDataLoggingGroup(TextBoxDataLoggingGroup.Text, TextBoxNetworkNode.Text, ErrorString)
 If ResultInt32 = -1 Then
 LabelAddDataLoggingGroupResult.Text = "OAS Service not reached."
 ElseIf ResultInt32 = 1 Then
 LabelAddDataLoggingGroupResult.Text = "Group successfully added."
 Else
 LabelAddDataLoggingGroupResult.Text = ErrorString
 End If
 End Sub

C#

 Private Sub ButtonAddDataLoggingGroup_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonAddDataLoggingGroup.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ResultInt32 As Int32
        Dim ErrorString As String = ""
        ResultInt32 = ModuleNetworkNode.OPCSystemsComponent1.AddDataLoggingGroup(TextBoxDataLoggingGroup.Text, TextBoxNetworkNode.Text, ErrorString)
        If ResultInt32 = -1 Then
            LabelAddDataLoggingGroupResult.Text = "OAS Service not reached."
        ElseIf ResultInt32 = 1 Then
            LabelAddDataLoggingGroupResult.Text = "Group successfully added."
        Else
            LabelAddDataLoggingGroupResult.Text = ErrorString
        End If
    End Sub

RemoveDataLoggingGroup

  • The RemoveDataLoggingGroup Function removes a Data Logging Group from the existing Data Logging configuration.
  • Returns -1 if service is not reachable.
  • Returns 1 if successful.
  • Returns 0 if the Group does not exist or removing the Group failed.
  • Group is the name of the Group to remove.
  • 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 ButtonRemoveDataLoggingGroup_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonRemoveDataLoggingGroup.Click
 Cursor.Current = Cursors.WaitCursor
 Dim ResultInt32 As Int32
 Dim ErrorString As String = ""
 ResultInt32 = ModuleNetworkNode.OPCSystemsComponent1.RemoveDataLoggingGroup(TextBoxDataLoggingGroup.Text, TextBoxNetworkNode.Text, ErrorString)
 If ResultInt32 = -1 Then
 LabelRemoveDataLoggingGroupResult.Text = "OAS Service not reached."
 ElseIf ResultInt32 = 1 Then
 LabelRemoveDataLoggingGroupResult.Text = "Group successfully removed."
 Else
 LabelRemoveDataLoggingGroupResult.Text = ErrorString
 End If
 End Sub

C#

 Private Sub ButtonRemoveDataLoggingGroup_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonRemoveDataLoggingGroup.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ResultInt32 As Int32
        Dim ErrorString As String = ""
        ResultInt32 = ModuleNetworkNode.OPCSystemsComponent1.RemoveDataLoggingGroup(TextBoxDataLoggingGroup.Text, TextBoxNetworkNode.Text, ErrorString)
        If ResultInt32 = -1 Then
            LabelRemoveDataLoggingGroupResult.Text = "OAS Service not reached."
        ElseIf ResultInt32 = 1 Then
            LabelRemoveDataLoggingGroupResult.Text = "Group successfully removed."
        Else
            LabelRemoveDataLoggingGroupResult.Text = ErrorString
        End If
    End Sub

GetDataLoggingParameterStrings

  • The GetDataLoggingParameterStrings Function returns an array of Strings containing all property types available for each Data Logging Group.
  • Returns Empty String Array if service is not reachable.
  • Returns a String Array of property types for all possible Parameters for a Data Logging Group.
  • NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.

VB

Private Sub ButtonGetDataLoggingParameterStrings_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetDataLoggingParameterStrings.Click
 Cursor.Current = Cursors.WaitCursor
 ComboBoxGetDataLoggingParameterStrings.Items.Clear()
 Dim Parameters() As String
 Dim Parameter As String
 Parameters = ModuleNetworkNode.OPCSystemsComponent1.GetDataLoggingParameterStrings(TextBoxNetworkNode.Text)
 For Each Parameter In Parameters
 ComboBoxGetDataLoggingParameterStrings.Items.Add(Parameter)
 Next
 If ComboBoxGetDataLoggingParameterStrings.Items.Count > 0 Then
 ComboBoxGetDataLoggingParameterStrings.SelectedIndex = 0
 End If
 End Sub

Private Sub ComboBoxGetDataLoggingParameterStrings_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBoxGetDataLoggingParameterStrings.SelectedIndexChanged
 TextBoxParameter.Text = ComboBoxGetDataLoggingParameterStrings.SelectedItem
 End Sub

C#

Private Sub ButtonGetDataLoggingParameterStrings_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetDataLoggingParameterStrings.Click
        Cursor.Current = Cursors.WaitCursor
        ComboBoxGetDataLoggingParameterStrings.Items.Clear()
        Dim Parameters() As String
        Dim Parameter As String
        Parameters = ModuleNetworkNode.OPCSystemsComponent1.GetDataLoggingParameterStrings(TextBoxNetworkNode.Text)
        For Each Parameter In Parameters
            ComboBoxGetDataLoggingParameterStrings.Items.Add(Parameter)
        Next
        If ComboBoxGetDataLoggingParameterStrings.Items.Count > 0 Then
            ComboBoxGetDataLoggingParameterStrings.SelectedIndex = 0
        End If
    End Sub
 
    Private Sub ComboBoxGetDataLoggingParameterStrings_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBoxGetDataLoggingParameterStrings.SelectedIndexChanged
        TextBoxParameter.Text = ComboBoxGetDataLoggingParameterStrings.SelectedItem
    End Sub

GetDataLogging_Parameter_Value

  • The GetDataLogging_Parameter_Value Function returns an object value for the Data Logging Group and Parameter specified.
  • Returns nothing if service is not reachable.
  • Parameter is a String of the Parameter Type desired of the Data Logging Group.
  • Group is a String of the Data Logging Group desired.
  • 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 ButtonGetDataLogging_Parameter_Value_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetDataLogging_Parameter_Value.Click
 Cursor.Current = Cursors.WaitCursor
 Dim ResultObject As Object
 Dim ErrorString As String = ""
 ResultObject = ModuleNetworkNode.OPCSystemsComponent1.GetDataLogging_Parameter_Value(TextBoxParameter.Text, TextBoxDataLoggingGroup.Text, TextBoxNetworkNode.Text, ErrorString)
 If ErrorString = "Success" Then
 Try
 If TextBoxParameter.Text = "DBFields" Then
 Try
 Dim DBFieldsArray() As Object
 DBFieldsArray = ResultObject
 Dim Version As Int32
 Dim NumberOfFields As Int32
 Dim FieldNames() As String
 Dim TagNames() As Array
 Array of Strings
 Dim NewTags(-1) As String
 Dim DataTypes() As String
 Dim TextLengths() As Int32
 Dim Index As Int32
 Dim BaseIndex As Int32
 Dim TagIndex As Int32
 Version = DBFieldsArray(0)
 2 is the current version to use.
 NumberOfFields = DBFieldsArray(1)
 If Version >= 1 Then

If Version >= 2 Then
 Current version of DBFields type

End If

ReDim FieldNames(NumberOfFields - 1)
 ReDim TagNames(NumberOfFields - 1)
 ReDim DataTypes(NumberOfFields - 1)
 ReDim TextLengths(NumberOfFields - 1)
 BaseIndex = 2
 For Index = 0 To NumberOfFields - 1
 FieldNames(Index) = DBFieldsArray(BaseIndex)
 BaseIndex += 1
 Next
 If Version >= 2 Then
 For Index = 0 To NumberOfFields - 1
 TagNames(Index) = DBFieldsArray(BaseIndex)
 BaseIndex += 1
 Next
 Else
 ReDim NewTags(0)
 For Index = 0 To NumberOfFields - 1
 NewTags(0) = DBFieldsArray(BaseIndex)
 BaseIndex += 1
 TagNames(Index) = NewTags
 Next
 End If
 For Index = 0 To NumberOfFields - 1
 Select Case DBFieldsArray(BaseIndex).ToString
 Case "Boolean"
 DataTypes(Index) = "Boolean"
 Case "Double"
 DataTypes(Index) = "Double"
 Case "Integer"
 DataTypes(Index) = "Integer"
 Case "String"
 DataTypes(Index) = "String"
 Case "Date/Time"
 DataTypes(Index) = "Date/Time"
 End Select
 BaseIndex += 1
 Next
 For Index = 0 To NumberOfFields - 1
 TextLengths(Index) = DBFieldsArray(BaseIndex)
 BaseIndex += 1
 Next
 Dim ResultString As String
 ResultString = "Version: " + Version.ToString
 ResultString += " Number Of Fields: " + NumberOfFields.ToString
 If NumberOfFields > 0 Then
 For Index = 0 To NumberOfFields - 1
 ResultString += " Field" + Index.ToString + ": " + FieldNames(Index)
 NewTags = TagNames(Index)
 For TagIndex = 0 To NewTags.GetLength(0) - 1
 ResultString += " Tag" + TagIndex.ToString + ": " + NewTags(TagIndex)
 Next
 ResultString += " DataType" + Index.ToString + ": " + DataTypes(Index)
 ResultString += " Text Length" + Index.ToString + ": " + TextLengths(Index).ToString
 Next
 End If
 LabelGetDataLogging_Parameter_ValueResult.Text = ResultString
 TextBoxValueToSet.Text = ResultString
 End If
 Catch ex As Exception
 LabelGetDataLogging_Parameter_ValueResult.Text = "Error converting value to string."
 TextBoxValueToSet.Text = ""
 End Try
 ElseIf TextBoxParameter.Text = "DataChangeTagsWithAlias" Then
 Try
 Dim TagsAndAliases() As String
 TagsAndAliases = ResultObject
 Dim ResultString As String = ""
 If Not (TagsAndAliases Is Nothing) Then
 Dim NumberOfTags As Int32
 NumberOfTags = TagsAndAliases.GetLength(0) / 2
 Dim Index As Int32
 For Index = 0 To NumberOfTags - 1
 ResultString += "Tag: " + TagsAndAliases(Index * 2) + " Alias: " + TagsAndAliases(Index * 2 + 1) + " - "
 Next
 LabelGetDataLogging_Parameter_ValueResult.Text = ResultString
 End If
 Catch ex As Exception
 LabelGetDataLogging_Parameter_ValueResult.Text = "Error converting value to string."
 TextBoxValueToSet.Text = ""
 End Try
 Else
 LabelGetDataLogging_Parameter_ValueResult.Text = ResultObject
 TextBoxValueToSet.Text = ResultObject
 End If
 Catch ex As Exception
 LabelGetDataLogging_Parameter_ValueResult.Text = "Error converting value to string."
 TextBoxValueToSet.Text = ""
 End Try
 Else
 LabelGetDataLogging_Parameter_ValueResult.Text = ErrorString
 TextBoxValueToSet.Text = ""
 End If
 End Sub

C#

 Private Sub ButtonGetDataLogging_Parameter_Value_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetDataLogging_Parameter_Value.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ResultObject As Object
        Dim ErrorString As String = ""
        ResultObject = ModuleNetworkNode.OPCSystemsComponent1.GetDataLogging_Parameter_Value(TextBoxParameter.Text, TextBoxDataLoggingGroup.Text, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            Try
                If TextBoxParameter.Text = "DBFields" Then
                    Try
                        Dim DBFieldsArray() As Object
                        DBFieldsArray = ResultObject
                        Dim Version As Int32
                        Dim NumberOfFields As Int32
                        Dim FieldNames() As String
                        Dim TagNames() As Array ' Array of Strings
                        Dim NewTags(-1) As String
                        Dim DataTypes() As String
                        Dim TextLengths() As Int32
                        Dim Index As Int32
                        Dim BaseIndex As Int32
                        Dim TagIndex As Int32
                        Version = DBFieldsArray(0)  ' 2 is the current version to use.
                        NumberOfFields = DBFieldsArray(1)
                        If Version >= 1 Then
 
                            If Version >= 2 Then    ' Current version of DBFields type
 
 
                            End If
 
                            ReDim FieldNames(NumberOfFields - 1)
                            ReDim TagNames(NumberOfFields - 1)
                            ReDim DataTypes(NumberOfFields - 1)
                            ReDim TextLengths(NumberOfFields - 1)
                            BaseIndex = 2
                            For Index = 0 To NumberOfFields - 1
                                FieldNames(Index) = DBFieldsArray(BaseIndex)
                                BaseIndex += 1
                            Next
                            If Version >= 2 Then
                                For Index = 0 To NumberOfFields - 1
                                    TagNames(Index) = DBFieldsArray(BaseIndex)
                                    BaseIndex += 1
                                Next
                            Else
                                ReDim NewTags(0)
                                For Index = 0 To NumberOfFields - 1
                                    NewTags(0) = DBFieldsArray(BaseIndex)
                                    BaseIndex += 1
                                    TagNames(Index) = NewTags
                                Next
                            End If
                            For Index = 0 To NumberOfFields - 1
                                Select Case DBFieldsArray(BaseIndex).ToString
                                    Case "Boolean"
                                        DataTypes(Index) = "Boolean"
                                    Case "Double"
                                        DataTypes(Index) = "Double"
                                    Case "Integer"
                                        DataTypes(Index) = "Integer"
                                    Case "String"
                                        DataTypes(Index) = "String"
                                    Case "Date/Time"
                                        DataTypes(Index) = "Date/Time"
                                End Select
                                BaseIndex += 1
                            Next
                            For Index = 0 To NumberOfFields - 1
                                TextLengths(Index) = DBFieldsArray(BaseIndex)
                                BaseIndex += 1
                            Next
                            Dim ResultString As String
                            ResultString = "Version: " + Version.ToString
                            ResultString += " Number Of Fields: " + NumberOfFields.ToString
                            If NumberOfFields > 0 Then
                                For Index = 0 To NumberOfFields - 1
                                    ResultString += " Field" + Index.ToString + ": " + FieldNames(Index)
                                    NewTags = TagNames(Index)
                                    For TagIndex = 0 To NewTags.GetLength(0) - 1
                                        ResultString += " Tag" + TagIndex.ToString + ": " + NewTags(TagIndex)
                                    Next
                                    ResultString += " DataType" + Index.ToString + ": " + DataTypes(Index)
                                    ResultString += " Text Length" + Index.ToString + ": " + TextLengths(Index).ToString
                                Next
                            End If
                            LabelGetDataLogging_Parameter_ValueResult.Text = ResultString
                            TextBoxValueToSet.Text = ResultString
                        End If
                    Catch ex As Exception
                        LabelGetDataLogging_Parameter_ValueResult.Text = "Error converting value to string."
                        TextBoxValueToSet.Text = ""
                    End Try
                ElseIf TextBoxParameter.Text = "DataChangeTagsWithAlias" Then
                    Try
                        Dim TagsAndAliases() As String
                        TagsAndAliases = ResultObject
                        Dim ResultString As String = ""
                        If Not (TagsAndAliases Is Nothing) Then
                            Dim NumberOfTags As Int32
                            NumberOfTags = TagsAndAliases.GetLength(0) / 2
                            Dim Index As Int32
                            For Index = 0 To NumberOfTags - 1
                                ResultString += "Tag: " + TagsAndAliases(Index * 2) + " Alias: " + TagsAndAliases(Index * 2 + 1) + " - "
                            Next
                            LabelGetDataLogging_Parameter_ValueResult.Text = ResultString
                        End If
                    Catch ex As Exception
                        LabelGetDataLogging_Parameter_ValueResult.Text = "Error converting value to string."
                        TextBoxValueToSet.Text = ""
                    End Try
                Else
                    LabelGetDataLogging_Parameter_ValueResult.Text = ResultObject
                    TextBoxValueToSet.Text = ResultObject
                End If
            Catch ex As Exception
                LabelGetDataLogging_Parameter_ValueResult.Text = "Error converting value to string."
                TextBoxValueToSet.Text = ""
            End Try
        Else
            LabelGetDataLogging_Parameter_ValueResult.Text = ErrorString
            TextBoxValueToSet.Text = ""
        End If
    End Sub

GetDataLogging_Parameter_Values

  • The GetDataLogging_Parameter_Values Function returns an array of object values for the Data Logging Group specified.
  • The order of the array corresponds with the GetDataLoggingParameterStrings Function order.
  • Returns empty array if service is not reachable.
  • Group is a String of the Data Logging Group desired.
  • 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 ButtonGetDataLogging_Parameter_Values_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetDataLogging_Parameter_Values.Click
 Cursor.Current = Cursors.WaitCursor
 ComboBoxGetDataLogging_Parameter_Values.Items.Clear()
 Dim ResultObjects() As Object
 Dim ResultObject As Object
 Dim ResultString As String = ""
 Dim ParameterIndex As Int32 = 0
 Dim ErrorString As String = ""
 ResultObjects = ModuleNetworkNode.OPCSystemsComponent1.GetDataLogging_Parameter_Values(TextBoxDataLoggingGroup.Text, TextBoxNetworkNode.Text, ErrorString)
 If ErrorString = "Success" Then
 For Each ResultObject In ResultObjects
 Try
 If ResultObject Is Nothing Then
 ResultString = ""
 Else
 If ParameterIndex = 2 Then
 DBFields type
 Try
 Dim DBFieldsArray() As Object
 DBFieldsArray = ResultObject
 Dim Version As Int32
 Dim NumberOfFields As Int32
 Dim FieldNames() As String
 Dim TagNames() As Array
 Array of Strings
 Dim NewTags(-1) As String
 Dim DataTypes() As String
 Dim TextLengths() As Int32
 Dim Index As Int32
 Dim BaseIndex As Int32
 Dim TagIndex As Int32
 Version = DBFieldsArray(0)
 2 is the current version to use.
 NumberOfFields = DBFieldsArray(1)
 If Version >= 1 Then

If Version >= 2 Then
 Current version of DBFields type

End If

ReDim FieldNames(NumberOfFields - 1)
 ReDim TagNames(NumberOfFields - 1)
 ReDim DataTypes(NumberOfFields - 1)
 ReDim TextLengths(NumberOfFields - 1)
 BaseIndex = 2
 For Index = 0 To NumberOfFields - 1
 FieldNames(Index) = DBFieldsArray(BaseIndex)
 BaseIndex += 1
 Next
 If Version >= 2 Then
 For Index = 0 To NumberOfFields - 1
 TagNames(Index) = DBFieldsArray(BaseIndex)
 BaseIndex += 1
 Next
 Else
 ReDim NewTags(0)
 For Index = 0 To NumberOfFields - 1
 NewTags(0) = DBFieldsArray(BaseIndex)
 BaseIndex += 1
 TagNames(Index) = NewTags
 Next
 End If
 For Index = 0 To NumberOfFields - 1
 Select Case DBFieldsArray(BaseIndex).ToString
 Case "Boolean"
 DataTypes(Index) = "Boolean"
 Case "Double"
 DataTypes(Index) = "Double"
 Case "Integer"
 DataTypes(Index) = "Integer"
 Case "String"
 DataTypes(Index) = "String"
 Case "Date/Time"
 DataTypes(Index) = "Date/Time"
 End Select
 BaseIndex += 1
 Next
 For Index = 0 To NumberOfFields - 1
 TextLengths(Index) = DBFieldsArray(BaseIndex)
 BaseIndex += 1
 Next

ResultString = "Version: " + Version.ToString
 ResultString += " Number Of Fields: " + NumberOfFields.ToString
 If NumberOfFields > 0 Then
 For Index = 0 To NumberOfFields - 1
 ResultString += " Field" + Index.ToString + ": " + FieldNames(Index)
 NewTags = TagNames(Index)
 For TagIndex = 0 To NewTags.GetLength(0) - 1
 ResultString += " Tag" + TagIndex.ToString + ": " + NewTags(TagIndex)
 Next
 ResultString += " DataType" + Index.ToString + ": " + DataTypes(Index)
 ResultString += " Text Length" + Index.ToString + ": " + TextLengths(Index).ToString
 Next
 End If
 End If
 Catch ex As Exception
 ResultString = "Error converting value to string."
 End Try
 Else
 ResultString = ResultObject
 End If
 End If
 ComboBoxGetDataLogging_Parameter_Values.Items.Add(ResultString)
 Catch ex As Exception
 ComboBoxGetDataLogging_Parameter_Values.Items.Add("Error Converting Object")
 End Try
 ParameterIndex += 1
 Next
 If ComboBoxGetDataLogging_Parameter_Values.Items.Count > 0 Then
 ComboBoxGetDataLogging_Parameter_Values.SelectedIndex = 0
 End If
 Else
 MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
 End If
 End Sub

C#


C#

 Private Sub ButtonGetDataLogging_Parameter_Values_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetDataLogging_Parameter_Values.Click
        Cursor.Current = Cursors.WaitCursor
        ComboBoxGetDataLogging_Parameter_Values.Items.Clear()
        Dim ResultObjects() As Object
        Dim ResultObject As Object
        Dim ResultString As String = ""
        Dim ParameterIndex As Int32 = 0
        Dim ErrorString As String = ""
        ResultObjects = ModuleNetworkNode.OPCSystemsComponent1.GetDataLogging_Parameter_Values(TextBoxDataLoggingGroup.Text, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            For Each ResultObject In ResultObjects
                Try
                    If ResultObject Is Nothing Then
                        ResultString = ""
                    Else
                        If ParameterIndex = 2 Then   ' DBFields type
                            Try
                                Dim DBFieldsArray() As Object
                                DBFieldsArray = ResultObject
                                Dim Version As Int32
                                Dim NumberOfFields As Int32
                                Dim FieldNames() As String
                                Dim TagNames() As Array ' Array of Strings
                                Dim NewTags(-1) As String
                                Dim DataTypes() As String
                                Dim TextLengths() As Int32
                                Dim Index As Int32
                                Dim BaseIndex As Int32
                                Dim TagIndex As Int32
                                Version = DBFieldsArray(0)  ' 2 is the current version to use.
                                NumberOfFields = DBFieldsArray(1)
                                If Version >= 1 Then
 
                                    If Version >= 2 Then    ' Current version of DBFields type
 
 
                                    End If
 
                                    ReDim FieldNames(NumberOfFields - 1)
                                    ReDim TagNames(NumberOfFields - 1)
                                    ReDim DataTypes(NumberOfFields - 1)
                                    ReDim TextLengths(NumberOfFields - 1)
                                    BaseIndex = 2
                                    For Index = 0 To NumberOfFields - 1
                                        FieldNames(Index) = DBFieldsArray(BaseIndex)
                                        BaseIndex += 1
                                    Next
                                    If Version >= 2 Then
                                        For Index = 0 To NumberOfFields - 1
                                            TagNames(Index) = DBFieldsArray(BaseIndex)
                                            BaseIndex += 1
                                        Next
                                    Else
                                        ReDim NewTags(0)
                                        For Index = 0 To NumberOfFields - 1
                                            NewTags(0) = DBFieldsArray(BaseIndex)
                                            BaseIndex += 1
                                            TagNames(Index) = NewTags
                                        Next
                                    End If
                                    For Index = 0 To NumberOfFields - 1
                                        Select Case DBFieldsArray(BaseIndex).ToString
                                            Case "Boolean"
                                                DataTypes(Index) = "Boolean"
                                            Case "Double"
                                                DataTypes(Index) = "Double"
                                            Case "Integer"
                                                DataTypes(Index) = "Integer"
                                            Case "String"
                                                DataTypes(Index) = "String"
                                            Case "Date/Time"
                                                DataTypes(Index) = "Date/Time"
                                        End Select
                                        BaseIndex += 1
                                    Next
                                    For Index = 0 To NumberOfFields - 1
                                        TextLengths(Index) = DBFieldsArray(BaseIndex)
                                        BaseIndex += 1
                                    Next
 
                                    ResultString = "Version: " + Version.ToString
                                    ResultString += " Number Of Fields: " + NumberOfFields.ToString
                                    If NumberOfFields > 0 Then
                                        For Index = 0 To NumberOfFields - 1
                                            ResultString += " Field" + Index.ToString + ": " + FieldNames(Index)
                                            NewTags = TagNames(Index)
                                            For TagIndex = 0 To NewTags.GetLength(0) - 1
                                                ResultString += " Tag" + TagIndex.ToString + ": " + NewTags(TagIndex)
                                            Next
                                            ResultString += " DataType" + Index.ToString + ": " + DataTypes(Index)
                                            ResultString += " Text Length" + Index.ToString + ": " + TextLengths(Index).ToString
                                        Next
                                    End If
                                End If
                            Catch ex As Exception
                                ResultString = "Error converting value to string."
                            End Try
                        Else
                            ResultString = ResultObject
                        End If
                    End If
                    ComboBoxGetDataLogging_Parameter_Values.Items.Add(ResultString)
                Catch ex As Exception
                    ComboBoxGetDataLogging_Parameter_Values.Items.Add("Error Converting Object")
                End Try
                ParameterIndex += 1
            Next
            If ComboBoxGetDataLogging_Parameter_Values.Items.Count > 0 Then
                ComboBoxGetDataLogging_Parameter_Values.SelectedIndex = 0
            End If
        Else
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

SetDataLogging_Parameter_Value

  • The SetDataLogging_Parameter_Value Function sets an object value for the Data Logging Group and Parameter specified.
  • Returns -1 if service is not reachable.
  • Returns 0 if the Group does not exist or the value did not get set correctly.
  • Returns 1 if the function was successful.
  • Parameter is a String of the Parameter Type desired of the Data Logging Group.
  • Value is the desired value to set.
  • Group is a String of the Data Logging Group desired.
  • 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 ButtonSetDataLogging_Parameter_Value_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetDataLogging_Parameter_Value.Click
 Cursor.Current = Cursors.WaitCursor
 Dim ResultInt32 As Int32
 Dim ErrorString As String = ""
 If TextBoxParameter.Text = "DBFields" Then
 Dim ArrayToSend(9) As Object
 Dim TagsToSend() As String
 ArrayToSend(0) = 2
 Version
 ArrayToSend(1) = 2
 Number of Fields
 ArrayToSend(2) = "Field01"
 First Field Name
 ArrayToSend(3) = "Field02"
 Second Field Name
 ReDim TagsToSend(0)
 Example of one Tag per field for Field01
 TagsToSend(0) = "Ramp.Value"
 ArrayToSend(4) = TagsToSend
 ReDim TagsToSend(1)
 Example of multiple Tags per field for Field02
 TagsToSend(0) = "Sine.Value"
 TagsToSend(1) = "Random.Value"
 ArrayToSend(5) = TagsToSend
 ArrayToSend(6) = "Double"
 Data Type for first field
 ArrayToSend(7) = "Double"
 Data Type fo second field
 ArrayToSend(8) = 100
 Length of text for first field if String field
 ArrayToSend(9) = 100
 Length of text for second field if String field

ResultInt32 = ModuleNetworkNode.OPCSystemsComponent1.SetDataLogging_Parameter_Value(TextBoxParameter.Text, ArrayToSend, TextBoxDataLoggingGroup.Text, TextBoxNetworkNode.Text, ErrorString)
 Else
 If TextBoxParameter.Text = "DataChangeTagsWithAlias" Then
 Dim ArrayToSend(5) As String
 Array of Tags and Aliases
 ArrayToSend(0) = "Ramp.Value"
 Tag Name
 ArrayToSend(1) = "Ramp"
 Alias Name
 ArrayToSend(2) = "Sine.Value"
 Tag Name
 ArrayToSend(3) = "Sine"
 Alias Name
 ArrayToSend(4) = "Random.Value"
 Tag Name
 ArrayToSend(5) = "Random"
 Alias Name
 ResultInt32 = ModuleNetworkNode.OPCSystemsComponent1.SetDataLogging_Parameter_Value(TextBoxParameter.Text, ArrayToSend, TextBoxDataLoggingGroup.Text, TextBoxNetworkNode.Text, ErrorString)
 Else
 ResultInt32 = ModuleNetworkNode.OPCSystemsComponent1.SetDataLogging_Parameter_Value(TextBoxParameter.Text, TextBoxValueToSet.Text, TextBoxDataLoggingGroup.Text, TextBoxNetworkNode.Text, ErrorString)
 End If
 End If

If ResultInt32 = -1 Then
 LabelSetDataLogging_Parameter_ValueResult.Text = "OAS Service not reached."
 ElseIf ResultInt32 = 1 Then
 LabelSetDataLogging_Parameter_ValueResult.Text = "Parameter Successfully Updated."
 Else
 LabelSetDataLogging_Parameter_ValueResult.Text = ErrorString
 End If
 End Sub

C#

  Private Sub ButtonSetDataLogging_Parameter_Value_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetDataLogging_Parameter_Value.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ResultInt32 As Int32
        Dim ErrorString As String = ""
        If TextBoxParameter.Text = "DBFields" Then
            Dim ArrayToSend(9) As Object
            Dim TagsToSend() As String
            ArrayToSend(0) = 2 ' Version
            ArrayToSend(1) = 2 ' Number of Fields
            ArrayToSend(2) = "Field01" ' First Field Name
            ArrayToSend(3) = "Field02" ' Second Field Name
            ReDim TagsToSend(0) ' Example of one Tag per field for Field01
            TagsToSend(0) = "Ramp.Value"
            ArrayToSend(4) = TagsToSend
            ReDim TagsToSend(1) ' Example of multiple Tags per field for Field02
            TagsToSend(0) = "Sine.Value"
            TagsToSend(1) = "Random.Value"
            ArrayToSend(5) = TagsToSend
            ArrayToSend(6) = "Double"   ' Data Type for first field
            ArrayToSend(7) = "Double"   ' Data Type fo second field
            ArrayToSend(8) = 100  ' Length of text for first field if String field
            ArrayToSend(9) = 100  ' Length of text for second field if String field
 
            ResultInt32 = ModuleNetworkNode.OPCSystemsComponent1.SetDataLogging_Parameter_Value(TextBoxParameter.Text, ArrayToSend, TextBoxDataLoggingGroup.Text, TextBoxNetworkNode.Text, ErrorString)
        Else
            If TextBoxParameter.Text = "DataChangeTagsWithAlias" Then
                Dim ArrayToSend(5) As String  ' Array of Tags and Aliases
                ArrayToSend(0) = "Ramp.Value" ' Tag Name
                ArrayToSend(1) = "Ramp" ' Alias Name
                ArrayToSend(2) = "Sine.Value" ' Tag Name
                ArrayToSend(3) = "Sine" ' Alias Name
                ArrayToSend(4) = "Random.Value" ' Tag Name
                ArrayToSend(5) = "Random" ' Alias Name
                ResultInt32 = ModuleNetworkNode.OPCSystemsComponent1.SetDataLogging_Parameter_Value(TextBoxParameter.Text, ArrayToSend, TextBoxDataLoggingGroup.Text, TextBoxNetworkNode.Text, ErrorString)
            Else
                ResultInt32 = ModuleNetworkNode.OPCSystemsComponent1.SetDataLogging_Parameter_Value(TextBoxParameter.Text, TextBoxValueToSet.Text, TextBoxDataLoggingGroup.Text, TextBoxNetworkNode.Text, ErrorString)
            End If
        End If
 
        If ResultInt32 = -1 Then
            LabelSetDataLogging_Parameter_ValueResult.Text = "OAS Service not reached."
        ElseIf ResultInt32 = 1 Then
            LabelSetDataLogging_Parameter_ValueResult.Text = "Parameter Successfully Updated."
        Else
            LabelSetDataLogging_Parameter_ValueResult.Text = ErrorString
        End If
    End Sub

SaveDataLoggingConfiguration

  • The SaveDataLoggingConfiguration Subroutine saves the current Data Logging configuration to the specified file path.
  • 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 ButtonSaveDataLoggingConfiguration_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSaveDataLoggingConfiguration.Click
 Cursor.Current = Cursors.WaitCursor
 Dim ErrorString As String = ""
 ModuleNetworkNode.OPCSystemsComponent1.SaveDataLoggingConfiguration(TextBoxFilePath.Text, TextBoxNetworkNode.Text, ErrorString)
 If ErrorString <> "Success" Then
 MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
 End If
 End Sub

C#


LoadDataLoggingConfiguration

  • The LoadDataLoggingConfiguration Subroutine saves the current Data Logging configuration to the specified file path.
  • 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 ButtonLoadDataLoggingConfiguration_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonLoadDataLoggingConfiguration.Click
 Cursor.Current = Cursors.WaitCursor
 Dim ErrorString As String = ""
 ModuleNetworkNode.OPCSystemsComponent1.LoadDataLoggingConfiguration(TextBoxFilePath.Text, TextBoxNetworkNode.Text, ErrorString)
 If ErrorString <> "Success" Then
 MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
 End If
 End Sub

C#


AddDataLoggingField

  • The AddDataLoggingField Function adds just one field to an existing Data Logging Group specified that is a wide table format.
  • Returns -1 if service is not reachable.
  • Returns 0 if the Group does not exist or the value did not get set correctly.
  • Returns 1 if the function was successful.
  • FieldName is the field name to add to the logging group.
  • TagName is the tag name to assign to the field.
  • DataType is a string of the field data type.
  • StringLength is the length of the string field if the data type is a string.
  • Group is a String of the Data Logging Group desired.
  • 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 ButtonAddDataLoggingField_Click(sender As System.Object, e As System.EventArgs) Handles ButtonAddDataLoggingField.Click
 Cursor.Current = Cursors.WaitCursor
 Dim ResultInt32 As Int32
 Dim ErrorString As String = ""

ResultInt32 = ModuleNetworkNode.OPCSystemsComponent1.AddDataLoggingField(TextBoxFieldNameToAdd.Text, TextBoxTagNameToAdd.Text, "Double", 100, TextBoxDataLoggingGroup.Text, TextBoxNetworkNode.Text, ErrorString)
 If ResultInt32 = -1 Then
 LabelAddDataLoggingFieldResult.Text = "OAS Service not reached."
 ElseIf ResultInt32 = 1 Then
 LabelAddDataLoggingFieldResult.Text = "Parameter Successfully Updated."
 Else
 LabelAddDataLoggingFieldResult.Text = ErrorString
 End If
 End Sub

C#

 Private Sub ButtonSaveDataLoggingConfiguration_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSaveDataLoggingConfiguration.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.SaveDataLoggingConfiguration(TextBoxFilePath.Text, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub
 
    ' The LoadDataLoggingConfiguration Subroutine saves the current Data Logging configuration to the specified file path.
    ' 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.
    Private Sub ButtonLoadDataLoggingConfiguration_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonLoadDataLoggingConfiguration.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ErrorString As String = ""
        ModuleNetworkNode.OPCSystemsComponent1.LoadDataLoggingConfiguration(TextBoxFilePath.Text, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString <> "Success" Then
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub
 
    ' The AddDataLoggingField Function adds just one field to an existing Data Logging Group specified that is a wide table format.
    ' Returns -1 if service is not reachable.
    ' Returns 0 if the Group does not exist or the value did not get set correctly.
    ' Returns 1 if the function was successful.
    ' FieldName is the field name to add to the logging group.
    ' TagName is the tag name to assign to the field.
    ' DataType is a string of the field data type.
    ' StringLength is the length of the string field if the data type is a string.
    ' Group is a String of the Data Logging Group desired.
    ' 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.
    Private Sub ButtonAddDataLoggingField_Click(sender As System.Object, e As System.EventArgs) Handles ButtonAddDataLoggingField.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ResultInt32 As Int32
        Dim ErrorString As String = ""
 
        ResultInt32 = ModuleNetworkNode.OPCSystemsComponent1.AddDataLoggingField(TextBoxFieldNameToAdd.Text, TextBoxTagNameToAdd.Text, "Double", 100, TextBoxDataLoggingGroup.Text, TextBoxNetworkNode.Text, ErrorString)
        If ResultInt32 = -1 Then
            LabelAddDataLoggingFieldResult.Text = "OAS Service not reached."
        ElseIf ResultInt32 = 1 Then
            LabelAddDataLoggingFieldResult.Text = "Parameter Successfully Updated."
        Else
            LabelAddDataLoggingFieldResult.Text = ErrorString
        End If
    End Sub

CSV Import and Export

TagCSVHeaderString

  • The TagCSVHeaderString Function returns a String of comma seperated heading to be used with the TagCSVExport Function.
  • Returns Empty String 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.

VB

    Private Sub ButtonTagCSVHeaderString_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonTagCSVHeaderString.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ResultString As String
        ResultString = ModuleNetworkNode.OPCSystemsComponent1.TagCSVHeaderString(TextBoxNetworkNode.Text)
        If ResultString = "" Then
            TextBoxTagCSVHeaderResult.Text = "OAS Service not reached."
        Else
            TextBoxTagCSVHeaderResult.Text = ResultString
        End If
    End Sub

C#

 private void ButtonTagCSVHeaderString_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ResultString = null;
                     ResultString = ModuleNetworkNode.OPCSystemsComponent1.TagCSVHeaderString(TextBoxNetworkNode.Text);
                     if (string.IsNullOrEmpty(ResultString))
                     {
                           TextBoxTagCSVHeaderResult.Text = "OAS Service not reached.";
                     }
                     else
                     {
                           TextBoxTagCSVHeaderResult.Text = ResultString;
                     }
              }

TagCSVExportWithDesiredColumns

  • The TagCSVExportWithDesiredColumns Function returns an array of comma seperated Strings, each String representing all attributes of a Tag.
  • The DesiredColumns is the properties of each tag to return.
  • Returns Empty 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.
  • Optional ErrorString will be set to Success when function is successful and an error message when in error.

VB

Private Sub ButtonTagCSVExport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonTagCSVExport.Click
        Cursor.Current = Cursors.WaitCursor
        ComboBoxTagCSVExport.Items.Clear()
        Dim CSVStrings() As String
        Dim ErrorString As String = ""
        Dim DesiredColumns(1) As String
        DesiredColumns(0) = "Tag"
        DesiredColumns(1) = "Value - Value"
        CSVStrings = ModuleNetworkNode.OPCSystemsComponent1.TagCSVExportWithDesiredColumns(DesiredColumns, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            ComboBoxTagCSVExport.Items.AddRange(CSVStrings)
            If ComboBoxTagCSVExport.Items.Count > 0 Then
                ComboBoxTagCSVExport.SelectedIndex = 0
            End If
        Else
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	       private void ButtonTagCSVExport_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     ComboBoxTagCSVExport.Items.Clear();
                     string[] CSVStrings = null;
                     string ErrorString = "";
                     string[] DesiredColumns = new string[2];
                     DesiredColumns[0] = "Tag";
                     DesiredColumns[1] = "Value - Value";
                     CSVStrings = ModuleNetworkNode.OPCSystemsComponent1.TagCSVExportWithDesiredColumns(DesiredColumns, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           ComboBoxTagCSVExport.Items.AddRange(CSVStrings);
                           if (ComboBoxTagCSVExport.Items.Count > 0)
                           {
                                  ComboBoxTagCSVExport.SelectedIndex = 0;
                           }
                     }
                     else
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

	    

TagCSVImport

  • The TagCSVImport Function is used to import comma seperated strings to the Tag configuration.
  • Returns a status String describing the success or failure of the import.
  • Returns Empty String if service is not reachable.
  • CSVStrings is an array of comma seperated Strings.
  • The first String in the passed array must be a header String with the unique heading columns that can be obtained with the TagCSVHeaderString Function.
  • Import all or just a few selected columns, but as a minimum the Tag column must be specified.
  • 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 ButtonTagCSVImport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonTagCSVImport.Click
        Dim ResultString As String
        Dim CSVStrings(3) As String
        CSVStrings(0) = "Tag,Value - Data Type,Value - Value,Value - Source"
        CSVStrings(1) = "CSV Import Group.Tag1,Float,1.0,Value"
        CSVStrings(2) = "CSV Import Group.Tag2,Float,2.0,Value"
        CSVStrings(3) = "CSV Import Group.Tag3,Float,3.0,Value"
        Dim ErrorString As String = ""
 
        ResultString = ModuleNetworkNode.OPCSystemsComponent1.TagCSVImport(CSVStrings, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            LabelTagCSVImportResult.Text = ResultString
        Else
            LabelTagCSVImportResult.Text = ErrorString
        End If
 
    End Sub

C#

	    private void ButtonTagCSVImport_Click(object sender, System.EventArgs e)
              {
                     string ResultString = null;
                     string[] CSVStrings = new string[4];
                     CSVStrings[0] = "Tag,Value - Data Type,Value - Value,Value - Source";
                     CSVStrings[1] = "CSV Import Group.Tag1,Float,1.0,Value";
                     CSVStrings[2] = "CSV Import Group.Tag2,Float,2.0,Value";
                     CSVStrings[3] = "CSV Import Group.Tag3,Float,3.0,Value";
                     string ErrorString = "";
 
                     ResultString = ModuleNetworkNode.OPCSystemsComponent1.TagCSVImport(CSVStrings, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           LabelTagCSVImportResult.Text = ResultString;
                     }
                     else
                     {
                           LabelTagCSVImportResult.Text = ErrorString;
                     }
 
              }

DriverInterfaceCSVHeaderString

  • The DriverInterfaceCSVHeaderString Function returns a String of comma seperated heading to be used with the DriverInterCSVExport Function.
  • Returns Empty String 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.
  • RemoteSCADAHostingName is the name of the Live Data Cloud OAS Service to connect to.

VB

Private Sub ButtonDriverInterfaceCSVHeaderString_Click(sender As System.Object, e As System.EventArgs) Handles ButtonDriverInterfaceCSVHeaderString.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ResultString As String
        ResultString = ModuleNetworkNode.OPCSystemsComponent1.DriverInterfaceCSVHeaderString(TextBoxNetworkNode.Text)
        If ResultString = "" Then
            TextBoxDriverInterfaceCSVHeaderResult.Text = "OAS Service not reached."
        Else
            TextBoxDriverInterfaceCSVHeaderResult.Text = ResultString
        End If
    End Sub

C#

	    private void ButtonDriverInterfaceCSVHeaderString_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ResultString = null;
                     ResultString = ModuleNetworkNode.OPCSystemsComponent1.DriverInterfaceCSVHeaderString(TextBoxNetworkNode.Text);
                     if (string.IsNullOrEmpty(ResultString))
                     {
                           TextBoxDriverInterfaceCSVHeaderResult.Text = "OAS Service not reached.";
                     }
                     else
                     {
                           TextBoxDriverInterfaceCSVHeaderResult.Text = ResultString;
                     }
              }

DriverInterfaceCSVExport

  • The DriverInterfaceCSVExport Function returns an array of comma seperated Strings, each String representing all attributes of a Driver Interface Group.
  • This function is to be used in conjuction with the DriverInterfaceCSVHeaderString Function.
  • Returns Empty 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.

VB

Private Sub ButtonDriverInterfaceCSVExport_Click(sender As System.Object, e As System.EventArgs) Handles ButtonDriverInterfaceCSVExport.Click
        Cursor.Current = Cursors.WaitCursor
        ComboBoxDriverInterfaceCSVExport.Items.Clear()
        Dim CSVStrings() As String
        Dim ErrorString As String = ""
        CSVStrings = ModuleNetworkNode.OPCSystemsComponent1.DriverInterfaceCSVExport(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            ComboBoxDriverInterfaceCSVExport.Items.AddRange(CSVStrings)
            If ComboBoxDriverInterfaceCSVExport.Items.Count > 0 Then
                ComboBoxDriverInterfaceCSVExport.SelectedIndex = 0
            End If
        Else
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	      private void ButtonDriverInterfaceCSVExport_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     ComboBoxDriverInterfaceCSVExport.Items.Clear();
                     string[] CSVStrings = null;
                     string ErrorString = "";
                     CSVStrings = ModuleNetworkNode.OPCSystemsComponent1.DriverInterfaceCSVExport(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           ComboBoxDriverInterfaceCSVExport.Items.AddRange(CSVStrings);
                           if (ComboBoxDriverInterfaceCSVExport.Items.Count > 0)
                           {
                                  ComboBoxDriverInterfaceCSVExport.SelectedIndex = 0;
                           }
                     }
                     else
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }
 

DriverInterfaceCSVImport

  • The DriverInterfaceCSVImport Function is used to import comma seperated strings to the Driver Interface configuration.
  • Returns a status String describing the success or failure of the import.
  • Returns Empty String if service is not reachable.
  • CSVStrings is an array of comma seperated Strings.
  • The first String in the passed array must be a header String with the unique heading columns that can be obtained with the DriverInterfaceCSVHeaderString Function.
  • Import all or just a few selected columns, but as a minimum the Logging Group Name column must be specified.
  • 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 ButtonDriverInterfaceCSVImport_Click(sender As System.Object, e As System.EventArgs) Handles ButtonDriverInterfaceCSVImport.Click
        Dim ResultString As String
        Dim CSVStrings(3) As String
        CSVStrings(0) = "Name,Driver,Connection,Simulation,IP Address,TCP Port Number,Modbus Ethernet Type,Serial Port Number,Serial Type,Baud Rate,Data Bits,Parity,Stop Bits,Number Of Retries,Number Of Bad Messages To Offline,Check To Return To Online Rate,AB Logix Processor Type,AB Classic Processor Type,Backplane,Slot,Simulate,Gateway,AB Classic Driver,Transaction Timeout,Connection Timeout,AB CSP TCP Port Number,AB EIP TCP Port Number,Siemens Processor Type,Siemens Rack,Siemens Slot,Last Column"
        CSVStrings(1) = "Modbus Driver Interface 01,Modbus,Ethernet,StaticReadWrite,192.168.0.1,502,TCP,1,RTU,9600,8,None,One,3,3,60,ControlLogix,PLC5,1,0,False,False,CSP,250,2500,2222,44818,S7_1500,0,1,Last Column"
        CSVStrings(2) = "Modbus Driver Interface 02,Modbus,Ethernet,StaticReadWrite,192.168.0.2,502,TCP,1,RTU,9600,8,None,One,3,3,60,ControlLogix,PLC5,1,0,False,False,CSP,250,2500,2222,44818,S7_1500,0,1,Last Column"
        CSVStrings(3) = "Modbus Driver Interface 03,Modbus,Ethernet,StaticReadWrite,192.168.0.3,502,TCP,1,RTU,9600,8,None,One,3,3,60,ControlLogix,PLC5,1,0,False,False,CSP,250,2500,2222,44818,S7_1500,0,1,Last Column"
        Dim ErrorString As String = ""
 
        ResultString = ModuleNetworkNode.OPCSystemsComponent1.DriverInterfaceCSVImport(CSVStrings, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            LabelDriverInterfaceCSVImportResult.Text = ResultString
        Else
            LabelDriverInterfaceCSVImportResult.Text = ErrorString
        End If
    End Sub

C#

	    private void ButtonDriverInterfaceCSVImport_Click(object sender, System.EventArgs e)
              {
                     string ResultString = null;
                     string[] CSVStrings = new string[4];
                     CSVStrings[0] = "Name,Driver,Connection,Simulation,IP Address,TCP Port Number,Modbus Ethernet Type,Serial Port Number,Serial Type,Baud Rate,Data Bits,Parity,Stop Bits,Number Of Retries,Number Of Bad Messages To Offline,Check To Return To Online Rate,AB Logix Processor Type,AB Classic Processor Type,Backplane,Slot,Simulate,Gateway,AB Classic Driver,Transaction Timeout,Connection Timeout,AB CSP TCP Port Number,AB EIP TCP Port Number,Siemens Processor Type,Siemens Rack,Siemens Slot,Last Column";
                     CSVStrings[1] = "Modbus Driver Interface 01,Modbus,Ethernet,StaticReadWrite,192.168.0.1,502,TCP,1,RTU,9600,8,None,One,3,3,60,ControlLogix,PLC5,1,0,False,False,CSP,250,2500,2222,44818,S7_1500,0,1,Last Column";
                     CSVStrings[2] = "Modbus Driver Interface 02,Modbus,Ethernet,StaticReadWrite,192.168.0.2,502,TCP,1,RTU,9600,8,None,One,3,3,60,ControlLogix,PLC5,1,0,False,False,CSP,250,2500,2222,44818,S7_1500,0,1,Last Column";
                     CSVStrings[3] = "Modbus Driver Interface 03,Modbus,Ethernet,StaticReadWrite,192.168.0.3,502,TCP,1,RTU,9600,8,None,One,3,3,60,ControlLogix,PLC5,1,0,False,False,CSP,250,2500,2222,44818,S7_1500,0,1,Last Column";
                     string ErrorString = "";
 
                     ResultString = ModuleNetworkNode.OPCSystemsComponent1.DriverInterfaceCSVImport(CSVStrings, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           LabelDriverInterfaceCSVImportResult.Text = ResultString;
                     }
                     else
                     {
                           LabelDriverInterfaceCSVImportResult.Text = ErrorString;
                     }
              }

DataLoggingCSVHeaderString

  • The DataLoggingCSVHeaderString Function returns a String of comma seperated heading to be used with the DataLoggingCSVExport Function.
  • Returns Empty String 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.

VB

 Private Sub ButtonDataLoggingCSVHeaderString_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonDataLoggingCSVHeaderString.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ResultString As String
        ResultString = ModuleNetworkNode.OPCSystemsComponent1.DataLoggingCSVHeaderString(TextBoxNetworkNode.Text)
        If ResultString = "" Then
            TextBoxDataLoggingCSVHeaderStringResult.Text = "OAS Service not reached."
        Else
            TextBoxDataLoggingCSVHeaderStringResult.Text = ResultString
        End If
    End Sub

C#

	         private void ButtonDataLoggingCSVHeaderString_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ResultString = null;
                     ResultString = ModuleNetworkNode.OPCSystemsComponent1.DataLoggingCSVHeaderString(TextBoxNetworkNode.Text);
                     if (string.IsNullOrEmpty(ResultString))
                     {
                           TextBoxDataLoggingCSVHeaderStringResult.Text = "OAS Service not reached.";
                     }
                     else
                     {
                           TextBoxDataLoggingCSVHeaderStringResult.Text = ResultString;
                     }
              }
 

DataLoggingCSVExport

  • The DataLoggingCSVExport Function returns an array of comma seperated Strings, each String representing all attributes of a Data Logging Group.
  • This function is to be used in conjuction with the DataLoggingCSVHeaderString Function.
  • Returns Empty 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.
  • Optional ErrorString will be set to Success when function is successful and an error message when in error.

VB

Private Sub ButtonDataLoggingCSVExport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonDataLoggingCSVExport.Click
        Cursor.Current = Cursors.WaitCursor
        ComboBoxDataLoggingCSVExport.Items.Clear()
        Dim CSVStrings() As String
        Dim CSVString As String
        Dim ErrorString As String = ""
        CSVStrings = ModuleNetworkNode.OPCSystemsComponent1.DataLoggingCSVExport(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            For Each CSVString In CSVStrings
                ComboBoxDataLoggingCSVExport.Items.Add(CSVString)
            Next
            If ComboBoxDataLoggingCSVExport.Items.Count > 0 Then
                ComboBoxDataLoggingCSVExport.SelectedIndex = 0
            End If
        Else
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	      private void ButtonDataLoggingCSVExport_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     ComboBoxDataLoggingCSVExport.Items.Clear();
                     string[] CSVStrings = null;
//INSTANT C# NOTE: Commented this declaration since looping variables in 'foreach' loops are declared in the 'foreach' header in C#:
//                   string CSVString = null;
                     string ErrorString = "";
                     CSVStrings = ModuleNetworkNode.OPCSystemsComponent1.DataLoggingCSVExport(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           foreach (string CSVString in CSVStrings)
                           {
                                  ComboBoxDataLoggingCSVExport.Items.Add(CSVString);
                           }
                           if (ComboBoxDataLoggingCSVExport.Items.Count > 0)
                           {
                                  ComboBoxDataLoggingCSVExport.SelectedIndex = 0;
                           }
                     }
                     else
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

DataLoggingCSVImport

  • The DataLoggingCSVImport Function is used to import comma seperated strings to the Data Logging configuration.
  • Returns a status String describing the success or failure of the import.
  • Returns Empty String if service is not reachable.
  • CSVStrings is an array of comma seperated Strings.
  • The first String in the passed array must be a header String with the unique heading columns that can be obtained with the DataLoggingCSVHeaderString Function.
  • Import all or just a few selected columns, but as a minimum the Logging Group Name column must be specified.
  • 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 ButtonDataLoggingCSVImport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonDataLoggingCSVImport.Click
        Dim ResultString As String
        Dim CSVStrings(3) As String
        Dim ErrorString As String = ""
        CSVStrings(0) = "Logging Group Name,Logging Type,Logging Rate,Logging Active"
        CSVStrings(1) = "Group1,Continuous,1.0,False"
        CSVStrings(2) = "Group2,EventDriven,1.0,False"
        CSVStrings(3) = "Group3,SpecificTimeOfDay,1.0,False"
 
        ResultString = ModuleNetworkNode.OPCSystemsComponent1.DataLoggingCSVImport(CSVStrings, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            LabelDataLoggingCSVImportResult.Text = ResultString
        Else
            LabelDataLoggingCSVImportResult.Text = ErrorString
        End If
    End Sub

C#

	        private void ButtonDataLoggingCSVImport_Click(object sender, System.EventArgs e)
              {
                     string ResultString = null;
                     string[] CSVStrings = new string[4];
                     string ErrorString = "";
                     CSVStrings[0] = "Logging Group Name,Logging Type,Logging Rate,Logging Active";
                     CSVStrings[1] = "Group1,Continuous,1.0,False";
                     CSVStrings[2] = "Group2,EventDriven,1.0,False";
                     CSVStrings[3] = "Group3,SpecificTimeOfDay,1.0,False";
 
                     ResultString = ModuleNetworkNode.OPCSystemsComponent1.DataLoggingCSVImport(CSVStrings, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           LabelDataLoggingCSVImportResult.Text = ResultString;
                     }
                     else
                     {
                           LabelDataLoggingCSVImportResult.Text = ErrorString;
                     }
              }

AlarmLoggingCSVHeaderString

  • The AlarmLoggingCSVHeaderString Function returns a String of comma seperated heading to be used with the AlarmLoggingCSVExport Function.
  • Returns Empty String 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.

VB

Private Sub ButtonAlarmLoggingCSVHeaderString_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonAlarmLoggingCSVHeaderString.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ResultString As String
        ResultString = ModuleNetworkNode.OPCSystemsComponent1.AlarmLoggingCSVHeaderString(TextBoxNetworkNode.Text)
        If ResultString = "" Then
            TextBoxAlarmLoggingCSVHeaderStringResult.Text = "OAS Service not reached."
        Else
            TextBoxAlarmLoggingCSVHeaderStringResult.Text = ResultString
        End If
    End Sub

C#

	         private void ButtonAlarmLoggingCSVHeaderString_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ResultString = null;
                     ResultString = ModuleNetworkNode.OPCSystemsComponent1.AlarmLoggingCSVHeaderString(TextBoxNetworkNode.Text);
                     if (string.IsNullOrEmpty(ResultString))
                     {
                           TextBoxAlarmLoggingCSVHeaderStringResult.Text = "OAS Service not reached.";
                     }
                     else
                     {
                           TextBoxAlarmLoggingCSVHeaderStringResult.Text = ResultString;
                     }
              }

AlarmLoggingCSVExport Function

  • The AlarmLoggingCSVExport Function returns an array of comma seperated Strings, each String representing all attributes of a Alarm Logging Group.
  • This function is to be used in conjuction with the AlarmLoggingCSVHeaderString Function.
  • Returns Empty 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.
  • Optional ErrorString will be set to Success when function is successful and an error message when in error.

VB

Private Sub ButtonAlarmLoggingCSVExport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonAlarmLoggingCSVExport.Click
        Cursor.Current = Cursors.WaitCursor
        ComboBoxAlarmLoggingCSVExport.Items.Clear()
        Dim CSVStrings() As String
        Dim CSVString As String
        Dim ErrorString As String = ""
        CSVStrings = ModuleNetworkNode.OPCSystemsComponent1.AlarmLoggingCSVExport(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            For Each CSVString In CSVStrings
                ComboBoxAlarmLoggingCSVExport.Items.Add(CSVString)
            Next
            If ComboBoxAlarmLoggingCSVExport.Items.Count > 0 Then
                ComboBoxAlarmLoggingCSVExport.SelectedIndex = 0
            End If
        Else
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	       private void ButtonAlarmLoggingCSVExport_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     ComboBoxAlarmLoggingCSVExport.Items.Clear();
                     string[] CSVStrings = null;
//INSTANT C# NOTE: Commented this declaration since looping variables in 'foreach' loops are declared in the 'foreach' header in C#:
//                   string CSVString = null;
                     string ErrorString = "";
                     CSVStrings = ModuleNetworkNode.OPCSystemsComponent1.AlarmLoggingCSVExport(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           foreach (string CSVString in CSVStrings)
                           {
                                  ComboBoxAlarmLoggingCSVExport.Items.Add(CSVString);
                           }
                           if (ComboBoxAlarmLoggingCSVExport.Items.Count > 0)
                           {
                                  ComboBoxAlarmLoggingCSVExport.SelectedIndex = 0;
                           }
                     }
                     else
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }
 

AlarmLoggingCSVImport

  • The AlarmLoggingCSVImport Function is used to import comma seperated strings to the Alarm Logging configuration.
  • Returns a status String describing the success or failure of the import.
  • Returns Empty String if service is not reachable.
  • CSVStrings is an array of comma seperated Strings.
  • The first String in the passed array must be a header String with the unique heading columns that can be obtained with the AlarmLoggingCSVHeaderString Function.
  • Import all or just a few selected columns, but as a minimum the Logging Group Name column must be specified.
  • 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 ButtonAlarmLoggingCSVImport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonAlarmLoggingCSVImport.Click
        Dim ResultString As String
        Dim CSVStrings(3) As String
        Dim ErrorString As String = ""
        CSVStrings(0) = "Logging Group Name,Min Priority,Max Priority"
        CSVStrings(1) = "Group1,0,1000000"
        CSVStrings(2) = "Group2,0,1000000"
        CSVStrings(3) = "Group3,0,1000000"
 
        ResultString = ModuleNetworkNode.OPCSystemsComponent1.AlarmLoggingCSVImport(CSVStrings, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            LabelAlarmLoggingCSVImportResult.Text = ResultString
        Else
            LabelAlarmLoggingCSVImportResult.Text = ErrorString
        End If
 
    End Sub

C#

	       private void ButtonAlarmLoggingCSVImport_Click(object sender, System.EventArgs e)
              {
                     string ResultString = null;
                     string[] CSVStrings = new string[4];
                     string ErrorString = "";
                     CSVStrings[0] = "Logging Group Name,Min Priority,Max Priority";
                     CSVStrings[1] = "Group1,0,1000000";
                     CSVStrings[2] = "Group2,0,1000000";
                     CSVStrings[3] = "Group3,0,1000000";
 
                     ResultString = ModuleNetworkNode.OPCSystemsComponent1.AlarmLoggingCSVImport(CSVStrings, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           LabelAlarmLoggingCSVImportResult.Text = ResultString;
                     }
                     else
                     {
                           LabelAlarmLoggingCSVImportResult.Text = ErrorString;
                     }
 
              }

ReportCSVHeaderString

  • The ReportCSVHeaderString Function returns a String of comma seperated heading to be used with the ReportCSVExport Function.
  • Returns Empty String 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.

VB

Private Sub ButtonReportCSVHeaderString_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonReportCSVHeaderString.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ResultString As String
        ResultString = ModuleNetworkNode.OPCSystemsComponent1.ReportCSVHeaderString(TextBoxNetworkNode.Text)
        If ResultString = "" Then
            TextBoxReportCSVHeaderStringResult.Text = "OAS Service not reached."
        Else
            TextBoxReportCSVHeaderStringResult.Text = ResultString
        End If
    End Sub

C#

	  
 private void ButtonReportCSVHeaderString_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ResultString = null;
                     ResultString = ModuleNetworkNode.OPCSystemsComponent1.ReportCSVHeaderString(TextBoxNetworkNode.Text);
                     if (string.IsNullOrEmpty(ResultString))
                     {
                           TextBoxReportCSVHeaderStringResult.Text = "OAS Service not reached.";
                     }
                     else
                     {
                           TextBoxReportCSVHeaderStringResult.Text = ResultString;
                     }
              }  

ReportCSVExport

  • The ReportCSVExport Function returns an array of comma seperated Strings, each String representing all attributes of a Alarm Logging Group.
  • This function is to be used in conjuction with the ReportCSVHeaderString Function.
  • Returns Empty 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.
  • Optional ErrorString will be set to Success when function is successful and an error message when in error.

VB

Private Sub ButtonReportCSVExport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonReportCSVExport.Click
        Cursor.Current = Cursors.WaitCursor
        ComboBoxReportCSVExport.Items.Clear()
        Dim CSVStrings() As String
        Dim CSVString As String
        Dim ErrorString As String = ""
        CSVStrings = ModuleNetworkNode.OPCSystemsComponent1.ReportCSVExport(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            For Each CSVString In CSVStrings
                ComboBoxReportCSVExport.Items.Add(CSVString)
            Next
            If ComboBoxReportCSVExport.Items.Count > 0 Then
                ComboBoxReportCSVExport.SelectedIndex = 0
            End If
        Else
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	     private void ButtonReportCSVExport_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     ComboBoxReportCSVExport.Items.Clear();
                     string[] CSVStrings = null;
//INSTANT C# NOTE: Commented this declaration since looping variables in 'foreach' loops are declared in the 'foreach' header in C#:
//                   string CSVString = null;
                     string ErrorString = "";
                     CSVStrings = ModuleNetworkNode.OPCSystemsComponent1.ReportCSVExport(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           foreach (string CSVString in CSVStrings)
                           {
                                  ComboBoxReportCSVExport.Items.Add(CSVString);
                           }
                           if (ComboBoxReportCSVExport.Items.Count > 0)
                           {
                                  ComboBoxReportCSVExport.SelectedIndex = 0;
                           }
                     }
                     else
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

ReportCSVImport

  • The ReportCSVImport Function is used to import comma seperated strings to the Alarm Logging configuration.
  • Returns a status String describing the success or failure of the import.
  • Returns Empty String if service is not reachable.
  • CSVStrings is an array of comma seperated Strings.
  • The first String in the passed array must be a header String with the unique heading columns that can be obtained with the ReportCSVHeaderString Function.
  • Import all or just a few selected columns, but as a minimum the Logging Group Name column must be specified.
  • 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 ButtonReportCSVImport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonReportCSVImport.Click
        Dim ResultString As String
        Dim CSVStrings(3) As String
        Dim ErrorString As String = ""
 
        CSVStrings(0) = "Report Name,Output Type"
        CSVStrings(1) = "Report1,Excel"
        CSVStrings(2) = "Report2,HTML_Plain"
        CSVStrings(3) = "Report3,PDF_SystemFonts"
 
        ResultString = ModuleNetworkNode.OPCSystemsComponent1.ReportCSVImport(CSVStrings, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            LabelReportCSVImportResult.Text = ResultString
        Else
            LabelReportCSVImportResult.Text = ErrorString
        End If
    End Sub

C#

	      private void ButtonReportCSVImport_Click(object sender, System.EventArgs e)
              {
                     string ResultString = null;
                     string[] CSVStrings = new string[4];
                     string ErrorString = "";
 
                     CSVStrings[0] = "Report Name,Output Type";
                     CSVStrings[1] = "Report1,Excel";
                     CSVStrings[2] = "Report2,HTML_Plain";
                     CSVStrings[3] = "Report3,PDF_SystemFonts";
 
                     ResultString = ModuleNetworkNode.OPCSystemsComponent1.ReportCSVImport(CSVStrings, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           LabelReportCSVImportResult.Text = ResultString;
                     }
                     else
                     {
                           LabelReportCSVImportResult.Text = ErrorString;
                     }
              }

RecipeCSVHeaderString

  • The RecipeCSVHeaderString Function returns a String of comma seperated heading to be used with the RecipeCSVExport Function.
  • Returns Empty String 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.

VB

Private Sub ButtonRecipeCSVHeaderString_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonRecipeCSVHeaderString.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ResultString As String
        ResultString = ModuleNetworkNode.OPCSystemsComponent1.RecipeCSVHeaderString(TextBoxNetworkNode.Text)
        If ResultString = "" Then
            TextBoxRecipeCSVHeaderStringResult.Text = "OAS Service not reached."
        Else
            TextBoxRecipeCSVHeaderStringResult.Text = ResultString
        End If
    End Sub

C#

	     private void ButtonRecipeCSVHeaderString_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ResultString = null;
                     ResultString = ModuleNetworkNode.OPCSystemsComponent1.RecipeCSVHeaderString(TextBoxNetworkNode.Text);
                     if (string.IsNullOrEmpty(ResultString))
                     {
                           TextBoxRecipeCSVHeaderStringResult.Text = "OAS Service not reached.";
                     }
                     else
                     {
                           TextBoxRecipeCSVHeaderStringResult.Text = ResultString;
                     }
              }

RecipeCSVExport

  • The RecipeCSVExport Function returns an array of comma seperated Strings, each String representing all attributes of a Alarm Logging Group.
  • This function is to be used in conjuction with the RecipeCSVHeaderString Function.
  • Returns Empty 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.
  • Optional ErrorString will be set to Success when function is successful and an error message when in error.

VB

Private Sub ButtonRecipeCSVExport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonRecipeCSVExport.Click
        Cursor.Current = Cursors.WaitCursor
        ComboBoxRecipeCSVExport.Items.Clear()
        Dim CSVStrings() As String
        Dim CSVString As String
        Dim ErrorString As String = ""
        CSVStrings = ModuleNetworkNode.OPCSystemsComponent1.RecipeCSVExport(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            For Each CSVString In CSVStrings
                ComboBoxRecipeCSVExport.Items.Add(CSVString)
            Next
            If ComboBoxRecipeCSVExport.Items.Count > 0 Then
                ComboBoxRecipeCSVExport.SelectedIndex = 0
            End If
        Else
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	

  private void ButtonRecipeCSVExport_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     ComboBoxRecipeCSVExport.Items.Clear();
                     string[] CSVStrings = null;
//INSTANT C# NOTE: Commented this declaration since looping variables in 'foreach' loops are declared in the 'foreach' header in C#:
//                   string CSVString = null;
                     string ErrorString = "";
                     CSVStrings = ModuleNetworkNode.OPCSystemsComponent1.RecipeCSVExport(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                            foreach (string CSVString in CSVStrings)
                           {
                                  ComboBoxRecipeCSVExport.Items.Add(CSVString);
                           }
                           if (ComboBoxRecipeCSVExport.Items.Count > 0)
                           {
                                  ComboBoxRecipeCSVExport.SelectedIndex = 0;
                           }
                     }
                     else
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }    

RecipeCSVImport

  • The RecipeCSVImport Function is used to import comma seperated strings to the Alarm Logging configuration.
  • Returns a status String describing the success or failure of the import.
  • Returns Empty String if service is not reachable.
  • CSVStrings is an array of comma seperated Strings.
  • The first String in the passed array must be a header String with the unique heading columns that can be obtained with the RecipeCSVHeaderString Function.
  • Import all or just a few selected columns, but as a minimum the Logging Group Name column must be specified.
  • 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 ButtonRecipeCSVImport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonRecipeCSVImport.Click
        Dim ResultString As String
        Dim CSVStrings(3) As String
        Dim ErrorString As String = ""
 
        CSVStrings(0) = "Recipe Name,Recipe Type"
        CSVStrings(1) = "Recipe1,MultipleRecords"
        CSVStrings(2) = "Recipe2,SingleRecord"
        CSVStrings(3) = "Recipe3,Queued"
 
        ResultString = ModuleNetworkNode.OPCSystemsComponent1.RecipeCSVImport(CSVStrings, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            LabelRecipeCSVImportResult.Text = ResultString
        Else
            LabelRecipeCSVImportResult.Text = ErrorString
        End If
    End Sub

C#

	     private void ButtonRecipeCSVImport_Click(object sender, System.EventArgs e)
              {
                     string ResultString = null;
                     string[] CSVStrings = new string[4];
                     string ErrorString = "";
 
                     CSVStrings[0] = "Recipe Name,Recipe Type";
                     CSVStrings[1] = "Recipe1,MultipleRecords";
                     CSVStrings[2] = "Recipe2,SingleRecord";
                     CSVStrings[3] = "Recipe3,Queued";
 
                     ResultString = ModuleNetworkNode.OPCSystemsComponent1.RecipeCSVImport(CSVStrings, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           LabelRecipeCSVImportResult.Text = ResultString;
                     }
                     else
                     {
                           LabelRecipeCSVImportResult.Text = ErrorString;
                     }
              }

AlarmNotificationCSVHeaderString

  • The AlarmNotificationCSVHeaderString Function returns a String of comma seperated heading to be used with the AlarmNotificationCSVExport Function.
  • Returns Empty String 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.

VB

	      Private Sub ButtonAlarmNotificationCSVHeaderString_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonAlarmNotificationCSVHeaderString.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ResultString As String
        ResultString = ModuleNetworkNode.OPCSystemsComponent1.AlarmNotificationCSVHeaderString(TextBoxNetworkNode.Text)
        If ResultString = "" Then
            TextBoxAlarmNotificationCSVHeaderStringResult.Text = "OAS Service not reached."
        Else
            TextBoxAlarmNotificationCSVHeaderStringResult.Text = ResultString
        End If
    End Sub

C#

	     private void ButtonAlarmNotificationCSVHeaderString_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ResultString = null;
                     ResultString = ModuleNetworkNode.OPCSystemsComponent1.AlarmNotificationCSVHeaderString(TextBoxNetworkNode.Text);
                     if (string.IsNullOrEmpty(ResultString))
                     {
                           TextBoxAlarmNotificationCSVHeaderStringResult.Text = "OAS Service not reached.";
                     }
                     else
                     {
                           TextBoxAlarmNotificationCSVHeaderStringResult.Text = ResultString;
                     }
              }

AlarmNotificationCSVExport

  • The AlarmNotificationCSVExport Function returns an array of comma seperated Strings, each String representing all attributes of a Alarm Notification Group.
  • This function is to be used in conjuction with the AlarmNotificationCSVHeaderString Function.
  • Returns Empty 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.
  • Optional ErrorString will be set to Success when function is successful and an error message when in error.

VB

Private Sub ButtonAlarmNotificationCSVExport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonAlarmNotificationCSVExport.Click
        Cursor.Current = Cursors.WaitCursor
        ComboBoxAlarmNotificationCSVExport.Items.Clear()
        Dim CSVStrings() As String
        Dim CSVString As String
        Dim ErrorString As String = ""
        CSVStrings = ModuleNetworkNode.OPCSystemsComponent1.AlarmNotificationCSVExport(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            For Each CSVString In CSVStrings
                ComboBoxAlarmNotificationCSVExport.Items.Add(CSVString)
            Next
            If ComboBoxAlarmNotificationCSVExport.Items.Count > 0 Then
                ComboBoxAlarmNotificationCSVExport.SelectedIndex = 0
            End If
        Else
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

 private void ButtonAlarmNotificationCSVExport_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     ComboBoxAlarmNotificationCSVExport.Items.Clear();
                     string[] CSVStrings = null;
//INSTANT C# NOTE: Commented this declaration since looping variables in 'foreach' loops are declared in the 'foreach' header in C#:
//                   string CSVString = null;
                     string ErrorString = "";
                     CSVStrings = ModuleNetworkNode.OPCSystemsComponent1.AlarmNotificationCSVExport(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           foreach (string CSVString in CSVStrings)
                           {
                                  ComboBoxAlarmNotificationCSVExport.Items.Add(CSVString);
                           }
                           if (ComboBoxAlarmNotificationCSVExport.Items.Count > 0)
                           {
                                  ComboBoxAlarmNotificationCSVExport.SelectedIndex = 0;
                           }
                     }
                     else
                     {
                            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }	    

AlarmNotificationCSVImport

  • The AlarmNotificationCSVImport Function is used to import comma seperated strings to the Alarm Notification configuration.
  • Returns a status String describing the success or failure of the import.
  • Returns Empty String if service is not reachable.
  • CSVStrings is an array of comma seperated Strings.
  • The first String in the passed array must be a header String with the unique heading columns that can be obtained with the AlarmNotificationCSVHeaderString Function.
  • Import all or just a few selected columns, but as a minimum the Notification Group Name column must be specified.
  • 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 ButtonAlarmNotificationCSVImport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonAlarmNotificationCSVImport.Click
        Dim ResultString As String
        Dim CSVStrings(3) As String
        Dim ErrorString As String = ""
        CSVStrings(0) = "Notification Group Name,Min Priority,Max Priority"
        CSVStrings(1) = "Group1,0,1000000"
        CSVStrings(2) = "Group2,0,1000000"
        CSVStrings(3) = "Group3,0,1000000"
 
        ResultString = ModuleNetworkNode.OPCSystemsComponent1.AlarmNotificationCSVImport(CSVStrings, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            LabelAlarmNotificationCSVImportResult.Text = ResultString
        Else
            LabelAlarmNotificationCSVImportResult.Text = ErrorString
        End If
    End Sub

C#

	     private void ButtonAlarmNotificationCSVImport_Click(object sender, System.EventArgs e)
              {
                     string ResultString = null;
                     string[] CSVStrings = new string[4];
                     string ErrorString = "";
                     CSVStrings[0] = "Notification Group Name,Min Priority,Max Priority";
                     CSVStrings[1] = "Group1,0,1000000";
                     CSVStrings[2] = "Group2,0,1000000";
                     CSVStrings[3] = "Group3,0,1000000";
 
                     ResultString = ModuleNetworkNode.OPCSystemsComponent1.AlarmNotificationCSVImport(CSVStrings, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           LabelAlarmNotificationCSVImportResult.Text = ResultString;
                     }
                     else
                     {
                           LabelAlarmNotificationCSVImportResult.Text = ErrorString;
                     }
              }
 

SecurityCSVHeaderString

  • The SecurityCSVHeaderString Function returns a String of comma seperated heading to be used with the SecurityCSVExport Function.
  • Returns Empty String 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.
  • VB
Private Sub ButtonSecurityCSVHeaderString_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSecurityCSVHeaderString.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ResultString As String
        ResultString = ModuleNetworkNode.OPCSystemsComponent1.SecurityCSVHeaderString(TextBoxNetworkNode.Text)
        If ResultString = "" Then
            TextBoxSecurityCSVHeaderStringResult.Text = "OAS Service not reached."
        Else
            TextBoxSecurityCSVHeaderStringResult.Text = ResultString
        End If
    End Sub

C#

	     private void ButtonSecurityCSVHeaderString_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ResultString = null;
                     ResultString = ModuleNetworkNode.OPCSystemsComponent1.SecurityCSVHeaderString(TextBoxNetworkNode.Text);
                     if (string.IsNullOrEmpty(ResultString))
                     {
                           TextBoxSecurityCSVHeaderStringResult.Text = "OAS Service not reached.";
                     }
                     else
                     {
                           TextBoxSecurityCSVHeaderStringResult.Text = ResultString;
                     }
              }

SecurityCSVExport

  • The SecurityCSVExport Function returns an array of comma seperated Strings, each String representing all attributes of a Alarm Logging Group.
  • This function is to be used in conjuction with the SecurityCSVHeaderString Function.
  • Returns Empty 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.
  • Optional ErrorString will be set to Success when function is successful and an error message when in error.

VB

Private Sub ButtonSecurityCSVExport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSecurityCSVExport.Click
        Cursor.Current = Cursors.WaitCursor
        ComboBoxSecurityCSVExport.Items.Clear()
        Dim CSVStrings() As String
        Dim CSVString As String
        Dim ErrorString As String = ""
        CSVStrings = ModuleNetworkNode.OPCSystemsComponent1.SecurityCSVExport(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            For Each CSVString In CSVStrings
                ComboBoxSecurityCSVExport.Items.Add(CSVString)
            Next
            If ComboBoxSecurityCSVExport.Items.Count > 0 Then
                ComboBoxSecurityCSVExport.SelectedIndex = 0
            End If
        Else
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	  private void ButtonSecurityCSVExport_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     ComboBoxSecurityCSVExport.Items.Clear();
                     string[] CSVStrings = null;
//INSTANT C# NOTE: Commented this declaration since looping variables in 'foreach' loops are declared in the 'foreach' header in C#:
//                   string CSVString = null;
                     string ErrorString = "";
                     CSVStrings = ModuleNetworkNode.OPCSystemsComponent1.SecurityCSVExport(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           foreach (string CSVString in CSVStrings)
                           {
                                  ComboBoxSecurityCSVExport.Items.Add(CSVString);
                           }
                           if (ComboBoxSecurityCSVExport.Items.Count > 0)
                           {
                                  ComboBoxSecurityCSVExport.SelectedIndex = 0;
                           }
                     }
                     else
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

SecurityCSVImport

  • The SecurityCSVImport Function is used to import comma seperated strings to the Alarm Logging configuration.
  • Returns a status String describing the success or failure of the import.
  • Returns Empty String if service is not reachable.
  • CSVStrings is an array of comma seperated Strings.
  • The first String in the passed array must be a header String with the unique heading columns that can be obtained with the SecurityCSVHeaderString Function.
  • Import all or just a few selected columns, but as a minimum the Logging Group Name column must be specified.
  • 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 ButtonSecurityCSVImport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSecurityCSVImport.Click
        Dim ResultString As String
        Dim CSVStrings(3) As String
        Dim ErrorString As String = ""
 
        CSVStrings(0) = "Group Name,Enable All"
        CSVStrings(1) = "Security1,1"
        CSVStrings(2) = "Security2,1"
        CSVStrings(3) = "Security3,1"
 
        ResultString = ModuleNetworkNode.OPCSystemsComponent1.SecurityCSVImport(CSVStrings, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            LabelSecurityCSVImportResult.Text = ResultString
        Else
            LabelSecurityCSVImportResult.Text = ErrorString
        End If
    End Sub

C#

	    

The SecurityUsersCSVHeaderString

  • The SecurityUsersCSVHeaderString Function returns a String of comma seperated heading to be used with the SecurityUsersCSVExport Function.
  • Returns Empty String if service is not reachable.

VB

   
 NetworkNode is the name of the network node of the OAS Service to connect to.  Leave blank for localhost connection.
    Private Sub ButtonSecurityUsersCSVHeaderString_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSecurityUsersCSVHeaderString.Click
        Cursor.Current = Cursors.WaitCursor
        Dim ResultString As String
        ResultString = ModuleNetworkNode.OPCSystemsComponent1.SecurityUsersCSVHeaderString(TextBoxNetworkNode.Text)
        If ResultString = "" Then
            TextBoxSecurityUsersCSVHeaderStringResult.Text = "OAS Service not reached."
        Else
            TextBoxSecurityUsersCSVHeaderStringResult.Text = ResultString
        End If
    End Sub

C#

	    private void ButtonSecurityUsersCSVHeaderString_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     string ResultString = null;
                     ResultString = ModuleNetworkNode.OPCSystemsComponent1.SecurityUsersCSVHeaderString(TextBoxNetworkNode.Text);
                     if (string.IsNullOrEmpty(ResultString))
                     {
                           TextBoxSecurityUsersCSVHeaderStringResult.Text = "OAS Service not reached.";
                     }
                     else
                     {
                           TextBoxSecurityUsersCSVHeaderStringResult.Text = ResultString;
                     }
              }
 

SecurityUsersCSVExport

  • The SecurityUsersCSVExport Function returns an array of comma seperated Strings, each String representing all attributes of a Alarm Logging Group.
  • This function is to be used in conjuction with the SecurityUsersCSVHeaderString Function.
  • Returns Empty 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.
  • Optional ErrorString will be set to Success when function is successful and an error message when in error.

VB

	       Private Sub ButtonSecurityUsersCSVExport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSecurityUsersCSVExport.Click
        Cursor.Current = Cursors.WaitCursor
        ComboBoxSecurityUsersCSVExport.Items.Clear()
        Dim CSVStrings() As String
        Dim CSVString As String
        Dim ErrorString As String = ""
        CSVStrings = ModuleNetworkNode.OPCSystemsComponent1.SecurityUsersCSVExport(TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            For Each CSVString In CSVStrings
                ComboBoxSecurityUsersCSVExport.Items.Add(CSVString)
            Next
            If ComboBoxSecurityUsersCSVExport.Items.Count > 0 Then
                ComboBoxSecurityUsersCSVExport.SelectedIndex = 0
            End If
        Else
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

	      private void ButtonSecurityUsersCSVExport_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     ComboBoxSecurityUsersCSVExport.Items.Clear();
                     string[] CSVStrings = null;
//INSTANT C# NOTE: Commented this declaration since looping variables in 'foreach' loops are declared in the 'foreach' header in C#:
//                   string CSVString = null;
                     string ErrorString = "";
                     CSVStrings = ModuleNetworkNode.OPCSystemsComponent1.SecurityUsersCSVExport(TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           foreach (string CSVString in CSVStrings)
                           {
                                  ComboBoxSecurityUsersCSVExport.Items.Add(CSVString);
                           }
                           if (ComboBoxSecurityUsersCSVExport.Items.Count > 0)
                           {
                                  ComboBoxSecurityUsersCSVExport.SelectedIndex = 0;
                           }
                     }
                     else
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
              }

SecurityUsersCSVImport

  • The SecurityUsersCSVImport Function is used to import comma seperated strings to the Alarm Logging configuration.
  • Returns a status String describing the success or failure of the import.
  • Returns Empty String if service is not reachable.
  • CSVStrings is an array of comma seperated Strings.
  • The first String in the passed array must be a header String with the unique heading columns that can be obtained with the SecurityUsersCSVHeaderString Function.
  • Import all or just a few selected columns, but as a minimum the Logging Group Name column must be specified.
  • 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 ButtonSecurityUsersCSVImport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSecurityUsersCSVImport.Click
        Dim ResultString As String
        Dim CSVStrings(3) As String
        Dim ErrorString As String = ""
 
        CSVStrings(0) = "UserName,Password,Security Group"
        CSVStrings(1) = "User1,Password1,Security1"
        CSVStrings(2) = "User2,Password2,Security2"
        CSVStrings(3) = "User3,Password3,Security3"
 
        ResultString = ModuleNetworkNode.OPCSystemsComponent1.SecurityUsersCSVImport(CSVStrings, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            LabelSecurityUsersCSVImportResult.Text = ResultString
        Else
            LabelSecurityUsersCSVImportResult.Text = ErrorString
        End If
    End Sub

C#

	      private void ButtonSecurityUsersCSVImport_Click(object sender, System.EventArgs e)
              {
                     string ResultString = null;
                     string[] CSVStrings = new string[4];
                     string ErrorString = "";
 
                     CSVStrings[0] = "UserName,Password,Security Group";
                     CSVStrings[1] = "User1,Password1,Security1";
                     CSVStrings[2] = "User2,Password2,Security2";
                     CSVStrings[3] = "User3,Password3,Security3";
 
                     ResultString = ModuleNetworkNode.OPCSystemsComponent1.SecurityUsersCSVImport(CSVStrings, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           LabelSecurityUsersCSVImportResult.Text = ResultString;
                     }
                     else
                     {
                           LabelSecurityUsersCSVImportResult.Text = ErrorString;
                     }
              }