How do you control LED lights on the front panel to identify the number of steps a stepper motor has taken?

I am controlling a stepper motor that is coupled with a valve with four outlets (using an Arduino).  I've got a general understanding of how to control the motor, but I want LED lights on the front panel to light up that indicate which outlet the valve is currently at after the steps are taken.  The method I'm thinking about involves a lot of repetitive code.  I'm not that experienced with LabVIEW, I'm assuming I need some sort of loop structure but I don't know how to set it up in order to control the sequence of the LEDs.  I've attached my current block diagram for a visual aid if needed.
Attachments:
Capture.JPG ‏33 KB

I was thinking about using the Stepper To Go and Stepper Write functions four separate times, using the same constants for the steps each time since the distance between each outlet is equivalent.  The only difference would be what's connected to the "steps remaining" node, which would be the function that activates one of the four LEDs (if that makes sense).  I was thinking that doing it this way would be a little counterintuitive since the only thing that needs to be changed is the LED indicator.

Similar Messages

  • Need your help, How to write a program such as drag the objects to the front panel like using the LabVIEW Front Platte

    Dear all:
    Sorry for so long title.
    I need your help with how to drag the objects and drop onto the front panel.
    Like the LabVIEW front platte, i can choose the objects i can drop onto every where of the front panel.
    Could drag and drop function can satify?
    Any idea?
    Thank you
    Attachments:
    Image00000.jpg ‏75 KB

    What you want to do is relatively complicated and it seems that your knowledge of LabVIEW is relatively basic. I suggest you try searching this site and google for LabVIEW tutorials. Here, here, here, here, here and here are a few you can start with and here are some tutorial videos. You can also contact your local NI office and join one of their courses.
    In addition, I suggest you read the LabVIEW style guide and the LabVIEW user manual (Help>>Search the LabVIEW Bookshelf).
    Try to take over the world!

  • I have a VI and an attched .txt data file. Now I want to read the data from the .txt file and display it as an array in the front panel. But the result is not right. Any help?

    I have a VI and an attched .txt data file. Now I want to read the data from the .txt file and display it as an array in the front panel. But the result is not right. Any help?
    Attachments:
    try2.txt ‏2 KB
    read_array.vi ‏21 KB

    The problem is in the delimiters in your text file. By default, Read From Spreadsheet File.vi expects a tab delimited file. You can specify a delimiter (like a space), but Read From Spreadsheet File.vi has a problem with repeated delimiters: if you specify a single space as a delimiter and Read From Spreadsheet File.vi finds two spaces back-to-back, it stops reading that line. Your file (as I got it from your earlier post) is delimited by 4 spaces.
    Here are some of your choices to fix your problem.
    1. Change the source file to a tab delimited file. Your VI will then run as is.
    2. Change the source file to be delimited by a single space (rather than 4), then wire a string constant containing one space to the delimiter input of Read From Spreadsheet File.vi.
    3. Wire a string constant containing 4 spaces to the delimiter input of Read From Spreadsheet File.vi. Then your text file will run as is.
    Depending on where your text file comes from (see more comments below), I'd vote for choice 1: a tab delimited text file. It's the most common text output of spreadsheet programs.
    Comments for choices 1 and 2: Where does the text file come from? Is it automatically generated or manually generated? Will it be generated multiple times or just once? If it's manually generated or generated just once, you can use any text editor to change 4 spaces to a tab or to a single space. Note: if you want to change it to a tab delimited file, you can't enter a tab directly into a box in the search & replace dialog of many programs like notepad, but you can do a cut and paste. Before you start your search and replace (just in the text window of the editor), press tab. A tab character will be entered. Press Shift-LeftArrow (not Backspace) to highlight the tab character. Press Ctrl-X to cut the tab character. Start your search and replace (Ctrl-H in notepad in Windows 2000). Click into the Find What box. Enter four spaces. Click into the Replace With box. Press Ctrl-V to paste the tab character. And another thing: older versions of notepad don't have search and replace. Use any editor or word processor that does.

  • How can I access the member of a cluster on the front panel by selecting the label?

    I have a cluster of Controls. i would like to choose the element of the cluster by his label on the front panel and then show the value. Does anyone have an idea?

    I think I understand what you are trying to do. I've whipped up an example that uses property nodes, see if it helps...
    Brian
    Attachments:
    ClusterSelect.vi ‏35 KB

  • How do I input data to a table on the front panel and stop the program immediatel​y as button is pressed?

    What should I do if I want to display on the front panel in real time the values from Polarizer #, P1, P2 and the last calculated value (P2/P1 * 100) called T% in a table or some graphical representation like that?  What would I have to do?  It could just be Polarizer # and T% if that would be simpler.  I just want to let the user know the values in a list, spreadsheet or table as they go.  One last thing is that I would like to be able to stop the program at any point in time as soon as the stop button is pressed.  As of now, when the button is pressed it goes through the iteration currently in progress and then one afterwards.  I want the program to end as soon as the stop button is pressed no matter what sequence it is.  What can I do to achieve this?  Could you give me an example or modify my program to show me this.
    Thanks,
    Steve
    Stephen Coward
    Northrop Grumman
    [email protected]
    Attachments:
    EPM2000 almost done.vi ‏50 KB

    Put a single frame sequence structure around your stop button and then wire from the error cluster going into the error handler to the edge of the sequence structure. Now your code will stop at the end of the current iteration. To see why this works, watch you code execute with execution highlighting turned on and review the section of the manual talking about "Dataflow".
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • I want to print the front panel without all the header stuff while the vi is running

    I want to print the vi front panel without all the header information that Labview puts at the top. I want to do all this while the vi is running by pushing a button.

    One option is to use the the 'Print VI to Printer' method. Beware that invoking this method repeatedly with complex front panels has caused me graphics problems in my VI's display that persist until the development environment or the built .exe app is exited and re-entered.
    See: http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=5065000000080000005F5A0000&UCATEGORY_0=_49_%24_6_&UCATEGORY_S=0&USEARCHCONTEXT_QUESTION_0=spaz+print&USEARCHCONTEXT_QUESTION_S=0
    NI has confirmed this to be a bug in 6.0x and 6.1 and has indicated that it will be fixed in the next version.
    I was forced to fall back on the Append Front Panel Image to Report.vi in the report toolkit. Which does not produce printed graphs of as high as quality as the Print VI to
    printer method.

  • Spry Accordion menu - How do you make tabs without content and make panel height fit the content?

    I have an Accordion Menu on my site and I would like to put a tab at the top that links to my homepage when clicked, instead of sliding open to show a content panel. I don't have any extra info to put in the content panel, so it would look kind of redundant to have it there.
    Also, each panel has a different amount of content, but they all default to the same height to fit the largest content. I want them to fit to the content of each panel. The only thing I've read said to set the height of the content panel to 100% in the CSS, but it didn't change anything.
    Thanks!
    Andrea
    http://www.andreamutsch.com

    You make it look so simple but it doesn't seem to be working for me...
    My first thought with getting rid of the tab content was to simply delete it, but when I do that I get a warning that 'The structure of the accordian appears to be damaged'. Then when I preview none of the tabs will open.
    This is what my accordian structure looks like with the tab content code deleted...
    <div id="Accordion1" tabindex="0">
          <div class="AccordionPanel">
            <div class="AccordionPanelTab">home</div>
            </div>
          <div class="AccordionPanel">
            <div class="AccordionPanelTab">graphic design</div>
            <div class="AccordionPanelContent">
              <p align="center">identity </p>
              <p align="center">print </p>
              <p align="center">packaging</p>
              <p align="center">web </p>
            </div>
          </div>
    <div class="AccordionPanel">
            <div class="AccordionPanelTab">photography</div>
            <div class="AccordionPanelContent">
              <p>traditional</p>
              <p>digital</p>
              <p>retouch</p>
            </div>
          </div>
          <div class="AccordionPanel">
            <div class="AccordionPanelTab">contact</div>
            <div class="AccordionPanelContent">
              <p>email me</p>
              <p>design quote</p>
              <p>purchase photography</p>
            </div>
          </div>
          <div class="AccordionPanel">
            <div class="AccordionPanelTab">resume</div>
            <div class="AccordionPanelContent">download resume (.pdf)</div>
          </div>
          <div class="AccordionPanel">
            <div class="AccordionPanelTab">design blog</div>
            <div class="AccordionPanelContent">2009</div>
          </div>
    Also, getting rid of the height in the CSS had no effect (I did this before I did the above)
    Below is my current CSS for the Panel Content
    .AccordionPanelContent {
        overflow: auto;
        margin: 0px;
        padding: 0px;
        font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
        font-size: large;
        background-color: #633408;
        font-weight: normal;
        word-spacing: normal;
        text-align: center;
    Also there is a note in the CSS that says this...
    * Anyone who styles an Accordion *MUST* specify a height on the Accordion Panel
    * Content container.
    I'm not sure how accurate that is since I don't have a height in there and it worked (although not how I wanted) but I just thought I would throw it in.

  • My question was how do you control bass and treble on your Mac pro? he act of the matter is you can't. Why don't they just say that rather than reading all of the ********

    My question was how do you control bass and treble n a Mac Pro with the latest software.
    The answer is you can't
    In summary why don't you say that upfront?
    Instead of reading a bunch of crap that says nothing

    just a suggestion: try soundflower or Audio Hijack Pro. I know with the 2nd one, you can control the bass, treble, and all that, with anything that makes sound, from itunes, to Safari, DVD player, Skype ( I guess) and other stuff. Worth the $, IMO, so in answer to your question  dbumgardner1, no, no you can't.  I suppose in that sense, Windows has us at a loss. We also need 2nd party stuff to play BluRay's, too. However, I haven't seen any Macintosh viruses (virii?) for a long long time....
    so, there's that....
    JB

  • How do I get the Label for a Front Panel Control to appear in the Block Diagram but not on the Front Panel?

    How do I get the Label for a Front Panel Control to appear in the Block Diagram but not on the Front Panel? On the Front Panel I am making a complex control that consists of a Slider and a Numerical Input box. Both Controls display the same information and either can be used for Input. When one changs, the other is made to display the same value.
     But I only want the Slider to display the Label on the Front Panel, to avoid confusion. On the Block Diagram however, I want both controls to display their Labels so that I know what they are. How do I display the Label for a Control on the Block diagram, but not display its Label on the Front Panel?

    No.  The Label Visible property is separate for the front panel control label and the block diagram terminal label.
    How did you start out with the block diagram's label not being visible?  Whenever I drop a control or indicator, the label is always visible on both the FP and BD by default.  Maybe there is a LabVIEW option that causes new controls/indicators not to have their labels visible by default, but I have yet to find it.  I don't think an item should ever be dropped without the label visible, good LabVIEW coding practice demands that the labels for control terminals on the block diagram be visible so that you know what control or indicator a wire is going to.
    That being said, I have seen a lot of VI's posted where the label for the terminal on the BD is not shown (against good programming practice.)  I've gone to the BD and right clicked to show the label.  Sometimes, the people have an empty label (which will turn off the visibility for both the FP and BD) and I'm forced to add some text of my own into the label so I can figure out what their code is doing.  When I add some text to the label, at that time, I find both the BD and FP labels become visible.
    Are you dealing with controls that have empty labels to start?
    Good programming practices:
    1.  Always have a name for all of your controls, never use and empty label by deleting the text in the label.
    2.  Make the labels unique.  For example, don't have two controls both called Stop.  How do you know quickly know which terminal relates to which control?
    3.  Always show the labels on the block diagram, so you know the function of a control's terminal.  If you want to hide the label on the FP, that's okay.
    4.  If you want a different label to appear on the FP than whatever you actually called the control, then use the caption.  You can hide the label and show the caption.  This is useful if you need to programmatically change what the "label" is on the front panel such if you are making an application that needs to change its user interface such as for a foreign language.

  • How do you control playlist song sorting?

    how do you control playlist song sorting?
    in itunes - i set the iPOD playlist to sort by name - but it sorts in some random way when disconnected - on it's own..
    BTW: I created this by making the playlist manual in iPOD in itunes then dragging in songs to it from itunes....
    QL how do i get it to sort the iPOD playlist songs by name?

    In iTunes, right-click on one of the songs in your playlist, then select 'Copy to play order'.

  • How can I display a changing variable in a subvi on the front panel of the main vi as the subvi is excuting

    In the document attached the vi on the right is sub to the vi on the left. On the subvi on the right the variable "Field Reading" is continuously updated on the front panel of the subvi as the "for" loop is executed, but only the last value of the variable is updated on the main vi front panel which is what is expected. My question is how can I display the changing value of "Field Reading" on the main vi front panel as the "for" loop in the subvi is running?
    Thank you.
    Solved!
    Go to Solution.
    Attachments:
    Doc2.docx ‏554 KB

    Hopefully I can explain it well enough. It really is simple.
    1) Create an empty global variable and call it something like User Interface References.vi
    2) For each and every control and indicator on your front panel, right-click and select Create/Reference
    3) Place these references wherever you like (I use a series of Event cases to perform my initialisation and these all live in one of these event cases). They can be placed anywhere in the main vi.
    4) For each of the references, right-click and select Create/Indicator
    5) Moving to the front panel, Cut all the indicators and Paste them in the global variable (eg. User Interface References.vi)
    6) Moving back to the block diagram, wire the global variable to each of the references and select the same named global variable.
    All the hard work is now done (until you add another user interface terminal). You should now have something that look as shown below, [except the reference labels would be to the left (not sure why the snippet put them above)]. In my latest program I have 82 references!
    Done. You can now access all your front panel controls and indicators anywhere in your program as shown below.
    You can just select Value in most cases, but in this particular case I wanted to fire off an Event to do some things (log the alarm) as well as just update the value. So, this is another bonus with the method.
    Hopefully this all makes sense. If not, let me know.

  • How do I get the front-panel to pop to the front of the screen?

    I have a program that is reading in some network files. When a certain part of the file has been changed I want to pop up the front panel and blink the changed area. The blinking is easy and I can get the VI to pop to the front of any other running LV stuff (using the IsFrontmost vi property) but I need the vi to pop to the front of the entire screen and whatever else is running (Excel or the such). Any ideas on this? I'm doing the development on LV 6.1 on Win2k.
    Thanks,
    Gary

    Mache wrote:
    Hi Gary,
    There is one thing I think you may have to do. If the window is minimized than it will try to make it topmost but the minimize will take precedence, so you will see the task bar blink and the OS stays in the active/current window. Try to use the "restore window" vi before trying to make it topmost. That should work.
    Also make sure that, the LV window you are trying to restore and make topmost is not superceded by another LV modal window.
    Thats my take, Let me know if that works, for future reference.
    Good Luck
    Mache
    I've tried putting in the Restore Windoe vi and the results are the same. Both of those functions (seperate or together) result in the window moving to the top of the other LV screens only. If I have Word or explorer or anything else open, that window will stay on top and the task bar flashes. Can I use the "move window to front" vi in my main vi to move my main vi's front panel to the front? If not are there any ways to get around this? My program is mostly running in the background but when there's an important change I need it to move to the front and take precedence for a few seconds.

  • Leaving the front panel displayed on a subpanel after stopping

    I have a tab control.
    Each tab control has a subpanel.
    Each subpanel has a static vi reference attached to it for launching.
    I would like the image of the front panel displayed in the subpanel after the program has finished running so that any information that was displayed is still present.
    Is there a way to retain all the settings between run's?
    -Regards
    eximo
    UofL Bioengineering M.S.
    Neuronetrix
    "I had rather be right than be president" -Henry Clay
    Attachments:
    NeuroNetriX TestSet.vi ‏12 KB

    When you say settings, do you mean controls? If so, you can right click on them and select Data Operations >> Make Current Value Default. That will keep the settings initialized how ever you set them up.
    I believe you can use use the Get Front Panel Image VI Method node, similar to the way to run the VI. You can create one by right clicking on the VI reference wire and selecting Method for VI Class >> Front Panel >> Get Image. 
    I've attached a code snippet of the node. If you want you can just drag the file into your block diagram and it should turn into code. 
    Applications Engineer
    National Instruments
    CLD Certified

  • Switching between two tables in the front panels

    Hi
    I am working on an application,which has two "Tables"
    in the front panel. Both the tables do get updated
    simultaneously from the same test,
    Table-A displays
    A short summary report while the test is beign executed, and result.
    Table-B displays
    A detailed report of the test and its condition and parameter
    along with results.
    My front end is a simple display table, along with couple of
    Button controls,like "START","ABORT","DeTAIL DISPLAY" and "QUIT"
    ofcourse.
    All these buttons are used in Event driven case structures except
    "DeTAIL DISPLAY"
    as the execution beigns, on the press of start button,
    there are number of tests in which i have to pass, parameters to
    DLL and get back the result parameters.
    The end customer requires to switch the display between the TABLE-A  & TABLE-B during execution.
    so i have a, seperate while loop,where in a case structure is wired to "DeTAIL DISPLAY"
    button, and if true, visible is set to true to TABLE-B, and false to TABLE-A,
    and vis-versa. as per the logic this while loop should take care of switching between the
    tables.
    The other while loop Takes care of the entire test.
    My problem is that, while i execute the switching of tables are not fast.
    it waits till the tests are over,and event case structure is in idle state, and then switches to the other table.
    Also some times i am unable to click on button"DeTAIL DISPLAY", as the event control
    case structure, is not responding till end of the execution.
    How to over come this problem
    rags

    Hi,
    Have you tried using notifiers in master slave architecture?
    check this out
    Attachments:
    Notifier.vi ‏45 KB

  • Screen capture of the front panel automatically

    I've got a VI that analyzes a data file and outputs a graph, some numbers/notes, and a pass/fail message to the front panel each time we run it. I want to be able to automatically save all that data into one easy-to-access file (no html) after running it, and ideally this would be accomplished by just capturing the screen of the front panel and saving it as a .jpg.
    I've looked up how to do this on the forums and searching the web, but no solutions have come up. I've looked at the "Get Image" method, but that only lets me get the image of one object in the front panel, and not the entire front panel screen. I read something about referencing the front panel as an global, and inputting that into the "Get Image" method, but I can't get that to work and don't know if that's possible.
    Is there a way to make a straightforward automatic screen capture of the VI front panel? How can I program that?  (Manually using the "pinrt screen" function off the keyboard and copying and pasting it won't be feasible for this application).
    -- Thanks for the guidance

    No sure why you couldn't find a reference to it but there is the VI method Get Panel Image.
    Message Edited by Dennis Knutson on 03-16-2007 07:42 AM
    Attachments:
    Get Panel Image.PNG ‏4 KB

Maybe you are looking for

  • Specific Content Will Not Load With Any Browser

    This is something I have never run into and can't solve... I have a D-Link DPR-1260 wireless multi-function print server. My machines are a MacBook Pro with 10.5.1, an iBook G4 with 10.5, a Mac Mini with 10.4.11, and a Mac Mini with 10.4.10. Connecti

  • Problem Calling Oracle Stored Procedure From JAVA

    Hello all. I've been banging my head against this all day: Here's the procedure I'm calling: GetIDsByLatLonRadius(inLatitude IN NUMBER, inLongitude IN NUMBER, inRadius IN NUMBER, inTableName IN VARCHAR2, inIDColName IN VARCHAR2, inLatColName IN VARCH

  • Sorting a List object

    Hi! I have a List object or component (java.awt.List) in my app. I try to order it using Collections.sort(my_list) but I recieve this message which I dont understand: The method sort(List<T>) in the type Collections is not applicable for the argument

  • Help with FaceTime sign in

    I recently am having trouble signing on to FaceTime.  I keep getting the message "Could not sign in. Please check your network connection and try again."  I haven't had this problem before. I have a MacBook laptop, OS X 10.9.  I am able to use FaceTi

  • HT202297 I can't drag my ical events over to the reminders list.

    I can't drag my ical events over to the reminders list (that's not there anymore) like I used to be able to do. Why?