Skip to main content

Load The Relay Setting File In Omicron Import Filter

Welcome to the fourth part of the Omicron Import Filter tutorial series. In this tutorial, I will show you how to open the relay setting file that generated from the relay software and manipulate the relay setting data inside the Import Filter. Every relay setting that generated by the different relay software are unique that's why data manipulation is also different. In this tutorial, we will focus on MiCOM P12x series, we will going to use the Schneider Electric software called Easergy Studio. In Easergy Studio, we're going to export the relay setting into TXT format because it's easy to manipulate the data. Make sure you have downloaded the Easergy Studio software.


Download the sample relay setting file in this link (Sample Setting File). Extract the file then open it in the Easergy Studio.


Once the setting file is loaded, export the setting file and select the Export to Text file format and make sure the include hidden settings is checked. Click OK button and save it to a known directory. 


Sample.P123 V10-V14.000.txt file will be generated in the selected directory. This file is contains relay setting information and we're going to load this in the Import Filter that we created.


Open the Visual Studio project MyImportFilter that we've created in the previous tutorial (Creating A User Interface In Omicron Test Universe Import Filter). Once the project is loaded, open the FormSample.vb then double click the Browse button to open the button's code. Copy the line of code below then paste it to the main declaration of the form.

Private TextFileContent As String

Copy the codes below then replace the ButtonBrowse_Click method.

Private Sub ButtonBrowse_Click(sender As Object, e As EventArgs) Handles ButtonBrowse.Click
Using dlgOpen As New Windows.Forms.OpenFileDialog
With dlgOpen
.Title = "Open Relay Setting File"
.Filter = "Text files (*.txt)|*.txt"
.Multiselect = False
If .ShowDialog = Windows.Forms.DialogResult.OK Then
If System.IO.File.Exists(.FileName) Then
Using TextStreamReader As System.IO.StreamReader = New System.IO.StreamReader(.FileName)
TextFileContent = TextStreamReader.ReadToEnd()
TextStreamReader.Close()
End Using
LoadTheTextFileContent()
End If
End If
End With
End Using
End Sub

That will give us an error because the LoadTheTextFileContent() was not declared. Copy the code below and paste it next to ButtonBrowse_Click method to get rid the error.

Private Sub LoadTheTextFileContent()
Dim TextFileLines() As String = TextFileContent.Trim.Split(vbNewLine)
Dim Table As New DataTable
Table.Columns.Add("Parameter", GetType(String))
For Each Line As String In TextFileLines.ToList
Table.Rows.Add(Line)
Next
DataGridViewParameters.DataSource = Table
DataGridViewParameters.Columns("Parameter").AutoSizeMode = Windows.Forms.DataGridViewAutoSizeColumnMode.AllCells
End Sub

Now, compile or build the project then install the output file in the Import Filter installation directory. Check this link on how to install the Import Filter (Install And Use Newly Created Import Filter In Omicron Test Universe) then execute the Import Filter using the OCC document that can be found in this link (Omicron Control Center - Using Import Filter). Open the file that we've exported before (Sample.P123 V10-V14.000.txt) and content will be populated in the datagridview.


We have successfully open the exported setting file in our Import Filter but we're not finished yet. We need to process those text lines, because each line contains seven parameters. So, we need to parse them before importing them in the Xrio converter. I will show you that in the next tutorial. See you next time


Comments

Popular posts from this blog

Install And Use Newly Created Import Filter In Omicron Test Universe

Welcome to my page. This is the second part of the Omicron Import Filter tutorial series. In this tutorial, I will show you how install  and use the Import Filter that we've created in the previous tutorial in this series using two methods.  The first one via Test Object and the second one is via script. Open the Visual Studio project called MyImportFilter that we created in the first part of tutorial which can be found here ( Omicron Import Filter - Create New Filter ). Once the project opened, right click on the project at the solution explorer the click Open Folder in File Explorer. The project file directory will open. Open the  bin\Debug folder and you will find the two files in that folder ( MyImportFilter.dll and  SampleFilter.xriofilter ). Create new folder in that directory and set the folder name to  MyImportFilter . Move the  MyImportFilter.dll file to the  MyImportFilter folder then, copy the  MyImportFilter folder and the  Sa...

Micom SE Studio1 Import Filter - Creating Class Module For Setting File Process

Welcome back to  Micom SE Studio1 Import Filter tutorial series. In the previous tutorial, I've shown you how to create user interface. Click this link  Micom SE Studio1 Import Filter - Creating User Interface (UI) In this series, I will show you how to add class module that responsible for setting file processing. Meaning, the relay has a setting configuration which can be exported in readable file like text file, xml file or csv file & etc. In this tutorial, I'm going to use text file (.txt). Now, add new class in the SEStudio1 folder and name it with SEStudio1Import.vb . All the data from setting file will be process in this class. Copy the code below and paste it it to import section. Imports System.IO Imports OMXRioData Next,  we need to declare some names, functions and procedures to be used in this class module. Copy the codes below and paste them inside the SEStudio1Import.vb . Private _Document As OMXRioData.IAutoXRioDocument 'Storage of XRIO document...

GE SR750/760 Relay Tutorials - Part 6: Creating Phase Overcurrent Protection Element Blocks and Parameters

In this tutorial, will show how to create multiple blocks and parameters, copying blocks and parameters, linking parameters to another parameters using conditional formula like iif() , inserting overcurrent test module in the test document (OCC). Welcome to the sixth part of GE SR750/760 Relay Tutorial series. If you haven't seen the previous tutorials, click the link below: Part 5: Link XRIO Parameters Into RIO Device Function In The Test Object GE SR750/760 Relay Tutorials Open the test document that been created from the previous tutorial ( Part 3 ). When the Omicron Control Center document is open, select the Hardware Configuration then go to Insert tab in the ribbon menu. In the Insert tab, click the Group button to insert a new folder group under the Hardware Configuration. Right click on the new group and select properties. In the properties dialog box, set the title to Phase Current. Select the Phase Current group and go to Insert tab then click Group button. Right click o...