Skip to main content

Omicron Control Center Custom Dialog - Creating Custom Dialog

This is the series of tutorial for Omicron Control Center (OCC) Custom Dialog. This is the first part of the series. In this tutorial, I will show you on how to make a custom dialog inside the Omicron Control Center (OCC) document using VB script. OCC document is also known as omicron test document, test plan and test routine.


Scripting is the way of document automation. 
The automation of OCC document is very useful to manipulate the OCC document test modules or test object parameters without opening the test object window.

Making of custom dialog is very useful because we can change the target parameters in the test object without opining it. In few lines of codes, we can could get the test object parameter value like substation name or address, relay type, serial number & etc. and display it into a textboxes then change the textbox values and sent it back to the test object.

Create a new test document. 

Download this file "Omicron Control Center Automation - Custom Dialog.xrio" then import this in the test object and click OK so that, you don't have to create the xrio parameters and to make sure you can follow this tutorial.

In the OCC main window, navigate to View tab then click Script View under the document views section to view the script window. There are two view mode in this button, Full View or Side by Side view, just choose which one is your preferred. 

In the script window, stop the script by clicking the Stop Script button at the Script tab under the run script section to allow us to write new codes.

By default, Module1 is already created. We can add additional module by clicking the New Sheet button at Script tab under Script Sheet section. For now, we're going to write the codes in Module1.

Declare constant string BASIC_INFO_PATH and set the value to "CUSTOM.RELAY_INFORMATION.BASIC". This value come from the block ID in the test object from CUSTOM block node to Basic node and joined them with dot (.). This is called path ID.

 1
2
3
4
5
6
7
8
9
10
' ************************************************************
' This is module *Module1 .
' Automatically generated uses comments are placed here.
' Don't edit these lines.
' {BEGINUSES}
'#Uses "*Module1"
' {ENDUSES}
' ************************************************************

Const BASIC_INFO_PATH As String = "CUSTOM.RELAY_INFORMATION.BASIC"

Add new sub procedure SetRelayInformation.

 1
2
3
4
5
6
7
8
9
10
11
12
13
14
' ************************************************************
' This is module *Module1 .
' Automatically generated uses comments are placed here.
' Don't edit these lines.
' {BEGINUSES}
'#Uses "*Module1"
' {ENDUSES}
' ************************************************************

Const BASIC_INFO_PATH As String = "CUSTOM.RELAY_INFORMATION.BASIC"

Sub SetRelayInformation

End Sub

Put the cursor inside the method then click the Edit Dialog button at the Script tab under the Tools section to create new custom dialog. User dialog editor will open after that.



Add eight textbox, eight label and one OK button then arrange them according to your taste and click save and exit button. This button is located second to the last button with tooltip save and exit. This will generate codes inside the sub procedure like the codes below. To edit it again in the user dialog editor, just put the cursor inside between the Begin Dialog and End Dialog then click the Edit Dialog in the ribbon menu.

 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
' ************************************************************
' This is module *Module1 .
' Automatically generated uses comments are placed here.
' Don't edit these lines.
' {BEGINUSES}
'#Uses "*Module1"
' {ENDUSES}
' ************************************************************

Const BASIC_INFO_PATH As String = "CUSTOM.RELAY_INFORMATION.BASIC"

Sub SetRelayInformation
Begin Dialog UserDialog 480,273,"Relay Information Dialog Editor" ' %GRID:10,7,1,1
Text 10,14,140,14,"Substation Name:",.lblSubstationName
Text 10,42,140,14,"Substation Address:",.lblSubstationAddress
Text 10,70,140,14,"CB Name:",.lblCBName
Text 10,98,140,14,"Circuit Name:",.lblCircuitName
Text 10,126,140,14,"Device Type:",.lblDeviceType
Text 10,154,140,14,"Manufacturer:",.lblManufacturer
Text 10,182,140,14,"Serial Number:",.lblSerialNumber
Text 10,210,90,14,"Device Address:",.lblDeviceAddress
TextBox 160,14,300,21,.txtSubstationName
TextBox 160,42,300,21,.txtSubstationAddress
TextBox 160,70,300,21,.txtCBName
TextBox 160,98,300,21,.txtCircuitName
TextBox 160,126,300,21,.txtDeviceType
TextBox 160,154,300,21,.txtManufacturer
TextBox 160,182,300,21,.txtSerialNumber
TextBox 160,210,300,21,.txtDeviceAddress
OKButton 370,238,90,21,.btnOK
End Dialog
Dim dlg As UserDialog
Dialog dlg

End Sub

Now, click the User Commands button at the Script tab under the Tools section to create a command to use the procedure that we've created. By doing this, this will create a button/menu in the ribbon menu to execute the SetRelayInformation procedure.

Once the User Commands has been clicked, the user command window will open. In the subroutine textbox, type in the SetRelayInformation and make sure its the same character case in the procedure we've created. Check the show as button. In the display name textbox put anything, for me, I will put Set Relay Information the same with the procedure but I put space between the words. In the status bar/tooltip, put "Click here to open the relay information dialog editor". Click add button to add that in the list below the subroutine textbox. Then click close button to exit.

Click the Back to Report View to close the script window.
In the Home tab, you will realized that there's a new button created under the User Commands name Set Relay Information. Click that button, the newly created custom dialog will open.


Now, we have successfully created a new custom dialog but it does nothing. I will show you in the next tutorial on how to get data from the test object parameters and display them in the custom dialog we've created and save them back once OK button was clicked.



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...

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...

Working On Omicron Control Center

The Omicron Control Center (OCC) is a test document that is use to combine multiple test modules in a single file like archive file. A single OCC file can be used to test a relay completely, rather than the multiple individual test modules. On the Test Universe start page, by start clicking new test document under control center. This will open a new blank OCC file. The OCC is basically divided into four sections: Test Modules Tree List on the left side Report pane on the right side Ribbon control on the top Status history on the bottom On the ribbon control View tab, contains the Report View, the List View and the Script View. In the Report View, we can customize the overall report. In the List View, displayed all the test modules or objects embedded in the test document. In the Script View, we can write and run scripts to control the test document. OCC has a document properties which can be found at the ribbon control File tab. Under the summary tab, we can specify the document param...