Rockmonton
Member
Folks,
Having a silly problem.
Trying to package a routine up that needs to be repeated ~~50 times into a nice Tidy AOI.
I need to do some array math, Summing and Averaging a few dimensions of a 1000 element x 7 array.
In the routine to develop the logic, which works, I have been using the following pseudocode to sum the array
Timer Done > Clear Sum > FAL (ALL) [Control_For_FAL, Output: Sum, Expression: (Sum + Array(Control_For_FAL.POS)]
This works just fine in RSLogix, but when wrapped into the AOI I can't get it to work. The rest of my FFU/FFL stuff works alright but struggling here.
Next step would be to write a few array sum/avg AOIs in structured text and package them in, but there's no reason this shouldn't work that I can find....
Put a couple of outputs to try and figure out what's going on, it appears that I can't get the control structure to cycle through, as the Position gets set to zero (Tried leaving it at an arbitrary middle number during testing) and the Dn bit does not come on.
Having a silly problem.
Trying to package a routine up that needs to be repeated ~~50 times into a nice Tidy AOI.
I need to do some array math, Summing and Averaging a few dimensions of a 1000 element x 7 array.
In the routine to develop the logic, which works, I have been using the following pseudocode to sum the array
Timer Done > Clear Sum > FAL (ALL) [Control_For_FAL, Output: Sum, Expression: (Sum + Array(Control_For_FAL.POS)]
This works just fine in RSLogix, but when wrapped into the AOI I can't get it to work. The rest of my FFU/FFL stuff works alright but struggling here.
Next step would be to write a few array sum/avg AOIs in structured text and package them in, but there's no reason this shouldn't work that I can find....
Put a couple of outputs to try and figure out what's going on, it appears that I can't get the control structure to cycle through, as the Position gets set to zero (Tried leaving it at an arbitrary middle number during testing) and the Dn bit does not come on.