back of the motor to the position in which he started?

Hello

I am writing an application to control a servo AC motor. It is based on reviews of couple. I use a state machine architecture. The result I'm aiming is,

(1) the engine operating at a user specified speed and accel/break.

(2) every time that the couple toggles between the upper and lower, limits the motor direction of rotation is changed.

(3) at the end (the user specifies no. sometimes he should make this bike) the engine returns to the first zero position in which he started.

(4) generates the data to the file and stops execution of the program.

(1) and (2) have been supported. However, I'm still struggling with (3) and (4).

What I have tried is to take note of the position of the encoder at the beginning of the program, and then after n cycles subtract aware of the position of him and give it as an input in State "Reset postion. Another thing I thought is playing with the tension (the departure of couple cell output voltage is always + 5V) so I thought to call the State "Motor Run" again at the end to move the engine to the original position. I tried some trial and error but am fultile in the efforts.

No matter who may be likely to help the hand?

Thank you

Amandine.

Hi Sasi,

in case you have not found your bug by yourself, yet:

After your state machine has entered the State of the 'RESET' POSITION you start a movement on the 0 position but you should not expect that the move is completed (this should be an additional State). Instead you immediately plug in "STOP ENGINE" and it stops moving without going back to the initial position.

In addition, there are several things in your code that could be optimized (some examples):

  • By comparing a Boolean value as your STOP button with a constant TRUE is pointless, because the output is always the value of the STOP button. It's sort of a code of Rube Goldberg.
  • Your initialization state runs the same sequence of commands (displacement engine position 0) until button is pressed. There is a large number of redundant orders, sent to the Commission of control of movement.

Kind regards

Jochen

Tags: NI Hardware

