![]() |
Logic check on my code
I would appreciate another person going through my PeriodicTasks.vi. I have it pretty heavily commented, but I am sure it is not perfect. I do not have a robot set up to test this code, thus the request on the forums. This is my first time using a PID controller (other than just fooling around).
Here is the Link to the file: https://www.dropbox.com/s/egijon3xwo...cCheck.vi?dl=0 This is for a hypothetical robot that has a "forklift" that can reach ~36". The motion is caused by a 12" stroke linear actuator and some mechanical (dis)advantage. There are limit switches on the top and bottom. The basic goals of the code are as follows (the three P's): 1) Prevent the actuator form going at 100% speed and stopping at the end of it's stroke at 100% (attempt to use PID as a "cushion") 2) Provide various heights for the forklift to stop at (13", 25", 36" etc.; via buttons on joystick) again, using PID in an attempt to not break the actuator w/ sudden stops. 3)Permit manual control of the lift (via Y axis on joystick) this must override any values the PID is feeding the actuator. - Keep in mind that the PID is not tuned (default values are still in place) - I may have to take direction into account for the encoder (to determine the actual direction of the linear actuator) Thank you for any help in advance. - Feel free to use any code/ideas (a PM that you did would be nice:D ) |
| All times are GMT -5. The time now is 08:50. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi