Hey there.
We have 8 digital inputs that define machine states. The inputs can work together and that gives us 256 different states. All we need to do is register all the states, but we don't really want to use 256 counters in the ladder logic and need to think of another way. Ladder logic is the only language we can actually use. The states are scanned every 100ms and we need to sum them up every 1 minute.
Example
We get the states
00000001 - t = 1s
00000010 - t = 2s
00000001 - t = 3s
00000010 - t = 4s
So as you can see the state 00000001 occured 2 times. The easy way, would be to make a counter to add 1 every time a state appeared. But that would lead to a ridiculous number of 256 counters in the logic.
Do you guys have any idea on how to solve the problem without using the counters?
Sorry for bad english. If you need any further information feel free to ask.
We have 8 digital inputs that define machine states. The inputs can work together and that gives us 256 different states. All we need to do is register all the states, but we don't really want to use 256 counters in the ladder logic and need to think of another way. Ladder logic is the only language we can actually use. The states are scanned every 100ms and we need to sum them up every 1 minute.
Example
We get the states
00000001 - t = 1s
00000010 - t = 2s
00000001 - t = 3s
00000010 - t = 4s
So as you can see the state 00000001 occured 2 times. The easy way, would be to make a counter to add 1 every time a state appeared. But that would lead to a ridiculous number of 256 counters in the logic.
Do you guys have any idea on how to solve the problem without using the counters?
Sorry for bad english. If you need any further information feel free to ask.