View Single Post
Old 10-07-2014, 11:04 PM   #1174 (permalink)
Astro
Dreamer
 
Join Date: Nov 2013
Location: Australia
Posts: 350
Thanks: 95
Thanked 214 Times in 151 Posts
Quote:
Originally Posted by MPaulHolmes View Post
You promise it's only once more? Haha. I'm happy to email it to anybody that wants it. But a lot of coding critique is style critique. Don't use globals. Break that up into separate files, etc... but my style is my style and is easiest for me to get it done. If you want to post it wherever you want, go ahead. now I have a path for tuning Id and Iq pi loops thanks to eV tech suggestions (but those aren't code specific suggestions), and then just need to find the right rotor time constant. I found a process in an ebook for that now that can be programmed into the controller so each person can identify their respective time constant, which unfortunately is unique to their motor.
Paul, i hear what you are saying about coding style. One of my co-workers wrote a script that ran at random times and modified each of the other team members efforts to match their own way of working. She was not very popular that day (actually she never was popular). The script had some major oversights that meant a lot of lost work for the other members of the team.
Some programmers are crazy good, some are just plain crazy.

What parameters are required to work out the time constant? Is there a way of deriving it by trial and error? Maybe spinning the flywheel one way then attempting to reverse its spin and seeing which time constant results in the least time to achieve the full reversal of rotation?
  Reply With Quote
The Following User Says Thank You to Astro For This Useful Post:
MPaulHolmes (10-08-2014)