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;
                     }
              }