We have recently observed some unexpected edge case behavior from the VEX Brain and VEX ADI Expander.
At our most recent tournament, one of our two identical robots was consistently experiencing connectivity issues with the ADI Expander that communicates between our off-the-shelf encoders for odometry and the brain.
The event log showed an “ADI Expander disconnected on port ” message. This is expected. We can confirm that we have tried different ports, different wires, different expanders, all of the obvious things. And we have confirmed that neither end of the smart wire is coming out of either device, nor are they loose/wiggly. It seems to be an entirely electrical disconnection, as opposed to a physical one.
What was not expected was that we also lost all functionality on the internal brain ADI ports, which control all of our pneumatics.
So the sequence of events is as follows: while driving, the ADI expander becomes disconnected (logged in event log, expander light blinking red), its ADI ports stop working (expected), the brain ADI ports stop working (not expected).
Functionality to both the brain ADI and the expander could not be restored without a power cycle.
We are wondering if this edge behavior could be explained by a vexOS bug. We are also curious if something is going wrong with the brain ADI system due to the high amount of solenoids plugged into it; and if that could be causing the brain to just shut all ADI down until power cycled.
I don’t actually see a 100 ppr setting for that encoder, looks like 120 may be the lowest rate, however, that’s not significantly higher than the legacy red VEX encoder (90 ppr, 360 counts/rev).
Anyway, I don’t know what the issue could be. I guess it’s possible that something crashing the 3wire expander could cause a vexos issue impacting other 3wire ports. I assume restarting the user program doesn’t get things working. Does power cycling just the 3wire expander get it working again ? or does the whole brain need a power cycle ?
The ADI code is some of the very oldest in the V5, probably written in 2016 (and originally not by me), it’s not been touched for many years, perhaps I can see if I can reproduce, but it won’t be any time soon, perhaps in the summer, we have no V5 vexos updates scheduled.
Would too many interrupts cause vexOS to forcibly disconnect the device? I suppose there’s not really any other V5 device that would have a similar problem over smart port. I am additionally curious to know if the same PPR limitations exist on the brain ADI expander.
V5 sensors initiate all messages, if the sensor stops sending messages then the V5 will assume no sensor is connected and log a disconnect message.
All I can think of is that too many interrupts may either starve the ADI cpu of cycles to do anything else, why it might crash idk, it’s just a theory. Somewhere I think there was a test to see what happens, could have been back in the cortex days.
We tested at 100, 500, and 5000 ppr. We got one data abort exception early on but couldn’t replicate that a second time. At no point did we successfully make the adi expander disconnect.
Additionally I communicated with some alumni and confirmed that we’ve been running 500 ppr encoders on adi expanders for years without issue.
The only constant I can think of is the brain? We haven’t swapped it.
Well, that’s good news I guess. It saves me from having to find the high res encoder I know I have stored… somewhere.
I did start to doubt this was the issue. There one very old topic here about the cortex and red quad encoders, even that system seemed to be able to handle a high rate.
and for newer forum members, that topic is a good example of the high level of technical discussion we used to have on the forum before it became full of “help me with my notebook” type posts