Page 1 of 1

DIO Module. Data Type BOOL.

Posted: 02 Apr 2019, 13:53
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,

Re: DIO Module. Data Type BOOL.

Posted: 02 Apr 2019, 15:19
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/

Re: DIO Module. Data Type BOOL.

Posted: 14 Oct 2019, 15:41
by palmerpi
Just a long due follow up.... This worked fine.

Thank you

Re: DIO Module. Data Type BOOL.

Posted: 16 Oct 2019, 08:38
by dirk
Hi palmerpi, thank you for your positive feedback.