How can I control a dc motor speed using an optical switch?

I am trying to use LabVIEW to create a VI that controls the speed of a DC motor. The system needs to have an user set rpm and the DC motor needs to adjust the duty cycle to obtain the correct rpm dependant on the load. A disk with holes and an optical switch is being used to measure rpm.
The current problem is that I cannot get the rpm based on the optical switch.
Thanks for your help!
Attachments:
Speed reg.vi ‏183 KB

The error for the samples to write does not appear after redoing the vi. Thanks. The controller seems to be working mostly.
However, the issue with the Tone Measurement reading inaccurately at low frequencies still exist. Any ideas?
I have attached the latest vi.
Thanks again!
Attachments:
speed_reg_v2013-05-07.vi ‏183 KB

Similar Messages

  • How can I control a stepper motor drive using a DAQ card?

    I need to control a simple CW/CCW stepper motor drive using a DAQ
    card.  I simply need to output a 5 volt signal and then a drop in
    the signal, and so on 200 times or steps for 1 revolution.  I have
    desiigned the basic program, but do not know how to output the
    appropriate signal.
    Cheers,
    Matt

    What DAQ card do you have? Ideally, one with a counter output to generate the steps, where you can control frequency. If you try to start the motor too fast (acceleration or abrupt application of fast pulses) it may stall out. Search in Help/Search for Examples for 'frequency' and 'pulse' for example of frequency generation. You can also use a digital output on the DAQ card to control direction.
    If DAQ card does not have a counter, you coul do a software timed loop to toggle a digital output to generate the pulse train. It may not be fast enough nor accurate for your application, do not know from info you have given
    ~~~~~~~~~~~~~~~~~~~~~~~~~~
    "It’s the questions that drive us.”
    ~~~~~~~~~~~~~~~~~~~~~~~~~~

  • How can I control 3 stepper motor in same time?

    I want to control 3 stepper motor and 30 electro-valves.
    I only had a few lessons on how to control one in C in college.
    Now I need to do this in labview and using an board from NI
    How can do the control of the three motors in same time?
    What the best board to do this. Maybe the NI PCI 6034.
    But I will need more than one?

    At least some of the NI motor controller boards have up to 32 digital lines which can be set to input or output. I did not write the software for our systems but we are using quite a few of the digital lines for our systems and have no problems reading the digital inputs or setting the digital outputs. Also, the digital outputs offer a high current sink capability and usually can be used to drive external drives without any interface circuits.
    The digital lines are available on a separate connector of the NI boards and there are also break-out boxes (with screw terminals) available. I do not see any serious problems to do your control tasks just with one NI motion controller board, as long as you do not have any special requirements (high sampling speed, high frequency pulse output etc) for the digital lines.

  • How can I control my step motor

    I am using a 6006-DB 3-mothor driver and a NEMA step motor model 405-SM, both from AMSI corp. I would like to control my step motor using LabVIEW. We use the LV. 5.1.1 version and we have a PCI-MIO-16E-40 as adquisition card.
    The sistem I want to built is to control my step motor and while turning detect the intesity variation on a photodetector which is conected to my adquisition card.
    I wonder if somebody has an idea how to do that.
    Thank you in advance
    Daniel Hernandez

    Ok I understood, I can use my PCI-MIO-16E card to control my steper motor driver, I will try to do that. But, if I use a DB-25 connector, how can I use my PCI card??
    I was thinking to use the parallel port, directly, to conect my steper motor driver.
    I attache some VI someone passed me. (It use a Setbit.vi and out port.vi)
    Attachments:
    MoteurGOTO6007-DB.vi ‏81 KB
    MoteurGOTO.vi ‏87 KB
    Commande_moteur.vi ‏10 KB

  • How can I control 3 stepper motors w/ amplifier by sending TTL pulses from DIO96

    We have NI PCI-DIO-96 board and we have 3 stepper motors with amplifier and encoders. We want to control the motors by sending TTL pulses directly from the DIO-96 board to the amplifiers. Is this possible? What would you recommend if this is not a good approach? Thanks in advance.
    Roman Zeylikovich

    Roman,
    Thank you for contacting National Instruments. While using a motion controller would be the recommended approach for any type of motion application, you may be able to use your DIO board to generate a TTL pulse train to control the step and direction inputs of your drive and motor. You will need to make sure that the current sinking and sourcing specification for the DIO-96 fits your stepper motor. That board is not designed to source very much current at all so this is one issue you will need to verify. Also, this board does not have any counter/timer logic that can handle quadrature encoder inputs.
    Again, this digital device is probably not the best solution to control a stepper motor, but, depending on your hardware, could be configured to work proper
    ly. The PCI-7334 is a low-cost stepper motion controller that can control up to 4 axes and is designed to easily accommodate these types of applications. You can browse through more information on our Motion controller boards at the following website:
    http://sine.ni.com/apps/we/nioc.vp?cid=3809〈=US
    Let us know if you have any more questions or comments.
    Regards,
    Michael
    Applications Engineer
    National Instruments

  • How can i control my new mac mini using my new macbook air? Thanks

    Hi, I would like to control and even file share my macmini using my macbook air... the mac mini is plugged into the family 50inch plasma... so getting access to it is not always easy! I'd like to play itunes, films, file share, just about do everything from the macbook air as if I was on and in front of the macmini... i'm hoping to do this from any country using wifi!
    I've looked at screens - vnc client, but can;t find anywhere where it says I should download the app... is there a master to download to the mac mini, then waht do i download to the macbook air to enjoy control... also am i expected to download twice and pay twice?
    I'm very new to the mac world... loving it, but lots to learn! Appreciate your help, thank you
    Chris
    PS... bonus if I can also control the mac mini using my iphone4 and ipad 2 (yup, my bank balance took a major hit.... apple certainly got me hooked!)

    Sceen sharing is built into the OS  go to your help in the finder and type in "screen sharing"
    To set up screen sharing: (on the mini)
    Choose Apple menu > System Preferences and click Sharing.
    Select the Screen Sharing checkbox.
    To specify who can share your screen, select one of the following:
    All users: Select this if you want to allow any user with a user account on your computer to share your screen.
    Only these users: Select this if you want to restrict screen sharing to specific users.Click Add at the bottom of the Users list and select a user from Users & Groups (accounts you have set up in Accounts preferences), Network Users (users on your network), or your Address Book. Or click New Person and enter a name and password to create a sharing account. Then select that user from the list and click Select.
    Click Computer Settings and set the following options:
    Anyone may request permission to control screen: Select this to allow anyone on your network to request to share your screen.
    VNC viewers may control screen with password: Select this and enter a password that VNC viewer applications can enter in order to control your screen.
    It’s recommended that you not set a password if you only share this computer’s screen using the built-in screen sharing viewer in Mac OS X.

  • How can I control the PP (monitor) volume using my computer volume controls.

    I'm no longer able to control the PP (monitor) volume using my computer volume controls. I've always controlled the monitor volume using my computer volume levels, but starting today, that has changed.
    The volume is just playing at the level recorded with no way for me to turn down or up.
    I performed a disc repair and that didn't solve the problem.

    Does the OS volume control affect anything?  System beeps and sych?

  • How can I control my fan speed?

    How can I control my fan speed on my macbook pro? I use SMC for gaming and streaming video from the internet when using my Mac OS, but I partitioned my drive and installed Windows 8 in order to play a different game (not a huge game) and the computer heats up dramatically when playing on Windows through Boot Camp to the point that it freezes every time (it never does this when playing a mac game or streaming on the normal partition Mac OS).
    Any suggestions or programs to control fan speed of the mac from windows?

    Get a cooling pad.  That will much better than trying to constantly adjust fan speeds.
    Ciao.

  • How can i control the motor movement of stepper motor using a NI PXI 7330

    Good day to all,
    i'm a newbie in programming in motion control of NI. I just want to ask if how can i control the clockwise and counter-clockwise rotation of a stepper motor using NI PXI 7330 module. all i can do is the counter-clockwise rotation using the example vi (Simple one-axis move.vi) found in the examples of LabView 2009.
    Thanks

    what type of limit switch sensor are you using and how did you wire itß What are your MAX settings regarding the limit switches?
    Good day SIr Jochen,
    I am using two reed switch for the reverse and forward limit. I wired the signal wire of the reed switch to the limit ports(forward and reverse Limit) and its ground to the digital ground of the UMI-7764.
    the attachment below is the my max configuration about limit switches
    Attachments:
    max configuration.JPG ‏155 KB

  • How can i connect simple dc motor to labview

    any one who help me how can i connect simple dc motor to labview and speed control of that

    Hi,
    There is a selection guide for motors on our website which can be found here: http://zone.ni.com/devzone/cda/tut/p/id/12594
    There is also software specifically for LabVIEW to control motors.  You can find it here: http://sine.ni.com/nips/cds/view/p/lang/en/nid/13851
    Regards,
    Greg H.
    Applications Engineer
    National Instruments

  • How can I control an iPad from a touch screen which is mirroring the iPad screen

    How can I control an iPad from a touch screen which is mirroring the iPad screen.
    This is a very important application for disability students who wish to use iPad apps but do not have sufficient fine motor skills to use the small screen of an iPad but could use a large format display touch screen.
    There must be a way.?????????? Help!!
    Peter Niass
    [email protected]

    Have a look here
    http://www.macstories.net/iphone/the-external-touchscreen-that-can-control-an-ip hone/

  • How can i control quicktime using my iphone

    how can i control quicktime using my iphone?
    mostly I want the playback speed control that is available to quicktime and the 10 second rewind that is available to the iOS remote app. 

    Connect iPhone to stereo system with headphone jack connector, very simple.

  • How can I control selection on a PDF

    I have Acrobat Pro 9 Pro build 9.4.6 and am constantly exporting documents from indesign to .pdf, and also building docs in the 'combine' feature from mixed pages. 
    While everything seems to go reasonably well, I have a few problems that are due either to my ignorance, or bugs.
    1.  The biggie; How can I control what I select, for the purpose of copying, moving and deleting?   When I drag the touch-up object tool over my selection, it selects what it wants to most of the time; sometimes it selects (i.e., puts a light blue box around) the entire page, instead of my selection (no pages are scanned).  There are very few instances when I get exactly what I want; there are usually a few lines above or below, no matter how careful I am in my selection.  The funny thing is that this is not a constant; sometimes, the tool works perfectly!  and I have my heart in my mouth every time I really need it to work, hoping that it will not force me to go back to Indesign to make minor corrections.   Perhaps my problems are connected to options I select when exporting my indds, but I've tried checking, clearing, and selecting various combinations and nothing seems to work.
    Sometimes, the text selection tool is strange; a wide blue swath develops over the selected text, even though it is still usually possible to  edit the text in this condition.  And BTW, is there anything to do about the fact that some text can't be edited at all because a suitable font replacement can't be found?  Can't a font be added somehow that will take care of this?
    2. Headers and Footers; fairly effortless, but if the footer contains two rows and I want them centered, the second row looks centered in the preview but not in the doc.  I have to go back to the footer dialog and guesstimate how many spaces to place before the second row to get it to look centered.  Also, is there any way to place a logo in a header?  That would be one of my requests for the next version of Acrobat, if not.
    3.Hyperlinks; they don't always work,even though I check Hyperlinks in the Export settings.  Sometimes yes, sometimes no.
    4.  Typwriter toolbar; it also seems to offer font and size changes whenever it feels like it, and I've tried all different orders of typing, selecting, etc.

    It's me again, sorry!  I wanted to save what I'd written, and my message popped up to the board.
    Thank you for any advice anyone has!
    PS  My indd and acrobat are the same version, as they came in the same package (CS4).  Windows XP sp3.
    Oh, one more thing I just remembered, as long as I'm complaining; sometimes if I place an object (the logo) and copy it to another page, it disappears on the original page, as if I've cut it.  Any fix for that?  (strange how I can edit tmy 'reply' but not my original post...well, at least I found where to ask a question fairly quickly!)

  • How can I control the zoom on my mac mouse?

    How can I control the zoom function on my mouse? In the middle of working on things my hand will rub the mouse by accident and all of a sudden the context within the screen is large. I have no idea of how to work this feature on my mouse and most times to get it to return to normal, I have to escape out of the work I am performing.

    If you are pressing the "Control" button on the Mac keyboard, scrolling up will zoom in and scrolling down will zoom out. You can disable this if it annoys you through System Preferences > Universal Access. If you are using Mountain Lion, it would be System Preferences > Accessibility.
    Uncheck the in the "Seeing" or "Zoom" section that says "Use scroll gesture with modifier keys to zoom".  It may be slightly different if you have an older OS X version. I have Mountain Lion and am going off of memory on the older versions.

  • How can I control a button from one swf file to another swf file?

    Hi,
    I have a main.swf file. From that file I am accessing the external.swf file which is an external file.
    Now, how can I write code on my main.swf file for the button which is on my external.swf file?
    Activities.MainPanel.close_btn.addEventListener(MouseEvent.CLICK, btnClickClose);
    Activities.MainPanel.close_btn (This buttons is actually on external.swf file, but I want to write code on main.swf file to execute it on external.swf) how can I control one swf button on other swf file?
    Thanks.

    Here's some example code that you should be able to adapt to your needs.
    // create a new loader object instance...
    var loader:Loader = new Loader();
    // make the download request...
    var request:URLRequest = new URLRequest("external.swf");
    // add a complete event listener to the loader
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
    // start the actual loading process...
    loader.load(request);
    // create a new empty movieClip instance, you will put the loaded movie into this movieClip once its loaded
    var externalMovie:MovieClip;
    // this function is called when the download has finished and the file is ready to use...
    function completeHandler(event:Event):void {
       // set the contents of the loaded movie to the new empty movieClip...
               externalMovie = MovieClip(event.target.content);
       // add this new movie to the display list...
       addChild(externalMovie);
    Now you can refer to the loaded movie with the instance name "externalMovie". So if, for instance, you want to address a button in the loaded movie, you could write something like this on the main timeline:
    externalMovie.addEventListener(MouseEvent.CLICK, btnClickClose);
    function btnClickClose(event:MouseEvent):void {

Maybe you are looking for

  • Occasional letters missing in pdf document created in Acrobat XI Pro

    I have been working on a pdf document created from Indesign By Acrobat XI Pro that will be for online download. The first version was fine. Links had to be added and some of the text coloured. After edits occasional letters have gone missing througho

  • Product is not defined in Supplying plant in demo system

    Hi Experts, I am doing initial load in demo system. While doing Material transfer I am facing Product is not defined in supplying plant issue. Though I am transferring master data 1st time to the plants, how can i extend product to the supplying plan

  • Issue with SAP MII Batch RDS

    Hi We are deploying the SAP MII Batch manufacturing Rapid deployment solution.After deploying the package and  setting up all the config guide, we have following concerns. 1. The orders are coming in operator dashboard but can not see work instructio

  • Have I been hacked?

    Ok, so I was on deviant art .com- a website which lets artists of all kinds post pictures of sculptures, paintings, drawings, photos, digital art, etc., online and lets them create a profile. I have been using it for a few months now, just looking fo

  • Can I import one non-global zone from one machine to another?

    If create a non-global zone on one disk on machine A, is it possible to make a copy of that disk, and import the non-global zone to machine B? If yes, how to import the non-global zone? Thanks!