Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I communicate between a Siemens S7-1200 and python?

I am running a process on a S7-1200 plc and I need it to send a start signal to my python script, after the script is done running it needs to send something back to the plc to initiate the next phase. Oh, and it has to be done in ladder.

Is there a quick and dirty way to send things over profibus or am I better off using just a RS232 thing?

like image 1000
Megimoo Avatar asked Apr 27 '12 18:04

Megimoo


People also ask

How do you connect S7 1200 PLC with PC to program?

Connecting Factory I/O to the PLCOpen the driver Configuration Panel by clicking on CONFIGURATION. Make sure S7-1200 is selected on the Model drop-down list and insert the PLC's IP address into the Host field. Press Esc to return to the main driver window. Now click on CONNECT to connect to the PLC.

What is Python Snap7?

Snap7 is an open source, 32/64 bit, multi-platform Ethernet communication suite for interfacing natively with Siemens S7 PLCs. Python-snap7 is tested with Python 3.6+, on Windows, Linux and OS X.

What are the programmable languages supported by Siemens step7 application?

We know some Programming Language for Siemens PLC programming Languages Like LAD,FBD,STL and SCL. Among them Every Language has its own Benefit. The SCL language is very powerful and well suited for complex math operations, data handling with arrays and string processing.


1 Answers

After failing with libnodave and OPC, I created a TCON,TSEND and TRECV communication thing. It transmits a byte over TCP and it works.

like image 51
Megimoo Avatar answered Oct 19 '22 08:10

Megimoo