Post by artplc on 3.5 P20 hangs - no response
CODESYS Forge
talk
(Post)
Subject: Solution: CODESYS Freezes Linked to Large Symbol Configuration (OPC UA) Hello everyone, I was experiencing the same problem as many here: CODESYS (v3.5 SP20+) freezing during compilation and download, especially on projects that use OPC UA for SCADA. The only workaround was to run Build > Clean all before every download. I believe I have found the root cause and a permanent solution. The Problem: The issue is directly related to a large Symbol Configuration. In my project, I only need about 700 tags for OPC UA, but the Symbol Configuration list was showing over 250,000 tags. This is because it automatically includes all variables from Global Variable Lists (GVLs) and other memory areas. When any static variable is changed, the IDE tries to rebuild this enormous list, causing it to freeze for several minutes. The Solution: Instead of letting CODESYS export every variable by default, you can use a pragma to tell it which variables or GVLs to exclude from the symbol export process. Place the following pragma at the top of any GVL or data structure that you do not want to be part of the symbol configuration: 1 {attribute 'symbol' := 'none'} 2 VAR_GLOBAL 3 // All variables in this GVL will now be excluded from the 4 // Symbol Configuration by default. 5 InternalVariable1 : INT; 6 InternalVariable2 : BOOL; 7 END_VAR After adding this pragma to all the GVLs that were not needed for OPC UA, the number of tags in my Symbol Configuration dropped to the correct amount. The compilation and download process is now fast again, with no freezing. This method is much more efficient than manually managing the symbol list in the editor. I hope this helps others who are facing this frustrating issue. Best regards.
Last updated: 2025-08-10
Post by astrum on OPC UA Information Model Error "Dimensions must be empty"
CODESYS Forge
talk
(Post)
Hello everyone, does anyone know what this error means: Internal Error in code generation for http://opcfoundation.org/UA/DI/: Dimensions must be empty. I use the standard information models from Codesys and haven't even called the Information Model, but my program can't compile. the only thing I did was to insert the Communication Manage.
Last updated: 2025-08-11
Post by davemansell on explicit cast ENUM to UINT and vice versa
CODESYS Forge
talk
(Post)
This is from sometime ago but below might help someone else; this could be done via POINTERS. Make sure you protect for NULL pointers etc if you take this approach. // DECLARATION myEnumValue : enumMyEnum; u8 : USINT; pmyEnumValue : POINTER TO enumMyEnum; pu8 : POINTER TO USINT; // CODE pu8 := ADR(u8); pmyEnumValue := pu8; myEnumValue := pmyEnumValue^; // dereference the pointer
Last updated: 2025-08-21
Post by davemansell on explicit cast ENUM to UINT and vice versa
CODESYS Forge
talk
(Post)
This is from sometime ago but below might help you could do this via POINTERS. Make sure you protect for NULL pointers etc if you take this approach. // DECLARATION myEnumValue : enumMyEnum; u8 : USINT; pmyEnumValue : POINTER TO enumMyEnum; pu8 : POINTER TO USINT; // CODE pmyEnumValue := pu8; myEnumValue := pmyEnumValue^; // dereference the pointer
Last updated: 2025-08-21
Post by raamkumar on exple1
CODESYS Forge
talk
(Post)
```structured text VAR bStartButton : BOOL; // Start button input bStopButton : BOOL; // Stop button input bMotorRunning : BOOL := FALSE; // Motor running status END_VAR // Motor control logic IF bStartButton AND NOT bMotorRunning THEN bMotorRunning := TRUE; // Start motor END_IF; IF bStopButton THEN bMotorRunning := FALSE; // Stop motor END_IF; // Output to motor driver (replace with your actual output) // Assume 'qMotor' is a boolean output to the motor driver. qMotor := bMotorRunning;
Last updated: 2025-08-23
Post by nilanjan on I want to show the current recipe name in the visualization screen
CODESYS Forge
talk
(Post)
I am having some trouble showing the current recipe name in visualization i am not using the RecipeManCommands i am using the inbuild visualization feature of Saving and Loading recipes. I need it so the user would have a track on which recipe is being used currently.
Last updated: 2025-08-24
Post by sandro66 on Application-based license Modbus Channels
CODESYS Forge
talk
(Post)
Hi, I imported an old project created with version 3.51.20.50 into the new version 3.51.21.20. I'm using ModbusFB.ClientTCP v4.5.0.0. Strangely, I can no longer download the project due to a licensing issue I didn't have before. The number of Modbus channels has gone from 1 to 54!, and there's no license that would work. Can anyone tell me where I'm going wrong? Thanks Sandro
Last updated: 2025-08-27
Post by gseidel on Cam Blending
CODESYS Forge
talk
(Post)
Hi ustad41, cams can be buffered using the BufferMode input of MC_CamIn. If the end- and start-velocity of two buffered cams are not zero, there will be no stop. Not sure this answers your question. Cams can be changes on the fly by aborting the active cam. Please see [0] for details on switching cams. [0] https://content.helpme-codesys.com/en/CODESYS%20SoftMotion/_sm_cam_switch_between_cams.html Best regards, Georg
Last updated: 2025-09-08
Post by timvh on PHOENIX CONTACT Axioline PLCnext project in CodeSys SodftPLC
CODESYS Forge
talk
(Post)
1) Based on your first screenshot. Do NOT filter on "Phoenix". Then first select the Ethernet adapter (of CODESYS) and add this to your device. 2) Then to this Ethernet adapter add a Profinet Controller of CODESYS. 3) Then to this Profinet Controller, add your Phoenix Profinet coupler/adapter.
Last updated: 2025-09-09
Post by ranadheer on PHOENIX CONTACT Axioline PLCnext project in CodeSys SodftPLC
CODESYS Forge
talk
(Post)
Thank you Pernockham, I am using Windows SoftPLC and the device is CODESYS Control Win V3 x64. In the above attached example, the file is Linux-based. This is an external add-on file in the CODESYS installer (CODESYS Control for PLCnext SL). I am trying to implement it without this add-on file.
Last updated: 2025-09-09
Post by rickwot809 on Codesys Soft PLC OPC UA server
CODESYS Forge
talk
(Post)
Enabling Anonymous Login 1. Navigate to 'Device' > 'Communication Settings' > 'Device'. 2. Next, click on 'Change Runtime Security Policy'. 3. In the new window, find and check the box for 'Allow anonymous login'. After completing these steps, you should be able to communicate with the OPC UA server.
Last updated: 2025-09-11
Post by totorovic on Project loses 'Download time' information
CODESYS Forge
talk
(Post)
Hello, Today I have the problem again. The code in my IDE is the same as the code in the runtime but I cannot Log in to the PLC without download. Juste because the Download information is 'None'. And I don"t know how is managed this information bu Codesys. I'M WAITING SINCE 17 MONTHS, CAN I PLEASE HAVE A ANSWER FROM CODESYS?
Last updated: 2025-09-18
Post by gseidel on can not new a cam table in codesys V3.5 SP20
CODESYS Forge
talk
(Post)
Hi liai, I tried it with a fresh CODESYS SP21 Patch 2 installation and SoftMotion 4.18, but cannot reproduce the compile errors. Could you please upload a project archive that has the errors? Then I can have a deeper look. https://dl.codesys.com/s/q4KcbKCcZndg6oR Best regards, Georg
Last updated: 2025-09-24
Post by pernockham on Gateway in China - "Gateway not connected"
CODESYS Forge
talk
(Post)
Gateway and runtime (Control for linux SL) on a debian linux. Thanks for your check. Good to know. I will probably travel there in about a months time so that will give me better possibility for further testing. (on a side note, I dont get mail-updates on forum-subscriptions, need to check the topics manually)
Last updated: 2025-09-26
Post by jy77812 on Visualization XY Charter Question
CODESYS Forge
talk
(Post)
Hello. I'm using Visualization XY Chart, and when I mark a circle through XY position data, a blue line is displayed in the circle with a red circle. At this time, can't I set the blue line not to be seen in the circle? Currently, whenever XY position is drawn, the line follows.
Last updated: 2025-10-02
Post by snhatton on How to write a for loop in ladder?
CODESYS Forge
talk
(Post)
Hi there, little late to the party, but you could also use the ST block for in-line ST code and implement a for loop as you normally would. ST Block is super handy if you just need a small amount of in-line structured text code without creating a new POU. Hope this helps!
Last updated: 2025-10-06
Post by arjunk on How to correctly create a device descriptor (.devdesc.xml) for a custom Linux ARM64 PLC in CODESYS 3.5.21.20?
CODESYS Forge
talk
(Post)
Hi, Iβm evaluating CODESYS for our devices. If I buy a standard runtime and the Toolkit, can I create a custom device descriptor so users can select my device (instead of just βCODESYS Control for Linux ARM64 SLβ) when starting a new project? Has anyone done this or know if itβs possible? Thanks!
Last updated: 2025-10-07
Post by snhatton on OPC UA: How to change NodeId ?!
CODESYS Forge
talk
(Post)
You can change the node id by adding the following to /etc/CODESYSControl.cfg: [CmpOPCUAProviderIecVarAccess] CustomNodeName=MyPLC123 Then restart the runtime and the new Node name will appear with the connection. I don't know if it's possible to remove the |var| from the name. I hope this helps!
Last updated: 2023-12-11
Post by zatalian on Codesys Control for Raspberry Pi 4.10.0.0 - Raspberry Pi OS > 2023-12-05
CODESYS Forge
talk
(Post)
I tried both 3B en 4. But every time with a lite version. I didn't try the full version of raspberry pi os. Nice to hear you are aware of the problem and trying to fix it. I'll hold on to the image from 2023-10-10 for now.
Last updated: 2023-12-12
Post by nz-dave on Bool turning on in case stament in wrong state?
CODESYS Forge
talk
(Post)
pretty sure its not. ive done a cross reference and only have one write that sets it to true. Only way i can stop it is to remove the function block call from the main pou that is running said case. its got me stumped:/
Last updated: 2023-12-16
Post by ulad on SPI Communication
CODESYS Forge
talk
(Post)
Hello. I created a project that uses SPI. This project is working well. I can see with an oscilloscope that the SPI pins are actually changing. But when I resave this project in the IDE and open it later in the system, I see a constant error. What do I need to fix? What am I doing wrong? Thank you.
Last updated: 2023-12-23
Post by martinlithlith on Raspberry Pi: List of available drivers / libraries
CODESYS Forge
talk
(Post)
Hi! I'm still on the hunt for drivers for example TCA9548 and a list or somewhere where all devices for raspberry is gathered. as this post is quite old I'm hoping/gussing that there is somewhere where work after 2021 is gathered? Or has the raspberry part if the community slowed down on creating device drivers?
Last updated: 2023-12-31
Post by felixal on Codesys automatic Data transfer to USB on rasberry pi
CODESYS Forge
talk
(Post)
Hi all, I am currently working on a project where I need to save data automatically on many diffrent USB-Sticks, which are always plugged in the same USB-Port on a Rasberry PI, but I do not get how I can automatically detect the USB devices Folder Name and save a file there on Linux. Thanks!
Last updated: 2024-01-03
Post by pmasip on Codesys Control for Raspberry Pi 4.10.0.0 - Raspberry Pi OS > 2023-12-05
CODESYS Forge
talk
(Post)
So none of the images from the 64bit archive work with any Codesys Control versions? I have tried the last Pi OS with every Codesys Control version and they don't work. I was wondering if there's any stable combination of versions.
Last updated: 2024-01-04
Post by tvm on Cannot pass array of constant size to a function as a reference
CODESYS Forge
talk
(Post)
It will be a reference, because it's a VAR_IN_OUT. it's a little weird debugging the array online. It just shows as a POINTER TO INT, and you can't actually see the array from the function side. But you can still work with it as a normal array, not a pointer.
Last updated: 2024-01-09
To search for an exact phrase, put it in quotes. Example: "getting started docs"
To exclude a word or phrase, put a dash in front of it. Example: docs -help
To search on specific fields, use these field names instead of a general text search. You can group with AND or OR.