Bad Data Quality in .NET Application.

Below are some possible reasons your .NET application is not able to read OAS tag values.

Data Source Quality

Use Configure-Tags to verify that the data quality of the source tags is “Good Quality”.

Menu Configure Tags

Quality Good

Security

The Default security group on either the local or remote OAS Engine may have Disable All Tags from Reading checked under the Read Tags Tab.  See Restrict Tag Access of Security setup to see how read, write, and browse access can be restricted.

View how to Implement User Credentials in Client Applications to provide log in method for each user in the .NET application.

Network

.NET applications can be defined to communicate to remote OAS Engines.  See Network Communications Troubleshooting to verify that port 58727 is allowing both incoming and outgoing traffic through your firewall.

Tag Path

The full tag path would include the full tag name including its parent groups and the variable of the Tag.

MyGroup.MyTag.Value

Tag names are case sensitive and the current value of a tag would be .Value as the most common variable.

If the tag is from a remote OAS Engine see Basic Networking for standard remote tag syntax or Live Data Cloud Networking if the OAS Engine system has a dynamic IP address.
\\192.168.0.1\TagName.Value

License

Use Configure-License to verify that a product feature .NET Data Connector, WinForm HMI, or WPF HMI is enabled on the data source system where the tags are located.

Menu Configure License

Enabled Products

Target Framework for WPF and WinForm Applications

The project type for WinForm and WPF applications should be set to include (.NET Framework) and target .NET Framework 4.6.1 or greater.

WinForm Target Framework

See the correct project type for WinForm above that is listed as Windows Forms App (.NET Framework) while Windows Forms App would not be the correct project type.

Assembly References

Visual Studio on some operating systems will assign a legacy assembly to the project causing an incompatibility due to an older version of the reference assembly.  A common assembly that can be incorrect is Newtonsoft.Json that has been registered in the GAC by another software product.

Select Newtonsoft.Json under the Project References to verify the correct path and version as 13.0.0.0.

Newtonsoft.Json Assembly Reference

If the Path does not reference the OAS installation directory remove the reference and select to Add Reference and browse for dll from the respective directory for the specific product feature. For .NET Framework applications include the .dlls located in C:\Program Files\Open Automation Software\OAS\Controls\NetFramework\. The Target Framework set for the VS project must be .NET Framework 4.6.1 or greater. For .NET Standard supporting the following targets include the. dlls located in C:\Program Files\Open Automation Software\OAS\Controls\NetStandard\.

See a list of locations for the correct type in the troubleshooting type After updating to OAS Version 17 the project no longer compiles for a list of correct project reference paths for each type of Visual Studio Project.

.NET Assembly is Blocked

If you have copied an application or project to another computer you may need to Unblock one or more the .dll files.

Right click on the .dll file that you have downloaded. Check the Unblock checkbox for security as shown in the example below, then click Apply or OK.

Excel Add-In

Legacy .NET Application with OAS Version 17

 If the OAS .NET assemblies are from OAS version 16 or less contact support@oasiot.com for compatibility instructions.

After updating to OAS Version 17 the project no longer compiles

OAS version 17 implements an improved network interface which requires some additional assemblies.

All dependent .dlls are located in the relative subdirectory of the Controls directory of the OAS installation directory, typically C:\Program Files\Open Automation Software\OAS\Controls\.

To add a reference to a Visual Studio project right click on References in the Solution Explorer.

Add Reference

Select Browse to browse the directory for each application feature.

Browse Assemblies

Include all .dlls files in the respective directory for the specific product feature.

For .NET Framework applications include the .dlls located in C:\Program Files\Open Automation Software\OAS\Controls\NetFramework\.

The Target Framework set for the VS project must be .NET Framework 4.6.1 or greater.

For .NET Standard supporting the following targets include the. dlls located in C:\Program Files\Open Automation Software\OAS\Controls\NetStandard\.

  • .NET 6
  • .NET 5
  • .NET Core 2.0 or greater
  • .NET Framework 4.61 or greater
  • Xamarin.iOS 10.14 or greater
  • Xamarin.Android 8.0 or greater
  • UWP 1.0.0.16299 or greater

WPF HMI Assemblies

  • C:\Program Files\Open Automation Software\OAS\Controls\NetFramework\OPCWPFDashboard\

WinForm HMI Assemblies

  • C:\Program Files\Open Automation Software\OAS\Controls\NetFramework\OPCControls\

Alarm .NET Assemblies

  • C:\Program Files\Open Automation Software\OAS\Controls\NetFramework\OPCAlarmControl\
  • C:\Program Files\Open Automation Software\OAS\Controls\NetFramework\OPCAlarmDataOnly\
  • C:\Program Files\Open Automation Software\OAS\Controls\NetStandard\OASAlarms\

Trend .NET Assemblies

  • C:\Program Files\Open Automation Software\OAS\Controls\NetFramework\OPCTrendControl\
  • C:\Program Files\Open Automation Software\OAS\Controls\NetFramework\OPCTrendDataOnly\
  • C:\Program Files\Open Automation Software\OAS\Controls\NetStandard\OASTrends\

.NET Data Connector Assemblies

  • C:\Program Files\Open Automation Software\OAS\Controls\NetFramework\OPCSystemsDataConnector\
  • C:\Program Files\Open Automation Software\OAS\Controls\NetStandard\OASData\

Server Configuration Assemblies

  • C:\Program Files\Open Automation Software\OAS\Controls\NetFramework\OPCSystems\
  • C:\Program Files\Open Automation Software\OAS\Controls\NetStandard\OASConfig\

IIoT Example Service Code

The OAS Example Service code example is a great way to learn how to programmatically add tags, update tag properties, and read and write live data to an OAS Engine.

You can view the .NET Programmatic Interface video for demonstration of the OAS Example Service Code and explanation of use of the most common methods.

  • 00:00 – Introduction
  • 00:33 – Source code example
  • 01:07 – Visual studio projects example
  • 01:33 – How to get a visual studio app
  • 01:40 – How to create projects and use visual studio
  • 03:05 – OAS service code example
  • 15:00 – Tag variables
  • 15:37 – How to browse tags
  • 17:10 – Networking
  • 20:55 – How to implement security
  • 21:31 – How to publish
  • 22:15 – How to register service
  • 23:41 – How to change project name
  • 26:20 – Questions

Download the OAS Example Service code.

Right click on the zip file that you have downloaded and choose Properties to select Unblock checkbox if Security warning is shown.

There are 4 Visual Studio projects all use the same methods to provide a working example.

  • C# .NET Core Console App
  • VB .NET Core Console App
  • C# Windows Service
  • VB Windows Service

These projects use the OASConfig.dll and OASData.dll assemblies that are included in the OAS platform installation directory, the default is C:\Program Files\Open Automation Software\OAS.

These projects are a good starting point if you need to setup unattended execution of processing and transferring data.  They can be easily modified to include your own routines.

Note: It is recommend to run Visual Studio in Administrative mode for full access to project files.  Either modify the properties of the shortcut under Advanced button or right click on the VS shortcut to Run as administrator.

Key Methods

Constructor

