|
Interesting cRIO delays
So while testing on bag&tag day I noticed some odd behavior coming from our robot.
First I will explain our setup. We have 2 separate axle shafts connected to encoders which I feed into 4 DMA channels which then return the rates of those shafts. I used modified versions of the example code for DMA encoders to accomplish this. I have these rates fed into PID functions to control the rate of the motors. This code is in its own loop in periodic tasks and is running as a 10ms loop. (Problem?)
I noticed that immediately after deploying the code, the delay between spinning the wheel and the encoder response was in-observable. However, as the testing continued the delay began to grow until it was at about a second after a few minutes of testing. When I stopped and redeployed the code, I would get temporary relif, but after a few minutes, the delay returned. I also noted that as the evening progressed the delay became larger and larger.
Additionally, at some point in the evening several motors including some on the drivetrain and shooter wheels began to twitch (turn on momentarily (<.5sec) and then stop.
Some of our mentors believe that the problem might be the ribbon cable that we were using to connect the DIO modules to the DS...
Does anyone have any explanations/workarounds for these problems.
|