Questions tagged [codesys]

CODESYS is an IDE for application development on programmable logic controllers (PLCs) distributed by the CODESYS Group in Germany. Use this tag only for questions about CODESYS installation and usage as well as related CODESYS software like CODESYS Control Runtime System and CODESYS Automation Server. Use the tags [structured-text], [ladder-logic], and [sfc], for (ide-agnostic) questions about [plc] or [servo] programming.

240 questions
0
votes
1 answer

Send Struct over TCP Socket between different programming languages (Java <-> CoDeSys)

I need to send a struct(consisting of booleans, ints and strings) over a TCP socket. The sender(a PLC) is implemented in CoDeSys and the receiver is implemented in Java. One solution would be to create a big string with the data, send it over the…
M0zart
  • 3
  • 2
0
votes
1 answer

Array of pointer to bool in CoDeSys

I would like to declare an array of pointer with an initialization Apb : array [0..2] of pointer to bool := adr(r0), adr(r1), adr(r2); Where r0, r1, r2 are declared in Modbus like Bitwise holding register. I got an error: Wrong initial value. In…
Ulrich Von Rekkenin
  • 352
  • 1
  • 3
  • 14
0
votes
3 answers

TwinCAT 3, Using Methods for internal FB functionality or just for interfaces?

I´m old users of Beckhoff technologies, especially TwinCAT. At the moment, we are suffering a transformation of our PLC architectures due to the new functionality that are bring by TwinCAT 3 (Object Oriented) At the moment we are developing our new…
OscarSanhueza
  • 317
  • 2
  • 13
0
votes
2 answers

Run CodeSys V2.3 in batch mode

I'm afraid I'm not making much progress on the 3S forums. So you lot are going to get pestered now! I'm using 3S Codesys v2.3 I'm trying to create a boot project and do sourcecode download on my build server and I'd like to avoid having any…
MattyW
  • 1,519
  • 3
  • 16
  • 33
0
votes
1 answer

How can I call an "AT command" in Codesys for a GSM modem? Not standard send_sms, etc

I have a GSM modem and a PLC. The PLC sees a modem (I use a *.lib and functional block "openPort"), but I don't understand how send an "AT command" to the modem, for example, "ate0".
noxom
  • 1
  • 1
  • 2
-1
votes
1 answer

Logic to control a multi-head weigher like machine

I need help to create an algorithm to control a machine which will do something very similar of what a multi-head weigher does. I will have a array of 192 available "heads" to make combinations. I don't need to find all availabe combinations. The…
-1
votes
1 answer

codesys - can anyone tell me explain this error to me on codesys v3.5.18 = "t it is in the compiled library for systtimecore 3.5.17?

"there is no source code available for this object as it is in the compiled library for "systimecore" 3.5.17 ?? how do I use this library whilst using the latest v3.5.18 do I need to only use v3.5.17?
-1
votes
1 answer

Codesys matrix generation

I wanted to create a matrix of 5 rows and 2 columns. For that i have written the code pascal A_matrix: ARRAY [1..2, 1..5] OF REAL := [fei, fei, fei, fei, fei, 0, fei_predicted, fei_predicted, fei_predicted, fei_predicted]; // (NxN_u matrix i.e…
-1
votes
1 answer

Is there any way to convert the matlab code into codesys?

I have a matlab code which i want to convert into the codesys structured text language. Is this possible?
-1
votes
1 answer

Codesys DTU in library

We are working on a data logging code and I would like to make a library of it. The only thing that different programs will need to define is the type strict for the sample that the want to save. The library will save a sample every x period. But I…
homer69
  • 53
  • 1
  • 8
-1
votes
1 answer

Can CFC and ladder programs run in single codesys project

Can someone please tell me how to run ladder program (PRG) and cfc(PRG)program in one codesys project. Moreover,what function should I use in codesys CFC programming to take multiple inputs in WORD data type and output will be the one which will…
Mar_60
  • 13
  • 3
-1
votes
4 answers

I'm looking for a more concise way to compare a variable to a range of numbers in Structure Text (ST)

I am trying to find a more concise way to compare a variable to a range of numbers. Currently I do: IF int_variable=67 or int_variable=68 or int_variable=69 then... Is there a way to write something like: IF int_variable=67 through 69 then Thanks in…
-1
votes
2 answers

MODBUS TCP between PLC and Arduino

I am trying to exchange data between an PLC(WAGO 750-8101) and an Arduino(UNO) with PLC as master, and the Arduino as Slave, but cant seem to get a connection. For the Arduino I have a MINI ENC28J60 as the networkmodule, and is connected to the…
bjorvik
  • 1
  • 1
  • 4
-2
votes
1 answer

Does anyone have the Codesys SysLibFile.lib file to share?

I am trying to save the values ​​of the PLC variables in a CSV file. I saw an example that uses the SysLibFile library, but I can't find it anywhere. Does anyone have the SysLibFile.lib file to share?
-2
votes
1 answer

Ladder diagram in winSPS

I have to express an RGB led in a ladder diagram using winSPS. I have used CodeSys before but that is all my experience. Can someone help me with the schematic for it?
1 2 3
15
16