Help on efficient SubVI interaction

I really could use some advice with how my main program passes data to my SubVi, and how the SubVi handles it.  Right now my main program passes values into the SubVi as fast as it gets it.  The whole point of the SubVI is to perform an integral on my data.  However, the change in time (dt) is never constant, so I need to always be calculating dt as I go.  So I take current time T2 and subtract from it time T1, which has been passed back through the shift registers. 
My questions are these:
1. Is a while loop in the SubVi the best way to go?  In the main loop, the program runs continuously until I hit the stop button.  So I want the SubVi to run until the main loop finishes.  How do I stop the Subvi?
2.  Suppose the 4 fuel flow channels don't come in at the same exact time?  Let's say Fuel Flow 2 gets fed to the SubVi .002 seconds after Fuel Flow 1, and Fuel Flow 3 comes in slighty after 2?  How is the SubVi going to run?  Will it wait until all four channels of data are received before executing?
3.  If there is no timing control for the while loops, like a wait function, I understand the the while loop will execute as fast as it can.  Since I have a while loop in the main program feeding data, and a while loop in the SubVi, am I going to need to syncronize these at all?
I included the SubVi itself, and a picture of the main loop, since it has a lot of functions that are custom. 
I appreciate any help.. starting to get into more advanced programming! 
Thanks,
Alex

Thanks for responding so quickly!  I thought about what both of you said, and I've been trying to think of the best (and easiest) ways to implement your ideas.  In response to some of your thoughts:
Brad -
I wired the stop button in the main program to the SubVi.  I think this is what you meant.  Seems simple enough.  Not sure why I never thought of that before.  As far as the for loop, it would take me some time to think about how to do that.  If this idea with the while loop doesn't work out, I'll have to try that next. 
Lynn -
When I said I stop the program, I meant stopping it using a button control on the front panel, rather than abort stop button in the front panel taskbar.  I saw what you meant about having my controls outside the while loop.  It's obvious now.  So I put them inside the while loop.  Now they should be updating constantly.  As far as the other things you were mentioning, like putting indicators and TDMS write functions in seperate loops, I don't know too much about how to do that, but I'd like to learn more about it.  Do you have any good resources in the help or online that have some simple examples demonstrating this?  I would very much like to make this program run more efficiently.  I don't mind doing a reconfiguration of the program.
Ok, so here are the changes I made.  Pretty simple ones.  I attached the pictures of the SubVi and the Main.  All I did in the main was to route the true/false control to the SubVi.  Now the SubVi will run until i stop the main program.  In the SubVi, I placed the time and data controls in the while loop, so its constantly bringing values in from the main program and processing them.  However, the very time the SubVi run, you have this condition where the first time T1 is subtracting a value T0 that is produced by the shift register from the left side.  Since the loop hasn't run yet, I dont know what it's subtracting.  I'd like to have T0=T1, so I set up a local variable to initialize the shift register.  After that, I expect the shift registers to pass values back, so cases will run such as T2-T1, T3-T2 and so on.
This seems like the simplest way to get this to work.  Do you see any problems I don't?  Unfortunately, I can't "test" this, it needs to work the first time.. so I appreciate the help. 
And at the risk of sounding like a complete nerd, I love programming in Labview.  Lots of awesome challenges figure out and new ways to do things!
Thanks,
Alex
Attachments:
Main_edit.JPG ‏167 KB
SubVi_edit.JPG ‏95 KB

