Questions tagged [siemens]

Tag for questions about Siemens informatics products such as the programmable logic controller (PLC)

Siemens develops electronic embedded systems, devices and informatics products such as the programmable logic controller (PLC)

177 questions
17
votes
2 answers

Connecting an PLC Siemens S7-1500 to an SQL Server Database

The connection guide is here. I track the guide and do a lot of stuff. The connection between PLC and SQL server is ok, I've login successfully to SQL. I can insert to tables, update, and execute store procedures. But when I run a select query I…
Peyman Majidi
  • 1,777
  • 2
  • 18
  • 31
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
6
votes
1 answer

Reading a JSON structure from a web server page on a Siemens S7 1500 PLC

I've been working with HTML and javascript to create graphical web pages to display data from my Siemens S7 1500 PLC. I've been using a $.getJSON command to successfully read values from the PLC when the web page that requests the information is…
Ryan Y
  • 81
  • 1
  • 5
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
4
votes
3 answers

How to get the value of a node with OPC UA and C#?

I have a panel Siemens TP1200 Comfort that I have configure as OPC AU server. This panel has some tags (nodes) from which I would like to get the value from a C# application. I have read the examples of the OPC UA github project:…
Álvaro García
  • 18,114
  • 30
  • 102
  • 193
4
votes
2 answers

Read a Siemens PLC s7 String in C# with S7netplus

I have trouble to read data in DB of a Siemens PLC S7 1500 using S7netplus. The situation: I have a C# application running. I connect on the PLC very well. I can read data such as Boolean, UInt, UShot, Bytes But I don't know how to read String…
Seb
  • 172
  • 1
  • 12
4
votes
1 answer

OPC dll - How to retrieve tags value in bulk

I'm using OPCSiemensDAAutomation dll with C# .NET to retrieve tag's value from OPC Server. I managed to retrieve the values using QueryAvailableProperties() and GetItemProperties(), but the objective is to retrieve 500k tags value per request. I…
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
1 answer

S7.net PLC tag reading exception thrown - Received 12 bytes: '32-02-00-00-00-00-00-00-00-00-81-04', expected 19 bytes

I'm trying to connect to a S7 1212 using this library. I can connect to the PLC fine, but whenever I try and read a tag I get the error exception Received 12 bytes: '32-02-00-00-00-00-00-00-00-00-81-04', expected 19 bytes. I'm using the latest…
Marcus S
  • 103
  • 8
3
votes
1 answer

issue Reading DT (date and time) from opc ua siemens server C#

I'm trying to read the date and time (#DT) from Opc ua Server (Siemens) using opc ua DLLs of unifiedautomation. But i get wrong value: siemens S7 1500 opc ua client DT#2008-10-25-08:12:34.567 --> 17.09.1142…
asdin
  • 41
  • 4
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
1 answer

SCL code: tag FUNCTION not defined on TIA

I want to create a new SCL function with TIA 15.1. I chose Program blocks => Add new block => Function. When I write the keyword FUNCTION in my file I get the following error: tag FUNCTION not defined. This is the same for others keywords like VAR…
Kantine
  • 47
  • 1
  • 8
3
votes
2 answers

Exporting Ladder Logic in Tia 14

TL;DR: What is the best way to Export Ladder Logic in Tia 14? Recently my company has started using Tia Portal v14. The update was due and we have begun to do some work with the S7 1500 series of CPUs. It has come to the attention of those in my…
JustinCoplin
  • 169
  • 3
  • 16
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
1
2 3
11 12