How do I get values into a vi from a subvi while the subvi is still running within the vi?

Hello
This is my problem. I have a subvi that runs an experiment. At different point in the experiment different instruments are on or off and I have a boolean array display this info. It is updated at various points of the experiment via a local variable. That works fine. Here is the problem though. I run that subvi from a main vi program (that runs it several times for several experiment cycles). I would like to pass the status of that array onto the mainvi to display there too. The problem is that the array in the main vi is not updated until the subvi is done running and thus displays only the array status at end of experiment (instead of changing
as the status changes within the subvi). I tried using a global variable to write to it in the subvi every time there is an update, and read from it in the mainvi, but that doesn't work, it still displays just the status at the end of the subvi execution. Does anyone know how to make this work, or if there is a workaround this? Thanks.

If you have LabVIEW 6i, you can update indicators of a calling VI from
a SubVI, while the subVI is running.
In your case you need
1) an indicator on the main VI panel to display the boolean array
2) to pass a reference to that indicator to the subvi when you call it
3) to use this reference in the subVI, connect a property node to it and
write the values to be displayed to the 'value' property of this node
If you don't have version 6, you can write the values to be displayed to
a global and display this global in the main VI from within a while loop
which must run in the main VI in parallel to the running subVI.
It's more complicated, since you need a mechanism to gracefully shut
down the while loop after subVI finishes. You could do this with
another global control boolean which is not displayed but just connected
to the repeat terminal of the while loop. Don't forget to put a 'Wait' of,
say, 50...100 msec in that while loop.
-Franz
zkajan schrieb:
> Hello
> This is my problem. I have a subvi that runs an experiment. At
> different point in the experiment different instruments are on or off
> and I have a boolean array display this info. It is updated at
> various points of the experiment via a local variable. That works
> fine. Here is the problem though. I run that subvi from a main vi
> program (that runs it several times for several experiment cycles). I
> would like to pass the status of that array onto the mainvi to display
> there too. The problem is that the array in the main vi is not
> updated until the subvi is done running and thus displays only the
> array status at end of experiment (instead of changing as the status
> changes within the subvi). I tried using a global variable to write
> to it in the subvi every time there is an update, and read from it in
> the mainvi, but that doesn't work, it still displays just the status
> at the end of the subvi execution. Does anyone know how to make this
> work, or if there is a workaround this? Thanks.
Franz Josef Ahlers
Section Semiconductor Devices
Physikalisch-Technische Bundesanstalt
Bundesallee 100
D-38116 Braunschweig
phone: (+49) 531 592 2410
fax: (+49) 531 592 2405

