Hi,
I'l having a problem with the logical "AND" in the conditional part of the Python expression.
I'm trying to do a bit wise test on a 8 bit status byte (0-255).
If the input value EN[9] = 3 and I do a logical "AND" with 1, the result should be non-zero (i.e. 1 in this case) and the formula should be executed. Right ?
If the input value EN[9] = 3 and I do a logical "AND" with 4 (or 8 or 16 or 32 or 64 or 128), the result should be zero (i.e. 0 in this case) and the formula should not be executed. Right ?
If I "force" the condition to 1, the formula works as expected, so I'm pretty sure I've a mistake with the "AND" in the condition, maybe a syntax problem ?
I wonder if it is allowed to have an "AND" in the condition, at all ?
According to the doc, yes, as long as the result is of type boolean 0-non zero.
NB: the "AND" in the formula part of the expression works fine.
Any hint ?
I'l having a problem with the logical "AND" in the conditional part of the Python expression.
Code:
5012|0|"(EN[9] & 1)"|"EN[1]"|""|1|0|0|0 5012|0|"(EN[9] & 2)"|"EN[2]"|""|2|0|0|0
If the input value EN[9] = 3 and I do a logical "AND" with 1, the result should be non-zero (i.e. 1 in this case) and the formula should be executed. Right ?
If the input value EN[9] = 3 and I do a logical "AND" with 4 (or 8 or 16 or 32 or 64 or 128), the result should be zero (i.e. 0 in this case) and the formula should not be executed. Right ?
If I "force" the condition to 1, the formula works as expected, so I'm pretty sure I've a mistake with the "AND" in the condition, maybe a syntax problem ?
I wonder if it is allowed to have an "AND" in the condition, at all ?
According to the doc, yes, as long as the result is of type boolean 0-non zero.
NB: the "AND" in the formula part of the expression works fine.
Any hint ?
Kommentar