private OASData.Data oasd = new OASData.Data();
private OASConfig.Config oassys = new OASConfig.Config();

Create Tags

string DemoErrorString = "";
string DemoResultString = oassys.SetTagProperties(DemoPropertyValues, "localhost", ref DemoErrorString);
  • PropertyValues is an array of arrays
  • NetworkNode is optional and can be an IP Address network node, or registered domain name
  • ErrorString will set the string passed by reference with Success if successful, or an error string if the tags were not created or updated.

First element is an array containing the property names.  These property names will match the Tag CSV Export header.

object[] DemoDesiredColumns = new object[5];
DemoDesiredColumns[0] = "Tag"; // Required
DemoDesiredColumns[1] = "Value - Data Type";
DemoDesiredColumns[2] = "Value - Source";
DemoDesiredColumns[3] = "Value - Simulation Type";
DemoDesiredColumns[4] = "Value - Simulation Rate";
DemoPropertyValues[0] = DemoDesiredColumns; // First record is the header

Additional elements contain the values for each Tag.

object[] DemoTagValues1 = new object[5];
DemoTagValues1[0] = "OAS Demo Service.Source Tags.Ramp";
DemoTagValues1[1] = "Double";
DemoTagValues1[2] = "Simulation";
DemoTagValues1[3] = "Ramp";
DemoTagValues1[4] = 0.25;
DemoPropertyValues[1] = DemoTagValues1;

Write Tags Asynchronously

oasd.WriteTags(OASTags, OASValues);
  • Tags is a string array of tag names and variables.
  • Values is an object array containing the values to write to each tag.
  • TimeStamps array can optionally be provided to set the time of the value if the Data Source of the Tag is Value.

If the Data Source is defined to a device or application writes to .Value will be written to the source defined.

Examples: Modbus, Siemens, AB, OPC UA, MQTT

Read Tags Asynchronously

Call AddTags to add a list of tags for subscription.

oasd.AddTags(ReadTags);
  • Tags is a string array of tag names and variables.

Values will be returned in the ValuesChangedAll event anytime value changes in a tag variable.

oasd.ValuesChangedAll += OASDValuesChangedAll;
private void OASDValuesChangedAll(string[] Tags, object[] Values, bool[] Qualities, DateTime[] TimeStamps)

Call RemoveTags to remove any of the tag variables from subscription.

Write Tags Synchronously

SyncWriteTags is a blocking call that waits for the call to return from the service.

Errors = oasd.SyncWriteTags(Tags, Values);
  • Tags is a string array of tag names and variables.
  • Values is an object array containing the values to write to each tag.
  • Errors is an Integer array that returns
  • 0 when successful
  • 1 when OAS Engine is not reachable
  • 2 when the Tags array size is not equal to the Values array

Write Tags Synchronously with Confirmation

SyncWriteTagsWithConfirmation is a blocking call that waits for the values of the tag variables written call to return from the service.

Errors = oasd. SyncWriteTagsWithConfirmation(Tags, Values, 10000, 0.0001);
  • Tags is a string array of tag names and variables.
  • Values is an object array containing the values to write to each tag.
  • Include optional timeout with default of 10,000 milliseconds and deadband for floating point values with default of 0.0001.
  • Errors is an Integer array that returns
  • 0 when successful
  • 1 when OAS Engine is not reachable
  • 2 when the Values array is null
  • 3 when the Tags array size is not equal to the Values array

Read Tags Synchronously

SyncReadTags is a blocking call that obtains the current value of the list of tag variables.

Values = oasd.SyncReadTags(Tags, ref Errors, 10000);
  • The returned value is an object array with the values for each tag variable.
  • Tags is a string array of tag names and variables to read.
  • Errors is an integer array returning:
  • 0 if the tag variable quality is good
  • 1 if the quality is bad
  • 2 if the value could not be returned within the timeout specified
  • Timeout is specified in milliseconds to wait for the call to return.

Networking

Tag names can include an IP Address, network node name, or registered domain name if the application is deployed remote from the OAS Engine.

Basis Networking Example:

\\192.168.0.1\TagName.Value

If Live Data Cloud networking is implemented for self-hosting with a dynamic IP Address the LDC syntax is applicable.

Live Data Cloud Networking Example:

\\www.opcweb.com\RemoteSCADAHosting.MyLDCNode.TagName.Value

Register Service

Linux

Windows

  • Windows: Use InstallUtil to register service
  • Using Visual Studio Command Prompt as Administrator
  • InstallUtil OASDemoService.exe

To change the name of the service set the properties of ServiceInstaller1 in ProjectInstaller.

  • Description
  • DisplayName
  • ServiceName

See our OASConfig documentation and OASData documentation for more details.

Trend Tags

GetTrendPointGroupNames

  • The GetTrendPointGroupNames Function returns a list of Groups in the specified ReferenceGroup path that contain Tags that are enabled for trending.
  • Returns Empty String if service is not reachable.
  • Returns a String Array of Groups in the ReferenceGroup that have Tags that are enabled for trending.
  • ReferenceGroup is a string of the Group path to retrieve the Groupss 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 ButtonGetTrendPointGroupNames_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetTrendPointGroupNames.Click
        Cursor.Current = Cursors.WaitCursor
        ComboBoxGetTrendPointGroupNames.Items.Clear()
        Dim GroupNames() As String
        Dim GroupName As String
        Dim ErrorString As String = ""
        GroupNames = ModuleNetworkNode.OPCSystemsComponent1.GetTrendPointGroupNames(TextBoxReferenceGroup.Text, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            For Each GroupName In GroupNames
                ComboBoxGetTrendPointGroupNames.Items.Add(GroupName)
            Next
            If ComboBoxGetTrendPointGroupNames.Items.Count > 0 Then
                ComboBoxGetTrendPointGroupNames.SelectedIndex = 0
            End If
        Else
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
 
    End Sub

C#

  private void ButtonGetTrendPointGroupNames_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     ComboBoxGetTrendPointGroupNames.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.GetTrendPointGroupNames(TextBoxReferenceGroup.Text, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           foreach (string GroupName in GroupNames)
                           {
                                  ComboBoxGetTrendPointGroupNames.Items.Add(GroupName);
                           }
                           if (ComboBoxGetTrendPointGroupNames.Items.Count > 0)
                           {
                                  ComboBoxGetTrendPointGroupNames.SelectedIndex = 0;
                           }
                     }
                     else
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
 
              }
 

