PLC (Programmable logic controller) or programmable controller is a digital computer used for automation of electromechanical processes, such as control of machinery on factory assembly lines, amusement rides, or light fixtures.
Questions tagged [plc]
1091 questions
4
votes
2 answers
Hangs on Socket.Receive with no exception
I have WPF C# application that communicate with a PLC (i.e. write/read Omron PLC's memory addresses) through Ethernet (UDP packets) using FINS command/frame.
I can send command to WRITE PLC address successfully, but application hangs/crashes when…

KMC
- 19,548
- 58
- 164
- 253
4
votes
2 answers
What language is behind ladder programming in Omron PLC?
What does the ladder programming in PLC convert to? Does the graphic command (e.g. open contact, instruction etc.) a BASIC or C instruction, or does it compile to assembly language directly?

KMC
- 19,548
- 58
- 164
- 253
4
votes
8 answers
C to IEC 61131-3 IL compiler
I have a requirement for porting some existing C code to a IEC 61131-3 compliant PLC.
I have some options of splitting the code into discrete function blocks and weaving those blocks into a standard solution (Ladder, FB, Structured Text etc). But…

Peter M
- 7,309
- 3
- 50
- 91
4
votes
2 answers
How can I use a local TwinCat 3 runtime with Hyper-V enabled?
I'm trying to run TwinCat 3 XAR in a PC where I need to have hyper-V ON to run Azure IoT Edge (which uses hyper-V). Is there a way to run XAR with hyper-V turned on? Is there any way to isolate the cores from hyper-v or something else?

Paulo Ilheu
- 61
- 1
- 4
4
votes
4 answers
What is the benefit of defining enumerators as a DUT?
The main goal of defining enumerators is to assign a variable to some numbers and their equal strings as I understand.
We can define var a as an enum everywhere in the initializing section of our Program or Function Block like…

asys
- 667
- 5
- 20
4
votes
5 answers
Resources to accessing a S7 Profinet PLC (1212C) from Java
I have a relatively special question here. At least I think it's special as Google didn't seem to be able to provide me with the information I was looking for.
I have recently purchased a S7 Starter Kit, containing a S7 1212C PLC. It's all setup and…

Christofer Dutz
- 2,305
- 1
- 23
- 34
4
votes
3 answers
How to assign an initialized array to an array of arrays in TwinCAT
I'm trying to assign two initialized arrays evenNumbers and oddNumbers to an array of arrays integers:
PROGRAM ArrayInit
VAR
evenNumbers : ARRAY[1..3] OF INT := [2, 4, 6];
oddNumbers: ARRAY[1..3] OF INT := [1, 3, 5];
integers :…

Roald
- 2,459
- 16
- 43
4
votes
1 answer
Twincat3: Can't connect to LabVIEW's Modbus TCP/IP server via Tc2_ModbusSrv library (on virtual PLC)
I am trying to create a simple Hello World Modbus TCP/IP program using Twincat3 and virtual PLC (PLC running locally on my computer).
I have set up a LabVIEW Modbus TCP/IP master + slave program (both of which are working see screenshots below).
I…

Jakub Szlaur
- 1,852
- 10
- 39
4
votes
3 answers
Interfacing .NET with Siemens PLC S7 200
I'm trying to interface .NET (C# or VB doesn't matter) with a Siemens PLC S7 200. I can't however get a connection set up. I'm working on a Win7 64bit machine but can't seem to get it working on 32bit either. I got two…

Henrik
- 490
- 2
- 10
- 16
4
votes
2 answers
TwinCAT - How to measure program execution time?
I would like to measure the execution time of a structured text (ST) program. The task associated with the program is running at 10 ms.
How do I measure execution time?

Piper
- 149
- 11
4
votes
1 answer
How do I run a Twincat program without PLC?
I am a beginner in Twincat and have been playing around with it. I watched this playlist where this guy explain structured text and successfully runs a program on his system. However when I try to run on my system, I get error 0x1028. Then I read…

Piper
- 149
- 11
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
Unsolvable error with multiple requested values send to the plc (apache.plc4x)
I'm new here and my first question is regarding the request of PLC values, using Apache PLC4x.
I want to loop through all the actual I, Q and DB available in the PLC. Because I want not able to accomplish this I looped through a set of DB but if the…

Titus
- 71
- 5
4
votes
3 answers
Are CIP services for reading and writing PLC tags (on AB Logix 5000 controllers) atomic?
I'm following the Allen-Bradley documentation for controller data access using CIP, specifically the read tag service, write tag service, and details around reading/writing whole UDTs:…

Camputer
- 387
- 2
- 16
4
votes
2 answers
What's the difference between plc's scan cycle and code surrended by while(1){ ... }?
I'm confusing that whether the plc's cyclic execution can be seen as a program surrounded by the endless loop. If not, what's the difference between them?

Eric
- 41
- 2