Digital Inputs not working

Comments & issues
Post Reply
joshkalsi
Fresh meat
Posts: 1
Joined: Tue Feb 18, 2020 3:59 am
Contact:

Digital Inputs not working

Post by joshkalsi »

I'm creating an interactive exhibit that uses two 1012 interface boards to read the state of about 30 input wires. I'm having an issue when I have both boards plugged in - if I have all the inputs open, when I trigger most channels on board 2, it's actually the input on board 1 that fires the state change event. This doesn't happen for all channels on board 2, 0-3 are fine, but all of the others exhibit this problem. If I only have one board or the other plugged in, then it behaves properly.

For example, if I try and log out the input ID when the state change event fires, for all inputs on board 1, I get input IDs 1-16. For channels 0-3 on board 2, I get 17-20, but then for channels 4-16, I go back to getting IDs 4-16 again.

To take this further, if I only open a single input, when it's one of the problematic ones on board 2 (channels 4-16) then when I trigger it no state change event is fired at all. I logged out the full input object and compared it to one of an input that was working correctly, and found that it was missing a 'data' object (screenshot attached of a diff between the input objects) - I'm not sure where or how this is set initially, but I have a hunch that whatever is causing it to not be set is what's causing my issues.

Has anyone encountered anything similar to this, or know of anything else to try that might isolate the problem more?
Attachments
Screenshot 2020-02-17 at 15.33.47.png
User avatar
Patrick
Lead Developer
Posts: 634
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Digital Inputs not working

Post by Patrick »

Releasing a fix for this now.

Had to do with JavaScript rounding 64-bit integers in the JSON to 53-bits - which ended up rounding off the bottom of the serial number portion of the internal channel ID in some cases.

-Patrick
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 0 guests