Programmatically add steps to a VI

I am writing a code to control a bank of valves via cDAQ/DAQmx. I need to figure out how to allow the user to build a macro or something similar that will allow them to programmatically change the order and number of the steps in a sequence. For example, one time he might want to have 5 different steps where he activates valves 1, 2, 1, 3, 1, 5. The next time he might need 8 steps alternating back and forth between 2 and 6. A sequence would only run one time.
With each step there are only two variables, the address of the valve on an ni9472 and the length of time the step is active, both of which could be expressed numerically. The code for each step will be the same, just these two variables change.
Thank you
Solved!
Go to Solution.

Hi LlywusB,
You might try to go about parsing a string constant (and later control) into separate numbers and feed that into a case structure.  This will give you the option to control up to 10 valves each with a different address and different timing.  Take a look at the VI attached
Anthony F.
Anthony F.
Product Marketing Engineer
National Instruments
Attachments:
DAQMacro80.vi ‏11 KB

Similar Messages

  • How to programmatically add rectangle to a pdf file ?

    How to programmatically add rectangle to a pdf file ?
    There is several page pdfs, non-vector, black and white.
    Users are color blind and have disabilities.
    To train them, one adds a rectangle at a certain lower-left point and width,height specified for a page.
    The idea is to give the script the page and coordinates and size of rectangle to be added programmatically. Green rectangles are acceptable as the cones are most sensitive there.
    Also, additional feature to add bookmarks on the left in the order these rectangle data is provided to the script.
    The script could be "hard-wired" by a list of the rectangle coodinates, and page number, pasted inside acrobat and run or entered into acrobat in some way.
    Your script would help many disabled people who are distributed through out the world.
    Feel free to contact me by email if you wish.
    Dying Vets

    P.S.
    This rectangle does not have to be a full annotation rectangle which needs user,date and a lot of info.
    Something minimal like this would suffice
    1 0 0 RG % red for stroke color
    200 300 50 75 re
    As you can see that the native unit of the pdf file is the "point" having 72 in an inch.
    The file dpi would be given. However, one could assume that pixel for the rectangle lower-left and width/height are given.
    From the pixels and dpi, the points could be calculated if desired.

  • How to add steps to a process in Performance Management

    how do I add steps to the process in SPRO->Objective Setting and Appraisals->Define Tabs and Process Configuration for Template?
    any time I try to add a status/substatus to the process it is added as a process phase, not a step.
    Thanks,
    Tiberiu

    I found that when I select the phase and then try to add the step it works.
    i used to select the process, and that is why the step was added as a phase.

  • How to programmatically add UDVs to project?

    Hi all,
    I have successfully used something like this to programatically add shared variables to an LVLIB (the code assumes that the library associated with the Container Reference contains at least one variable):
    An example output would be:
    Container Name: "MyLibrary.lvlib"
    Variable Name: "Variable1"
    Variable Path: <blank>
    Variable Type String: "Variable"
    (I notice that there is no way to specify the data type of the variable, and LabVIEW creates a DBL variable in the LVLIB by default.)
    However, if Container Reference is associated with a "User-Defined Variables" container, then I get Error 1 at the Invoke Node ("LabVIEW: An input parameter is invalid"). A example output is:
    Container Name: "User-Defined Variables"
    Variable Name: "Variable1"
    Variable Path: <blank>
    Variable Type String: "Variable"
    Questions:
    Does the error occur because LabVIEW is trying to create a DBL variable (which is not allowed with UDVs)?
    How can I programmatically add UDVs to my project?
    Thanks in advance!

    What is the scope of your project? How will you be using these UDV's?
    Mark P.
    Applications Engineer
    National Instruments
    www.ni.com/support

  • How can i programmatically add a text in a combobox drop down menu ?

    How can i programmatically add a text in a combobox drop down menu ? Can it be possible using any property node?

    You've posted to the wrong forum. Please post to the LabVIEW board.

  • Very Simple: How do I programmatically add line breaks?

    Very Simple: How do I programmatically add line breaks or how do I encapsulate my RichCommandLink's within a paragraph?
    My Code is as follows:
    for (String token : userViews.getViewNames())
    // add command link
    RichCommandLink output = new RichCommandLink();
    output.setText(token);
    // set action here
    // output.setActionExpression());
    viewItem.getChildren().add(output);
    // update view
    this.menuAccordion.getChildren().clear();
    this.menuAccordion.getChildren().add(0, viewItem);
    AdfFacesContext.getCurrentInstance().addPartialTarget(getMenuAccordion());

    Sorry, I'm using Jdeveloper 11.
    Im using JSP, JSF, ADF, Fusion. The RichCommandLink is an ADF Control.
    My PanelAccordion is bound to a RichPanelAccordion in my java class. When I add RichCommandLink's to the accordion the items are added next to each other. How do I add line breaks from my java class?

  • How to programmatically add af:setPropertyListener to CommandImageLink

    Hi All,
    My Requirement: programmatically add af:setPropertyListener to CommandButton
    I referred this post how to programmatically add af:setPropertyListener to CommandButton and followed the following code.
    Code:
    // create a value expression
    ValueExpression vx =
    elFactory.createValueExpression(elContext, "#{pageFlowScope.clockNo}",
    String.class);
    // set a default value if desired
    vx.setValue(elContext, clockNo);
    SetPropertyListener spl =
    new SetPropertyListener(ActionEvent.class.getName());
    spl.setFrom(clockNo);
    spl.setValueExpression("to", vx);
    // add the listener to the button
    newOpButton.addActionListener(spl);
    My Code:
    <af:commandImageLink id="editInsuraceDetLink"
    icon="/resources/images/Edit.jpg"
    iconPosition="trailing"
    rendered="#{not row.deleted}"
    action="addEndorsement"
    useWindow="true"
    inlineStyle="vertical-align:bottom;"
    partialSubmit="true"
    shortDesc="Edit"
    *actionListener="#{pageFlowScope.GetEndorsementTypeListener.execute}"*
    returnListener="#{GetEndorsementDetailsListener.execute}"
    windowEmbedStyle="window"
    windowModalityType="applicationModal"
    windowHeight="650" windowWidth="740">
    </af:commandImageLink>
    Action Listener - .GetEndorsementTypeListener.execute code:
    RichCommandImageLink a_button = (RichCommandImageLink) a_component.findComponent("editInsuraceDetLink");
    FacesContext fctx = FacesContext.getCurrentInstance();
    Application application = fctx.getApplication();
    ELContext elContext = fctx.getELContext();
    ExpressionFactory elFactory = application.getExpressionFactory();
    ValueExpression vx = elFactory.createValueExpression(elContext, "#{pageFlowScope.controlFlowName}", String.class);
    // set a default value if desired
    //vx.setValue(elContext, clockNo);
    SetPropertyListener spl = new SetPropertyListener(ActionEvent.class.getName());
    spl.setFrom(a_target.getEndorsementFor().toString());
    spl.setValueExpression("to", vx);
    System.out.println("From= "+spl.getFrom());
    System.out.println("To= "+spl.getValueExpression("to"));
    // add the listener to the button
    a_button.addActionListener(spl);
    I got the following output.
    From= Nominee / Appointee
    To= ValueExpression[#{pageFlowScope.controlFlowName}]
    Now my Problem is: the pageFlowScope variable ControlFlowName is not set.
    And also I got a *link*: https://blogs.oracle.com/vijaymohan/entry/usage_of_setpropertylistener_and_setactionlistener
    Whats wrong with my code. Is my problem related with above *link*.
    Please suggest me how to add SetPropertyListener programmatically.
    -Thanks
    Mohanraj

    Frank,
    This works:
            // create a value expression
            ValueExpression vx =
                elFactory.createValueExpression(elContext, "#{pageFlowScope.clockNo}",
                                                String.class);
            // set a default value if desired
            vx.setValue(elContext, clockNo);
            SetPropertyListener spl =
                new SetPropertyListener(ActionEvent.class.getName());
            spl.setFrom(clockNo);
            spl.setValueExpression("to", vx);
            // add the listener to the button
            newOpButton.addActionListener(spl);But, I am thinking you would have known about it before I posted it. I don't really know how it works, but it does.
    Can you help me reconcile between this, and what you said. Because what you said makes sense too.

  • Programmatically add contacts

    I was wondering if there is a way to programmatically add contacts, and possibly search for duplicates.

    "contacts"? Not sure what context you're talking about ... What are "contacts"?

  • Programmatically add front panel objects

    hello,
    I would like to programmatically add controls and indicators to a front panel. I have read a thread:
    http://forums.ni.com/ni/board/message?board.id=170&message.id=70347&query.id=10819#M70347
    Ben Rayner describes a technique which takes an image of the relavant object, then adds this image to a picture on the front panel. I was wondering if anyone has an example of this techinique? Or if there is a simpler method of doing it?
    Thanks,
    paul.

    Hi Paul,
    This thread contains a collection of Picture related threads.
    Contained in that collection you will find a link to this thread where in reply #52 I posted an entry for the "Obfuse Code Challenge" . In that example I grab the image of a boolean and use it in a Picture control to play a game of Hang Man" while executing a random walk to speel out "Hello World". That code is not documented since the game was to be obfuse.
    In reply #33 of this thread, I posted a new version of the CC and Friends" project where I used a picture control to display an arbitrary set of images.
    Ading to the above:
    I have developed and delivered "Controls on the Fly" applications
    add they were well recieved, BUT....
    They are not trivial!
    So if you would like to share what you are trying to accomplish, we may be able to makes suggestions that are esier to implement. 
    Ben
    * Art work by Christian Altenbach
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • Programmatically add meta tags to docs

    Is there a way to programmatically add custom meta tags to
    documents that are being uploaded via CF? I am looking to do this
    for our Google Mini Search Appliance.
    Thanks,
    Josh

    You couldn't find the answer by searching?!? Why be concerned with searching if you do not search yourself?
    c'mon

  • Programmatically add a  DateTimeConverter to a RichInputDate In Jdev11G TP3

    Hi I’m trying to programmatically add a DateTimeConverter to a RichInputDate.
    I’m understanding that I must first do something like this.
    ApplicationFactory af = (ApplicationFactory)
    FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY);
    javax.faces.application.Application a = af.getApplication();
    At this point I know I’m doing something wrong but I’m not sure what
    a.addConverter(“dtc”,”DateTimeConverter”);
    DateTimeConverter dtc = (DateTimeConverter)a.createConverter("dtc");
    Can someone send an example of how to do this.
    Thanks

    Hi,
    When I'm creating a DateTimeConverter like this.
    RichInputDate rid = new RichInputDate();
    DateTimeConverter dtc = new DateTimeConverter();
    dtc.setPattern("dd-MMM-yy");
    rid.setConverter(dtc);
    I get this......
    WARNING: The converter supplied for InputDate with id null does not implement the ClientConverter interface: javax.faces.convert.DateTimeConverter@405a01.
    The input field will not support client conversion or validation, and only the input field will be displayed (no date-picker popup).
    To get client conversion and validation support, implement the org.apache.myfaces.trinidad.convert.ClientConverter interface or obtain the converter using javax.faces.application.Application.createConverter (preferred).
    If you just want to set the converter pattern programmatically, obtain it using createConverter and call setPattern() on it.
    Please Help !

  • Programmatically add a signature to mail?

    Is it possible to programmatically add a signature to mail? AppleScript? Automator?
    I have 10+ macs on a lab and would be "painful" to do all of it manually
    Thanks!

    Do you want to create this signature on an email site you access in Firefox (the method would depend on which service it is), or in Thunderbird?

  • Programmatically add folder to classpath

    How can I programmatically add a folder (either on the local filesystem or through a URL across a network) to the classpath? If I'm trying to load a file test.properties, and I do a ResourceBundle.getInstance("test"), I'd like the folder that I add to the classpath to be searched in the process of finding test.properties. (I'd therefore need to add test.properties's containing folder to the classpath.)
    The reason I need to do this programmatically is because within this web application, we're unable to modify the packaged WAR file or make the resources available to other web contexts by placing it in the common library directory of the web server. And being a web application, of course setting the CLASSPATH environment variable or setting the cp command-line flag won't help.
    Thanks.

    Right, I do that too. We have a web application with a configuration file (and some other things like log files) that are external to the EAR file. So I hard-code the directory where those things belong somewhere in the application. No need for desperate measures like class loaders, and anyway even if you did that you would still need to hard-code the place where the class loader should look.

  • Programmatically add a dimension condition in my BI JSP crosstab page

    How can I programmatically add a dimension condition on a existing measure in my BI JSP page?? My case is that I have a fact table which stores all department cost. I want my BI JSP crosstab can only display one department cost total "not" all department total. But, the department condition is base on which user logined. For example, "A" user should display "aa" department and "B" user should display "bb" department. Please HELP!!!!!!!!!!!! Thanks very much!!!!!
    Regards,
    Eric

    I would recommend using the built-in security feature of the analytic workspace. There is a command called PERMIT that can be applied to both dimensions and cubes and controls user access to dimension members.
    There is a document on the OLAP home page that explains how to secure and AW using the permit command
    http://www.oracle.com/technology/products/bi/olap/olap10g_applying_aw_security.doc
    Hope this helps
    Keith Laker
    Oracle EMEA Consulting
    BI Blog: http://oraclebi.blogspot.com/
    DM Blog: http://oracledmt.blogspot.com/
    BI on Oracle: http://www.oracle.com/bi/
    BI on OTN: http://www.oracle.com/technology/products/bi/
    BI Samples: http://www.oracle.com/technology/products/bi/samples/

  • Programmatically Add Formatted AutoCorrect: Outlook Word Excel

    There are many posts available regarding the addition of AutoCorrect entries, formatted or not, using VB or PowerShell.  These have been very helpful in my efforts to give marketing what they want: a helping-hand to ensure that users are using proper
    branding (italics, bold, capitalization, etc.) when typing our brand names.  I now have a PS script which I can apply as a user login script, which creates all the entries.  Unfortunately, after all the effort, I've come to the realization that formatted
    AutoCorrect additions made using Word (the only way the community seems to know how to break-in to AutoCorrect from a scripting perspective), apply only to Word.  (This is an insanely frustrating thing from my perspective.)
    Is there any way to programmatically add AutoCorrect entries to other Office products, specifically Outlook and Excel?  If not, does anybody know of any reason why Microsoft would design Office in this fashion? It seems remarkably short-sighted on the
    surface ...
    Thanks ahead of time for any advice you may have!

    Hi,
    This is the forum to discuss questions and feedback for Microsoft Office, I'll move your question to the MSDN forum for DEV
    http://social.msdn.microsoft.com/Forums/en-US/home?forum=officegeneral&filter=alltypes&sort=lastpostdesc
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
    George Zhao
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

Maybe you are looking for