AMarks95
Member
Hello,
I have 5 sensors that must be tripped in a specific order, and anything but this order is an error. The truth table looks like so:
0 0 0 0 1
0 0 0 1 1
0 0 1 1 1
0 1 1 1 1
1 1 1 1 1
I could easily hard-code this with 5 OR statements using XIO and XIC instructions for 0 and 1 respectively. However, the first thing that comes to mind is creating an integer out of the bits and checking the value. The valid values would be 1, 3, 7, 15, and 31. Any other value would show an error. Is there a way to do such a thing in RSLogix 500?
I have 5 sensors that must be tripped in a specific order, and anything but this order is an error. The truth table looks like so:
0 0 0 0 1
0 0 0 1 1
0 0 1 1 1
0 1 1 1 1
1 1 1 1 1
I could easily hard-code this with 5 OR statements using XIO and XIC instructions for 0 and 1 respectively. However, the first thing that comes to mind is creating an integer out of the bits and checking the value. The valid values would be 1, 3, 7, 15, and 31. Any other value would show an error. Is there a way to do such a thing in RSLogix 500?