Hann
Member
Is there a way in CX-Programmer to initialise an array?
Set all values to zero or false depending on the data type
Solutions in Ladder and Structured Text are needed
The solution that uses the fewest steps is desired.
Potential solutions
- Set each element to 0 or False (Consumes many steps to do this)
- Use a for loop to reset all values
- Incapsulate a for loop into a function that has an array as an In_Out Parameter.
- For Bool arrays mov a #0 into the first element of the array. (Not able to do this with other array types)
I would like to know if there are methods that I am not seeing for accomplishing this task.
Set all values to zero or false depending on the data type
Solutions in Ladder and Structured Text are needed
The solution that uses the fewest steps is desired.
Potential solutions
- Set each element to 0 or False (Consumes many steps to do this)
- Use a for loop to reset all values
- Incapsulate a for loop into a function that has an array as an In_Out Parameter.
- For Bool arrays mov a #0 into the first element of the array. (Not able to do this with other array types)
I would like to know if there are methods that I am not seeing for accomplishing this task.