Similar Messages

  • Help with Aggregate on Interactive Report

    I have a field that is a number but I need to convert to show as a percentage (i.e. 17.4%) in the interactive report. At the same time I need to be able to do an Aggregate on this field so I know it needs to stay a numeric and I can't convert in the SQL. Is there a way to use the number format mask on the column to add the percentage or another way that will allow me to still perform aggregates?
    Version: Application Express 3.2.1.00.12
    Thanks for your help.
    Chris

    Anyone have any suggestions?
    Thanks.

  • Help needed in printing   interactive form

    Hi Friends
    I just developed an application  which access  ECC
    can any one guide me to print  the output pdfform
    i have opened result interactive form and placed a print button ...next which script i should use? formcalc  or
    java script..since my application is a java webdynpro .
    can  you give me the piece of code for that..formcalc
    already got the script..but  i dont know the exact java script for  printing.
    plz help me in this issue
    vivek chandra

    Hi Raja
    Thanks for that stuff..very helpful
    i  have 3 inputfields on one of my interactive form
    i was asked to fill those fileds  with predefined data
    so that once the app is run, input form fields should
    dispaly the predefiend values.in wdinit method i could
    do that using wdContext.currentelement.setName("xxx");
    i have 3 fields..three are text fields.from the third field need to eneter the date,its a PO Bapi..i did context binding ..i could drag the input  fields..
    but when iam trying to set predefiend date for the
    3rd field..its not accepting it..since it is of type
    date.. do i need to create any data type for the 3rd field in javadictionary????plz guide me in this issue
    regards
    vivek chandra

  • Problem with Input help inside an adobe interactive forms

    Hi Experts,
    I'm currently implementing a Webdynpro ABAP application containing a Interactive forms.
    I'm using Adobe Live Cycle Designer 8.0, Acrobat reader 9.2, Internet Explorer 7.0
    My problem is that when I click on the "input help" button inside the adobe form, he automatically refresh all the forms UI element with their initial values. Is-it a refresh event included when we pressed the "Input help" button or an other event? How Can I deactivate that action, event?
    Because since he automatically refresh my form data I loose the context current values.
    Thanks in advance,
    Louis

    P740741 wrote:>
    > Hi Norbert,
    >
    > Thanks for reply, yes I use ZCI and I inserted the Webdynpro script  through Utilities.
    >
    > Best Regards,
    > Louis
    strange, but you could compare the version of the zci scripting
    in your form in the hierarchy tab there are variables and the ContainerFoundation_JS script --> the first line
    // DO NOT MODIFY THE CODE BEYOND THIS POINT - xxxxxxxxxxxxxxxxxxxxxxxxxxx - ContainerFoundation_JS gives you the requested information about the scripting version...have a look at this version...
    norbert
    perhaps this note helps:
    Note 999998 - Analyzing errors with Adobe Integration of Web Dynpro ABAP
    --> for debugging!
    A client debug function is available as of SAP NetWeaver Release 7.00 Support Package 19 (or after you implement Note 1287114) and for all Enhancement Packages. Activate this client debug function using the URL parameter "sap-wd-clientDebug=X" (attach it to the URL using "&"). You can then activate the client trace using the key combination <CTRL><ALT><SHIFT>T (move the focus to a Web Dynpro UI element, for example, to an InputField, do NOT move the focus to Adobe Reader). The system opens a new browser window with the trace output. The trace may contain an error entry ("Network Error", and so on). The URL also activates the Adobe document services (ADS) trace. The trace outputs of the ADS are copied to the generated PDF document as an attachment. Open the file "Error.pdf" of the ADS trace: Form errors (for example, script errors) are listed there.
    Edited by: Norbert Prager on Oct 24, 2009 7:31 PM

  • Need help with a customized interactive web application for  apparel

    Help!!!!
    Hi I am a web designer at beginners stage with web
    devlopment. I am seeking guidance on how to develop a customized
    interactive web application so that the end user can change color
    and patterns of apparel on vector images such as teamsports
    uniforms and tshirts. Once the design is customized to their liking
    they can save it with all of the spec information in a file to
    there desktop or to a database to send to the manufacturer.
    Also looking for a possible way to use a CMS so I can upload
    templates of the garment easily for the end user to customize
    online. Can this be done and if so how? This is an example the kind
    of application I am looking for:
    http://www.dynamicteamsports.com/elite/placeorder.jsp
    I am in desperate need of some brilliant developer to help
    with this.
    Thanks in advance for anyone who is willing to assist or give
    me guidance,
    Danka
    "Reap what you sew"

    some parts of that are doable using non-advanced skills, but
    will be difficult and unwieldly if there are more than a few
    colors/patterns.
    saving the image to the server is a bit more advanced and
    you're going to need some server-side scripting like php, perl, asp
    etc. in addition to some flash programming ability.

  • Need Help with ACTIONSCRIPT for Interactive Music Video

    I am trying to create an interactive music video in After Effects and Flash.
    The concept is that while the music video is taking place the user can  decorate the hair of the woman with any of the objects they select.   There will be predetermined animations and destination spots but the  user can choose whatever objects they select to be delivered to the  predetermined spot.  I need to figure out how to let the user to select  an object that will become part of the animation.  I created a PDF  Roughly explaining what I am trying to do.  If anyone can help me I'd be  very grateful as I am more versed in After Effects, I don't know  ActionScript well enough to execute what I am trying to do.
    Below is a rough example of what I am trying to do.  There will be a music video of an animated woman singing.  As she is singing the user will be able to click any of the objects , below the numbers 1-10.  Below it is illustrated that the user wants to press the blue number 2.  If the user presses the 2 the 2 will animate in the mouth of a bird to a predetermined pre-animated spot.  I assume I need to send a movieclip to a blank  holder on the timeline and use a gotoAndPlay() action ???  I am not well versed in ActionScript so any advice would help
    Now whatever number (movieclip) the user chooses next needs to be placed in another blank spot in the timeline? Below the user selcts the Pink 5.
    If the user just wanted to Place two "Blue 2's" then the "Blue 2's" would follow the same animated path and end up at the same predetermined space.
    If the user selected just 5's and 7's they would go to the predetermined preanimated paths
    How would I go about writing the Actionscript for this?

    Look, I hope you don't have false expectation that by knowing one piece of AS capabilities you will be able to accomplish your task.
    If I say that the code for placing one MovieClip into another is:
    clip1.addChild(clip2);
    will it make any difference in terms of implementation?
    Also, you say "select." This may mean a lot of thing: click, drag and drop, mouse down, etc. I am saying that implementation tightly depends of definitions that you give.
    I don't know the extend of your AS skills, so it is not easy to figure where to start helping. Also, forum, perhaps, is not the medium where someone will write a lot of code for you. It is good for getting answers to very specific questions and solutions. This is when you have some code in place already.
    What I would suggest is to start developing a very rough concept - no video, no birds, no numbers - just a static background image of the person you have in your first post. If you advance to an application that will allow user to select a square, place the square into another one - it will be a good start.

  • Bringing up the help popup in an interactive report

    The gear dropdown on an interactive search, has a help, that when clicked on would bring up a popup explaining the icons of the gear search.
    I created a button and trying to bring up this help when the user clicks on it.
    How would I go about doing this?
    Thanks.

    Lloyd,
    An interactive report is also known as a worksheet. Each interactive report region has a unique ID. That ID is needed as a parameter in the URL to generate the help page.
    On second thought, try the following which should not need a page item:
    javascript:html_PopUp('wwv_flow_utilities.show_ir_help?p_app_id=' + $x('pFlowId').value + '&p_worksheet_id=' + $x('apexir_WORKSHEET_ID').value + '&p_lang=en-us');Regards,
    Dan
    http://danielmcghan.us
    http://sourceforge.net/projects/tapigen

  • Help. about java c++ interaction

    there is a java program in the unix environment, it will run a tool software written in c++.the c++ program will send back some options by stdoutput,the java program gets it and makes the choice,and then send to c++.this procedure will repeat several times until there comes the result from the c++ program.
    i want to know what kind of solution should i choose in java language.
    i tried
    process p = runtime.getRuntime("command");
    but can read and write only once,which is not interaction indeed, and then the program hangs.if you think it is the solution,could you give me some examples programs about that.

    First let me say what i understand of ur problem,
    u essesntially want to invoke some c++ code(a method) and then want the method to return back some value. right?
    using exec() method won't solve ur problem, as it starts the process in another address space and u won't be able to establish communication as such.
    the way which i used to take care of similar problem is to use JNI.
    Using JNI, i invoked the C++ method. there is something called JNIEnv thru which i can access the variables of java from within the c++ method this enabled me to obtain results from the c++. u can also get the value the method returns. The method gets invoked just like any other java class method. This shuld solve ur problem i guess
    and it is also not that complicated and i guess i can help u with this
    regards
    Deepak Saini

  • Can someone please help me create an interactive feature.

    I am creating a website for a small business using Adobe Dreamweaver CS6 and am trying to create an interactive feature where the text appears once a button is clicked. The interactive feature I am trying to create is on the website: http://www.specialistengineeringplastics.com/products/ where the product name is given and then more details are shown below it once this name has been clicked. I have access to a wide range of Adobe Products including Fireworks, Flash, Illustrator etc. Please help me!

    I am creating a website for a small business using Adobe Dreamweaver CS6 and am trying to create an interactive feature where the text appears once a button is clicked. The interactive feature I am trying to create is on the website: http://www.specialistengineeringplastics.com/products/ where the product name is given and then more details are shown below it once this name has been clicked. I have access to a wide range of Adobe Products including Fireworks, Flash, Illustrator etc. Please help me!

  • Multiple search helps in ABAP Adobe interactive forms not working....

    Hello,
    I am working on my first interactive form. I have a couple of fields to which I have attached a search help. However, I am able to use the search help for only one field in a session. If I use the search help on one field then I am unable to use it on another field which uses the search help.
    Can some one help? I am new to interactive forms and this is my first form.
    I appreciate your help in advance.
    Thank you,
    Leena

    Hi Leena,
    Are the Data dictionary fields which you are using contains value range. Because i am only getting value help only for the fields for which there is value range defined in the dictionary. The problem is only for the fields for which there is no value range defined. If you have solution to this problem I will definitely award points to you. But in your thread for me its not possible to reward points, so you can answer the following thread:
    [How to get Value help in Adobe forms;
    Will reward points if found your answer helpful.

  • Value Help in online Adobe Interactive Form

    Hi All,
    One of our clients needs value help in Adobe Interactive form for Java Webdynpro.
    But I got a problem in value help. For the first time when I click the button its working fine but the next time itu2019s not working.
    The whole screen is locked and no event is triggered for the next time.
    I am using Adobe Lifecycle Designer 8.0, Netweaver Studio 7.13  and the display type is ZCI(native).

    Hi Syed,
    I am using Adobe Lifecycle Designer 8.0, Netweaver Studio 7.0  and the display type is ZCI(native), but i am getting dump on click on valuehelp button. Can please provide me steps to resolve this? What are things need to be done.

  • Help Needed with Adobe Interactive Forms scripts

    Hi Gurus,
    I have an Interactive form in which I have 5 radio buttons. Upon selecting any one of the radio buttons, some values (Ex : If user selects the first radi button 20 should be displayed in the text box. If he selects the second 21 should be displayed in the textbox.). In my script, I need to capture the checked value of the radio buttons ( They  are grouped) and how I should reference radio button on the form/subform
    Regards,
    Srini

    Where to start with scripting:
    http://www.adobe.com/devnet/livecycle/articles/lc_designer_scripting_basics/lc_designer_scripting_basics.pdf
    http://help.adobe.com/en_US/livecycle/es/FormCalc.pdf
    In first doc, check the last chapter for the most illustrative examples.
    You need to be able to get the value of the radio (var help = this.rawValue), use the condition (if (){} else {} )and set the value (this.rawValue = "").
    Otto

  • Help with efficiency for insert/get methods?

    I am not an expert when it comes to run times and I am wondering what the most efficient data structures would be for a program I am making. I need to:
    Go through a large document in which each line is formatted as: (String Integer), and add the string & integer to some sort of data structure. The list of string/integers is large and I need to be able to access the information in the data structure efficiently. Right now I am using a scanner to read the doc and a TreeMap<String, Integer> to store the info. The get method for the TreeMap is fine, but processing the document is a little slow.
    What do you think? TreeMap, hashing, balanced search tree? Remember, the insert and get methods are the two that need to be most efficient.

    Why are you using a TreeMap? Is the order of iteration important to you?
    If not, then you can probably get better performance using a HashMap, properly configured. The TreeMap has O(n) performance for get/put. while HashMap has constant-time performance. If you properly configure the initialCapacity and loadFactor for the HashMap you can get very efficient puts by reducing the number of re-hashes that are needed during map-growth. Note that if you retrieve the data from the Map using an iterator (rather than just calling get()) then you have to be more careful with these settings because they affect the total number of buckets - which can affect the speed of iteration.
    You should also run your code through a profiler. Are you sure that the put() operation is the slow step when reading from the file? It may be that your file access is really the slow step, and so modifying the data structure would have little or no effect. You might consider different methods for accessing the file data, perhaps something from thew NIO package would help speed things up (I am not particularly sure though - I am not very familiar with NIO).

  • HELP NEEDED with flash interactive comic book

    Hi folks
    I am really stuck here.
    I am creating an interactive comic book for college. I want a menu, which will house all four issues of the comic series. When you click and drag an issue to the drag area I want that issue of the comic to appear. Then all I need is a button to turn the pages. Pressing the final turn page button will return to the main menu again. If someone can help me Id appreciate it as this thing needs to be in for monday/tuesday.

    At this stage I've only been able to make the issue snap to the read me button but I have no idea how to make sure that action leads to the first page of that comic issue.

  • Help required to understand interactive SWF appearance on various browsers and pc's

    I have created an interactive newsletter for global distribution.
    My work machine uses a resolution of 1280 x 1024
    However, my company uses different browsers and laptops globally, as we have approx 150,000 employees.
    The Indesign pages are 1000 x 800 px
    When I sent out a few test files, I received various issues from different people.
    Some using IE6, IE7 and IE8 complained that although their resolutions were 1280 x 800, or 1280 x 1024, the  top and bottom of the swf files were either cut off or the file was presented with text too small to read.
    Using Firefox, some of the people also said that the file presented with the top and bottom cut off.
    My own PC using either IE8 or Firefox @ 1280 x 1024 presents the file perfectly fine.
    Now, with IE 8 and firefox, by either using the CTRL + middle mouse wheel, or CTRL and + or - the SWF file resized correctly by zooming in and out.
    For IE6 the user would need to right click and choose Zoom in or Zoom out.
    Most users are, and I am not being patronising here, not computer savvy, and would not generally know how to perform this option. They simply use the computers to do their job and panic if a java updated is presented.
    I need to avoid this if I am to pursue the interactive SWF file approach.
    Has anyone else experienced this and can you offer a solution that, no matter the resolution ot Browser used the SWF file will present correctly all the time?
    thanks

    The usual approach is to assume the smallest pixel dimension for a desktop is 1024x768, so you set the flash stage at around 900x650. If you are coding in Actionscript there is the option to listen for a browser resize and rearrange the objects on the stage to fit the space, but that's not an option saving out of ID. The best approach is to setup your ID page to 900x650,  and make sure the text is readable at 100% view.

Maybe you are looking for

  • Maximum page size in fireworks

    hi, what is the maximum size fireworks can handle. As i have one file in Tiff format which i want to edit in firewroks but by maintaining the same pge size . the page size is 112x112 inches . now the problem is i can open the same file in fw but if i

  • Itunes store locks up when trying to search

    Hello all I am running itunes 9.1.1 on a pc I built just a few weeks ago. I'm using windows 7 64 bit. My problem is that when I try to search the Itunes store, itunes locks up and must be forced closed with the task manager. I can still get to my lib

  • Calendar from other Person

    Hello all. I am trying Outlook 2007 (now there is a connector for that). It seems ok for emails, but calendaring is still a bit confusing. Is there a way I can see another person's calendar, as I do from the Collab portal? Looks like I can only see e

  • Jdk1.6.0 run error, how to solve?

    I am using Linux-fedora6.0 , downloaded jdk1.6.0 . I am working in an standalone machine. javac can compile properly my file, but java can't run my class file that is created by javac. Error msg. " Exception in thread"main" java.lang.classFormatError

  • Help getting started with Aperture

    Hello, Can anyone advise please. I am getting an imac, and have decided to work with Aperture & NIK plug-ins, and also change from NEF files from my D90 to DNG (I have been using Capture NX2, but have run out of patience with Nikon, and can't risk th