vtince Posted April 30, 2009 Report Share Posted April 30, 2009 Hi, Im using LV8.0 and i want to control a small dc motor, like making it turn for like 2 seconds then turn off for like 30seconds, and the repeat. Is there anyway to do this? Im just starting to play with LV and i dont know too much. Quote Link to comment
ShaunR Posted May 1, 2009 Report Share Posted May 1, 2009 Short answer "yes". We need to know more too. How are you interfacing to the motor (is it RS232 , PWM card, digital card, parallel port, force of will?). Regardless of the interface, you will need a while loop that generates a timed pulse. It'll look something like this There are many examples in the Labview examples directory. I would take some time to look at them as quite often you can modify them to suit your needs. Quote Link to comment
vtince Posted May 1, 2009 Author Report Share Posted May 1, 2009 QUOTE (ShaunR @ Apr 29 2009, 02:42 PM) Short answer "yes".We need to know more too. How are you interfacing to the motor (is it RS232 , PWM card, digital card, parallel port, force of will?). Regardless of the interface, you will need a while loop that generates a timed pulse. It'll look something like this http://lavag.org/old_files/monthly_04_2009/post-15232-1241044875.png' target="_blank"> There are many examples in the Labview examples directory. I would take some time to look at them as quite often you can modify them to suit your needs. I am using a NI USB-6009, we're planning on constructing a solar tracking system to see how much energy is generated at certain hours of the day. What we have planned to do is to have the solar panel connected to a resistor connected to the DAQ and have the DAQ record the voltage that is generated every hour. So in order to have the solar panel perpendicular to the sun, we plan to use a motor that is geared down to turn the solar panel. So we want the motor to turn on for a certain time around 2 seconds for every 30min. Is the DAQ capable of powering a small motor? if not, can we use a transistor connected to the motor, and waits for a signal from the DAQ to turn the motor? Quote Link to comment
carlover Posted May 1, 2009 Report Share Posted May 1, 2009 QUOTE (vtince @ Apr 29 2009, 05:18 PM) Hi, Im using LV8.0 and i want to control a small dc motor, like making it turn for like 2 seconds then turn off for like 30seconds, and the repeat. Is there anyway to do this? Im just starting to play with LV and i dont know too much......I am using a NI USB-6009, we're planning on constructing a solar tracking system to see how much energy is generated at certain hours of the day. In addition to some of the answers already provided, you could search LAVA and NI's site for example. Here are some threads/articles to get you started on motor/motion control: http://forums.lavag.org/Coding-Technique-a...ller-t9517.html http://zone.ni.com/devzone/cda/tut/p/id/30...on_fundamentals http://zone.ni.com/devzone/cda/tut/p/id/3054 As you probably know, what you are attempting to do/build has already been done before and perhaps you can incorporate those approaches into your project. I don't think that moving your solar tracking system for X seconds every Y seconds will give you very good results. Sure you can calculate time and path oof the sun , and try to move your system , but perhaps better approach would be to actually dynamically track the sun (i.e. have a feedback in your system , or in another words move your system towards the position where sun actually is rather then where you calculated it to be). Sucha a "dynamic" tracker is fairly easy to build and implement. For example you can have 3 or 4 light meters positioned some distance apart from one another and continuously measrure their inputs. Then in response to those inputs you would move your system such that all of the detectors show same values - this condition would mean that you are pointing towards sun... Do a search on the net for "sunflower" system... HTH Quote Link to comment
ShaunR Posted May 1, 2009 Report Share Posted May 1, 2009 No. Your DAQ definitely won't be enough to drive the motor. Motors are high current devices. You will need a separate power supply and control it via that. I agree with carlover in so much that really you need a dynamic tracking system (as well as it has been done before). You will also probably want to go backwards and forwards, as well as up and down (since the sun tracks in an arc and starts in the east and sets in the west every day) so a single motor probably won't be enough (2) and they will need to rotate in both directions. You might find this useful in thinking about what you want to acheive. Solar Tracking Project Although I'm at a loss as to why it took 13 weeks...lol. Quote Link to comment
vtince Posted May 6, 2009 Author Report Share Posted May 6, 2009 Thx guys... also to the block diagram above... how would you actually set the motor up? I set the daq to generate a signal so the transistor which will run the motor that is powered by an external source? How would you do the timing shown above with them all connected? Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.