Update Indicator from SubVi in Main Vi

Hi, I am new to labview and have recently undertood the concept of Control Refnum. Because all the examples online are related to passing controls to the subvi and triggerign an event there, I am able to do it and it works. I am here because I could not find any example where indicator values are passed back to the Main Vi. I have attached my two Vis and will appreciate if someone could help me understand and apply this concept.
I am just pressing a button in Main Vi and want the LED and number indicator in my main vi to update from the sub Vi. Currently it only updates in Sub Vi.
Thanks
Attachments:
Actual.vi ‏8 KB
A_TRAILER.vi ‏18 KB

lsbu wrote:
I will have nearly 8-10 events in my final program and I find it easier to shift them to sub vi.
That's very few events.  Did you not know the event structure can handle many events?  At that point, it is as hard to manage as a single case structure (which is dirt easy).  Trust me.  It will be a lot easier to manage a single event structure than trying to follow your references everywhere just to try to figure out who is handling what event.
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines

Similar Messages

  • How to add indicators from subVIs to main VI

    Hi,
    I have a similar problem as well as a question or two about running subVI's.  Basically, I am trying to create a project that will use both syringe pump injections and the opening and closing of valves to transport a fluid.  As of now, I have a program written for the syringe pump that I was able to modify from an instrument driver from the manufactuer of the syringe.  The goal is to just have the operator press a single run button, as all volume and flow rate conditions will stay the same from trial to trial.  I created two separate syringe pump suvbVI's, one injects 1mL of fluid at 1mL/min and the second injects 2mL of fluid at 1mL/min.  
    I want to use the flat sequence structure to run these two subVI's sequentially, which I am having some difficulty with.  I set this up so that the operator must press an "OK" button in order for the case structre to read "true" and begin the operations in the flat sequence.  Both subVI's work correctly if operated on their own.  However, when I use the highlight data flow function (lightbulb on block diagram) I can see that pressing the OK button causes the case structure to read true, and the program to engage the first subVI.  Upon opening the block diagram of the first subVI and using the same lightbulb tool, I noticed that the information is getting stuck in the first while loop and repeating itself endlessly.  Any suggestions as to why this may be the case?  (I did go into each subVI and changed the VISA resource name to the correct COM port)
    Also, once I figure out how to get the information to flow correctly, I do want my main VI front panel to display some of the front panel indicators on the syringe pump VI's, such as the volume dispense and tank.  I would like to know more information about how to reference a wire to the subVI as previously mentioned in this thread.
    Sorry this was such a long post!  I attached the main VI with the embedded syringe pump subVI's as well as both individual subVI's.  Any suggestions would be greatly appreciated!
    Thanks
    Attachments:
    Test Project_Pumps.vi ‏9 KB
    NE-50X Push Button Example-tester_1mL_3_30_1013.vi ‏289 KB
    NE-50X Push Button Example-tester_2mL_3_30_1016.vi ‏289 KB

    galXE1,
    From my example you can use the invoke node method of "get all" and it will retrieve all the indicator names and values and then you can get the values you want. 
    Sorry for not posting this originally but without modifying your code a bunch your quickest option is to use shared variables. If you have important vital tasks they aren't the best but if you're just looking to pass data between vi's then they are you're easiest option. 
    Creating a Shared Variable - look at single process shared variable section. 
    http://zone.ni.com/devzone/cda/tut/p/id/4679
    So you basically call your subvi every time the loop iterates to perform some execution and then you can update your main front panel with the newest values. Calling the subvi with a loop in it. Nothing special but it gets the job done. Its not very good practice if you have a bunch of values you want to pass. 
    See subvi calculations.jpg
    A better approach to passing data between vi's is detailed in the document. Its called a Functional Global Variable. 
    https://decibel.ni.com/content/docs/DOC-12876
    Kyle Hartley
    RIO Product Support Engineer
    National Instruments
    Attachments:
    Subvi calculations.JPG ‏42 KB

  • Show indicator from subvi

    Hello
    I am very new in programming with labview. I have a problem showing property of a boolean indicator of a Subvi in a mainvi. The Subvi contains a while loop where the property of the indicater is set.
    I have attached the two files in Labview-version 8.0.
    The problem is that the property of the indicator of the main vi only changes at the seconed time. The reason for the problem is clear. The property of the indicator is set only once in the beginning and not continuous. Can somebody complete the attached vi´s with the necessary functions so that I can comprehend it. May be I can solve the problem with a global variable or a reference. I tryed a lot but my skills in programming are not so gut.
    Thank you for your help
    Attachments:
    Mainvi Indicator.vi ‏11 KB
    Subvi Indicator.vi ‏17 KB

    Thank you all for your replies
    @davidpcl : The VI´s you gave to me could help me a lot. But by using these vi´s one other problem was generated.
    I want to open thes SubVi several times by the MainVi. The problem ist the correct parameterization of especially the stop-button. With the parameterization you gave me I could not use it several times in the MainVi.
    Can somebody give me a help?
    I attached the two new fiels.
    Attachments:
    MainVI addon.vi ‏17 KB
    SubVI addon.vi ‏23 KB

  • Text output using string indicator from subVI to mainVI

    Hi,
    I think I asked similar question before, but since then my program got more complicated.
    Here is my issue.
    I have a program with nested loops to print out the stream of strings in subVI
    and it needs to be updated in a string indicator in mainVI.
    When I say "update", it needs to be updated as it comes out line by line, not by
    the block when the loop is finished.
    I was not successful doing this by both shift register or RefNum.
    Maybe I do not know the advance usage these two.
    So can someone show me how?
    I have attached simplified version of my labview program.
    Thank you in advance!!!
    Solved!
    Go to Solution.
    Attachments:
    MainSubStrIndicator.zip ‏12 KB

    Hi horanyee,
    use some standard shift registers to achieve your goal... They will keep the previous valu so you can ad the new line!
    Message Edited by GerdW on 09-11-2009 08:43 PM
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome
    Attachments:
    subVI.vi ‏8 KB

  • Main VI is not updating the data from subVI

    Dear all,
    I
    have a Vi A using the data front a subVi B. When I run it, I see the
    data is updating in the subVI, but not the main Vi and the Front Panel.
    The subVi has three output channels and the main Vi tries to display
    those three channel data on the Front Panel.
    Could somebody tell me how I can solve the problem?
    Thanks a lot.
    Roy
    Solved!
    Go to Solution.

    You could probably use Control Refnums but as Dennis mentioned, be sure to explain the use case to us.
    How Can I Update the Changes Made to a Control/Indicator from a SubVI on the main VI?
    Message Edited by Adnan Z on 06-02-2009 02:48 PM
    Adnan Zafar
    Certified LabVIEW Architect
    Coleman Technologies

  • How to get updated values from the loops while they are running

    Hello,
            I am having difficulty solving a very basic problem, how to access the updated values from the 'FOR loop' while its running?  Basically, the VI  I am currently working on calls two sub VIs. Each sub VI has a for loop, and both VIs may or may not run for same number of iterations. My goal is to read the values at each terminal inside the loop of both sub VIs, in the Main VI. I tried to achieve it using Global Variables, but in main VI it displays only the last iteration value from both sub VIs. Could anyone please tell me whrere am I going wrong? Is there any other/better way to achieve this.
    I appreciate any input on this issue.  
    Kudos are (always) welcome for the good post. :-)
    Solved!
    Go to Solution.

    Dennis,
                In attached VI, I can see the values changing in the sub VI from the main VI with the numeric indicator whose reference is passed on to the sub VI. Now if I wanted to store or use those values how do I do that? I tried to chnge the indicator to control and read from it (in the attached VI) , but the the indicator updates only once. Tried to create a property node and read the Value from it and it didn't work either.
    Thanks in Advance!
    -Nilesh
    Kudos are (always) welcome for the good post. :-)
    Attachments:
    main-1.vi ‏8 KB
    sub-1.vi ‏9 KB

  • Write multicolumn listbox value from subvi whitout reference

    Hi:
     Is it anyway to write data to multicolumn list box from subVI without pass in reference? Because if pass in reference I have to pass a lot.
    Like I can use Open VI Reference together with "Set Control Value" to set a String indicator text.  But I can't find the way to use open vi reference to set the multicolumn listbox text, I only can highlist which row.
    Thank.

    One thing you could do:
    Write the multicolumn listbox reference to an indicator in your main VI. In the SubVI read that indicator value and unflatten it into a multicolumn listbox reference. Then you'll have the reference available in the SubVI as if you had passed it.

  • Updated n97 from v20.0.019 to v20.0.27

    Hi
    I would like to know the difference in both the firmwares .
    Secondly my incoming calling call vibration and touch screen vibration has stopped working ...
    So please someone help me and tell me how to rectify this ...
    Akash

    Hi,I was having problems with my N97. Vibration was not working and the GPS never connected to any satalite after updating Nokia Maps. So I got a back up of my data and updated the phone. However the phone does not even start. Only the NOKIA screen with back light appears and it stucks. The same thing happens when I plug in the charger and the led next to the usb (indicating charging) does not light. Throughout Nokia troubleshooting pages I found a topic with that title 'If your phone is not working after a successful update' and under it it is said that 'Return to the beginning of all the steps and start the update procedure from the beginning' but the PC does not see the phone and so Nokia Software Updater does not also. Thus I could not repeate updateting.
    The phone is not with me right now. When I get it I will try hard resting but I am not hoping a result. I paid lots of money on this thing and now I am sad and really geting nervous.
    Do you have problems with vibration? I read in discussions that some people had their phone's mainboard replaced with a new one at Care Centers to get rid of this problem. This feels really bad that a new device requires a new main board. Really sad for Nokia I think.

  • HT4972 I have ipad 1 . And i want to update it from ios 4.3.5 to ios 7 but i can't why ?? Please help me becouse i can't download apps from app store !!!!!   I would suggust:  1 to create a big camera for i pads and ipods and iphones so we can put it in a

    I have ipad 1 . And i want to update it from ios 4.3.5 to ios 7 but i can't why ?? Please help me becouse i can't download apps from app store !!!!!
    I would suggust:
    1 to create a big camera for i pads and ipods and iphones so we can put it in another ipad or ipod or iphone and it has a zoom lens
    2 when i downloaded photos and music from a computer to my ipad , i cant delete them now plese do the itunes like samsung becuz samsung have an easier way to download thing from computer
    I hope to help me with my poblome and fix it please !!??
    And i hope to take my suggusts and make me happy becouse apple it is cooler from samsung
    Apple the best
    H.M

    The iPad 1 can't run the newer operating systems. It'd be like trying to play a bluray disc in your 6 year old dvd player....it simply lacks the hardware to make the software run.
    No suggestion about the camera, but given that Apple's attitude seems to be to focus more on the more mobile devices for photography (the iPhone and Touch cameras got features, the iPad and mini didn't), that is highly unlikely. You can tell Apple what you want, but you'd probably be money ahead to get a digital camera.
    as to the photos, anything put on via iTunes has to come off via iTunes.Your main alternative would be to look for photo apps that offer file exchange that may give you more functionality.

  • "Old" update rule from ODS not working

    Hi Gurus,
    I need to set up the "old" fashioned update rule to load data from an ODS1 to another ODS2.
    The thing is that I need to set up an update rule because I need to implement a Return Table Routine that is not supported (as far as I know) by the new Transformation/DTP.
    When I select option (through the right mouse click over ODS1)  "Other Options" - "Create Update Rule" it takes me out of the RSA1 and leaves me in the main menu making it impossible to create a new update rule.
    The strange thing is that I have this working from and ODS to an InfoCube.....
    Suggestions, a workaround??
    Andrea.

    Hi Jerry,
    Just to confirm that this is not working. The tys_TG_1 structure only shows me the target infoprovider structure. Check that in the how to, to be able to derive employee first you need to assign eache source_filed to the result_field leaving employee blank.
    I need to have in the same place, the source_field structure (source infoprovider field structure) and the result_field structure (target infoprovider structure). That is what the "old" return table gives me as in the same place I can have the communication_structure (source infoprovider field structure) with the return_table structure (target infoprovider structure). 
    Just to understand, in the source infoprovider I have 12 Key Figures (1 for each period) and I have to split each incoming record to 12 records. If I work only with the result_field structure tys_TG_1 and the result_package tyt_TG_1 I'm not able the see those 12 KF.
    So... return table functionality is not fully supported by BW 7 as far as I know.
    Any other ideas why I'm not able to create the old Update Rules from an ODS?
    Regards,
    Andrea.

  • How to upload the Cycle Count Indicator from ERP into EWM

    Hello Gurus,
    Can someone tell me what the transaction is to upload the Cycle Count Indicator from the ERP into EWM?  I am currently researching the cycle count functionality of EWM for a roll-out at our facility, and this information would be most helpful.
    As I understand it, there are transactions for the Global Material Master Data upload, Storage Unit Type in the Palletization Data fields of the ERP (which seems to be translated as the SUT to Packing Material), and Unit of Measure management.  Also, judging by a document I found, the Cycle Count Indicator isn't uploaded in the Global Material Data, but I did see that the field has relevency in the EWM packing specifications.
    Does this mean that the indicators must be uploaded through the "SUT to Packing Material" transaction (/SCWM/MIG_MAP_SUT)?
    What if the Cycle Count Indicator should require a change?  Does the change have to be made in ERP and pushed to EWM, do they get updated separately, or is there a way to allow for automatic updating?
    I hope the question doesn't seem too complex, but it is the only way I could drill down enough to get what I hope I need.
    Thank you!

    Hello,
    You can do it using MASS TCode.
    Regards,
    Sathish

  • Have reformatted my Imac using original discs (installed leopard (10.5)) tried to do the software update but it cant download the itunes update and when it gets to the configure update screen after restart for main update, it just gets stuck. HELP!

    have reformatted my Imac using original discs (installed leopard (10.5)) tried to do the software update but it cant download the itunes update and when it gets to the configure update screen after restart for main update, it just gets stuck. HELP!
    The configure bar gets about an 1/8 full and then just does nothing. I think its lists the update as combo update? cant remember with out checking.
    I have tried to do the disk verify and repair but this has made no difference.
    Please let me know what i need to do, I have reformatted the mac just to start over as was clogged with a lot of useless data, I had installed lion (10.7) from the app store previously and now cant seem to find a way to re install lion. I hope I dont need to pay for it again?

    If you erased your hard drive, you'll need to reinstll OS X 10.6 Snow Leopard to access the App store. You won't have to pay for OS X 10.7 Lion again. Did you try booting to the recovery partition by holding the command and r keys down? If that's still there, you can reinstall OS X 10.7 from there.
    If you're looking to install the current iTunes, you need OS X 10.6.8 at a minimum.
    If you're still trying to update OS X 10.5 Leopard, you can download the combo update from here.  Download, use Disk Utility to repair permissions, apply the update, then repair permissions again. That will take you to OS X 10.5.8.

  • REgarding Info update indicator in PO

    Hello Gurus,
    There is no EVO parameter set in user profile.But still while creating PO ,system still taking Infoupdate indicator in PO.
    Please let me know whr this tick is coming from?
    Thanks
    santosh

    Hi
    Regarding EVO Check sap note;-202173,it may helpful to you
    this is from sap notes
    The system does not use the default value for the InfoUpdate indicator in the purchase order of the EVO parameter. Customizing in transaction OMFI
    Consider the following two scenarios:
    There is an info record in the system.
    The system looks in table T160V (that is, Customizing in transaction OMFI with user parameter EVO).
    1. There is an entry with InfoUpdate indicator 'A':
    If an info record exists at plant level, the system overwrites this with the value 'B'.
    If no info record exists at plant level, the system proposes the value ' C' by default.
    2. There is an entry with a 'blank' InfoUpdate indicator or with the value 'B' or 'C':
    The system always transfers Customizing from OMFI.
    3. There is no entry (' ... ') and no user parameter is assigned:
    The system sets the InfoUpdate indicator with the same logic as for the InfoUpdate indicator 'A'.
    There is no info record in your system:
    The default value for the info update indicator is determined by Customizing.
    1. There is no entry (' ... ') and no user parameter is assigned:
    The system sets the InfoUpdate indicator to 'A'.
    General logic (independent of the info record):
    1. There is a 'blank' entry and no user parameter is assigned:
    The settings that are stored for the 'blank' entry are used.
    You can choose to make 'blank' the default setting of the InfoUpdate indicator for all users. You can do this by maintaining the InfoUpdate indicator entry as 'blank' for the 'blank' entry in Customizing.
    2. The InfoUpdate indicator is 'blank', 'A' ' B ' or 'C' and the condition maintenance for the plant is activated:
                  If only plant-specific conditions are allowed, the system overwrites the value with 'B'.
    If no plant-specific conditions are allowed, the system  overwrites the value with 'C'.
    Regards
    Kailas Ugale

  • Info Update Indicator Tick in 'Material' Tab page of Purchase Order.

    Dear All,
    I am creating a Purchase Order and in 'Material' Tab Page of PO , Indicator "INFO UPDATE" is having Tick.
    Is it possible to do customization so that Tick will not appear as a Default Value?
    You are requested to kindly provide valuable solution to this.
    Thanks & regards,
    Vishwas

    Hi,
    If you dont maintain Purchase Info Record for a Particular Material, System will automatically create one Purchase Info Record in Background with Vendor and Price Detail only.
    For this,in OMFI the Purchase order Update Indicator should be B and in Po item Detail tab Info Update Indicator will be Checked. If you want you can change the PIR which was created in background.
    The Configuration settings for Autoupdate Inforecord is in OMFI trxn code.
    Go to OMFI and in Info record update tab keep Blank value agianst purchase order and save.
    From next time when you create Po you can see the item detail tab for Inforecord update is unchecked.
    Define default values for buyers
    Transaction OMFI
    Double click on the default values you want to change.
    Save it.
    Next, you've got to associate via SU01
    Click Parameters, insert a new parameter id EVO to the authorization code.
    Type in Parameters value you want e.g. 01
    You have to assign the control for ALL the SAP buyers via thier SAP users id.
    Logoff and login again. Then try to create a Purchase Order and check the default values.
    In the Fast Processing button :-
    you can choose whether to adopt automatically all the line items fields in the Purchaes Requisitions.
    Regards,

  • Calling producer/consumer subvi using main vi for image grab acquire

    Hi everyone,
    I am not sure if I get the producer/consumer concept wrong. I tried to write a producer/consumer subvi that simulate continuously grab acquire image. When I call the subvi from the main while loop with a main vi, it seems to run into a infinite loop. I am wondering does anyone know how else can I activate a producer/consumer subvi using main vi? Thanks in advance.
    Kind regards,
    Han Yen
    Solved!
    Go to Solution.
    Attachments:
    MainTrial.vi ‏7 KB
    ProducerConsumerGrab.vi ‏18 KB

    Hi Han Yen,
    a few remarks :
    - your Top VI has no function what so ever.  So skip that.
    - your image queue has no name, so that gives problems from the minute you're going to use more queues.
    - It does not matter which command you send to the queue, it will start the bottom loop anyway
    - You don't have a check whether "live trial" is true yes or no, so everytime you switch it from T=>F or F=>T is will activate the command.
    I've tweeked your producer-consumer.  Maybe this will give you an idea.  I put some remarks in some places
    Kind regards,
    - Bjorn -
    Have fun using LabVIEW... and if you like my answer, please pay me back in Kudo's
    LabVIEW 5.1 - LabVIEW 2012
    Attachments:
    ProducerConsumerGrab.vi ‏21 KB

