Search talk: real to array

 
<< < 1 2 3 4 5 6 .. 177 > >> (Page 4 of 177)

BadTooManyOperations after changing array dimension from 80 to 160 CODESYS Forge talk (Thread)
BadTooManyOperations after changing array dimension from 80 to 160
Last updated: 2022-08-09

how to read the data from array CODESYS Forge talk (Thread)
how to read the data from array
Last updated: 2013-04-15

Mapping of Array Element to a EtherCAt Slave variable CODESYS Forge talk (Thread)
Mapping of Array Element to a EtherCAt Slave variable
Last updated: 2018-07-25

save the varies of array to a TXT file CODESYS Forge talk (Thread)
save the varies of array to a TXT file
Last updated: 2014-05-26

[SOLVE] Convert array of word to string CODESYS Forge talk (Thread)
[SOLVE] Convert array of word to string
Last updated: 2023-06-30

How to create an array dynamically CODESYS Forge talk (Thread)
How to create an array dynamically
Last updated: 2009-06-16

Limiting Memory Access of an Array to Within its Bounds CODESYS Forge talk (Thread)
Limiting Memory Access of an Array to Within its Bounds
Last updated: 2024-03-06

Is it possible to send a real value close to 0 through modbus? CODESYS Forge talk (Thread)
Is it possible to send a real value close to 0 through modbus?
Last updated: 2023-02-25

array table and combo box array multitouch problem CODESYS Forge talk (Thread)
array table and combo box array multitouch problem
Last updated: 2018-04-23

Write one dimensional array into two dimensional array CODESYS Forge talk (Thread)
Write one dimensional array into two dimensional array
Last updated: 2022-02-25

Post by apurv on Cannot pass array of constant size to a function as a reference CODESYS Forge talk (Post)
I have a Array of constant size defined like this Var Constant MAX_SIZE :UINT := 10; End_var VAR array : ARRAY[0..MAX_SIZE] OF INT; END_VAR Now I want to pass this array to a function by reference, Function fun : INT VAR_IN_OUT CONSTANT MAX_SIZE : UINT; END_VAR VAR_INPUT array : REFERENCE TO ARRAY[0..MAX_SIZE] OF INT; END_VAR but when I run this it gives strange Errors Error : Cannot Convert type 'ARRAY [0..MAX_SIZE] OF INT' to type 'ARRAY[0..MAX_SIZE] OF INT'
Last updated: 2024-01-07

Post by john-robinson on Limiting Memory Access of an Array to Within its Bounds CODESYS Forge talk (Post)
Recently we had an issue regarding some simple code to calculate a rolling average. The code indexes from zero to 199 to properly store the current input into a circular buffer which then allows us to calculate a rolling average: VAR input_5s : REAL; outs_arr : ARRAY[0..199] OF REAL; i : USINT := 0; END_VAR ___ //this code runs every five seconds, calculating a rolling average outs_arr[i] := input_5s; i := i + 1; output := OSCAT_BASIC.ARRAY_AVG(ADR(outs_arr), SIZEOF(outs_arr)); IF i >= SIZEOF(outs_arr) THEN i := 0; END_IF There is a simple bug in this code where the index will be set to 0 when it has surpassed the length of the array in bytes (800 in this case) rather than larger than the number of reals in the array (200). The solution here is simple, replacing i >= SIZEOF(outs_arr) with i >= SIZEOF(outs_arr)/SIZEOF(outs_arr[0]). In this example when the index increased to 201 and the line outs_arr[201] := input_5s was called, codesys arbitrarily wrote to the address in memory that is where outs_arr[201] would be if the array was that long. I would like to find a way to wrap the codesys array inside of a wrapper class that checks if an input is within the bounds of an array before writing to that value. I know how I would implement that for a specific array, I could create a method or class that takes an input of an array of variable length, ie. ARRAY[*] OF REAL, but I don't know how to make this for any data type. I am wondering if anyone has ever done anything similar to this, or has any better suggestions to ensure that none of the programmers on this application accidentally create code that can arbitrarily write to other locations in memory.
Last updated: 2024-03-05

Cannot convert type 'Unknown type: 'ADR(tabOrderIdArray)" to type 'POINTER TO ARRAY [0..0]OF INT' CODESYS Forge talk (Thread)
Cannot convert type 'Unknown type: 'ADR(tabOrderIdArray)" to type 'POINTER TO ARRAY [0..0]OF INT'
Last updated: 2021-04-26

How to select the real I/O module terminals/channels in CODESYS V3.5 ? Or better to say, How to specify the real physical terminals of analog and digital I/O modules in the CODESYS programm ? CODESYS Forge talk (Thread)
How to select the real I/O module terminals/channels in CODESYS V3.5 ? Or better to say, How to specify the real physical terminals of analog and digital I/O modules in the CODESYS programm ?
Last updated: 2022-08-13

How to select the real I/O module terminals/channels in CODESYS V3.5 ? Or better to say, How to specify the real physical terminals of analog and digital I/O modules in the CODESYS programm ? CODESYS Forge talk (Thread)
How to select the real I/O module terminals/channels in CODESYS V3.5 ? Or better to say, How to specify the real physical terminals of analog and digital I/O modules in the CODESYS programm ?
Last updated: 2022-07-29

ARRAY of unknow struct CODESYS Forge talk (Thread)
ARRAY of unknow struct
Last updated: 2017-10-09

TwinCAT ARRAY CODESYS Forge talk (Thread)
TwinCAT ARRAY
Last updated: 2018-08-16

In Array suchen CODESYS Forge talk (Thread)
In Array suchen
Last updated: 2010-12-22

Array Deklaration über Konstante CODESYS Forge talk (Thread)
Array Deklaration über Konstante
Last updated: 2012-07-30

ARRAY [*] OF in PLCopenXML CODESYS Forge talk (Thread)
ARRAY [*] OF in PLCopenXML
Last updated: 2018-10-26

ARRAY beschreiben CODESYS Forge talk (Thread)
ARRAY beschreiben
Last updated: 2008-04-07

ARRAY ALS FESTER SPEICHER CODESYS Forge talk (Thread)
ARRAY ALS FESTER SPEICHER
Last updated: 2009-05-13

Array größe bestimmen. CODESYS Forge talk (Thread)
Array größe bestimmen.
Last updated: 2008-01-05

Increas Array Element CODESYS Forge talk (Thread)
Increas Array Element
Last updated: 2023-06-17

String array corruption CODESYS Forge talk (Thread)
String array corruption
Last updated: 2012-01-31

<< < 1 2 3 4 5 6 .. 177 > >> (Page 4 of 177)

Showing results of 4421

Sort by relevance or date