Get the in-, out- and inoutputs from compiled library POUs in my Python script
    
    
       CODESYS Forge
    
    
      talk
    
    (Thread)
    
    
      Get the in-, out- and inoutputs from compiled library POUs in my Python script
    
    Last updated: 2018-08-07
    
    
      
        Post by davidbo on What does CODESYS expect to do when I get such an error message
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      What does CODESYS expect me to do when I get such an error message:
    
    Last updated: 2024-01-08
    
    
      
        What does CODESYS expect to do when I get such an error message
    
    
       CODESYS Forge
    
    
      talk
    
    (Thread)
    
    
      What does CODESYS expect to do when I get such an error message
    
    Last updated: 2024-01-08
    
    
      
        Code for reading 4 address to get 1 value of sensor (Ethernet IP)
    
    
       CODESYS Forge
    
    
      talk
    
    (Thread)
    
    
      Code for reading 4 address to get 1 value of sensor (Ethernet IP)
    
    Last updated: 2024-05-06
    
    
      
        Scripting - how to get the fixed compiler version from Project settings
    
    
       CODESYS Forge
    
    
      talk
    
    (Thread)
    
    
      Scripting - how to get the fixed compiler version from Project settings
    
    Last updated: 2024-06-13
    
    
      
        Post by alink on Visu - changing auto-logout time
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      Hello is there a chance to set with a visu input the auto-logout time? At the moment, it is a fix value set in visu-manager. But for individual configurating of passwort policies I create a visu-dialog to set policies and there for an option to set auto-logout-time. But till now, I haven't found a solution. Maybe someone has an idea? Thanks
    
    Last updated: 2023-11-30
    
    
      
        Post by jtebokkel on Set REFERENCE to 0 (null) when no longer used
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      yes, it works
    
    Last updated: 2024-10-07
    
    
      
        Post by atone on File Creation Issue
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      Found it! Set ForceIecFilePath to 0 in CODESYSControl.cfg
    
    Last updated: 2024-01-04
    
    
      
        Post by fless on Release SP20 - Changes in behaviour?
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      use this to set an invalid reference Add_EVT_OUT REF= 0;
    
    Last updated: 2024-03-24
    
    
      
        Post by e13740e on Parameterized Property syntax for array element processing
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      Hello. I'm trying to create a Parameterized Property(CDS V3.5 SP21) to avoid copy-pasting code for processing array elements. I can't seem to get any result. Perhaps I am making a mistake with the syntax. None of the declaration options below are accepted by the compiler. If you know and use them (Parameterized Properties) in your work, please let me know. Thank you in advance. Option 1: PROPERTY <property_name> : <data_type> VAR_INPUT <index_name> : <index_type>; // One or more index parameters are declared here END_VAR</index_type></index_name></data_type></property_name> GET Code that uses <index_name> to return a value END_GET</index_name> SET Code that uses <index_name> and the implicit variable <property_name> to write a value END_SET</property_name></index_name> END_PROPERTY Option 2: PROPERTY <property_name> (<index_name> : <index_type>) : <data_type></data_type></index_type></index_name></property_name> GET Code that uses <index_name> to return a value END_GET</index_name> SET Code that uses <index_name> and the implicit variable <property_name> to write a value END_SET</property_name></index_name> END_PROPERTY
    
    Last updated: 2025-10-09
    
    
      
        Post by e13740e on Parameterized Property syntax for array element processing
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      Hello. I'm trying to create a Parameterized Property(CDS V3.5 SP21) to avoid copy-pasting code for processing array elements. I can't seem to get any result. Perhaps I am making a mistake with the syntax. None of the declaration options below are accepted by the compiler. If you know and use them (Parameterized Properties) in your work, please let me know. Thank you in advance. Option 1: PROPERTY <property_name> : <data_type> VAR_INPUT // One or more index parameters are declared here <index_name> : <index_type>; END_VAR</index_type></index_name></data_type></property_name> // Accessor for reading GET // Code that uses <Index_Name> to return a value END_GET // Accessor for writing SET // Code that uses <Index_Name> and // the implicit variable <Property_Name> to write a value END_SET END_PROPERTY Option 2: PROPERTY <property_name> (<index_name> : <index_type>) : <data_type></data_type></index_type></index_name></property_name> // Accessor for reading GET // Code that uses <Index_Name> to return a value END_GET // Accessor for writing SET // Code that uses <Index_Name> and // the implicit variable <Property_Name> to write a value END_SET END_PROPERTY
    
    Last updated: 2025-10-09
    
    
      
        Post by ahuckphin on Issues with Modbus Slave with Raspberry Pi
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      I have a DFRobot RS485 temperature & humidity sensor (SEN0438) connected to my Raspberry Pi via a USB to RS485 adapter. I am able to connect and read the sensor data when running a python code locally. However in Codesys, I encounter this error "A bus error has occurred." and "There was no response in time". Could this be because of Modbus Server Channel and Modbus Server Init configuration on my part? Admittedly I am new to Codesys. To get to this stage, I: 1. added some lines to CODESYSControl_User.cfg 2. added "Modbus_COM" in Codesys and set "Serial Port Configuration" under "General" 3. added "Modbus_Master_COM_Port" in Codesys and checked transmission mode is set to "RTU" 4. added "Modbus_Slave_COM_Port" in Codesys and checked server address is set to 1 (also set 1 in my sensor) 5. added 1 channel and 1 init for "Modbus_Slave_COM_Port" under "Modbus Server Channel" and "Modbus Server Init"
    
    Last updated: 2024-07-10
    
    
      
        Post by simotion on Codesys Softmotion Win V3 x64
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      I have a project in Codesys v3.5 sp19 patch2 that contains softmotion virtual axes. I want to simulation the code (softmotion) on the simulated plc on the pc. The controller in the project is a Codesys Softmotion Win V3 x64. I have started up the Codesys Softmotion Win 64 on the pc. However it seems a 3.5 sp14 controller. When trying to download the project, I get a message that target system is different from connected system (3.5.19 vs 3.5.14). How do I set the connected system to 3.5.20 (there seems no way to set the target system to 3.5.14
    
    Last updated: 2023-10-04
    
    
      
        Post by ofey on Modbus TCP communication
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      Hi! I tried setting up the PLC I'm working with (Beijer GN-9373) to connect to a modbus master running on a laptop. I have an ethernet connection (via USB-C to ethernet) between the laptop and the controller. I have tried following tutorial on how to set this up. I have added an ethernet device with the IP-address of the PLC. Further I added a ModbusTCP_Slave_Device with default settings. I get the error "Failed to open TCP Port: 1" when I try to go online with the PLC. Earlier I tested the exact same set up with the soft PLC from codesys. I can then read/write values correctly with the Modbus master i have running on the laptop. Hope anybody can help me with this, thanks in advance!
    
    Last updated: 2023-10-06
    
    
      
        Post by jerry-sorrells on Find Function: Object reference not set to an instance of an object.
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      Build: CODESYS 3.5 SP19 Patch 1 (64-bit) Host OS: Windows 10 Target: Linux SL I have a project with programs in Structured Text and Ladder Diagram. When I try to use the Find function, it works for the Active Editor; however, when I try to use Find for the Entire Project, I get the error "Object reference not set to the instance of an object." I know what this error means in the context of the program, but I have no idea why the find function is returning this error. The variable I am searching does not matter: it happens with all variables. Any help with this will be greatly appreciated. I generally use the Find function quite often as I am developing and not having it is really slowing me down.
    
    Last updated: 2023-10-23
    
    
      
        Post by timvh on Problem Reading Registers via Modbus from non Codesys device
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      According to the documentation: https://wiki.teltonika-networks.com/view/RUT956_Modbus You need to create a Channel to read 2 registers from address 143 to get the lattitude. It doesn't specify if you need to read it as a Holding Register or as an Input Register. You could try both. So in the Teltonika router, you need to enable it as being a Modbus Server. Then in CODESYS add an Ethernet Adapter, then a Modbus Client (Master) and to the Client (Master) add the Modbus Server (Slave). Set the IP address and add the Channel. The please consider that CODESYS doesn't update any variables when they are not used in the application. In the I/O mapping tab of your I/O configuration, you can set the "Always update" to enabled.
    
    Last updated: 2025-03-08
    
    
      
        Post by viksym on How to get the motor scaling value from code
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      Is there a way to see what value is set as the "Work travel distance per motor rotation" that is set in the Scaling menu of the axis ? I am working on my own homing function block for sensorless (hardstop) homing and I want to make it be universal between different axes with different motor's scaling for distance per rev so I need to know this value from the axis itself. I know I could do it by just creating an input variable for the function block but I'm leaving that option as a last resort.
    
    Last updated: 2025-06-12
    
    
      
        Post by jeroenaero on CodeSys Raspberry pi I2C driver not found
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      Finnaly i get it working. There was a line in the file that set the ADS1015 chip in /boot/firmware/config.txt which i removed and after that the ADS1115 has a green turning circle and i got values. i created a new component so it fits our ADS1015. see screenshot. It works also with Codesys Control for Raspberry Pi 64 SL after adding the ULINT_TO_UDINT conversion in the library. i think the chip was all the time in use by the Raspberry pi itself. Thanks for your help!
    
    Last updated: 2024-11-12
    
    
      
        Post by pedrorgd on SFC Exit Action during SFCReset Flag
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      I have an SFC POU with an SFCReset Flag that I use to restart it from the beginning. It works properly. During an Action Step I set one variable to TRUE and I reset it to FALSE during the Exit Action. My question is if this Exit Action will be activated -and the variable reset to FALSE- if I get out of the active step using the SFCReset Flag.
    
    Last updated: 2025-02-11
    
    
      
        Post by kuegerls on OpC UA server on Raspberry Pi MC SL - Certificate Issue 
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      Hello, I have set up an OPC UA server following several guides, including this one: https://revolutionpi.com/documentation/tutorials/opc-ua-codesys-nodered/. The license for the runtime is installed on the device. However, I am unable to create a certificate for the OPC UA server in the security screen. I always get the error message: "The certificate has not been created by the device." Does anyone have an idea what might be causing this issue? Any help would be greatly appreciated! Thanks in advance! Best regards, Stefan
    
    Last updated: 2025-04-02
    
    
      
        Post by lookingforhelp on CODESYS v3.5 SP18
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      Hello @community, i hope i will get a solution for following problem. I am using CODESYS v3.5 SP18. At the visualization i dont see the action for the element which i could set below the InputConfiguration-Section. I found a topic about that, but this could be resolved through activate the Advanced Checkbox. But in my case it did not work. See the screenshots. I hope someone know this problem and have a solution. Thank you in advance.
    
    Last updated: 2025-04-17
    
    
      
        Post by lookingforhelp on CODESYS v3.5 SP18
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      Hello @community, i hope i will get a solution for following problem. I am using CODESYS v3.5 SP18. At the visualization i dont see the action for the element which i could set below the InputConfiguration-Section. I found a topic about that, but this could be resolved through activate the Advanced Checkbox. But in my case it did not work. See the screenshots. I hope someone know this problem and have a solution. Thank you in advance.
    
    Last updated: 2025-04-17
    
    
      
        Post by vsgn on Passing properties as VAR_IN_OUT variables.
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      Hi, in my experience, the best options for such a case could be: 1. Pass a FunctionBlock via VAR_IN_OUT, containing all variables, mehods and properties needed for the logic of this graphic element (be aware of implementing correcly both get and set accessor for properties) 2. Pass an Interface via VAR_INPUT, of which you can use obviously only Properties and Methods. This is much more elegant for me. Here, you can just pass directly the instance of a FunctionBlock implementing such Interface as input. Hope you'll find this suggestions useful.
    
    Last updated: 2025-05-13
    
    
      
        Post by macros8 on Translation - How to get text as reference in Frames translated?
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      Hi, one more point. I have been able to create Property of Text which is added to Global text list so itΒ΄s fine. But as soon as I use Frame configuration I lose all other properties but some very basics. I need to have still possibility to set Input configuration because my element is Button. Do you know how to make visible all standard properties + my own properties created in Frame configuration? Thanks a lot. M.
    
    Last updated: 2024-01-03
    
    
      
        Post by richard-wang on Codesys recipe manager - what does it do?
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      Hi All Thanks for sharing this information. For whom may not know why always get error code 16#4000 or 16#4002 while performing Recipe commands, the root cause is There is a line need to be inserted in CODESYSControl.cfg file, which is PlaceholderFilePath.1=/var/opt/codesys/PlcLogic/ I am using Pi, therefore the above path is set to my pi unit, after adding above line to my cfg file, all the Recipe commands work fine. But I still do not know how and when this file got modified though.
    
    Last updated: 2024-04-29
    
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.