2

Currently I'm working on project with PLC's.

I have Siemens s7 1200 PLC and I would like to pass data into another website. For example I would like to count units and send/record on database.

I know I can have website on PLC and remotely open that website from PC, It works.

But my question is:

Is it possible to have something like html form and log on to another server FROM PLC and pass parameters via GET into PHP script?

Basically I need to find a way to execute html link from PLC. [ I don't need code but just ideas if possible? ]

ZF007
  • 3,708
  • 8
  • 29
  • 48
Klapsius
  • 3,273
  • 6
  • 33
  • 56
  • Does the web page from you PLC need authentication or you can access it anonymously? – EhsanT Nov 21 '16 at 14:58
  • @i can access as anonymous because i'm trying to access onto a website – Klapsius Nov 21 '16 at 15:29
  • Then maybe you can use `file_get_contents('http://your_plc_machine_address/whatever.html');` to get the content of the PLC webpage and parse it on your server and extract the data from it... – EhsanT Nov 21 '16 at 15:53
  • @EhsanT I understand what you saying but i need todo that from different way round. Execute link from plc – Klapsius Nov 21 '16 at 16:40
  • I'm afraid it may be impossible since you may need to change the firmware of the machine. but maybe you machine has some kind of console that allow you to define some kind of triggers to send selected data to a url. I think this will be your only hope... – EhsanT Nov 21 '16 at 16:51

1 Answers1

1

I think that u cannot send parameters over website cause cross domain.. you should use comunication data blocks for sending parameters over WiFi or Ethernet with TCP or UDP protocol. So you can make that like this. for example: You can make a button on your PLC web server user-defined site and when will user press that button, it will be send request to the internal PLC logic and after execution can be forwards data to another web site contains PHP backend.

Peter
  • 21
  • 2