Control IP Power by HMI / SCDA(Demo by Office Excel )

In this page, we would like to introduce the function : Control IP Power by HMI / CDA.
Just few simple step to integrate the exist system with IP Power.
As use HMI/SCDA system for most industrial application, System Integrator ( SI ) develop own software to work together.
Here is an example for user to know the way for SI to integrate IP Power with Office Excel.
Basically the way is similar for other software developing, user can refer this example to develop own system.

Most people use Excel, Word or Power Point in Microsoft Office.
These tools supply widely over system calculation, data collection and demonstration .

IP Power supply a convenience 介面 CGI command, for user had experience making webpage, yo ucan use the way HTTP GET to send out or receive the command

Now we use EXCEL as an example to do the control of IP Power. Please refer the following step :

  • First, please collect the IP Power information : IP address, username and password.
    For example : IP = , port = 80
    The CGI command to turn ON outlet #1 is : HTTP://
    The CGI command to turn OFF outlet #1 is : HTTP://

  • You need to know the simple VBA. It is fine to download the code to learn immediately. Use the fix format in network read or write. Replace CGI to URL

  • Open an excel file, please go to File a Option a Customize a Enable the "Developer"

  • Back to Excel, go to "Developer" -- > Select "Visual Basic" --> Start to develop your Marco

  • Dim strResult As String
    Dim objHTTP As Object
    Dim URL As String
    Dim strIP As String
    Dim strUSER As String
    Dim strPASS As String
    strIP = Worksheets("Worksheets1").Range("B2:B2")
    strUSER = Worksheets("Worksheets1").Range("B3:B3")
    strPASS = Worksheets("Worksheets1").Range("B4:B4")
    Set objHTTP = CreateObject("WinHttp.WinHttpRequest.5.1")
    URL = "http://" & strIP & "/set.cmd?user=" & strUSER & "+pass=" & strPASS & "+cmd=setpower+p62=1"
    objHTTP.Open "GET", URL, False
    objHTTP.setRequestHeader "User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)"
    objHTTP.setRequestHeader "Content-type", "application/x-www-form-urlencoded"
    objHTTP.send ("")
    strResult = objHTTP.responseText
    Worksheets("Worksheets1").Range("A1:A1") = strResult
  • Then you can develop your face by pictures or button to make it a friendly 介面.

  • Here is example EXCEL file - Excel vba 9258 please click to download

    The following example is IP Power work with EXCEL