Questions tagged [s7-1200]

This is a tag to identify Siemens plc's from the product line S7-1200 series.

Questions related to the S7-1200 line may include module setup, function, errors, OPC communication but also communication via for example the snap7 library.

Some issues you may post are related to older PLC firmware versions in combination with certain Tia-Portal versions. If this applies to your case include version numbers always in the question either upfront or after the issue is solved. This way you save other users a lot of time finding bugs that are user coding unrelated.

58 questions
10
votes
1 answer

Access Siemens S7-1200 through C# Application

I'm trying to access the Siemens S7-1200 database to set and read tags through a C# executable that I will run on Windows. The intention is to have a desktop app that can establish a connection with a PLC over Wi-Fi / Ethernet. The app will then…
itstudes
  • 411
  • 5
  • 14
10
votes
7 answers

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…
Megimoo
  • 387
  • 1
  • 3
  • 15
5
votes
1 answer

Read/Write S7-1200 bit memory via C#

I am trying to set value on a boolean memory in the S7-1200 CPU, I have used the SNAP7 library but I couldn't get success with it : Result result = new Result(); byte[] Buffer = new byte[26]; Client.DBRead(1, 0, 2, Buffer); result.bArret =…
Erwin Draconis
  • 764
  • 8
  • 20
3
votes
3 answers

Python OPC UA Client - Write variable using BrowseName

I can't find the correct syntax for assigning a value to a variable using its BrowseName. I am testing with the 'flag1' boolean variable because it is easier to debug. But my goal is be able to write in all variables, including the arrays. If I try…
AlexMacabu
  • 127
  • 9
3
votes
3 answers

Converting real data type from Siemens PLC (S7-1200) to be displayed in Visual C# Windows Form

I am trying to read a real value from a Siemens PLC (S7-1200) and display it in Windows Form. I am using the S7.NET library to communicate with the PLC and a TIA Portal V15 to program/Monitor the PLC. I am able to read the particular data block…
Jai Jai
  • 31
  • 1
  • 4
3
votes
3 answers

Reading from S7-1200 PLC with s7.net plus library

I'm trying to read values from S7-1200 PLC using s7.net plus library. When I try to read data from datablocks it returns "WrongVarFormat" message. My code is: using (var plc = new Plc(CpuType.S71200, "192.168.1.17", 0, 0)) { //IP is…
Dnate
  • 31
  • 1
  • 5
3
votes
1 answer

Serial communication between Siemens PLC and Arduino

I want to have a serial communication using Siemens S7-1200 with CM 1241 (RS-232) and communicate with my Arduino. Here is the setup of the communication. I have 2 temperature sensor and one Led connected to my Arduino, and on the PLC side I have…
3
votes
2 answers

libnodave error while reading from Siemens s7-1200 (0x8104)

While checking s7nodave's EPICS device support for S7-1200 I've encountered a problem that refers to libnodave. When I'm try to read any memory address in PLC, IOC console reports an error: epics> 2014/05/19 14:20:41.964 Siemens-PLC error while…
user3653898
  • 31
  • 1
  • 3
2
votes
1 answer

Siemens S7-1200: Cannot download datalog

I have problem downloading my datalog. Already make a coding using python to automatically download the datalog everyday. And the coding works on three sites. But, on the fourth site, using the same code, I got an ERROR 404 not found. But, the files…
Mohd Izzar
  • 41
  • 8
2
votes
2 answers

S7-1200, Snap7: Exception: CLI : function refused by CPU (Unknown error)

Running below snap7 client script for python using Siemens S7-1200 PLC shows the below common CLI refusal error. What is here the common problem and how to solve it? Script: import snap7 from snap7.util import * import struct import…
ZF007
  • 3,708
  • 8
  • 29
  • 48
2
votes
1 answer

Pass data from Siemens s7 1200 PLC to PHP script

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…
Klapsius
  • 3,273
  • 6
  • 33
  • 56
2
votes
1 answer

SIEMENS PLC S7 1200 TOF issue

Let's say I have a Boolean input which can switch its state automatically. Swichting from 0 to 1 and from 1 to 0 sets a cycle. To determine if that cycle is valid, the cycle time must be at least 10 seconds. I can determine if one semicicle is…
Aldridge1991
  • 1,326
  • 6
  • 24
  • 51
2
votes
4 answers

python snap7 windows - can't find snap7 library

i try to install snap7 (to read from a S7-1200) with it's python-snap7 0.4 wrapper but i get always a traceback with the following simple code. from time import sleep import snap7 from snap7.util import * import struct plc =…
Lavalu
  • 83
  • 1
  • 1
  • 8
2
votes
1 answer

Siemens S7-1200 PLC LED DI/DO History

Is there a way to review the Digital Input/Digital Output LED light history of a Siemens S7-1200 PLC? If so, is it through the web portal or through Simatic and can someone point me in the direction of where to find such information? Thanks - will…
Emko
  • 21
  • 1
2
votes
1 answer

Siemens S7-1200. TRCV_С. Error code: 893A; Event ID 02:253A

Please, help to solve the problem with communication establishment between PC and 1211C (6ES7-211-1BD30-0XB0 Firmware: V 2.0.2). I feel that I've made a stupid mistake somewhere, but can't figure out where exactly it is. So, I'm using function…
KrasnokutskiyEA
  • 587
  • 1
  • 6
  • 20
1
2 3 4