Omron CX-Programmer Initialising Arrays

Hann

Member
Join Date
Nov 2022
Location
New Zealand
Posts
16
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.

bLeLHkr.png


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.

QAykLy1.png
 

Similar Topics

Hello ! I am trying to use an omron cj2m-cpu33 with a CP1W-CIF01 plug in serial connector to talk to a zebra ZT610 printer. I am getting the data...
Replies
8
Views
316
I am using a function block that has a in/out parameter that is a structure. The structure has an array as one of the elements. I can index the...
Replies
1
Views
708
Is there a way in CX-Programmer to call Ladder Instructions from a structured text program? I can see several functions in the autocomplete...
Replies
3
Views
1,851
Is there a way in CX-Programmer to call functions from a structured text program? I have found this manual that seems to describe the process...
Replies
1
Views
1,006
Is there a way in CX-Programmer to ad UINTs together with an instruction without a compiler warning. Ladder Rung: Warning: Instructions...
Replies
2
Views
1,223
Back
Top Bottom