Similar Questions

  • need to take my computer back in the day that I first started it on7/21/2011 my restore point back up to now how can you start over from scratch with no disc?

    need to take my computer back in the day that I first started it on7/21/2011 my restore point back up to now how can you start over from scratch with no disc?

    Most OEM computers have a partition on the hard drive, that allows to give it bought as provided.  Usually, you activate this feature by pressing a key or combination of keys when the first splash screen appears at startup.  Look quickly at the first screen that appears, and you could see the key that you press.  Otherwise, go to your computer manufacturer's website and download the manual for your computer.  Instructions must be there.

    HTH,
    JW

  • Envy 17 2180el can I add a second hard drive, and then choose bios/boot of the system with which to start?

    Envy 17 2180el can I add a second hard drive, and then choose bios/boot of the system with which to start?

    in the case give me the link of a hard disk of type to add

    Hello

    While you can certainly add another HARD drive in the Bay of secondary drive (you must also support and the connection cable) you can't boot from it - only in the Bay of primary HARD drive is bootable.

    Kind regards

    DP - K

  • Help the position of the tabs

    Hello. Since the Firefox 20 update, I noticed that the "tabs" are right along at the top of the screen now, that I can not enter because I use Dell Desktop for my shortcuts in, coming down in front of them. It used to be fine when he was just a little lower, but at the same time I don't want to 'menu bar' on as it grows TOO low for my smaller screen. How can I get back to the position they where, just below the organge "Firefox" button as apposed to the appearance of it without recourse to the deactivation of Dell desktop?

    If the window is maximized you can toggle this pref to disable the display of the tabs in the title bar:

    • browser.tabs.drawInTitlebar
  • Laptop HP 15-af157na: new laptop - how do I back up the operating system until I use?

    You just bought a laptop and PC World told me to back up the operating system before you start to use it on a pendrive of 32 GB, but because he wanted to sell their service, he refused to give me any indication on how where to start!  Should not be difficult.  Stupid how they do not include the cs as they did.

    Someone help please?

    Thanks for the comments.

    Glad to have been of help

    Feel free to post back. Please mark the thread/post as accepted solution to possibly help other users who search the forum for similar problems. Good day!

  • Fix the Position of the tab

    Hi friends,

    I want a script that can fix the position of tab for start all the first paragraph 3 tabs only. Otherwise, don't change your other potions of tabs.

    (This feature works in single line).

    I try some code but not working out and automatically changed tab position. Please see my code below:

    Example:

    First tab position - 10 points:

    Second tab position - 30 points:

    Three tab position - 50 points:

    var myDoc = app.activeDocument;  
    app.findGrepPreferences = app.changeGrepPreferences = null;  
    app.findGrepPreferences.findWhat = "(\\t\\t\\t)";
    var myFnd = myDoc.findGrep();
    var a = 0;
    for(var i=0;i<myFnd.length;i++)
    {
        var tabstops = myFnd[i].tabStops;
        for(var j =0;j<tabstops.length;j++)
        {
                tabstops[j].position =  a+=20;
            }
    }
    

    Please see my screenshot as below:

    11.png

    Please suggest friends,

    Thanks in advance.

    Grep search for ^ \\t\\t\\t

    In your script, you change all the tab stops in a paragraph, not just those of your choice. On the contrary, do something like this:

    var tabStops = myFnd[i].tabStops;
    tabStops[0].position = 10;
    tabStops[1].position = 30;
    tabStops[2].position = 50;
    

    Peter

  • after upgrade to 29.0 customizations go back to the previous positions.

    My problem is quite simple (if not boring), I have a problem with my browser customization. my original question was the theme linked however this was rectified with the Restorer 'classic theme...

    now, everything's fine, l sorted all the customizations mainly bring the broswer look at most closely what lm used for (decided to leave the colors as they were, rather than ruin) and once finished l l closed my browser and thought nothing of it, until l it has reopened.

    basically l use an add-on called 'gmail manager' and did for a while now and its been very useful given that l have three accounts gmail (site/personal/professional), these buttons to access have been placed on the toolbar addon (or at least that's where I want them) However whenever l open my browser two of my account change the position upward (corresponding to my address bar) , originally all three accounts were doing the same thing but l managed to get an account to stay in the bar of the addon (although l can't she move, tho that case... what l want is for the two other accounts of staying there as well as the a lve managed to get to stay l put. have you tried to reset the browser , but that doesn't seem to work and since the managed to get one of my accounts permanently placed on the bar of the addon l don't want to go through the inconvenience of having to go through customizations each time l open my browser to do the cleaning in the bar where they seem to come back. so is it possible to make permanent customizations?

    You would need to configure options for this add-on in the Add-ons Manager-> Extensions-> Options of Gmail Manager, then accounts-> account gmail-> change-> toolbar option, you should get something like this where you can change the set up of this account

  • Where can I find the tutorial or sample Vi to control the position and speed of the stepper motor?

    Hi all

    I use a driver on 3rd for a stepper motor and I use USB6356 as the controller to drive the motor. Could you recommend some VI sample or tutorial on the position and the speed control of stepper motor?

    Thank you

    The best

    I think that what you are looking for is the LabVIEW SoftMotion Module:

    http://sine.NI.com/NIPs/CDs/view/p/lang/en/NID/14234

    Here is a good resource on stepper motor theory:

    http://www.haydonkerk.com/resources/StepperMotorTheory/tabid/192/default.aspx

    My recommendation would be to start from a counterexample of LabVIEW. These can be found in LabVIEW > help > examples > material input and output > DAQmx > input meter, output meter.

  • my taskbar has moved to the top left corner how to bring back to the original position, which means at the bottom of the screen. I am using microsoft windows xp

    my taskbar has moved to the top left corner how to bring back to the original position, which means at the bottom of the screen. I am using microsoft windows xp

    Right-click on the taskbar and unlock it. Take an empty place and slide it downwards. Lock the taskbar.

  • How can I get Firefox back to the same position on the web page

    How can I configure Firefox to return to the same position on the web page

    Wait until Firefox finishes loading web page. Then it will be automatically the position value when you were leaving the web page

  • Position of the mouse goes to where he left the guest back to the guest (RESOLVED)

    I have 4 Mageia (Linux) as a guest in 10 workstation. I have installed VM tools in the comments.

    Now, here's the problem. Say I move the mouse off the screen of Mageia VM and go click on a window in the host, as checking my email or something, so I smile above Mageia. Now I'm hovering over something I want to click on to Mageia, like Firefox. But when I click on the mouse button, the cursor jumps to where he left Mageia. So now I must get back on the mouse to the Firefox icon and click again.

    Is this perhaps a parameter in VM tools? Or is it maybe a setting to Mageia? I can't really see any reason that someone would choose this behavior, so I think that the VM tools cannot reposition the mouse pointer to where it is now, for some reason, and Mageia just think that this is where it has been changed.

    Any thoughts would be appreciated.

    I found the fix if anyone needs.

    https://forums.Mageia.org/en/viewtopic.php?f=7&t=7977&p=49643#p49643

  • My home page is MY MSN and when I go to a certain article and I am in fact and that the browser goes back to the top of the page MY MSN rather than where I left

    If I'm browsing subjects on my homepage and find one that reads my interest, I click on it and the browser goes on this site for me to read. When I'm through with that I hit the back button and on most Web sites, the original page back to where you were before you click on the interesting element. Not MY MSN, which is my home page, it returns to the top of MY MSN, which is irritating, especially if the elements that interest me are a group at the bottom of page on MY MSN and I want to read every 5 or 6 of them. How can I get the browser to return to the place I left?

    Try to open the "statutes" in a new tab, and when finished read each article close the tab I hope the MY MSN page original will maintain the position you left it to (unless this page has an automatic refresh frequency, to add new items to the list).

  • How can I move the button Favorites back to the left side of the toolbar?

    I have always displayed the bookmarks toolbar which included icons for favorite registered sites and bookmarks to access Favorites button all other saved. All of a sudden, the Bookmarks button on the right side of the toolbar of bookmarks. How can I move this back to the left side? I tried dragging using customize, but it does not work.

    Hello

    Please try to Customize and then mini window drag and place it in the desired position.

  • Firefox comes back to the top of the page when returning from a url why

    Hello

    When you use a search engine like google and by selecting a web site, when I use the left arrow to return to the results of my search for the web page is at the top of the list of the sites found not where I was down for.

    A slight but pain can it be set to return to the initial position of the page?

    Thank you

    Arnak

    Why not open each search result in a new tab and close each tab when you are done with it, instead of going forward and back in the same tab? The original search page will not need to reload each time you return.

  • How can I change the position of to the MoveAbsolute method to move an engine?

    I'm just starting LabView and am still stuck on the methods of motor control. How to set the angle or position to which the engine will move (or turn in the case of MoveAbsoluteRot), and can I set the speed how to get there? Any help is appreciated.

    It is not the syntax of LabVIEW. The methods and the actual properties are defined by Thorlabs. The correct values are defined by Thorlabs. Functions in LabVIEW are simply display the names of the properties/methods and the names of the inputs and outputs to the Thorlabs ActiveX dll. There is nothing in LabVIEW itself which allows to determine the order, you must call a special series of properties/methods or their values. Detection of errors and reports done by the ActiveX dll.

Maybe you are looking for

  • Elitbook 840 G1: HP Elitbook 840 g1 - M.2 SSD slot

    Hello! As you can see from the image below, I am after a compatible disc SSD m2 (ideally 256Go). I selected in red the single 'hole' in the connector as the largest part of the SSD M2 card I see online have two "holes". Any recommendations would be m

  • How to remotely manage the tasks of acquiring data and SCXI modules?

    Hi, I have a system consists of a PCI4070, a PCI6024E, several SCXI1102 and a SCXI1130. I wonder if I can remotely view/create data acquisition tasks and configure SCXI modules. My PC and PC host of these devices are in the same LAN, I tried to creat

  • BSOD on W530 during the game

    When I play a game and I go from the battery to a power outlet, I get the blue screen saying something about nvkflt.sys. I think that I have updated the driver of k1000m once with active Optimus in the bios and once with dedicated. Someone can give m

  • Azur AD - box for SSO

    Hello If the check box "I intend to set up this area for single sign - we with my local Active Directory." is checked when a new custom domain has been created in ad Azur is present then stop Azure AD Connect be able to password synchronization? I'm

  • unforwarding a fax machine

    We have a hp laser jet m3022, does anyone know how to close the fax, transfer function? Thank you