Skip to main content

Creating A User Interface In Omicron Test Universe Import Filter

Welcome to my page. This is the third part of the Omicron Import Filter tutorial series. In this tutorial, I will show you how to create a User Interface (UI) inside the Import Filter. UI will be helpful to see the activities during import like in the image below. Unlike the traditional way, it just open the setting file then wait until the setting files populated in the test object and wait until the confirmation of completion.


Now open the MyImportFilter project in Visual Studio that we've created in the previous tutorial which can be found here (Omicron Import Filter - Create New Filter and Omicron Import Filter - Install And Use Newly Created Import Filter). Check those tutorials if you haven't done creation of the project.


Now add new form by clicking Add Form (Windows Forms) in the Project menu or right clicking in the MyImportFilter project at the solution explorer then selecting Add > Form (Windows Forms). Set the name to FormSample.vb then click Add button.

Once the new form added, set the following properties below
  • Text - My Import Filter Dialog
  • StartPosition - CenterScreen
  • MinimizeBox - False
  • MaximizeBox - False
  • FormBorderStyle - FixedDialog

Add the following controls and arrange them like in the image below
  • Textbox - 1
  • Label - 1
  • Pushbutton - 3
  • DataGridView - 1

Set the the following controls' properties
  • Textbox1, set the Name to TextboxFilename and ReadOnly to True
  • Button1, set the Name to ButtonBrowseFile and Text to &Browse
  • DataGridView1, set the Name to DataGridViewParameters
  • Label1, set the Name to LabelStatusMessage and clear the text content
  • Button2, set the Name to ButtonCancel and Text to &Cancel
  • Button3, set the Name to ButtonOK and Text to &OK
  • FormSample, set the AcceptButton to ButtonOK and CancelButton to ButtonCancel

Open the FormSample code window and copy the codes below and paste it to inside the FormSample class.

Private Document As OMXRioData.IAutoXRioDocument

Public Sub DisplayForm(ByVal pDocument As OMXRioData.IAutoXRioDocument)
Document = pDocument
ShowDialog()
End Sub

Private Sub ButtonOK_Click(sender As Object, e As EventArgs) Handles ButtonOK.Click
DialogResult = Windows.Forms.DialogResult.OK
End Sub

Private Sub ButtonCancel_Click(sender As Object, e As EventArgs) Handles ButtonCancel.Click
DialogResult = Windows.Forms.DialogResult.Cancel
End Sub

Open the SampleFilter class and copy the codes below then replace the ShowParameterDialog procedure.

Public Overrides Function ShowParameterDialog(isImport As Boolean) As Boolean
Dim Result As Boolean = False
Using dlg As New FormSample
With dlg
dlg.DisplayForm(Document)
If .DialogResult = Windows.Forms.DialogResult.OK Then
MsgBox("The import filter was successfully executed.", MsgBoxStyle.OkOnly, "Import Filter")
Result = True
End If
End With
End Using
Return Result
End Function

Now, compile or build the project and install the output class to the XRIO directory. To see how to install and execute the new Import Filter check this link (Omicron Import Filter - Install And Use Newly Created Import Filter) .


We have successfully executed the newly modified Import Filter. In the next tutorial, I will show you how to open, read and parse relay setting file particularly in MiCOM P12x relay. I will show you how to manipulate the relay setting file to import the parameters easily. See you next time.


Comments

Popular posts from this blog

Micom SE Studio1 Import Filter - Creating User Interface (UI)

Welcome to my page and welcome to the continuation of Omicron Import Filter tutorial series. In this tutorial, I will show you how to create the actual import filter fom Micom relays. In this tutorial, we will focus on the Visual Studio program. We're going to modify the codes in our project called MyImportFilter that we've created in the previous tutorial.  Download the project in this link  MyImportFilter - Process Relay Setting Parameters . Extract and open the project. Once the project is loaded, add New Folder inside the project and set the name to SEStudio1. We need this to make organize our project class filter.  SE Studio 1 stands for Schneider Electric Studio 1 which is the software that used in communicating MiCOM relays particularly P12x series. And yes we're going to create a new import filter and user interface form MiCOM P12x series relay. I think this will applied to other MiCOM P series relay. Add a new Form inside the  SEStudio1 folder...

Change Data With Feedback In Omicron Control Center Custom Dialog

Welcome to the fifth and final part of the tutorial series about Omicron Control Center (OCC) Custom Dialog. In this tutorial, I will show you how to get a real-time feedback when data was change. This will be helpful that you will be notified what will be the outcome of the changed data. Check the video below. Now, open the OCC document that we used in the previous tutorial. If you don't have it check this link ( Omicron Control Center Custom Dialog - Creating Custom Dialog With Dropdown Control ) then come back here once you have OCC document. When the document is loaded, open the script view by clicking the Script View button under the View tab then stop the script if its running. Now, find the  SetTheSourceController sub procedure. We're going to modify this codes and use different methods of loading data from the test object and saving back to test object. Point the mouse pointer and click between  Begin Dialog and  End Dialog then click the Edit Dialog button un...

Processing The Relay Setting Parameters In Omicron Import Filter

Welcome to my page and welcome to the fifth part of Omicron Import Filter tutorial series. In this tutorial, I will show you how to process the relay setting parameters that to be import in the Xrio converter. In this tutorial, we will focus on the Visual Studio program. We're going to modify the codes in our project called MyImportFilter that we've created in the previous tutorial.  Download the project in this link  MyImportFilter - Process Relay Setting Parameters . Extract and open the project. Once the project is loaded, add New Folder inside the project and set the name to SEStudio1. We need this to make organize our project class filter.  SE Studio 1 stands for Schneider Electric Studio 1 which is the software that used in communicating MiCOM relays particularly P12x series. And yes we're going to create a new import filter and user interface form MiCOM P12x series relay. I think this will applied to other MiCOM P series relay. Add a new Form inside ...