I've a RESTful HTTP API. Now I would like to send HTTPS requests from my S7 PLC to the API. I've contacted Siemens and they said that they don't have a HTTPS client implementation.
But there is a tcpClient
module in the library. And since TCP is the foundation for HTTP over SSL, I wanted to ask if somebody has already implemented a HTTPSClient or if somebody knows where to start?
The API is only via HTTPS accessible to protect the privacy.
The tcpClient only enables you to create a TCP socket and is not meant to provide communication with a HTTP(s) server. The S7 does not have enough processing power to provide full HTTP communication.
One of the options you have is to place a small computer near the PLC and do a conversion to one of the protocols the S7 does support like OPC-Da or write a custom implementation to work with the tcpClient.
Depending on the S7 version you could also use OPC-Ua which is the successor of OPC-Da so you won't have any trouble with dcom. Another benefit of OPC-Ua is that is has build in encryption and can travel trough firewalls.
If you need any further information please let me know.
Having a tcpClient module enables you creating TCP socket for communicating with PC or other PLC. However, HTTPS is another story: It is the application layer protocol.
PLC programming software, in your case Step 7, are normally designed for implementing control algorithms; data processing is definitely not the strongpoint, though today's PLC hardware should be powerful enough for HTTPS.
I would say if you could get the access to S7 PLC's kernel API (I know Schneider did provide SDK for their Unity platform but I am not sure Siemens), you should be able to write your HTTPS module with C language. However, with IEC61131-5 language is not an option at all.
Regards, Hao
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With