after many, many hours of chasing what seems like wiring problems, we believe we have identified a problem with the compressor while running 2-can. we can work the compressor just fine without drive code, and can run our Jaguars off 2-can without the compressor. to get the compressor going, we enabled the disable code block in periodic tasks.
when we have both, the compressor’s behavior is erratic. sometimes it works, sometimes is runs for about 1 execution cycle and sometimes it doesn’t run at all. we are getting errors on the driver’s station saying something like robot drive loop not getting inputs, etc, something that makes me think either the compressor or the 2-can is using all the processor.
we have changed out cables, side cars, crio modules, spikes, just about everything.
we are using the 2-can module purchased from cross the road electronics.
has anyone else seem this? is anyone running 2-can and the compressor successfully? is there a switch setting on the crio we need to change?
Try moving any of the compressor code out of the drive code. The compressor only needs initialized once and it controls itself. It sounds like you might be initializing it over and over again and keeping your drive code from getting valeus fast enough.
there is no compressor code in teleop. the compressor is only initialized in begin and then enabled in periodic tasks. drive code is only in begin and teleop
Yes we have, on last year’s robot with no problems. The process you have seems to be correct from a code prospect. The only difference is that we usually just enable the compressor in the begin.vi, the compressor still won’t start until the robot gets enabled.
we using the code as it is posted by mark mcleod in post 9 of the thread posted there.
in begin we are calling open, start, and setting the ref num.
then in periodic tasks we are enabling the block of code that FIRST has disabled that calls ref num and the compressor control. this control loop is new from NI this year. have you used this piece of code successfully?
We have successfully run the compressor & the 2CAN at the same time on this years and last years robot. Unfortunately, we use C++, and not LabVIEW. I can’t think of any reason why the 2 devices would be interacting. We did have an issue during autonomous on last year’s robot, but that seemed to be related to trying to run all the motors on our robot at the same time as well as having the compressing kick on (had a slow leak in the pneumatics system) at the start of autonomous. This appeared to cause a brown out of Jags and/or the 2CAN and by adding a voltage ramp to the drive motor configuration the issue seemed to go away. I don’t think that is your problem. I’ve seen similar weird behavior from the compressor if it was reinitialized every time in teleop periodic, but if you’re using a reference to it, that shouldn’t be the case.
Not much help other than to let you know that it can work properly.