Hey everyone. I am very new to using RSlogix and from the bit of searching this forum I've done, I found that everyone seems to be really helpful so I'm hoping you'll be able to help answer what I hope to be a simple question.
I am using RSlogix 5000 ladder logic (dont know how to use FB for ST logics)and I need to find the moving average of the last 200 objects past a cull flipper to see which objects passed by and which ones were culled off.
My thought for this was to use a PE as a trigger to count the 200 packages and to use an array and counter to store whether the cull flipper was triggered or not. Now, where I am stuck is being able to sum the values of the array. I would think there would be a single instuction to do this rather than having to use a large amount of ADD instructions to count each individual element of the array. But I may be wrong since I haven't found one yet. At one point, I thought the MAVE instruction was my ticket but isnt available in ladder logic. Does someone have an answer or, perhaps, a better way to do this than what I am thinking?
I am using RSlogix 5000 ladder logic (dont know how to use FB for ST logics)and I need to find the moving average of the last 200 objects past a cull flipper to see which objects passed by and which ones were culled off.
My thought for this was to use a PE as a trigger to count the 200 packages and to use an array and counter to store whether the cull flipper was triggered or not. Now, where I am stuck is being able to sum the values of the array. I would think there would be a single instuction to do this rather than having to use a large amount of ADD instructions to count each individual element of the array. But I may be wrong since I haven't found one yet. At one point, I thought the MAVE instruction was my ticket but isnt available in ladder logic. Does someone have an answer or, perhaps, a better way to do this than what I am thinking?