View Single Post
  #14   Spotlight this post!  
Unread 30-01-2012, 20:02
DominickC DominickC is offline
Registered User
FRC #0023 (PNTA)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 1620
Location: Boston
Posts: 435
DominickC is an unknown quantity at this point
Re: Worried about high CPU usage in CRIO

Now, I've placed this code within Periodic Tasks.vi. There are two more case structures similar to the two visible, and I've moved the axis value to Teleop.vi. Today, we were getting some infrequent watchdog errors which shut down our comms with the cRIO.

Just by looking at this image, is there a way to streamline the code? I had tried to do something similar to the second image with just the single case structure visible, wired to a joystick button. When the structure was false, it set motor outputs to 0. No matter what I did, it wouldn't work. (I followed it in debug mode, and it appeared that the command to set the motor output to -1 was being triggered, however nothing happened on our jags.)

Is there a conflict between the 500 millisecond timing and the 100 millisecond timing within the while loop?
Attached Thumbnails
Click image for larger version

Name:	periodic.JPG
Views:	60
Size:	114.3 KB
ID:	11637  Click image for larger version

Name:	case.JPG
Views:	40
Size:	16.6 KB
ID:	11638  
Reply With Quote