Siemens S7-1200 web server returning error 500

1.6k views Asked by At

I was wondering if there were some gurus here who could help me with the following problem.

I have a Siemens S7-1200 PLC that I am accessing via HTTP and the built-in webserver in the PLC. The PLC has been set up with a very simple web page that has two tags on it inside a "HTML FORM" so that the page can be loaded and new values for the tags written to the PLC. This has been tested from a browser and works well.

Then I have a Java application which connects to the PLC two to three times each hour, loads the page with a GET request, writes a new value into either tag-field (a value of 1) and then POSTs the page back to the webserver. This also works well.

Hence, before the page with the tag-fields can be loaded, the HTTP client must log in with a user/pass via another page in the PLC webserver. The Java application actually does this and then gets the "tag page", updates a tag and posts the page.

The problem is that this will run fine for weeks and then suddenly the webserver will start returning "error 500" during the login phase:

500 INTERNAL SERVER ERROR

Turning the PLC off and back on makes everything start working again, but this is still not good because the PLC and Java app are supposed to ring a school bell on a certain schedule and when this problem occurs everyone will sit there waiting for it to ring, but it doesn't :-)

Not a lot of info to go on, I know, I was mostly hoping someone else had a similar problem and some insight into why this occurred. I am not a PLC expert so I don't know if there is a log or anything like that on the PLC that could be studied.

For further info, I am using the Apache HTTP client library to talk to the PLC webserver from the Java app.

Thanks in advance,

Hordur Thordarson

0

There are 0 answers