Similar Messages

  • XSL-How to get value of a variable from inside loop-- to the outside loop?

    Pls help
    hi im currently working on this xsl file..
    This works on generating a txt file,my problem right now is
    ' how can i get the value of a variable generated from the inside forloop,
    i have to get the total,sum value of this variables after performing the loop
    ***this is the for loop
    <xsl:for-each select="OutboundPayment">
    <xsl:variable name='id' select='generate-id(OutboundPayment)'/>
    <xsl:sort select="PaymentNumber/CheckNumber" data-type="text" />
    <xsl:variable name='PValue' select='format-number(100*PaymentAmount/Value,"0000000000000")'/>
    <xsl:value-of select='$id'/>
    <xsl:text>D</xsl:text>
    <xsl:value-of select='$DDate'/>
    <xsl:value-of select='$Batch'/>
    <xsl:text>3</xsl:text>
    <xsl:value-of select='format-number(PaymentNumber/PaymentReferenceNumber,"0000000000")'/>
    <xsl:value-of select='format-number(PayeeBankAccount/BankAccountNumber,"0000000000")'/>
    <xsl:value-of select='substring(Payee/Name,1,20)'/>
    <xsl:value-of select='$PValue'/>
    <xsl:variable name='Addend' select='concat($DDate,substring($DAcct,5,5),$Batch)'/>
    <xsl:variable name="LHash">
    <xsl:call-template name="GetHash">
    <xsl:with-param name="A1" select="$PValue" />
    <xsl:with-param name="A2" select="$Addend" />
    </xsl:call-template>
    </xsl:variable>
    <xsl:value-of select="concat('[',$LHash,']')" />
    <!--LHash*i have to get the total amount of this one from the outside loop /---->
    <xsl:call-template name='NewLine'/>
    </xsl:for-each>
    <!--I have to put in here the total value of that LHash/---->
    <!--This is the template on how to get the value of that variable in the inside loop/---->
    <xsl:template name="GetHash">
    <xsl:param name='A1'/>
    <xsl:param name='A2'/>
    <xsl:variable name='TwoSum' select='format-number($A1+$A2,"000000000000000")'/>
    <xsl:variable name='Weight' select='317191314191112'/>
    <xsl:call-template name="WDigit">
    <xsl:with-param name="Cnt" select="15"/>
    <xsl:with-param name="Sum" select="$TwoSum"/>
    <xsl:with-param name="Wgt" select="$Weight"/>
    <xsl:with-param name="Tot" select="0"/>
    </xsl:call-template>
    </xsl:template>
    <xsl:template name='WDigit'>
    <xsl:param name='Cnt'/>
    <xsl:param name='Sum'/>
    <xsl:param name='Wgt'/>
    <xsl:param name='Tot'/>
    <xsl:choose>
    <xsl:when test="$Cnt > 0">
    <xsl:variable name='Multip' select='substring($Wgt,$Cnt,1)'/>
    <xsl:variable name='Factor' select='substring($Sum,$Cnt,1)'/>
    <xsl:variable name='Prduct' select='$Multip$Factor'/>
    <!--xsl:value-of select="concat($Tot,'[',$Cnt,']')"/-->
    <!--xsl:value-of select="concat($Multip,'x',$Factor,'=',$Prduct)"/-->
    <!--xsl:call-template name='NewLine'/-->
    <xsl:call-template name="WDigit">
    <xsl:with-param name="Cnt" select="$Cnt - 1"/>
    <xsl:with-param name="Sum" select="$Sum"/>
    <xsl:with-param name="Wgt" select="$Wgt"/>
    <xsl:with-param name="Tot" select="$Tot+$Prduct"/>
    </xsl:call-template>
    </xsl:when>
    <xsl:otherwise>
    <xsl:variable name="Rem" select="$Tot mod 11"/>
    <xsl:variable name="Chk" select="11 - $Rem"/>
    <xsl:value-of select="format-number(concat($Tot,$Chk),'00000')"/>
    </xsl:otherwise>
    </xsl:choose>
    <xsl:template name='GetTotal'>
    </xsl:template>
    Thanks in advance for those who are willing to help.
    -Leighya

    It would have helped if you had posted your code as CODE but as it is, I could hardly read it. My guess about what you are asking is, if you want a template to return a value, just write that value to the result stream inside the template.
    If that wasn't what you were asking, then please post your code in a readable format.

  • I downloaded an audiobook to the library but it went into music instead of books and then transferred to music in my nano.  How do I get it into books and also prevent this in the future?

    I transferred an audiobook from CD's to the iTune library but it went into music instead of books and then then sync'd to music on the ipod instead of books.  How do I fix this and then prevent it from happening in the future?

    You are sure that it is not in the More tab of the Music app on the iPad, where you should find synced audiobooks?

  • How do i get value of Environment variables from a java program?

    Hai,
    I have a setup file wherein i set the path for the root directory , in the following way.
    setenv TPEROOT "/home/systpe/khurram/changes"
    when i give echo $TPEROOT
    the path , home/systpe/khurram/changes , is displayed on the console
    If i want to assign the $TPEROOT to a string variable str in my java program , then how can i do it.
    I want to use the value of the environment variable in my program.
    Any help in this regard would be very useful
    Thanks
    khurram

    java -DTPEROOT=$TPEROOT my&#337;ackage.myclass myargs

  • How do i get music into my itunes from my husbands itunes

    If anyone knows how to transfer music from one itunes to another please let me know
    my husband and i both have ipods each with itunes on the same computer
    how can i pick the songs i want off of his and put them into mine????????

    Welcome, Nicole, to the Apple Discussions!
    The music you want to share has to be in "a publicly accessible location".
    What's that?
    Have a look at:
    http://docs.info.apple.com/article.html?artnum=93195
    Any further questions, post back.

  • How do I get music into my library from my ipod

    Everything was going fine with my ipod until I had to wipe my hard drive a few weeks ago.
    I set my ipod so that it wouldn't sync automatically anymore so I wouldn't lose the songs on it but now I can't get the music from my ipod into the library on itunes that I just downloaded.
    So now I can't do anything with my ipod but listen to the songs that are on it. I can't even get songs I don't like anymore off of it.
    Help!!!

    this is an option
    http://docs.info.apple.com/article.html?artnum=300173
    or
    you can download third party software that will allow you to take the information on your ipod and trasfer it back on to your computer.. you can find these programs at www.versiontracker.com
    a few that are free for windows are iPod->Folder 1.2 or YamiPod - 1.0.1
    if you use a mac I suggest senuti
    all of these can be found on www.versiontracker.com
    good luck

  • How can you get back into your phone when you've forgotten the passcode?

    I recently changed my passcode and have been enterig what i thought was my new one but it has not been working.

    Hi Tim, hope this turial would make it easy for you.
    http://support.apple.com/kb/HT1414

  • How do I get iTunes to arrange movies (from a series) in the order they were released

    Bottom line, we all download movies into iTunes and regardless of if you view them as a list or as cover art, they are always in alphabetical order.   But when you have a series of movies (pick any of your favorites... Harry Potter, Twilight, Transformers, whatever.) as part of your collection, is there a way to get those movies to show in the order they were released?

    You asked if there is a way to impose a more useful order, and there is, but it requires a little effort on your part. Doing so via the sort fields (in the iTunes Get Info window) means you keep the original display names but just influence the sort order. An alternative, but still effort, is to tell iTunes that a series of movies is a TV Show, and then use the Episode ID field to control order.
    And no, local changes don't get mirrored to iCloud, so if you have a device that shows cloudly links to your purchases they will display with the original store metadata. In fact if you enable Show All Music and Show All Videos on your device the store metadata can sometimes be shown in preference to your edits even when you have the content in question loaded onto the device from your own library.
    There aren't any features that would made the process easier. Use iTunes Feedback if you would like to suggest improvements.
    tt2

  • How do i get back into my ipod if i forgot my password

    how do i get back into my ipod touch if i forgot the password?

    iPod touch User Guide (For iOS 5.1 Software)

  • How to get  value on jsp file from ActionServlets class

    Hi All,
    I am facing problem in action servlets class into Struts, I am able to get the value on jsp file from action class with the help of session scope but i want to another method for it , so how i can solve the problem.Plz help me
    Thanks......... in advance

    I got a way out to access the attribute, i feel it is
    <jsp:usebean id="myRack" class="settings.Rack"/>
    <c:foreach var="book" item="myRack.books">
    </c:foreach>
    I am not able to check if this is correct or not because myRack.books is not having any value set by me in the request scope. How do i get instance of Rack class set by another page in the current request? I can get the value if i use scriptlet but i dont want to use scriptlet.
    I am continiously trying, if I get an answer, I shall post, else pls somebody guide.

  • How can I get back into my application aftermath invoking Start up page of index.htm ?

    Gorgeous Hello All,
    If anyone of you can please provide me a solution for the following, will help me in plentious and galore.
    Am using Adobe RoboHelp, Version 10 and IE version being 10.
    A hurdle :-
    I have a application which has been developed in ASP .NET, Version 4.0. Help link has been created in this application wherein here the Start up page of index.htm has been linked to be read from the RoboHelp local project folder\!SSL!\Multiscreen_HTML5\desktop. All are working absolutely fine except when
    I login into the above-said application -> click on the Help page -> the index.htm opens with Contents, Index, Glossary -> Am able to successfully perform any task by respective clickings
    -> But I am not able to get back into my application when I click on the IE provided Back button (Alt+Left) -> Any amount of invoking Back button makes the system getting looped into this Start up page of index.htm only -> When I Close Tab (Ctrl + W) or Close ( X ) -> The window session gets closed and I have to repeat all by relogin once again.
    How can I get back into my application aftermath invoking Start up page of index.htm ?
    (I can always get back into the application easily by erasing those parts in the url which refers to this RoboHelp linkages – but this certainly looks non-polished work)
    Help Please
    Cheese – Vipin Nambiar, Bangalore

    Hey Jeff, I used Internet Explorer 10.0.9200 and Google Chrome 26.0.1410. Alas - it is the same behavior.
    (But Jeff : When I used Microsoft HTML Help as primary layout to generate chm file , My Help when launched from my Application opened in a new browser window and when I closed this Help browser window did not close my application. Looks like need to write few liner code to get this issue settled )
    Thanks Indeed of lots for your concerns Jeff !!!

  • How can I get values from listbox?

    Hi all,
    I need to get price values from Price List (Inventory -> Item Master Data screen). It's important to get values from field 'Price' BEFORE item will be added/updated.
    How can I get values from Pricelist listbox?
    Thanks for any suggestions or short sample code.
    Best regards,
    Andy

    Hi Andy
    Here is som sample code that will get the description of the price list and also the price that is displaying at the time. The item master must be open for this snippet of code
      Public Sub GetItemPriceFromOpenWindow()
            'this is assuming item master is open
            Dim oEdit As SAPbouiCOM.EditText
            oEdit = SBO_Application.Forms.GetForm("150", 1).Items.Item("34").Specific
            SBO_Application.MessageBox(oEdit.Value)
            Dim oCmb As SAPbouiCOM.ComboBox
            oCmb = SBO_Application.Forms.GetForm("150", 1).Items.Item("24").Specific
            SBO_Application.MessageBox(oCmb.Selected.Description)
        End Sub
    Hope it helps

  • How do I get signed into Icloud when it says my apple id is valid but not an icloud acct?

    How do I get signed into Icloud when it says my apple id is valid but not an icloud acct?

    You will have to sign in to I cloud on any of the iOS device with version 5 or above  once with your Apple Id to use your Apple Id as I cloud account. So if you have an iPhone iPad or iPod touch with iOS 5 or later.
    On your iOS device go to settings > I cloud and sign in and you should be able to use your Apple Id as an icloud Id.

  • When I try to sync my music on my iPhone 4 I have a tab at the top that says 'on this iPhone' The music in that tab is always on my phone but does not show in my itunes library.  How can I get it into my library?

    When I try to sync my music on my iPhone 4 I have a tab at the top that says 'on this iPhone'.  This is at the end of all the other tabs like info, ringtones, music etc. The music in that tab is always on my phone but does not show in my itunes library.  How can I get it into my library?  It doesn't sync either.

    The new iTunes has a somewhat different look from the previous version.  You can get the old look back if you prefer it by doing View > Show Sidebar in iTunes.  Or you can adapt to the new look.

  • HT1311 i tried to do a backup from my old iphone as i have a new one that was signed into another itunes account. it said i cant do it because the iphone rejected the request. how do i get around this? i have signed out of the old acct and into mine on th

    i tried to do a backup from my old iphone as i have a new one that was signed into another itunes account. it said i cant do it because the iphone rejected the request. how do i get around this? i have signed out of the old acct and into mine on the phone

    What is the precise wording of the error message that occurs on the old iPhone when attempting to do a backup?
    Are you attempting to backup via iTunes on the computer or iCloud?

Maybe you are looking for