I’m getting from a PLC a 32bit decimal entry, for more details 2013265974. That is stored in influx. I need to get different bit’s to know if an alarm is enabled or no.
Decimal to binary logic is explained in this webpage:
I was also interested in the question and I also did not find any bitwise operators in the documentation…
I cannot believe it…
I could think of a few workarounds.
You could convert the integer input into bytes with the bytes() function.
Bit 8 is the first bit of the second byte.
So you could treat the second byte with modulo % 2.
If the result is 1, bit 8 is set.
If the result is 0, bit 8 is not set.
It’s rather complicated, but you should be able to do it roughly.