GetTrendPointTagNames

  • The GetTrendPointTagNames Function returns a list of Tags in the specified ReferenceGroup path that are enabled for trending.
  • Returns Empty String if service is not reachable.
  • Returns a String Array of Tags in the ReferenceGroup that are enabled for trending.
  • ReferenceGroup is a string of the Group path to retrieve the Tags 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 ButtonGetTrendPointTagNames_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetTrendPointTagNames.Click
        Cursor.Current = Cursors.WaitCursor
        ComboBoxGetTrendPointTagNames.Items.Clear()
        Dim TagNames() As String
        Dim TagName As String
        Dim ErrorString As String = ""
        TagNames = ModuleNetworkNode.OPCSystemsComponent1.GetTrendPointTagNames(TextBoxReferenceGroup.Text, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            For Each TagName In TagNames
                ComboBoxGetTrendPointTagNames.Items.Add(TagName)
            Next
            If ComboBoxGetTrendPointTagNames.Items.Count > 0 Then
                ComboBoxGetTrendPointTagNames.SelectedIndex = 0
            End If
        Else
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

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

GetAllTrendPointTagNames

  • The GetAllTrendPointTagNames Function returns a list of all Tags in the specified ReferenceGroup and all sub groups path that are enabled for trending.
  • Returns Empty String if service is not reachable.” + vbCr + “Returns a String Array of Tags in the ReferenceGroup that are enabled for trending.
  • ReferenceGroup is a string of the Group path to retrieve the Tags from.
  • 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 ButtonGetAllTrendPointTagNames_Click(sender As System.Object, e As System.EventArgs) Handles ButtonGetAllTrendPointTagNames.Click
        Cursor.Current = Cursors.WaitCursor
        ComboBoxGetTrendPointTagNames.Items.Clear()
        Dim TagNames() As String
        Dim TagName As String
        Dim ErrorString As String = ""
        TagNames = ModuleNetworkNode.OPCSystemsComponent1.GetAllTrendPointTagNames(TextBoxReferenceGroup.Text, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            For Each TagName In TagNames
                ComboBoxGetTrendPointTagNames.Items.Add(TagName)
            Next
            If ComboBoxGetTrendPointTagNames.Items.Count > 0 Then
                ComboBoxGetTrendPointTagNames.SelectedIndex = 0
            End If
        Else
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub
 
    Private Sub ComboBoxGetTrendPointTagNames_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBoxGetTrendPointTagNames.SelectedIndexChanged
        TextBoxTag.Text = ComboBoxGetTrendPointTagNames.SelectedItem
    End Sub

C#

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

GetTrendPointParameterNames

  • The GetTrendPointParameterNames Function returns a list of Parameters of a Tag in the specified ReferenceGroup path that is enabled for trending.
  • Returns Empty String if service is not reachable.
  • Returns a String Array of Tags in the ReferenceGroup that are enabled for trending.
  • TagName is a string of the tag name to query.
  • ReferenceGroup is a string of the Group path to retrieve the Tags from.
  • NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.

VB

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

C#

  private void ButtonGetTrendPointParameterNames_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     ComboBoxGetTrendPointParameterNames.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.GetTrendPointParameterNames(TextBoxTag.Text, TextBoxReferenceGroup.Text, TextBoxNetworkNode.Text);
                     foreach (string Parameter in Parameters)
                     {
                           ComboBoxGetTrendPointParameterNames.Items.Add(Parameter);
                     }
                     if (ComboBoxGetTrendPointParameterNames.Items.Count > 0)
                     {
                           ComboBoxGetTrendPointParameterNames.SelectedIndex = 0;
                     }
 
              }

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.

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
        Groups = ModuleNetworkNode.OPCSystemsComponent1.GetDataLoggingNames(TextBoxNetworkNode.Text)
        For Each Group In Groups
            ComboBoxGetDataLoggingNames.Items.Add(Group)
        Next
        If ComboBoxGetDataLoggingNames.Items.Count > 0 Then
            ComboBoxGetDataLoggingNames.SelectedIndex = 0
        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 void ButtonGetDataLoggingNames_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     ComboBoxGetDataLoggingNames.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;
                     Groups = ModuleNetworkNode.OPCSystemsComponent1.GetDataLoggingNames(TextBoxNetworkNode.Text);
                     foreach (string Group in Groups)
                     {
                           ComboBoxGetDataLoggingNames.Items.Add(Group);
                     }
                     if (ComboBoxGetDataLoggingNames.Items.Count > 0)
                     {
                           ComboBoxGetDataLoggingNames.SelectedIndex = 0;
                     }
              }
 
              private void ComboBoxGetDataLoggingNames_SelectedIndexChanged(object sender, System.EventArgs e)
              {
                     TextBoxDataLoggingGroup.Text = ComboBoxGetDataLoggingNames.SelectedItem.ToString();
              }

