Search talk: declare array dimensions

 
<< < 1 .. 3 4 5 6 7 .. 23 > >> (Page 5 of 23)

Symbol for array element CODESYS Forge talk (Thread)
Symbol for array element
Last updated: 2018-04-15

Array of Bits CODESYS Forge talk (Thread)
Array of Bits
Last updated: 2023-07-11

Array addieren CODESYS Forge talk (Thread)
Array addieren
Last updated: 2008-05-29

Konstantes Array/Struktur? CODESYS Forge talk (Thread)
Konstantes Array/Struktur?
Last updated: 2009-04-24

dynamic array CODESYS Forge talk (Thread)
dynamic array
Last updated: 2012-10-01

Array of FB initialization CODESYS Forge talk (Thread)
Array of FB initialization
Last updated: 2018-02-15

max Array index? CODESYS Forge talk (Thread)
max Array index?
Last updated: 2009-02-21

ARRAY with and ENUM CODESYS Forge talk (Thread)
ARRAY with and ENUM
Last updated: 2022-06-16

OPCUA array max length? CODESYS Forge talk (Thread)
OPCUA array max length?
Last updated: 2024-02-19

Post by hammer on Cartesian XY Chart β€” 2-D array binding: "Element to use" enumerates the wrong dimension CODESYS Forge talk (Post)
Title: Cartesian XY Chart β€” 2-D array binding: "Element to use" enumerates the wrong dimension; documented example (Dialog: XY Chart Configuration, "Two-dimensional array of base type REAL") appears transposed Product / version: CODESYS Development System V3.5 SP21 Patch 40 (3.5.21.40). Cartesian XY Chart visualization element (System_VisuElemXYChart / VisuElemXYChart). Summary: When a curve's Data X/Data Y is bound to a two-dimensional array, the element treats the last array dimension as the per-point record (the one selected by "Element to use") and iterates the first dimension as the sequence of curve points. The online documentation's worked example has the dimensions in the opposite order, so following it produces a non-functional curve and a nonsensical "Element to use" list. Steps to reproduce (fails β€” matches the documented layout): 1. Declare aData : ARRAY[0..1, 0..4095] OF LREAL; (2 data sets Γ— 4096 points, i.e. first dimension = set, second = point). 2. In XY Chart Configuration, bind a curve's Data X (and Y) Variable to this array. 3. Observe the "Element to use" combobox. Actual result: The "Element to use" combobox lists 4096 entries (the indices of the second dimension) instead of 2 (the data sets in the first dimension). Selecting a row does not produce the expected curve; at most a single/degenerate point is plotted. Steps to reproduce (works β€” transposed): 1. Declare aData : ARRAY[0..4095, 0..1] OF LREAL; (points first, set second). 2. Bind Data X/Y to this array; "Element to use" now correctly lists [0] and [1]. 3. Populate aData[point, set] and the curve plots as expected. Expected result: Either the documented example should select the data set from the first dimension (as its [1]/[2] "Element to use" implies), or the documentation should state that the last dimension is the record dimension (stride) and the first dimension is the point sequence β€” consistent with how the element actually behaves. Analysis: The behavior is self-consistent if the element always walks a single array by a fixed byte stride, reading one element per point β€” the same mechanism as the documented "one-dimensional array of a DUT" case, where it strides by SIZEOF(DUT) and "Element to use" picks the member offset. For a 2-D array the record is the last dimension: to plot column/set c it starts at [0, c] and strides by the last-dimension length to reach [1, c], [2, c], … (row-major layout makes this a contiguous column walk). Under that rule, ARRAY[0..N, 0..1] is correct (record length 2 β†’ "Element to use" [0]/[1]), and the documented ARRAY[1..2, 1..50] with "Element to use" [1]/[2] is transposed. Documentation reference: Dialog: XY Chart Configuration β†’ Data X / Data Y β†’ "Example: Two-dimensional array of the base type REAL" (ARRAY[1..2, 1..50], Element to use [1]/[2], "100 array values are displayed"). This example does not plot as described in 3.5.21.40; transposing to ARRAY[1..50, 1..2] does. Request: Please confirm whether this is (a) a documentation error (example dimensions reversed) or (b) an element defect (combobox enumerates the wrong dimension). Either way, a corrected example plus an explicit statement of which dimension is the point sequence vs. the record/stride dimension would prevent others from hitting this. Two separate 1-D arrays for Data X and Data Y work correctly and are unaffected.
Last updated: 2026-08-14

Problem of assigning physical addresses to variables of type ARRAY OF ARRAY as MW and QW CODESYS Forge talk (Thread)
Problem of assigning physical addresses to variables of type ARRAY OF ARRAY as MW and QW
Last updated: 2025-03-31

How do I pass a array throught a function and return an array - Pointers CODESYS Forge talk (Thread)
How do I pass a array throught a function and return an array - Pointers
Last updated: 2018-04-16

Initialize an array of structures with a content of an array CODESYS Forge talk (Thread)
Initialize an array of structures with a content of an array
Last updated: 2020-05-18

Sorting array of any-sized structure CODESYS Forge talk (Thread)
Sorting array of any-sized structure
Last updated: 2023-08-18

Oscat Basic - Array sort function CODESYS Forge talk (Thread)
Oscat Basic - Array sort function
Last updated: 2021-06-25

combo box array - not working? CODESYS Forge talk (Thread)
combo box array - not working?
Last updated: 2016-06-22

Funktion - Pointer auf variables Array CODESYS Forge talk (Thread)
Funktion - Pointer auf variables Array
Last updated: 2017-09-26

Vergleich von Array- und Struktur-Variablen? CODESYS Forge talk (Thread)
Vergleich von Array- und Struktur-Variablen?
Last updated: 2007-05-18

Convert Array Of DINT To STRING CODESYS Forge talk (Thread)
Convert Array Of DINT To STRING
Last updated: 2023-12-03

Reverse bytes in an array CODESYS Forge talk (Thread)
Reverse bytes in an array
Last updated: 2024-08-22

Reverse bytes in an array CODESYS Forge talk (Thread)
Reverse bytes in an array
Last updated: 2024-08-22

REFERENCE TO in an array CODESYS Forge talk (Thread)
REFERENCE TO in an array
Last updated: 2025-05-21

string as array of bytes CODESYS Forge talk (Thread)
string as array of bytes
Last updated: 2021-11-30

FEHLER: Falscher Index fΓΌr Array! CODESYS Forge talk (Thread)
FEHLER: Falscher Index fΓΌr Array!
Last updated: 2007-08-06

Array mit unbestimmter Elementezahl / flexibler Speicher CODESYS Forge talk (Thread)
Array mit unbestimmter Elementezahl / flexibler Speicher
Last updated: 2011-01-14

<< < 1 .. 3 4 5 6 7 .. 23 > >> (Page 5 of 23)

Showing results of 570

Sort by relevance or date