Ubidots Community

Synthetic variable for certain bits of a 2 byte word

Hi, I am trying to find out how you would create a synthetic variable consisting of a certain bit.
my variable comes in as a decimal value of 2 bytes information, below is how the 2 bytes are broken down into.

High Byte is Drive trip value
Low byte is 8 bits of operating status,
example bit 0 is drive stopped or running
bit 1 is drive healthy or drive tripped.

i need to map a bit to a synthetic variable so i can create a dashboard.

any help would be appreciate

Hello @Motiontronic

Thank you for sharing your question with the community.

Unfortunately, our synthetic variables do not support bitwise operators. However, I suggest that, instead of sending the data directly to Ubidots, you send it to a Ubifunction over MQTT or HTTP and this way, you could use the bitwise operators to transform that decimal value into the binary conversion you need. Please refer to the link below to understand how to invocate the Ubifunction:

All the best,