Declare enumerations outside Object Organizer?
    
    
       CODESYS Forge
    
    
      talk
    
    (Thread)
    
    
      Declare enumerations outside Object Organizer?
    
    Last updated: 2020-09-13
    
    
      
        Post by manuknecht on FileDialog - OnDialogClosed not called anymore
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      I had similar issues with the OnDialogClosed not being called. I realized that this behaviour is resolved, when the according visualization object on which the input configuration is set is moved to the foreground. Somehow, the object has to be one of the lowest elements in the Element List (i.e. in the foreground) for it to work.
    
    Last updated: 2025-04-25
    
    
      
        Post by benemenn on Type mappings in Datasource
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      Hi! I am trying to achieve the same issue. Has there been a solution? I can create the mapping, and map the local variable, but somehow the object does not update. Furthermore, i have an issue where codesys doesn't let me set ReadWrite accesses to the variables in the "Type Mapping" place. The access will simply not be set. Has anyone ran int that issue?
    
    Last updated: 2025-04-02
    
    
      
        How to reference an element on a visiualization in program?
    
    
       CODESYS Forge
    
    
      talk
    
    (Thread)
    
    
      How to reference an element on a visiualization in program?
    
    Last updated: 2012-10-22
    
    
      
        CmpIecVarAccess to get name of a type, not of a variable (instance)
    
    
       CODESYS Forge
    
    
      talk
    
    (Thread)
    
    
      CmpIecVarAccess to get name of a type, not of a variable (instance)
    
    Last updated: 2016-06-08
    
    
      
        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 clarenced on Multiple applications on one device sharing variables.
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      Sounds feasible, but how would I create this object so that both applications would use the same instance of it. If this did work, it's still not really the solution I am looking for as it would mean mapping every variable I want to use on the hmi through this object vs I was hopping all the GVL variables would be available.
    
    Last updated: 2025-02-20
    
    
      
        Post by struccc on Release SP20 - Changes in behaviour?
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      Dear all, I've just started to migrate some of my ancient projects to SP20. There is one strange error (?) I have noticed so far. In a method call, depending on the circumstances I would like to return reference to an object, or an invalid reference: METHOD Add_EVT_OUT : REFERENCE TO FB_MSG VAR END_VAR IF __ISVALIDREF(refMSG_Entry) THEN Add_EVT_OUT REF= MANAGER.AddMsg_EVT_OUT( refMSG_Entry, _Get_EVT_Message(MSG_EVENT.OUT), _Get_EVT_AddCode(MSG_EVENT.OUT) )^; ELSE Add_EVT_OUT := 0; END_IF So far setting a reference variable to 0, did this. But now, the expression Add_EVT_OUT := 0; gives an error: [ERROR] DB_WTP_370: Add_EVT_ACK MSG_TRIGGER_EXT: C0032: Cannot convert type 'BIT' to type 'REFERENCE TO FB_MSG' Naturally... I can write: Add_EVT_OUT := DWORD#0; But is this the correct way? Is there any constant I could use instead, like "NULL"? Or this is totally wrong and to be avoided?
    
    Last updated: 2024-03-24
    
    
      
        Post by manuknecht on Using SMC_MOVTYP.INITPOS without specifying the start position
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      I am using the object SMC_GEOINFO to generate a trajectory and move a system accordingly using the SMC_INTERPOLATOR function block similar to the sample project CNC10_DynamicPath.project. According to the documentation, the movement type INITPOS does not require a start position in the SMC_GEOINFO object, which is confirmed in the documentation of the SMC_GEOINFO object. When using the movement type INITPOS however, the motion will still start from the starting point defined in the SMC_GEOINFO object (0,0,0 if not specified otherwise). Does someone know how to resolve this or is there an example project that makes use of the INITPOS movement type without specifying the starting point? Thanks in advance!
    
    Last updated: 2023-12-15
    
    
      
        ENI server: Object type registry not found in the database
    
    
       CODESYS Forge
    
    
      talk
    
    (Thread)
    
    
      ENI server: Object type registry not found in the database
    
    Last updated: 2010-02-19
    
    
      
        How to Calculate Checksum of an array of bytes?
    
    
       CODESYS Forge
    
    
      talk
    
    (Thread)
    
    
      How to Calculate Checksum of an array of bytes?
    
    Last updated: 2016-05-08
    
    
      
        Post by e13740e on Parameterized Property syntax for array element processing
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      Since parameterized (indexed) properties are not possible, I decided to use architectural approach "Indexing Property Adapter" to achieve the intended goal β avoiding code duplication for validated access to array elements. Essence: Create a Function Block Adapter (FB_PropertyAdapter) that encapsulates the logic for working with a single element of the target array (e.g., with one settings structure). Declare Properties inside the adapter block for accessing each individual field of the data structure. All validation logic is implemented within the Set accessors of these properties. Data Binding via VAR_IN_OUT: The adapter block receives a reference to a specific data element from the global array through its VAR_IN_OUT section, which ensures direct work with the original data without copying. Create an Array of Adapters: In the parent POU (e.g., FB_SettingsManager), an array of these adapter blocks is created β one for each element of the global array that needs to be managed. Initialize Bindings: In a FOR loop, each adapter instance from the array is given a reference to the corresponding data element. Result: This approach allows accessing the data via the index of the adapter array, and then through the property name, which simulates the behavior of an indexed property: MyAdapterArray[Index].MyProperty Thus, the validation and data access logic is written only once inside the adapter block and is then reused multiple times by creating instances of it in an array. This completely solves the problem of code duplication while providing a clean, scalable, and object-oriented architecture compatible with standard CODESYS features. Question closed.
    
    Last updated: 2025-10-19
    
    
      
        Post by timvh on Sensor not set
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      Your function block instance is not called, so the code is not executed to set the light on when the button is pressed.
    
    Last updated: 2024-05-27
    
    
      
        Post by manuknecht on Using an Axis of an Axis Group in Torque Conctrol
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      I don't seem to be able to use an axis, which is part of an Axis Group in torque control mode. I call the SMC_SetControllerMode FB to switch from position to torque control mode, followed by the SMC_SetTorque FB to set the desired torque. This works flawlessly for most axes, however if an axis is part of an axis group, switching the controller mode seems to work without any issues, but the desired torque is never set. SMC_SetTorque does not return an error, but fSetTorque of the axis is never changed. Disabling the axis group before does not change anything, but if I use MC_UngroupAllAxes before changing the controller mode, it all works as it should. Is there no way to control a single axis in torque control, if it is part of an axis group?
    
    Last updated: 2025-07-17
    
    
      
        [OOP] Use extended interface instead of base interface as a method return object
    
    
       CODESYS Forge
    
    
      talk
    
    (Thread)
    
    
      [OOP] Use extended interface instead of base interface as a method return object
    
    Last updated: 2017-03-02
    
    
      
        Set REFERENCE to 0 (null) when no longer used
    
    
       CODESYS Forge
    
    
      talk
    
    (Thread)
    
    
      Set REFERENCE to 0 (null) when no longer used
    
    Last updated: 2024-10-07
    
    
      
        Post by ojz0r on Multiple applications on one device sharing variables.
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      One thing you could do is create an object with the variable as field with a function and procedure to get the variable (read) and set the variable (write). These are then called from your program and the vizualization.
    
    Last updated: 2025-02-20
    
    
      
        Post by alez on CANOpen SDO to write VISIBLE STRING
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      Hello, I am experiencing difficulties in configuring a CANopen device by sending SDOs. In particular I am attempting to write an Object Dictionary that has VISIBLE STRING as the Data Type. When I try to configure the sending of an SDO from Codesys to configure this parameter I am not allowed to enter a string value. In my particular case I am trying to change the Manufacturer Device Name ( Index 0x1008 ). Could it be that Codesys doesn't manage these types of variables?
    
    Last updated: 2024-04-29
    
    
      
        Post by benediktenger on Access project information of references library by script
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      Hi, I need to accesss to project information of a referenced library in the project. At least I need the "Released" flag from these information to check that no project gets shipped with unreleased libraries. Unfortunally, I do not get this information by script. I archieved to get the library reference object and the managed library object but both won't give me this flag but only basic information like company, name, version, etc. Here is my code: # get the library refernces proj = projects.primary objects = proj.get_children(recursive=True) for object in objects: if object.is_libman: for libref in iter(object): if libref.is_placeholder and isinstance(libref.effective_resolution,str): print(libref) print(libref.name) # get the managed libraries libs = librarymanager.get_all_libraries() for lib in libs: print(lib.displayname) print(lib.version) Does somebody know how do get these information?
    
    Last updated: 2023-10-23
    
    
      
        Post by timvh on Limiting Memory Access of an Array to Within its Bounds
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      Add the object "POU for Implicit Checks" to your application, then select "Bounds check". This will create a function which is automatically called each time an array is write accessed. In the function you can handle "out of bounds" situations. By default it will be limited to its lower or upper bound.
    
    Last updated: 2024-03-06
    
    
      
        Viewing Source Code for Visualization Object
    
    
       CODESYS Forge
    
    
      talk
    
    (Thread)
    
    
      Viewing Source Code for Visualization Object
    
    Last updated: 2007-07-03
    
    
      
        No source code available for this object
    
    
       CODESYS Forge
    
    
      talk
    
    (Thread)
    
    
      No source code available for this object
    
    Last updated: 2024-07-15
    
    
      
        OPC-UA object instances preexisting in imported xml information model
    
    
       CODESYS Forge
    
    
      talk
    
    (Thread)
    
    
      OPC-UA object instances preexisting in imported xml information model
    
    Last updated: 2024-08-08
    
    
      
        No source code available for this object
    
    
       CODESYS Forge
    
    
      talk
    
    (Thread)
    
    
      No source code available for this object
    
    Last updated: 2025-01-28
    
    
      
        Accessing a library object without using the namespace
    
    
       CODESYS Forge
    
    
      talk
    
    (Thread)
    
    
      Accessing a library object without using the namespace
    
    Last updated: 2018-08-17
    
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.