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 interface 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 :
For example : IP = 192.168.100.47 , port = 80
The CGI command to turn ON outlet #1 is : HTTP://192.168.100.47:80/set.cmd?user=admin+pass=12345678+cmd=setpower+p61=1
The CGI command to turn OFF outlet #1 is : HTTP://192.168.100.47:80/set.cmd=user=admin+pass=12345678+cmd=setpower+p61=0
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"
strResult = objHTTP.responseText
Worksheets("Worksheets1").Range("A1:A1") = strResult