View Single Post
  #8   Spotlight this post!  
Unread 30-01-2011, 21:10
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,751
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: PID need someone to look it over.

If you want a few pointers on more readable diagrams -- so that you can read your code more easily and others can too, I'll throw some out there.

When you have a choice between a case structure and the ternary assignment, also called the Select node, use the Select.

When you have a positive and negative constant that you are just selecting between, consider using one constant and multiply by either one or negative one. When you need to change the constant, you are far less likely to wind up with a partial update.

Whenever possible, combine the Booleans into a number and switch on that to minimize duplication of constants and code.

My monitor is 1920x1200 and I still need to scroll quite a bit to see your diagram. White space is cool, but if you need to scroll, limit the scrolling to one dimension. Even better, use subVIs to avoid scrolling altogether.

I can't follow the logic enough to be able to answer your question about the PID.

Greg McKaskle
Reply With Quote