|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||||
|
|||||
|
Re: building and deploying code
The words "loop error" seem to be referring to a message telling you the loop containing the motor drive commands is running too slow. Is that correct?
The code looks okay. I don't see any problems in Teleop that would make it run slowly. Is there anything in Periodic Tasks? Perhaps something in there is using up all the cRIO's CPU cycles. |
|
#2
|
|||||
|
|||||
|
Re: building and deploying code
Quote:
|
|
#3
|
|||
|
|||
|
Re: building and deploying code
I don't see anything in the Periodic Tasks that should cause it to run slowly or consume CPU. There is one piece of code with the encoder that isn't in a loop, so it will only run one time.
If you have the newer driver station, it will show you CPU usage for different modes of operation. Does it help you understand what the robot is doing? Is the disabled robot CPU high? Is it just teleop? Is it auto too? Greg McKaskle |
|
#4
|
|||||
|
|||||
|
Re: building and deploying code
The "loop running too slowly" error can also be caused by the Driver Station computer being overburdened. Are you running anything CPU-intensive on it?
|
|
#5
|
||||
|
||||
|
Re: building and deploying code
we are no longer getting the slow loop error, but there are a few new problems.
The compressor does not stop at 120 psi. The shooter motor does not respond to joystick 3 (or any other control). The strangest part is that all the buttons i have set to control a piston move the drive train instead. here are all the vis I changed. if you need to see any others, ill post them as well. |
|
#6
|
||||
|
||||
|
Re: building and deploying code
The drive train also no longer whines or "twitches"
|
|
#7
|
|||||
|
|||||
|
Re: building and deploying code
The compressor code looks right. Do you have the pressure switch wired across the SIG and (-) pins of DIO1? Can you verify that the switch opens when the pressure reaches 120 PSI? Is there perhaps a short circuit across the connections, such as a bit of metal in the DIO pins or a stray strand of wire on the switch terminals?
Quote:
|
|
#8
|
||||
|
||||
|
Re: building and deploying code
The reason the controls were going crazy was that the sidecar was ony drawing power from the cRIO and not the battery. we fixed this problem and a few other minor issues, and everything seems to be running smoothly. thanks to everyone for all the help!
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|