Opc Server
Binu
Posts: 49
I am trying to connect to a OPc server to collect the condition of the room temperature.
From the help file I got the following code, and I try to send in various combination But no luck , Can some one help me?
SOAP 1.1
The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.
POST /amxopc/opcservice.asmx HTTP/1.1
Host: 192.168.100.95
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://www.pbswebserver.com/ReadFromOPC"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ReadFromOPC xmlns="http://www.pbswebserver.com/">
<pRoomID>string</pRoomID>
</ReadFromOPC>
</soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ReadFromOPCResponse xmlns="http://www.pbswebserver.com/">
<ReadFromOPCResult>
<RoomID>string</RoomID>
<SpaceTemperature>string</SpaceTemperature>
<TempSetPoint>string</TempSetPoint>
<FanSpeedCtrl>string</FanSpeedCtrl>
<HvacAppliMode>string</HvacAppliMode>
</ReadFromOPCResult>
</ReadFromOPCResponse>
</soap:Body>
</soap:Envelope>
I tried like
data_event[OpcServer]
{
online :
{
send_string OpcServer,
//"'POST http://192.168.100.95/amxopc/opcservice.asmx?op=ReadFromOPC',13,10,'Connection: Close', 13, 10, 13, 10"
"'POST /amxopc/opcservice.asmx HTTP/1.1',13,10,
'Host: 192.168.100.95',13,10,
'Content-Type: text/xml; charset=utf-8',13,10,
'Content-Length: 300',13,10,
'SOAPAction: "http://www.pbswebserver.com/ReadFromOPC"',13,10,
'<?xml version="1.0" encoding="utf-8"?>',13,10,
'<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">',13,10,
'<soap:Body>',13,10,
'<ReadFromOPC xmlns="http://www.pbswebserver.com/">',13,10,
'<pRoomID>10</pRoomID>',13,10,
'</ReadFromOPC>',13,10,
'</soap:Body>',13,10,
'</soap:Envelope>',13,10"
}
}
From the help file I got the following code, and I try to send in various combination But no luck , Can some one help me?
SOAP 1.1
The following is a sample SOAP 1.1 request and response. The placeholders shown need to be replaced with actual values.
POST /amxopc/opcservice.asmx HTTP/1.1
Host: 192.168.100.95
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://www.pbswebserver.com/ReadFromOPC"
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ReadFromOPC xmlns="http://www.pbswebserver.com/">
<pRoomID>string</pRoomID>
</ReadFromOPC>
</soap:Body>
</soap:Envelope>
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8
Content-Length: length
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ReadFromOPCResponse xmlns="http://www.pbswebserver.com/">
<ReadFromOPCResult>
<RoomID>string</RoomID>
<SpaceTemperature>string</SpaceTemperature>
<TempSetPoint>string</TempSetPoint>
<FanSpeedCtrl>string</FanSpeedCtrl>
<HvacAppliMode>string</HvacAppliMode>
</ReadFromOPCResult>
</ReadFromOPCResponse>
</soap:Body>
</soap:Envelope>
I tried like
data_event[OpcServer]
{
online :
{
send_string OpcServer,
//"'POST http://192.168.100.95/amxopc/opcservice.asmx?op=ReadFromOPC',13,10,'Connection: Close', 13, 10, 13, 10"
"'POST /amxopc/opcservice.asmx HTTP/1.1',13,10,
'Host: 192.168.100.95',13,10,
'Content-Type: text/xml; charset=utf-8',13,10,
'Content-Length: 300',13,10,
'SOAPAction: "http://www.pbswebserver.com/ReadFromOPC"',13,10,
'<?xml version="1.0" encoding="utf-8"?>',13,10,
'<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">',13,10,
'<soap:Body>',13,10,
'<ReadFromOPC xmlns="http://www.pbswebserver.com/">',13,10,
'<pRoomID>10</pRoomID>',13,10,
'</ReadFromOPC>',13,10,
'</soap:Body>',13,10,
'</soap:Envelope>',13,10"
}
}
0
Comments
Can't recall who it was, but he will sure post in here