Skip to main content

Save Test Object Data In Omicron Control Center Custom Dialog

Welcome to the third part of the tutorial series about Omicron Control Center (OCC) Custom Dialog. In this tutorial, I will show you how to save the data that entered in the custom dialog to the OCC document test object.


Now, open the OCC document that created in the first and second part of this series. If you don't have it, please check the first and second part of the series (Omicron Control Center Custom Dialog - Creating Custom Dialog) and (Omicron Control Center Custom Dialog - Display Test Object Data). Follow the step by step procedure there to create the a OCC document then return to this page.

Open the script window by clicking the Script View button under the View tab in the Document Views group. Stop the script by clicking the Stop Script button under the Run Script group to enable us to edit or modify the script.

Find the sub method SetRelayInformation and insert the code below between the Dialog dlg and Set GlobalTO = Nothing

GlobalTO.XRioDocument.GetParamFromIDs(BASIC_INFO_PATH & ".SUBSTATION_NAME").ParameterString.SetDisplayValue dlg.txtSubstationName, ""
GlobalTO.XRioDocument.GetParamFromIDs(BASIC_INFO_PATH & ".SUBSTATION_ADDRESS").ParameterString.SetDisplayValue dlg.txtSubstationAddress, ""
GlobalTO.XRioDocument.GetParamFromIDs(BASIC_INFO_PATH & ".CB_NAME").ParameterString.SetDisplayValue dlg.txtCBName, ""
GlobalTO.XRioDocument.GetParamFromIDs(BASIC_INFO_PATH & ".CIRCUIT_NAME").ParameterString.SetDisplayValue dlg.txtCircuitName, ""
GlobalTO.XRioDocument.GetParamFromIDs(BASIC_INFO_PATH & ".DEVICE_TYPE").ParameterString.SetDisplayValue dlg.txtDeviceType, ""
GlobalTO.XRioDocument.GetParamFromIDs(BASIC_INFO_PATH & ".MANUFACTURER").ParameterString.SetDisplayValue dlg.txtManufacturer, ""
GlobalTO.XRioDocument.GetParamFromIDs(BASIC_INFO_PATH & ".SERIAL_NUMBER").ParameterString.SetDisplayValue dlg.txtSerialNumber, ""
GlobalTO.XRioDocument.GetParamFromIDs(BASIC_INFO_PATH & ".DEVICE_ADDRESS").ParameterString.SetDisplayValue dlg.txtDeviceAddress, ""

Document.TestObjects(1).CommitChanges

Once completed, close the script window by clicking the Back To Report View button then run the script by click the Set Relay Information button in the Home tab under the User Commands group and the result should be like the in the image below.


Then, enter the new data and click OK button when done. Open the test object and check the data Relay Information > Basic should be updated like in the image below.


Now, close the test object window and click again the Set Relay Information button in the Home tab under the User Commands group and the result should be like the in the image below.


Now, we have successfully save the data that we entered in the custom dialog to the test object. But, those data are purely strings that's why we only used textbox control. I will show you in the next tutorial on how create custom dialog with enumeration list using dropdown control.


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

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