read csv into string array help
    
    
       CODESYS Forge
    
    
      talk
    
    (Thread)
    
    
      read csv into string array help
    
    Last updated: 2018-02-26
    
    
      
        auf Feldbusvariablen ΓΌber Array zugreifen
    
    
       CODESYS Forge
    
    
      talk
    
    (Thread)
    
    
      auf Feldbusvariablen ΓΌber Array zugreifen
    
    Last updated: 2024-02-23
    
    
      
        Init Array input on a method
    
    
       CODESYS Forge
    
    
      talk
    
    (Thread)
    
    
      Init Array input on a method
    
    Last updated: 2024-02-26
    
    
      
        Post by dominggus on Recipe Manager - RecipeManCommands, load & write wrong values, Bug?
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      I still have the same problem even when updating to CODESYS Recipes 4.3.0.0. My scenario: I'm trying to save/load an array of structs using the Visu: - Execute Command > "SaveRecipeAs" works properly - Execute Command > "LoadWriteRecipe" works not entirely: the structs of array[6] and array[7] should have been empty but were duplicates of array[4] and array[5]... the struct contains 26 variables and the array's length is 30.. Maybe there is a upper limit on recipe variable count?
    
    Last updated: 2024-03-02
    
    
      
        Post by corriibme on Setting array values with JSON Utilities SL
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      I have been trying to set an array value to a JSON structure of this form: {"key": [1,2,3,4]} While I have been able to create the key and set its value to an empty array, I've not had any luck in putting any value in that array. objindex:= fb_JBuilder.SetKeyWithArray("Key6", diParentIndex := diRootIndex); objindex2:= fb_JBuilder.SetValue(value:= iValue2, diParentIndex:= objindex); iValue2: ARRAY[0..3] OF INT:= [1,2,3,4]; The two lines of code above produce {"key6": []} . The second line essentially has no effect.
    
    Last updated: 2024-05-12
    
    
      
        Post by leon78 on Codesys 3.5 SP17 Patch 2 CheckBounds (POUs for Implicit Checks)
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      Hello! I use CheckBounds (POUs for Implicit Checks). But I have a problem. I use an array as an VAR_IN_OUT of Function Block. If I try to monitor the array of variable length ([* ]), its does't work. The CheckBounds POU isn't called. If I use the array of fixed lenght ([lower..upper]), the CheckBounds POU is called. Why?
    
    Last updated: 2023-11-14
    
    
      
        Post by leon78 on Codesys 3.5 SP17 Patch 2 CheckBounds (POUs for Implicit Checks)
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      Hello! I use CheckBounds (POUs for Implicit Checks). But I have a problem. I use an array as an VAR_IN_OUT of Function Block. If I try to monitor the array of variable length ([* ]), its does't work. The CheckBounds POU isn't called. If I use the array of fixed lenght ([lower..upper]), the CheckBounds POU is called. Why?
    
    Last updated: 2023-11-14
    
    
      
        Post by janber on REFERENCE TO in an array
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      Hi all, in the online help it written, that array of reference to data type is not possible. Ok... but if I create array of struct of reference to - everything works fine - please see the screenshots: and it works this way OK. Is it intention or error in compiler 3.5.18.20 and we should avoid it? Thanks a lot, Jan.
    
    Last updated: 2024-10-14
    
    
      
        Post by alexgooi on Init Array input on a method
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      Dear Forum, I would like to initialize an array input on a method. When I do this, I get the following error: "The type of ARRAY [1..2] OF BOOL cannot have a default value in this context." I attached a picture for more clarity. Is this simply not possible or is there a different way of tackling this problem? Thank you in advance
    
    Last updated: 2024-02-26
    
    
      
        Post by szotyi on Array of Program
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      Hi! What is the proper and the easiest way to call programs through looping of array of programs, or pointer of program? instead of calling the programs one by one: prog1(inputX: 11); prog2(inputY: 12); prog3(inputZ: 13); similar like: VAR programsToCall : ARRAY [1..3] OF PROGRAM; END_VAR programsToCall[1] := prog1(inputX: 11); programsToCall[2] := prog2(inputY: 12); programsToCall[3] := prog3(inputZ: 13); FOR i := 1 TO 3 DO programsToCall[i] (); END_FOR Thanks.
    
    Last updated: 2024-08-28
    
    
      
        Post by kislov on Remove white spaces in file .txt
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      Seems like you use SIZEOF as size, but you need to use LEN as size of data which you want to write.
    
    Last updated: 2024-04-23
    
    
      
        Post by hazarath on How extract JSONElement containing Array data
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      I want to extract each element of an Array. Can someone help me with this. When I use JSONElementToString (part of JSON Utilities SL), I am seeing output as "ARRAY" instead of actual data. Here is the JSON content that I want to read : { "value1Unit": { "units": "M" }, "data": { "stepSize": 300.23, "points": [6,8] } } I would like to read each item of the element "points" i.e. 6 and 8. Here is the code I used, // Reading the content as JSON reader ( xExecute := execute , pwData := ADR ( converted_value ), jsonData := jsonDataStorage ); // Get the JSON Element jsonDataStorage.FindFirstValueByKey( wsKey := fidKeyVar, diStartIndex := searchElem, jsonElement => jsonElement ); JSON.JSONElementToString ( element := jsonElement , wsResult := valueWstring ); The content of the output of valueWstring is shown as "ARRAY" instead of the array items i.e. 6 and 8 Please can someone help me.
    
    Last updated: 2024-07-30
    
    
      
        Post by mxj262 on FB having single input but initialized with Array
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      I am adding elements of an ARRAY using pointer to access each element inside a FOR loop and the FOR loop does not stop! What is the right way to use pointers in such case?? I have another loop that is not using pointer and it stops but the loop using pointer keep on adding. METHOD FB_Init: BOOL VAR_INPUT bInitRetains: BOOL; // TRUE: the retain variables are initialized (reset warm / reset cold) bInCopyCode: BOOL; // TRUE: the instance will be copied to the copy code afterward (online change) END_VAR VAR_IN_OUT // basically REFERENCE TO window_buffer: ARRAY [*] OF INT; // array of any size END_VAR THIS^.windowPtr := ADR(window_buffer[0]); THIS^.windowSize := UPPER_BOUND(window_buffer, 1) - LOWER_BOUND(window_buffer, 1) + 1; FUNCTION_BLOCK FB500 VAR_INPUT END_VAR VAR_OUTPUT END_VAR VAR windowPtr: POINTER TO INT; windowSize: DINT; currentIndex: UINT; element1:INT; element2:INT; i:INT; j:INT; sum:DINT:=0; END_VAR element1:=windowPtr[0]; // read the first element of the Array dynamic memorry element2:=windowPtr[1]; FOR i:=0 TO (TO_INT(windowSize-1)) BY 1 DO // this loop does not stop Sum:=sum + windowPtr[i]; END_FOR FOR j:=0 TO 5 BY 1 DO // this loop stops j:=j+1; END_FOR https://ibb.co/k3DhkZT
    
    Last updated: 2024-05-06
    
    
      
        Post by corriibme on JSON Utilities and SetArray
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      Hello @florian, Could you please help with how to set an array value? I've been trying to use the with the setKeyWithArray method which creates the key with an empty array value. But I have been unable to set items in this array? objindex:= fb_JBuilder.SetKeyWithArray("Key6", diParentIndex := diRootIndex); objindex2:= fb_JBuilder.SetValue(value:= iValue2, diParentIndex:= objindexx); //iValue: array[0..n] of int; Best regards
    
    Last updated: 2024-05-11
    
    
      
        Post by mucleus on How do I fix ";Internal Error (x86-64): Invalid type size" error?
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      I opened the project file of version 3.5.19.7 in 3.5.21.0. I updated all the environment of the project to the latest and compiled it. When I compile it, I get an error ";Internal Error (x86-64): Invalid type size". How can I fix this error? I will wait for your help.
    
    Last updated: 2025-04-15
    
    
      
        Post by rafaelbrito on The element of type 'VisuFbElemImage' could not be updated. Reason: Index was outside the bounds of the array.
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      When trying to use the Visualization ToolBox, no objects appear and the following error appears. Could you tell me what this error could be? The element of type 'VisuFbElemImage' could not be updated. Reason: Index was outside the bounds of the array. Can anyone tell me what this error is?
    
    Last updated: 2024-12-03
    
    
      
        Post by peterned on Array to String
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      max. string length in Codesys is 255 chars. It's not possible to cram 20,000 things in a string. If you need to send the data to another device, send the whole data[] array (as byte array, without doing anything to it) and extract the information on the other end. As each struct member has a fixed size (81 bytes, as per you declaration), this will be easy. To save some resources, consider declaring string lengths - e.g. if the max possible length for key is 10 chars, declare it key: STRING(10); and it will occupy 11 bytes instead of 81
    
    Last updated: 2024-07-20
    
    
      
        Post by rickj on Defining local variables that can be independent with several users.
    
    
       CODESYS Forge
    
    
      talk
    
    (Post)
    
    
      You need to create an array with one element for each possible user. I usually define these arrays in the root screen. FrameIndex : Array [0..MaxUsers] OF INT; Then use the global CurrentClientId (defined by one of the VISU libraries) to index the array element used to select the frame. FrameIndex[CurrentClientId]
    
    Last updated: 2023-10-21
    
    
      
        How do I fix ";Internal Error (x86-64): Invalid type size" error?
    
    
       CODESYS Forge
    
    
      talk
    
    (Thread)
    
    
      How do I fix ";Internal Error (x86-64): Invalid type size" error?
    
    Last updated: 2025-04-16
    
    
      
        How to stop execution when a table index goes outside the table size range.
    
    
       CODESYS Forge
    
    
      talk
    
    (Thread)
    
    
      How to stop execution when a table index goes outside the table size range.
    
    Last updated: 2019-11-06
    
    
      
        Wrong font size after installation on Windows 7 64-bit
    
    
       CODESYS Forge
    
    
      talk
    
    (Thread)
    
    
      Wrong font size after installation on Windows 7 64-bit
    
    Last updated: 2011-06-14
    
    
      
        How to change visualization size, or initiate automatic detection at runtime?
    
    
       CODESYS Forge
    
    
      talk
    
    (Thread)
    
    
      How to change visualization size, or initiate automatic detection at runtime?
    
    Last updated: 2020-04-08
    
    
      
        How to adjust Maximun packet size in the parameter list? (MQTT) 
    
    
       CODESYS Forge
    
    
      talk
    
    (Thread)
    
    
      How to adjust Maximun packet size in the parameter list? (MQTT)
    
    Last updated: 2022-11-07
    
    
      
        What is the bitmap size and resolution to add in PLC_Visu
    
    
       CODESYS Forge
    
    
      talk
    
    (Thread)
    
    
      What is the bitmap size and resolution to add in PLC_Visu
    
    Last updated: 2009-08-03
    
    
      
        Is it possible to change the code font size in Codesys 2.3 ?
    
    
       CODESYS Forge
    
    
      talk
    
    (Thread)
    
    
      Is it possible to change the code font size in Codesys 2.3 ?
    
    Last updated: 2022-04-16
    
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.