03-25-2013 02:24 PM
Hi
I have a problem and I am going round in circles
I am trying to create a cruise control in labview for a lego mindstorms robot.
I have got as far as motor control and measuring rotations, however I have hit a wall
I need to work out The transfer function of The motor and then wire up a PID to compensate The power to maintain a steady speed.
1. I have no idea which PID controller to use in labview or how to wire it into my circuit - I have tried a few and I'm lost
2. The output taco is telling me The number of rotations per "second" wrong by a factor of 24 (yes I know odd number)
3. The seconds at ticking over at 24 times The actual rate of time (again odd)
4. I can calculate The speed of The motor but I have no idea how to use this motor speed to calculate The "motor transform" its a new one on me tbh but its something like (1/0.3s)+1 but I'm not sure
5. I have no idea how to add a disturbance in The circuit or where I need to wire The feedback loop into.
All I want to achieve is a controller that will maintain a constant speed no matter The rise or fall of The road for 1 motor
any help would;d be greatly appreciated Thanks
03-26-2013
06:23 AM
- last edited on
10-13-2025
10:43 AM
by
Content Cleaner
Hello Labviewnooby
Thanks for your post. When looking at PID control the following white paper is a really good starting point if you've not seen it before.
https://www.ni.com/en/shop/labview/pid-theory-explained.html
As to the reason you're speed is wrong by a factor of 24. How are you working this out, can you not just scale the answer down by 24?
Many thanks
Dan.H
National Instruments
Applications Engineer UK
03-29-2013 01:00 PM
Thanks for trying but I have read that before and it does not help and as I said I seem to be going around in circles
i have to find the transform function and put it in a PID....but i have no idea how to put the correct PID in to labview
I am currently trial and error every PID controller there is in the list and will hopefully eventually get there
I am literally trying every wire to every connection in order on each PID on the list ..but im not hopefull.
I know what i want it to do but how to do it in lab view i seem to be missing a trick somewhere along the line.
I also am having troubble reading the boxes (is there a Zoom function?)
03-29-2013
03:57 PM
- last edited on
10-13-2025
10:43 AM
by
Content Cleaner
It's never as easy as they make it look on TV, huh? 😉
Have you considered this:
LabVIEW Introduction Course - Three Hours
or this:
LabVIEW Introduction Course - Six Hours
03-30-2013 12:52 PM
I hear you there brother...
Thus far I have cobbled together a PID controller (now I realized I needed to use Boolean math in the program) that was a kind of eureka moment..
I have to put a disturbance in to test it but I am out of time so it is what it is ...
I am OK in the theory of what I want to do ..But I shall have to have a long learning session on labview this summer me thinks... If I ever get time off work LOL.
Thanks boys for the assist and I shall re visit this later in the year ...
04-01-2013 09:52 AM
Good luck! Please report back because these robotics things are always interesting projects. 🙂
04-02-2013
05:53 AM
- last edited on
10-13-2025
10:44 AM
by
Content Cleaner
Hi
Sorry I was out of the office over Easter so have only seen your posts now. I hope your project went OK in the end. If you need anymore LabVIEW help or guides there are plenty of online resources we also offer courses you can take online or onsite details of these can be found here:
https://www.ni.com/en/shop/services/education-services.html
If not the forums are a great place to search for past and previous problems and solutions. Good luck with your learning with LabVIEW.
Many thanks
Dan.H
National Instruments
UK AE
01-06-2014 11:50 AM
i´m calculate the speed motor using a time loop but i dont know the period of Sampling time. if someone could help me
thanks.
01-07-2014 03:23 AM
i´m calculate the speed motor using a time loop but i dont know the period of Sampling time. if someone could help me
thanks.
If you have a question, you can better open a new topic instead of using an old one.