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
1
vote
1 answer

How do I use system time as a trigger in codesys ladder?

Programming a raspberry pi with codesys, using mostly ladder, basically I need to write all data that is currently in a couple arrays to a csv file at midnight, so i'd like to be able to use a dt value as a trigger. I can't figure out how to use…
SBatesAES
  • 13
  • 6
1
vote
2 answers

In Codesys, how to define pre-processors parameters?

I need create certain amount of struct type pairs which will be further used as const parameters and has essentially the same set of values, but scaled in half, something like this (given a n constant): TYPE ADDR_1 : STRUCT …
aluis.rcastro
  • 46
  • 1
  • 7
1
vote
0 answers

Codesys 2.3 - wago 750-842 - I/O

I need your help to solve a "strange" problem I am facing. My wago 750-842 does not write digital outputs and does not read digital inputs. Below you can find my very simple program, along with the harware configuration. To summarize, I have a 8…
andreapier
  • 2,958
  • 2
  • 38
  • 50
1
vote
2 answers

Is there a timer function or variable in Codesys as in arduino millis()?

Is there a timer function or variable in Codesys as in arduino millis() ? If not, how can I create a timer? Thanks!
lorex04
  • 15
  • 1
  • 4
1
vote
1 answer

Included Library vs. Placeholder Template in CoDeSys

What is the difference between including a library in a CoDeSys project and including a placeholder template? And why can't certain libraries be added as libraries as opposed to placeholder templates? For example, I can't seem to add the Standard…
Michael LeVan
  • 528
  • 2
  • 8
  • 21
1
vote
2 answers

how to parameterize a Function Block in CODESYS?

I have a FB (SmartLogic) with two boolean input variables and one output variable, but I want the output to depend of a parameter X too which i want to set during instantiation before the FB is called. Is that possible? And how do I do that?
user2304458
  • 363
  • 1
  • 2
  • 11
1
vote
3 answers

Syntax for Returning One Character of String by Index

I am attempting to compare one character of a string to see if it is my delimiter character. However, when I execute the following code the value that gets placed in the variable valstring is a number that represents the byte that was converted to a…
Michael LeVan
  • 528
  • 2
  • 8
  • 21
1
vote
1 answer

What are the semantics of input variables passed by reference?

Beckhoff's TwinCat-3, as well as Codesys 3 it's based on, adds references as an extension to IEC-61131-3 languages. I'm wondering what is the exact grammar and semantics of this non-standard addition (that's the problem with them: nobody bothers…
Kuba hasn't forgotten Monica
  • 95,931
  • 16
  • 151
  • 313
1
vote
1 answer

Codesys and CANopen multisame NodeID

If I have Codesys project with CANopen manager and I add a CANopen slave node to the CAN with node id 19, the system is clear to me, but if I add two same sensor devices with same factory preset nodeid 19, how do I change the nodeID of either of…
1
vote
1 answer

Codesys CAA_File and SysFile library difference

What is the difference between Codesys CAA_File lib and SysFile lib? When to use CAA_File instead of SysFile?
1
vote
2 answers

generating week day by knowing the date in Codesys

very new to Codesys so bear with me. I know you can use a time picker, but it doesn't get displayed on the web visualisation for some reason. So trying to find a function that will display the day of the week that corresponds to the chosen…
Ana
  • 97
  • 6
1
vote
2 answers

Can CODESYS be used to develop for hardware PLCs (i.e. not simulated)?

In the examples I found so far, CODESYS was used for building demonstrations on a PC (e.g. using the simulated PLC) or for industrial PCs (not PLCs). Is there a way to export/upload a CODESYS project to proprietary PLCs (AutomationDirect, Allen…
Sparkler
  • 2,581
  • 1
  • 22
  • 41
1
vote
1 answer

OPC UA with Codesys v. 2.3

I'm trying to use a Wago 750-881 as a OPC UA Server, which I'm programming with Codesys v. 2.3. My problem is how to make this happen? I have found a lot of info about OPC UA with Codesys v. 3.5, but not any information about Codesys v. 2.3. Could…
user3176870
  • 31
  • 1
  • 10
1
vote
1 answer

OPC connection active but LabView does not see variable changes

I have OPC server on CodeSys. I am trying to read variables using LabView. I have tried two options: using DataBinding to OPC Variables in controls using DataSocket Open, Read, Write, Close VI LabView returns no error. When I use data binding…
krzych
  • 2,126
  • 7
  • 31
  • 50
1
vote
1 answer

How to transfer the concepts of real-time control from "C" environment to "IEC61131 (CODESYS)"?

We are trying to perform a real-time measurement/calculation on sampled data. Our previous experience was based on C programming. I wonder if anyone can help me transfer the real-time c programming structure into the PLC IEC61131 Structured…
aghd
  • 685
  • 2
  • 9
  • 20