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.
Questions tagged [codesys]
240 questions
0
votes
0 answers
I have problem on configuring a canopen network with EL6751 as master and wago 750-838 as slave using my customized EDS file
I am working on a project with a Canopen network consisting of a Beckhoff CX2030 controller and an EL6751 Canopen master device. The network also includes a Wago 750-838 PLC followed by several input/output modules acting as slaves.
To transfer the…

Mehdi Mahyar
- 1
- 2
0
votes
1 answer
Multiplying time by integer in Codesys
I want to multiply a TIME variable by an integer. Documentation says that you can use * with TIME variables but when I try:
CYCLE_TIME : TIME := T#5MS;
CYCLE_TIME_OFFSET : TIME := CYCLE_TIME * 2;
Or
CYCLE_TIME : TIME :=…

Malinko
- 124
- 11
0
votes
0 answers
CODESYS 3.5.12, added AC_ModuleBase and AC_Persistance without meaning too How to remove?
I added the AC_ModuleBase and AC_Persistance module into codesys 3.5.12, ive tryed removing them via the library manager but i keep getting the following error even after removing them:
------ Build started: Application:…
0
votes
0 answers
Jog axis bacward with a uni-directional servo
In TwinCAT3 or Codesys, is it possible to control a bi-directional servo with 0-10v and direction pin?
Or, is it possible to decouple the analog output from a PTP Axis at runtime, and control it from the program?
I am trying to do a software…

Dexter
- 354
- 6
- 11
0
votes
0 answers
Codesys 3, Is there any way to stop CANopen_Manager sending NMT Reset node command on enable?
I've noticed that when enabling the 3S CANopen_manager device (as declared in the device tree, _3SCOS.CANOpenManager_Diag), by CANopen_Manager.Enable := TRUE; (I'm not talking about NMT start) the PLC automatically sends NMT Reset command to…

e-mal
- 1
- 1
0
votes
0 answers
Raspberry Pi with wrong GPIO value in Codesys
I have a Codesys application which runs on my Raspberry Pi. On this Pi, there are two LED's and two buttons connected. The LED's are working fine as they are connected to a GPIO output pin. But the buttons don't work as expected. However it seems…

MKlaassen
- 37
- 3
0
votes
2 answers
Iterating through variable list
I'm writing an App on CODESYS that has a set of alarms in a variable list whose state I'd like to check in a program. Right now I'm just referencing those variables individually in the program, but I was wondering if there's a way to iterate through…

Oriol Galceran
- 3
- 3
0
votes
0 answers
How to create a semi-custom language vscode extension from a JSON
I've been trying to automate a lot of the manual processes in Codesys and found out they have an API that lets you use ironpython scripts to interact with the IDE. I cannot make heads or tails of their API documentation, and would like an…

Gene Parmesan
- 211
- 2
- 8
0
votes
1 answer
How do I automate/optimize D/Y connection selection based on selected input voltage and motor plate voltage values?
I have a test setup with six (6) selectable load motors and four (4) possible input voltage options. The motors are divided into three (3) motor sets, each containing two (2) motors (i.e. 1M1 1M2, 2M1 2M2 and 3M1 3M2 where the first number is the…

Overflown Roni
- 5
- 3
0
votes
2 answers
Access VAR_STAT CONSTANTS of an FB externally without instantiation in CODESYS V3
I would like to have the behaviour of a public constant in C#. So:
In CODESYS V3, is it possible to externally access VAR_STAT CONSTANTS of an FB without instantiation in CODESYS V3? and If not, what would be the most proper way to do so?
The…

Cédric Moers
- 395
- 1
- 10
0
votes
1 answer
CODESYS, TON not resetting
I have an INT and TON defined
VAR
state : INT := 0;
timer_on : TON;
END_VAR
Now. The program is like this
IF (state = 0) THEN
timer_on(IN := TRUE, PT := T#5s);
IF (timer_on.Q = TRUE) THEN
timer_on.IN := FALSE;
state…

user3742046
- 171
- 12
0
votes
1 answer
Calling a function in Structured text, Codesys 2.3
I'm new to Codesys, and PLC programming in general. I am currently being self-taught with the help of some literature. Currently working a practice program. I made a function but when I try to call it I get and error 4051, 'Throttle_Timer' is no…
0
votes
2 answers
Codesys interface properties in ST
I'm trying to make a interface with properties in st instead of having to add them as property with getter and setting by doing a lot of clicking.
How I am doing it now
How I want to do it:
INTERFACE Door
VAR
sensorBack : BOOL;
END_VAR
Is there…

Roel
- 97
- 1
- 11
0
votes
1 answer
How do I view raw memory addreses of MODBUS TCP/IP holding registers in CODESYS
For a work project, I have to read a bunch of holding registers from an IFM CR1203 PLC that is programmed using CODESYS 3.5.
The PLC will be running a slave instance and the device reading the holding registers will be a PC running a custom…

Rikus Coetzee
- 63
- 6
0
votes
1 answer
How to change axis velocity during Gcode operation
Good work everyone,
I have been working on a 3 axis CNC machine for a while. A lot of things are going great! But I couldn't find how to increase or decrease the axis speeds while processing the g code. I am using the SMC_INTERPOLTAOR block to…