Hi all,
I have the following problem: from a long list of boolean values (about 100) I should program each possible combination with the following conditions:
In order for bool_1 to be true the following must be true:
bool_2 = false
bool_3 = false
bool_4 = false
bool_... = false
bool_100 = false
In order for bool_2 to be true the following must be true:
bool_1 = false
bool_3 = false
bool_4 = false
bool_... = false
bool_100 = false
Etcetera.
The values are scattered in different databases, so not in one array.
Is there an easy way to program this, instead of just copying the long list and removing the one bool that should be true? Perhaps first copy the values states to an array and perform logic on the array? Am working in Step 7 Ladder, but FBD/SCL/STL can also be used.
I have the following problem: from a long list of boolean values (about 100) I should program each possible combination with the following conditions:
In order for bool_1 to be true the following must be true:
bool_2 = false
bool_3 = false
bool_4 = false
bool_... = false
bool_100 = false
In order for bool_2 to be true the following must be true:
bool_1 = false
bool_3 = false
bool_4 = false
bool_... = false
bool_100 = false
Etcetera.
The values are scattered in different databases, so not in one array.
Is there an easy way to program this, instead of just copying the long list and removing the one bool that should be true? Perhaps first copy the values states to an array and perform logic on the array? Am working in Step 7 Ladder, but FBD/SCL/STL can also be used.