Maybe you are looking for

  • How can I fix a (damaged) library file?

    I just upgraded to itunes 5 last week. I opened itunes yesterday and it said my library file had been damaged so it renamed it with (damaged)and gave me a new library file without any of my custom playlists, etc... I lost a playlist thats really spec

  • Free Goods Promotion for Generic Article

    Hi In IS-Retail can we create free good prmotion for generic article & it will automatically be applicable for varients of that generic article. or we need to create on individual varient free good condition record Pl advise Regards Sandip

  • Stuck with a 802.11b/g router?

    I have a MI424WR (Rev E) router with a 50/25 plan. This router only supports the 802.11b/g networking standards, which of course, has a theoretical wireless speed of 54Mbps, but in actuality doesn't get anywhere near those numbers due to overhead. Th

  • Can I use FF logo on a custom-design tshirt? Or would I breach some sort of copyright?

    I know, not really a problem, but I don't know where to ask it.. So, i came up with this awesome idea of creating a custom-design t shirt with some logos on it and I'm wondering if I'd be breaching some (c)'s if I included ff logo on it too.. or woul

  • ?  Lion 10.7

    This is the first time on any Apple Support  Communities I have  Lion 10.7 and Safari 6.05 .   I cannot move the page of Safari at all.  Cannot move it to see the desktop(minor) but cannot move it to see the red,yellow ,green buttons  at the top left