Apologies.
LAR1 P#DBX0.0
LAR2 P#DBX0.0
L 108
next: T #count
LAR2 P#DBX0.0
OPN "Light Switch Config Data"
L DBW [ AR1 , P#0.0 ]
+AR2
OPN "MB_Collection"
A DBX [ AR1 , P#0.0 ]
OPN "Light Switch Config Data"
= DBX [ AR2 , P#216.0 ]
+AR1 P#2.0
//+AR2 P#2.0
L #count
LOOP next
Thanks.
Thinking that you could do this also on word compare.
First, copy from DB17 6 ints indirectly.
index have value 0..17 to first array (looping from 0 to 17)
"DB17".switch[#index, 1] - move-> cmp1_word1
"DB17".switch[#index, 2] - move-> cmp1_word2
"DB17".switch[#index, 3] - move-> cmp1_word3
"DB17".switch[#index, 4] - move-> cmp1_word4
"DB17".switch[#index, 5] - move-> cmp1_word5
"DB17".switch[#index, 6] - move-> cmp1_word6
"DB18".switch[#index, 1] - move-> cmp2_word1
"DB18".switch[#index, 2] - move-> cmp2_word2
"DB18".switch[#index, 3] - move-> cmp2_word3
"DB18".switch[#index, 4] - move-> cmp2_word4
"DB18".switch[#index, 5] - move-> cmp2_word5
"DB18".switch[#index, 6] - move-> cmp2_word6
then And_word block for these word values, so you get 6 compare result of words of DB17 and DB18 arrays.
Now you need to set/reset DB216.0-218.2 bits depending of compare result.
then loop this 18 times?
And sorry, don't have TIA portal available right now, so no complete block code, more like pseudo code.