GetHistoryTagNames

  • The GetHistoryTagNames Function returns a list of Field Names in the Data Logging Group.
  • Returns Empty String if service is not reachable.
  • Returns a String Array of Field Names in the Data Logging Group.
  • Group is a string of the Data Logging Group path to retrieve the Field Names 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 ButtonGetHistoryTagNames_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetHistoryTagNames.Click
        Cursor.Current = Cursors.WaitCursor
        ComboBoxGetHistoryTagNames.Items.Clear()
        Dim FieldNames() As String
        Dim FieldName As String
        Dim ErrorString As String = ""
        FieldNames = ModuleNetworkNode.OPCSystemsComponent1.GetHistoryTagNames(TextBoxDataLoggingGroup.Text, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            For Each FieldName In FieldNames
                ComboBoxGetHistoryTagNames.Items.Add(FieldName)
            Next
            If ComboBoxGetHistoryTagNames.Items.Count > 0 Then
                ComboBoxGetHistoryTagNames.SelectedIndex = 0
            End If
        Else
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
    End Sub

C#

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

Tags

The most commonly used methods are Get and Set Tag Properties to obtain and set desired properties of multiple tags in one call

Please note that the most efficient way to add tags and set their properties programmatically is using the SetTagProperty or TagCSVImport methods.

GetTagValuesByGroup

The GetTagValuesByGroup Function returns an array of Tag Names and Values for all of the Tags in the specified group. Tag Names and Values are alternating with the the array of tags.

Returns Empty Array if service is not reachable.

The returned array of objects will contain first the tag name followed by the value.

Example is element 0 contains Tag01, element 1 contains the value of Tag01 element 2 contains Tag02, element 3 contains the value of Tag02.

If the data quality of the Tag value is bad the individual returned value will be null.

The GroupName is the reference path of the group to get the values 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 ButtonGetTagValuesByGroup_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetTagValuesByGroup.Click
    Cursor.Current = Cursors.WaitCursor
    ComboBoxGetTagValuesByGroup.Items.Clear()
    Dim TagNamesAndValues() As Object
    Dim TagName As String
    Dim ValueString As String
    Dim ErrorString As String = ""
    TagNamesAndValues = ModuleNetworkNode.OPCSystemsComponent1.GetTagValuesByGroup(TextBoxReferenceGroup.Text, TextBoxNetworkNode.Text, ErrorString)
    If ErrorString = "Success" Then
        Dim numberOfTags As Int32 = TagNamesAndValues.GetLength(0) / 2
        Dim tagIndex As Int32
        Dim itemIndex As Int32
        Dim tagsToAdd As New ArrayList

        For tagIndex = 0 To numberOfTags - 1
            TagName = TagNamesAndValues(itemIndex)
            itemIndex += 1
            If TagNamesAndValues(itemIndex) Is Nothing Then
                tagsToAdd.Add(TagName + " = Bad Quality")
            Else
                Try
                    ValueString = TagNamesAndValues(itemIndex).ToString
                    tagsToAdd.Add(TagName + " = " + ValueString)
                Catch ex As Exception
                    tagsToAdd.Add(TagName + " = Value Cannot Be Converted To String")
                End Try
            End If
            itemIndex += 1
        Next
        ComboBoxGetTagValuesByGroup.Items.AddRange(CType(tagsToAdd.ToArray(GetType(String)), String()))
        If ComboBoxGetTagValuesByGroup.Items.Count > 0 Then
            ComboBoxGetTagValuesByGroup.SelectedIndex = 0
        End If
    Else
        MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
    End If
End Sub

C#

private void ButtonGetTagValuesByGroup_Click(object sender, System.EventArgs e) {
   System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
   ComboBoxGetTagValuesByGroup.Items.Clear();
   object[] TagNamesAndValues = null;
   string TagName = null;
   string ValueString = null;
   string ErrorString = "";
   TagNamesAndValues = ModuleNetworkNode.OPCSystemsComponent1.GetTagValuesByGroup(TextBoxReferenceGroup.Text, TextBoxNetworkNode.Text, ref ErrorString);
   if (ErrorString == "Success")
   {
         Int32 numberOfTags = Convert.ToInt32(TagNamesAndValues.GetLength(0) / 2);
         Int32 tagIndex = 0;
         Int32 itemIndex = 0;
         ArrayList tagsToAdd = new ArrayList();

         for (tagIndex = 0; tagIndex < numberOfTags; tagIndex++)
         {
                TagName = TagNamesAndValues[itemIndex].ToString();
                itemIndex += 1;
                if (TagNamesAndValues[itemIndex] == null)
                {
                       tagsToAdd.Add(TagName + " = Bad Quality");
                }
                else
                {
                       try
                       {
                              ValueString = TagNamesAndValues[itemIndex].ToString();
                              tagsToAdd.Add(TagName + " = " + ValueString);
                       }
                       catch (Exception ex)
                       {
                              tagsToAdd.Add(TagName + " = Value Cannot Be Converted To String");
                       }
                }
                itemIndex += 1;
         }
          ComboBoxGetTagValuesByGroup.Items.AddRange((string[])tagsToAdd.ToArray(typeof(string)));
         if (ComboBoxGetTagValuesByGroup.Items.Count > 0)
         {
                ComboBoxGetTagValuesByGroup.SelectedIndex = 0;
         }
   }
   else
   {
         MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
   }
}

GetTagNames

The GetTagNames Function returns a list of Tags in the specified ReferenceGroup path.

Returns Empty String if service is not reachable.

Returns a String Array of Tags in the ReferenceGroup.

ReferenceGroup is a string of the Group path to retrieve the Tags 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 ButtonGetTagNames_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetTagNames.Click
    Cursor.Current = Cursors.WaitCursor
    ComboBoxGetTagNames.Items.Clear()
    Dim TagNames() As String
    Dim TagName As String
    Dim ErrorString As String = ""
    TagNames = ModuleNetworkNode.OPCSystemsComponent1.GetTagNames(TextBoxReferenceGroup.Text, TextBoxNetworkNode.Text, ErrorString)
    If ErrorString = "Success" Then
        For Each TagName In TagNames
            ComboBoxGetTagNames.Items.Add(TagName)
        Next
        If ComboBoxGetTagNames.Items.Count > 0 Then
            ComboBoxGetTagNames.SelectedIndex = 0
        End If
    Else
        MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
    End If
End Sub

C#

private void ButtonGetTagNames_Click(object sender, System.EventArgs e) {
     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
     ComboBoxGetTagNames.Items.Clear();
     string[] TagNames = null;
     string ErrorString = "";
     TagNames = ModuleNetworkNode.OPCSystemsComponent1.GetTagNames(TextBoxReferenceGroup.Text, TextBoxNetworkNode.Text, ref ErrorString);
     if (ErrorString == "Success")
     {
           foreach (string TagName in TagNames)
           {
                  ComboBoxGetTagNames.Items.Add(TagName);
           }
           if (ComboBoxGetTagNames.Items.Count > 0)
           {
                  ComboBoxGetTagNames.SelectedIndex = 0;
           }
     }
     else
     {
           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
}

GetAllTagNames

The GetAllTagNames Function returns a list of all of the Tags from the specified ReferenceGroup path and all tags in all sub groups within the Reference Group.

Returns Empty String Array if service is not reachable.

Returns a String Array of Tags in the ReferenceGroup and all tags within the sub groups of the Reference Group.

ReferenceGroup is a string of the Group path to retrieve the Tags from.

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 ButtonGetAllTagNames_Click(sender As System.Object, e As System.EventArgs) Handles ButtonGetAllTagNames.Click
    ComboBoxGetTagNames.Items.Clear()
    Dim TagNames() As String
    Dim TagName As String
    Dim ErrorString As String = ""
    TagNames = ModuleNetworkNode.OPCSystemsComponent1.GetAllTagNames(TextBoxReferenceGroup.Text, TextBoxNetworkNode.Text, ErrorString)
    If ErrorString = "Success" Then
        For Each TagName In TagNames
            ComboBoxGetTagNames.Items.Add(TagName)
        Next
        If ComboBoxGetTagNames.Items.Count > 0 Then
            ComboBoxGetTagNames.SelectedIndex = 0
        End If
    Else
        MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
    End If
End Sub

Private Sub ComboBoxGetTagNames_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBoxGetTagNames.SelectedIndexChanged
    TextBoxTag.Text = ComboBoxGetTagNames.SelectedItem
End Sub  

C#

private void ButtonGetAllTagNames_Click(object sender, System.EventArgs e) {
     ComboBoxGetTagNames.Items.Clear();
     string[] TagNames = null;
     string ErrorString = "";
     TagNames = ModuleNetworkNode.OPCSystemsComponent1.GetAllTagNames(TextBoxReferenceGroup.Text, TextBoxNetworkNode.Text, ref ErrorString);
     if (ErrorString == "Success")
     {
           foreach (string TagName in TagNames)
           {
                  ComboBoxGetTagNames.Items.Add(TagName);
           }
           if (ComboBoxGetTagNames.Items.Count > 0)
           {
                  ComboBoxGetTagNames.SelectedIndex = 0;
           }
     }
     else
     {
           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
}

private void ComboBoxGetTagNames_SelectedIndexChanged(object sender, System.EventArgs e) {
     TextBoxTag.Text = ComboBoxGetTagNames.SelectedItem.ToString();
}

AddTag

The AddTag Function adds a Tag to the existing Tag configuration.

*** Note to add multiple Tags with mutliple parameters use the TagCSVImport method as demonstrated under Configure-Tags

Returns -1 if service is not reachable.

Returns 1 if successful.

Returns 0 if the Tag already exists or adding the Tag failed.

Tag is the name of the Tag to add.

ReferenceGroup is a string of the Group path to add the Tag 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 is in error.

VB

Private Sub ButtonAddTag_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonAddTag.Click
    Cursor.Current = Cursors.WaitCursor
    Dim ResultInt32 As Int32
    Dim ErrorString As String = ""
    ResultInt32 = ModuleNetworkNode.OPCSystemsComponent1.AddTag(TextBoxTag.Text, TextBoxReferenceGroup.Text, TextBoxNetworkNode.Text, ErrorString)
    If ResultInt32 = -1 Then
        LabelAddTagResult.Text = "OAS Service not reached."
    ElseIf ResultInt32 = 1 Then
        LabelAddTagResult.Text = "Tag successfully added."
    Else
        LabelAddTagResult.Text = ErrorString
    End If
End Sub

C#

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

RemoveTag

The RemoveTag Function removes a Tag to the existing Tag configuration.

Returns -1 if service is not reachable.

Returns 1 if successful.

Returns 0 if the Tag does not exist..

Tag is the name of the Tag to remove.

ReferenceGroup is a string of the Group path to remove the Tag 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 is in error.

VB

Private Sub ButtonRemoveTag_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonRemoveTag.Click
    Cursor.Current = Cursors.WaitCursor
    Dim ResultInt32 As Int32
    Dim ErrorString As String = ""
    ResultInt32 = ModuleNetworkNode.OPCSystemsComponent1.RemoveTag(TextBoxTag.Text, TextBoxReferenceGroup.Text, TextBoxNetworkNode.Text, ErrorString)
    If ResultInt32 = -1 Then
        LabelRemoveTagResult.Text = "OAS Service not reached."
    ElseIf ResultInt32 = 1 Then
        LabelRemoveTagResult.Text = "Tag successfully removed."
    Else
        LabelRemoveTagResult.Text = ErrorString
    End If
End Sub

C#

   

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

DeleteAllTags

The DeleteAllTags Function removes all Tags from the existing Tag configuration.

Returns -1 if service is not reachable.

Returns 0 if error occurs.

Returns 1 if successful.

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 ButtonDeleteAllTags_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonDeleteAllTags.Click
    Cursor.Current = Cursors.WaitCursor
    Dim ResultInt32 As Int32
    Dim ErrorString As String = ""
    ResultInt32 = ModuleNetworkNode.OPCSystemsComponent1.DeleteAllTags(TextBoxNetworkNode.Text, ErrorString)
    If ResultInt32 = 1 Then
        LabelDeleteAllTagsResult.Text = "All Tags successfully removed."
    Else
        LabelDeleteAllTagsResult.Text = ErrorString
    End If
End Sub

C#

private void ButtonDeleteAllTags_Click(object sender, System.EventArgs e) {
     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
     Int32 ResultInt32 = 0;
     string ErrorString = "";
     ResultInt32 = ModuleNetworkNode.OPCSystemsComponent1.DeleteAllTags(TextBoxNetworkNode.Text, ref ErrorString);
     if (ResultInt32 == 1)
     {
           LabelDeleteAllTagsResult.Text = "All Tags successfully removed.";
     }
     else
     {
           LabelDeleteAllTagsResult.Text = ErrorString;
     }
}

GetTag_Parameter_Strings

The GetTag_Parameter_Strings Function returns an array of Strings containing all Parameter Types available for each Tag.

Returns Empty String Array if service is not reachable.

Returns a String Array of Parameter Types for all Tags.

NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.

VB

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

C#

private void ButtonGetTag_Parameter_Strings_Click(object sender, System.EventArgs e) {
     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
     ComboBoxGetTag_Parameter_Strings.Items.Clear();
     string[] Parameters = null;
     Parameters = ModuleNetworkNode.OPCSystemsComponent1.GetTag_Parameter_Strings(TextBoxNetworkNode.Text);
     foreach (string Parameter in Parameters)
     {
           ComboBoxGetTag_Parameter_Strings.Items.Add(Parameter);
     }
     if (ComboBoxGetTag_Parameter_Strings.Items.Count > 0)
     {
           ComboBoxGetTag_Parameter_Strings.SelectedIndex = 0;
     }

}

private void ComboBoxGetTag_Parameter_Strings_SelectedIndexChanged(object sender, System.EventArgs e) {
     TextBoxParameter.Text = ComboBoxGetTag_Parameter_Strings.SelectedItem.ToString();
}

GetParameter_Property_Strings

The GetParameter_Property_Strings Function returns an array of Strings containing all property types available for each Parameter.

Returns Empty String Array if service is not reachable.

Returns a String Array of property types for all Parameters.

NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.

VB

Private Sub ButtonGetParameter_Property_Strings_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetParameter_Property_Strings.Click
    Cursor.Current = Cursors.WaitCursor
    ComboBoxGetParameter_Property_Strings.Items.Clear()
    Dim Properties() As String
    Dim PropertyType As String
    Properties = ModuleNetworkNode.OPCSystemsComponent1.GetParameter_Property_Strings(TextBoxNetworkNode.Text)
    For Each PropertyType In Properties
        ComboBoxGetParameter_Property_Strings.Items.Add(PropertyType)
    Next
    If ComboBoxGetParameter_Property_Strings.Items.Count > 1 Then
        ComboBoxGetParameter_Property_Strings.SelectedIndex = 2
    End If
End Sub
 
Private Sub ComboBoxGetParameter_Property_Strings_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBoxGetParameter_Property_Strings.SelectedIndexChanged
    TextBoxProperty.Text = ComboBoxGetParameter_Property_Strings.SelectedItem
End Sub

C#

private void ButtonGetParameter_Property_Strings_Click(object sender, System.EventArgs e) {
     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
     ComboBoxGetParameter_Property_Strings.Items.Clear();
     string[] Properties = null;
     Properties = ModuleNetworkNode.OPCSystemsComponent1.GetParameter_Property_Strings(TextBoxNetworkNode.Text);
     foreach (string PropertyType in Properties)
     {
           ComboBoxGetParameter_Property_Strings.Items.Add(PropertyType);
     }
     if (ComboBoxGetParameter_Property_Strings.Items.Count > 1)
     {
           ComboBoxGetParameter_Property_Strings.SelectedIndex = 2;
     }

}

private void ComboBoxGetParameter_Property_Strings_SelectedIndexChanged(object sender, System.EventArgs e) {
     TextBoxProperty.Text = ComboBoxGetParameter_Property_Strings.SelectedItem.ToString();
}

GetTag_Parameter_Value

The GetTag_Parameter_Value Function returns an object value for the Tag.Parameter.Property specified.

Returns nothing if service is not reachable.

Parameter is a String of the Parameter Type desired of the Tag.

PropertyType is a String of the Property Type desired of the Parameter.

TagName is a String of the Tag desired.

ReferenceGroup is a String of the Group(s) where the Tag is to be contained.

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 ButtonGetTag_Parameter_Value_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetTag_Parameter_Value.Click
    Cursor.Current = Cursors.WaitCursor
    Dim ResultObject As Object
    Dim ErrorString As String = ""
    ResultObject = ModuleNetworkNode.OPCSystemsComponent1.GetTag_Parameter_Value(TextBoxParameter.Text, TextBoxProperty.Text, TextBoxTag.Text, TextBoxReferenceGroup.Text, TextBoxNetworkNode.Text, ErrorString)
    If ErrorString = "Success" Then
        If ResultObject Is Nothing Then
            LabelGetTag_Parameter_ValueResult.Text = "OAS Service not reached or Tag, Parameter, or Property not found."
            TextBoxValueToSet.Text = ""
        Else
            Try
                LabelGetTag_Parameter_ValueResult.Text = ResultObject
                TextBoxValueToSet.Text = ResultObject
            Catch ex As Exception
                LabelGetTag_Parameter_ValueResult.Text = "Error converting value to string."
                TextBoxValueToSet.Text = ""
            End Try
        End If
    Else
        LabelGetTag_Parameter_ValueResult.Text = ErrorString
        TextBoxValueToSet.Text = ""
    End If
End Sub

C#

  

private void ButtonGetTag_Parameter_Value_Click(object sender, System.EventArgs e) {
     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
     object ResultObject = null;
     string ErrorString = null;
     ResultObject = ModuleNetworkNode.OPCSystemsComponent1.GetTag_Parameter_Value(TextBoxParameter.Text, TextBoxProperty.Text, TextBoxTag.Text, TextBoxReferenceGroup.Text, TextBoxNetworkNode.Text, ErrorString);
     if (ErrorString == "Success") {
        if (ResultObject == null)
        {
            LabelGetTag_Parameter_ValueResult.Text = "OAS Service not reached or Tag, Parameter, or Property not found.";
            TextBoxValueToSet.Text = "";
        }
        else
        {
            try
             {
                LabelGetTag_Parameter_ValueResult.Text = ResultObject;
                TextBoxValueToSet.Text = ResultObject;
             }
             catch (Exception ex)
             {
                LabelGetTag_Parameter_ValueResult.Text = "Error converting value to string.";
                TextBoxValueToSet.Text = "";
             }

        }
     }
     else 
     {
        LabelGetTag_Parameter_ValueResult.Text = ErrorString;
        TextBoxValueToSet.Text = "";
     }
}

GetTag_Parameter_Values

The GetTag_Parameter_Values Function returns an array of object values for the Tag.Parameter specified.

The order of the array corresponds with the GetParameter_Property_Strings Function order.

Returns empty array if service is not reachable.

Parameter is a String of the Parameter Type desired of the Tag.

TagName is a String of the Tag desired.

ReferenceGroup is a String of the Group(s) where the Tag is to be contained.

NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.

VB

Private Sub ButtonGetTag_Parameter_Values_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGetTag_Parameter_Values.Click
    Cursor.Current = Cursors.WaitCursor
    ComboBoxGetTag_Parameter_Values.Items.Clear()
    Dim ResultObjects() As Object
    Dim ResultObject As Object
    Dim ResultString As String
    ResultObjects = ModuleNetworkNode.OPCSystemsComponent1.GetTag_Parameter_Values(TextBoxParameter.Text, TextBoxTag.Text, TextBoxReferenceGroup.Text, TextBoxNetworkNode.Text)
    For Each ResultObject In ResultObjects
        Try
            If ResultObject Is Nothing Then
                ResultString = ""
            Else
                ResultString = ResultObject
            End If
            ComboBoxGetTag_Parameter_Values.Items.Add(ResultString)
        Catch ex As Exception
            ComboBoxGetTag_Parameter_Values.Items.Add("Error Converting Object")
        End Try
    Next
    If ComboBoxGetTag_Parameter_Values.Items.Count > 0 Then
        ComboBoxGetTag_Parameter_Values.SelectedIndex = 0
    End If
End Sub

C#

  

private void ButtonGetTag_Parameter_Values_Click(object sender, System.EventArgs e) {
     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
     ComboBoxGetTag_Parameter_Values.Items.Clear();
     object[] ResultObjects = null;
     string ResultString = null;
     ResultObjects = ModuleNetworkNode.OPCSystemsComponent1.GetTag_Parameter_Values(TextBoxParameter.Text, TextBoxTag.Text, TextBoxReferenceGroup.Text, TextBoxNetworkNode.Text);
     foreach (object ResultObject in ResultObjects)
     {
           try
           {
                  if (ResultObject == null)
                  {
                         ResultString = "";
                  }
                  else
                  {
                         ResultString = ResultObject.ToString();
                  }
                  ComboBoxGetTag_Parameter_Values.Items.Add(ResultString);
           }
           catch (Exception ex)
           {
                  ComboBoxGetTag_Parameter_Values.Items.Add("Error Converting Object");
           }
     }
     if (ComboBoxGetTag_Parameter_Values.Items.Count > 0)
     {
           ComboBoxGetTag_Parameter_Values.SelectedIndex = 0;
     }
}

SetTag_Parameter_Value

The SetTag_Parameter_Value Function sets an object value for the Tag.Parameter.Property specified.

Returns -1 if service is not reachable.

Returns 1 if the function was successful.

Parameter is a String of the Parameter Type desired of the Tag.

PropertyType is a String of the Property Type desired of the Parameter.

Value is the desired value to set.

TagName is a String of the Tag desired.

ReferenceGroup is a String of the Group(s) where the Tag is to be contained.

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 ButtonSetTag_Parameter_Value_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonSetTag_Parameter_Value.Click
    Cursor.Current = Cursors.WaitCursor
    Dim ResultInt32 As Int32
    Dim ErrorString As String = ""
    ResultInt32 = ModuleNetworkNode.OPCSystemsComponent1.SetTag_Parameter_Value(TextBoxParameter.Text, TextBoxProperty.Text, TextBoxValueToSet.Text, TextBoxTag.Text, TextBoxReferenceGroup.Text, TextBoxNetworkNode.Text, ErrorString)
    If ResultInt32 = -1 Then
        LabelSetTag_Parameter_ValueResult.Text = "OAS Service not reached."
    ElseIf ResultInt32 = 1 Then
        LabelSetTag_Parameter_ValueResult.Text = "Parameter Property Successfully Updated."
    Else
        LabelSetTag_Parameter_ValueResult.Text = ErrorString
    End If
End Sub

C#

  

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

SaveTagConfiguration

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

C#

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

LoadTagConfiguration

The LoadTagConfiguration Subroutine saves the current Tag 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 ButtonLoadTagConfiguration_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonLoadTagConfiguration.Click
    Cursor.Current = Cursors.WaitCursor
    Dim ErrorString As String = ""
    If ModuleNetworkNode.OPCSystemsComponent1.InRuntime(TextBoxNetworkNode.Text) = 1 Then
        MessageBox.Show("Cannot Load Tag configuraitons while in Runtime Mode", "Cannot Load Tags", MessageBoxButtons.OK, MessageBoxIcon.Information)
        Exit Sub
    End If
    ModuleNetworkNode.OPCSystemsComponent1.LoadTagConfiguration(TextBoxFilePath.Text, TextBoxNetworkNode.Text, ErrorString)
    If ErrorString <> "Success" Then
        MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
    End If
End Sub

C#

  

private void ButtonLoadTagConfiguration_Click(object sender, System.EventArgs e) {
     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
     string ErrorString = "";
     if (ModuleNetworkNode.OPCSystemsComponent1.InRuntime(TextBoxNetworkNode.Text) == 1)
     {
           MessageBox.Show("Cannot Load Tag configuraitons while in Runtime Mode", "Cannot Load Tags", MessageBoxButtons.OK, MessageBoxIcon.Information);
           return;
     }
     ModuleNetworkNode.OPCSystemsComponent1.LoadTagConfiguration(TextBoxFilePath.Text, TextBoxNetworkNode.Text, ref ErrorString);
     if (ErrorString != "Success")
     {
           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
}

CheckTagAccessRead

The CheckTagAccessRead Function returns a list of Tags that have read access from the UserName and Password specified.

This method requires Security access for Get Secuirty Parameters from the user and password specified in the LogIn method of the component.

Returns Empty String Array if service is not reachable.

Returns a String Array of Tags that are allowed for Read Access.

UserName is the user to verify with the Tags.

Password is the password of the user to verify with the Tags.

Tags is a list of tags to check in the service, do not include the remote network path in the tag names.

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 ButtonCheckTagAccessRead_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonCheckTagAccessRead.Click
    Cursor.Current = Cursors.WaitCursor
    ComboBoxCheckTagAccessRead.Items.Clear()
    Dim TagNames() As String
    Dim TagName As String
    Dim ErrorString As String = ""
    Dim TagsToCheck(2) As String
    TagsToCheck(0) = "Ramp.Value"
    TagsToCheck(1) = "Sine.Value"
    TagsToCheck(2) = "Random.Value"
    TagNames = ModuleNetworkNode.OPCSystemsComponent1.CheckTagAccessRead(TextBoxUserNameToCheck.Text, TextBoxPasswordToCheck.Text, TagsToCheck, TextBoxNetworkNode.Text, ErrorString)
    If ErrorString = "Success" Then
        For Each TagName In TagNames
            ComboBoxCheckTagAccessRead.Items.Add(TagName)
        Next
        If ComboBoxCheckTagAccessRead.Items.Count > 0 Then
            ComboBoxCheckTagAccessRead.SelectedIndex = 0
        End If
    Else
        MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
    End If
End Sub

C#

private void ButtonCheckTagAccessRead_Click(object sender, System.EventArgs e) {
     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
     ComboBoxCheckTagAccessRead.Items.Clear();
     string[] TagNames = null;
     string ErrorString = "";
     string[] TagsToCheck = new string[3];
     TagsToCheck[0] = "Ramp.Value";
     TagsToCheck[1] = "Sine.Value";
     TagsToCheck[2] = "Random.Value";
     TagNames = ModuleNetworkNode.OPCSystemsComponent1.CheckTagAccessRead(TextBoxUserNameToCheck.Text, TextBoxPasswordToCheck.Text, TagsToCheck, TextBoxNetworkNode.Text, ref ErrorString);
     if (ErrorString == "Success")
     {
           foreach (string TagName in TagNames)
           {
                  ComboBoxCheckTagAccessRead.Items.Add(TagName);
           }
           if (ComboBoxCheckTagAccessRead.Items.Count > 0)
           {
                  ComboBoxCheckTagAccessRead.SelectedIndex = 0;
           }
     }
     else
     {
           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
}

CheckTagAccessWrite

The CheckTagAccessWrite Function returns a list of Tags that have write access from the UserName and Password specified.

This method requires Security access for Get Secuirty Parameters from the user and password specified in the LogIn method of the component.

Returns Empty String Array if service is not reachable.

Returns a String Array of Tags that are allowed for Write Access.

UserName is the user to verify with the Tags.

Password is the password of the user to verify with the Tags.

Tags is a list of tags to check in the service, do not include the remote network path in the tag names.

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 ButtonCheckTagAccessWrite_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonCheckTagAccessWrite.Click
    Cursor.Current = Cursors.WaitCursor
    ComboBoxCheckTagAccessWrite.Items.Clear()
    Dim TagNames() As String
    Dim TagName As String
    Dim ErrorString As String = ""
    Dim TagsToCheck(2) As String
    TagsToCheck(0) = "Write OPC Output.Value"
    TagsToCheck(1) = "Write String.Value"
    TagsToCheck(2) = "Pump.Value"
    TagNames = ModuleNetworkNode.OPCSystemsComponent1.CheckTagAccessWrite(TextBoxUserNameToCheck.Text, TextBoxPasswordToCheck.Text, TagsToCheck, TextBoxNetworkNode.Text, ErrorString)
    If ErrorString = "Success" Then
        For Each TagName In TagNames
            ComboBoxCheckTagAccessWrite.Items.Add(TagName)
        Next
        If ComboBoxCheckTagAccessWrite.Items.Count > 0 Then
            ComboBoxCheckTagAccessWrite.SelectedIndex = 0
        End If
    Else
        MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
    End If
End Sub

C#

  

private void ButtonCheckTagAccessWrite_Click(object sender, System.EventArgs e) {
     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
     ComboBoxCheckTagAccessWrite.Items.Clear();
     string[] TagNames = null;
     string ErrorString = "";
     string[] TagsToCheck = new string[3];
     TagsToCheck[0] = "Write OPC Output.Value";
     TagsToCheck[1] = "Write String.Value";
     TagsToCheck[2] = "Pump.Value";
     TagNames = ModuleNetworkNode.OPCSystemsComponent1.CheckTagAccessWrite(TextBoxUserNameToCheck.Text, TextBoxPasswordToCheck.Text, TagsToCheck, TextBoxNetworkNode.Text, ref ErrorString);
     if (ErrorString == "Success")
     {
           foreach (string TagName in TagNames)
           {
                  ComboBoxCheckTagAccessWrite.Items.Add(TagName);
           }
           if (ComboBoxCheckTagAccessWrite.Items.Count > 0)
           {
                  ComboBoxCheckTagAccessWrite.SelectedIndex = 0;
           }
     }
     else
     {
           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
}

System Errors

GetSystemErrors

  • The GetSystemErrors Function returns a list of the System Errors from the System Type, Group, and Category specified.
  • The CurrentlyInError returns a Boolean error with a value of True if the System Type, Group, or Category is in error and False if it is not, This list should be the same length as the number of System Error names that are returned.
  • To return a list of all System Types that are in error or have had an error specify System Type as blank.
  • To return a list of all Groups that are in error or have had an error specify the System Type to obtain and Group as blank.
  • To return a list of all Categories that are in error or have had an error specify the System Type and Group to obtain and Category as blank.
  • To return a history list of all previous system error messages specify the System Type, Group, and Category to obtain the messages from.
  • 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 ButtonGetSystemErrors_Click(sender As System.Object, e As System.EventArgs) Handles ButtonGetSystemErrors.Click
        Cursor.Current = Cursors.WaitCursor
        Dim localGetSystemTypes As Boolean
        Dim localGetGroups As Boolean
        Dim localGetCategories As Boolean
        Dim localSystemType As String = ""
        Dim localGroup As String = ""
        Dim localCategory As String = ""
 
        ComboBoxPreviousMessages.Items.Clear()
 
        If ComboBoxSystemType.SelectedItem = "" Then
            localGetSystemTypes = True
            ComboBoxSystemType.Items.Clear()
            ComboBoxGroup.Items.Clear()
            ComboBoxCategory.Items.Clear()
        ElseIf ComboBoxGroup.SelectedItem = "" Then
            localSystemType = ComboBoxSystemType.SelectedItem.Remove(0, 8)
            localGetGroups = True
            ComboBoxGroup.Items.Clear()
            ComboBoxCategory.Items.Clear()
        ElseIf ComboBoxCategory.SelectedItem = "" Then
            localSystemType = ComboBoxSystemType.SelectedItem.Remove(0, 8)
            localGroup = ComboBoxGroup.SelectedItem.Remove(0, 8)
            localGetCategories = True
            ComboBoxCategory.Items.Clear()
        Else
            localSystemType = ComboBoxSystemType.SelectedItem.Remove(0, 8)
            localGroup = ComboBoxGroup.SelectedItem.Remove(0, 8)
            localCategory = ComboBoxCategory.SelectedItem.Remove(0, 8)
        End If
        Dim SystemErrors() As String
        Dim CurrentlyInError(-1) As Boolean
        Dim ErrorString As String = ""
 
 
        SystemErrors = ModuleNetworkNode.OPCSystemsComponent1.GetSystemErrors(localSystemType, localGroup, localCategory, CurrentlyInError, TextBoxNetworkNode.Text, ErrorString)
        If ErrorString = "Success" Then
            Dim localIndex As Int32
            For localIndex = 0 To SystemErrors.GetLength(0) - 1
                If localGetSystemTypes Then
                    If CurrentlyInError(localIndex) Then
                        ComboBoxSystemType.Items.Add("Error - " + SystemErrors(localIndex))
                    Else
                        ComboBoxSystemType.Items.Add("OK -    " + SystemErrors(localIndex))
                    End If
                    If localIndex = 0 Then
                        ComboBoxSystemType.SelectedIndex = 0
                    End If
                ElseIf localGetGroups Then
                    If CurrentlyInError(localIndex) Then
                        ComboBoxGroup.Items.Add("Error - " + SystemErrors(localIndex))
                    Else
                        ComboBoxGroup.Items.Add("OK -    " + SystemErrors(localIndex))
                    End If
                    If localIndex = 0 Then
                        ComboBoxGroup.SelectedIndex = 0
                    End If
                ElseIf localGetCategories Then
                    If CurrentlyInError(localIndex) Then
                        ComboBoxCategory.Items.Add("Error - " + SystemErrors(localIndex))
                    Else
                        ComboBoxCategory.Items.Add("OK -    " + SystemErrors(localIndex))
                    End If
                    If localIndex = 0 Then
                        ComboBoxCategory.SelectedIndex = 0
                    End If
                Else
                    ComboBoxPreviousMessages.Items.Add(SystemErrors(localIndex))
                    If localIndex = 0 Then
                        ComboBoxPreviousMessages.SelectedIndex = 0
                    End If
                End If
            Next
        Else
            MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If
 
    End Sub

C#

	        private void ButtonGetSystemErrors_Click(object sender, System.EventArgs e)
              {
                     System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
                     bool localGetSystemTypes = false;
                     bool localGetGroups = false;
                     bool localGetCategories = false;
                     string localSystemType = "";
                     string localGroup = "";
                     string localCategory = "";
 
                     ComboBoxPreviousMessages.Items.Clear();
 
                     if (string.IsNullOrEmpty(ComboBoxSystemType.SelectedItem.ToString()))
                     {
                           localGetSystemTypes = true;
                           ComboBoxSystemType.Items.Clear();
                           ComboBoxGroup.Items.Clear();
                           ComboBoxCategory.Items.Clear();
                     }
                     else if (string.IsNullOrEmpty(ComboBoxGroup.SelectedItem.ToString()))
                     {
                localSystemType = ComboBoxSystemType.SelectedItem.ToString().Remove(0, 8);
                            localGetGroups = true;
                           ComboBoxGroup.Items.Clear();
                           ComboBoxCategory.Items.Clear();
                     }
                     else if (string.IsNullOrEmpty(ComboBoxCategory.SelectedItem.ToString()))
                     {
                localSystemType = ComboBoxSystemType.SelectedItem.ToString().Remove(0, 8);
                localGroup = ComboBoxGroup.SelectedItem.ToString().Remove(0, 8);
                           localGetCategories = true;
                           ComboBoxCategory.Items.Clear();
                     }
                     else
                     {
                localSystemType = ComboBoxSystemType.SelectedItem.ToString().Remove(0, 8);
                localGroup = ComboBoxGroup.SelectedItem.ToString().Remove(0, 8);
                localCategory = ComboBoxCategory.SelectedItem.ToString().Remove(0, 8);
                     }
                     string[] SystemErrors = null;
                     bool[] CurrentlyInError = new bool[0];
                     string ErrorString = "";
 
 
                     SystemErrors = ModuleNetworkNode.OPCSystemsComponent1.GetSystemErrors(localSystemType, localGroup, localCategory, ref CurrentlyInError, TextBoxNetworkNode.Text, ref ErrorString);
                     if (ErrorString == "Success")
                     {
                           Int32 localIndex = 0;
                           for (localIndex = 0; localIndex < SystemErrors.GetLength(0); localIndex++)
                           {
                                  if (localGetSystemTypes)
                                  {
                                         if (CurrentlyInError[localIndex])
                                         {
                                                ComboBoxSystemType.Items.Add("Error - " + SystemErrors[localIndex]);
                                         }
                                         else
                                         {
                                                ComboBoxSystemType.Items.Add("OK -    " + SystemErrors[localIndex]);
                                         }
                                         if (localIndex == 0)
                                         {
                                                ComboBoxSystemType.SelectedIndex = 0;
                                         }
                                  }
                                  else if (localGetGroups)
                                  {
                                         if (CurrentlyInError[localIndex])
                                         {
                                                ComboBoxGroup.Items.Add("Error - " + SystemErrors[localIndex]);
                                         }
                                         else
                                         {
                                                ComboBoxGroup.Items.Add("OK -    " + SystemErrors[localIndex]);
                                         }
                                         if (localIndex == 0)
                                         {
                                                ComboBoxGroup.SelectedIndex = 0;
                                         }
                                  }
                                  else if (localGetCategories)
                                  {
                                         if (CurrentlyInError[localIndex])
                                         {
                                                ComboBoxCategory.Items.Add("Error - " + SystemErrors[localIndex]);
                                         }
                                         else
                                         {
                                                ComboBoxCategory.Items.Add("OK -    " + SystemErrors[localIndex]);
                                         }
                                         if (localIndex == 0)
                                         {
                                                ComboBoxCategory.SelectedIndex = 0;
                                         }
                                  }
                                  else
                                  {
                                         ComboBoxPreviousMessages.Items.Add(SystemErrors[localIndex]);
                                         if (localIndex == 0)
                                         {
                                                ComboBoxPreviousMessages.SelectedIndex = 0;
                                         }
                                  }
                           }
                     }
                     else
                     {
                           MessageBox.Show(ErrorString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                     }
 
              }
 
              private void ButtonReset_Click(object sender, System.EventArgs e)
              {
                     ComboBoxSystemType.Items.Clear();
                     ComboBoxGroup.Items.Clear();
                     ComboBoxCategory.Items.Clear();
                     ComboBoxPreviousMessages.Items.Clear();
              }	

 

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

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