DIO Module. Data Type BOOL.

Topics about the Software of Revolution Pi
Post Reply
User avatar
palmerpi
Posts: 21
Joined: 04 Feb 2019, 17:17
Answers: 0
Location: Northern Ireland
Contact:

DIO Module. Data Type BOOL.

Post by palmerpi »

Don't have DIO module in front of me so cant check this so have to ask.
In Pictory, can to the Input Unit be changed from BOOL to Int or Dint?
When publishing to MQTT broker the IO value 1 or 0 is put in quotations. This is causing me an issue on another system that is subscribing to the message. Im sure I could manipulate the quotes in Nodered or python but would rather not have to do that. (This is related to my other post)

Thank you,
User avatar
dirk
KUNBUS
Posts: 1926
Joined: 15 Dec 2016, 13:19
Answers: 4

Re: DIO Module. Data Type BOOL.

Post by dirk »

Hi, you may access in the process image every channel separate (i.e. I_1, I_2, etc.) or all channels together as one bit per channel (i.e. Inputs). So you may write code to query if channel 10 is hi like so "if (I_10) {...} " or "if (Inputs & (1 << 10)) {...}"
https://revolution.kunbus.com/tutorials ... o-modules/
User avatar
palmerpi
Posts: 21
Joined: 04 Feb 2019, 17:17
Answers: 0
Location: Northern Ireland
Contact:

Re: DIO Module. Data Type BOOL.

Post by palmerpi »

Just a long due follow up.... This worked fine.

Thank you
User avatar
dirk
KUNBUS
Posts: 1926
Joined: 15 Dec 2016, 13:19
Answers: 4

Re: DIO Module. Data Type BOOL.

Post by dirk »

Hi palmerpi, thank you for your positive feedback.
Post Reply