Go to Post that....was more far-fetched than the tennis ball I threw for my dog earlier today... - TeknicllyInsane [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #5   Spotlight this post!  
Unread 30-01-2011, 14:20
Acarid Acarid is offline
<3 Nested Clusters
FRC #2521
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Eugene, Oregon
Posts: 10
Acarid is an unknown quantity at this point
Re: PID need someone to look it over.

I think I have a basic understanding of what it's doing, although the details are beyond me. I think the code can be cleaned up a little, if nothing else.

Near the end, you are using case structures to decide which wire to use. Take a look at this block, it might be more suited for this.
http://zone.ni.com/reference/en-XX/h.../glang/select/

Also the giant case structure in the middle... I'd be tempted to put the buttons into a boolean array, then convert that array to a number, then put that number into a single case structure which can select the constant. This was used pretty elegantly in the example line following code.

Also it seems a little messy to run the process value into the setpoint as a method of making it not move. I'm not sure I understand the goal, but perhaps removing the first case and instead making one around that PID would be better.

Hope this helps... My confidence is a little shot by Alan's reply...
Reply With Quote
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 21:35.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi