Sub vi used in main vi

Download this .zip and extract all files to a folder, used LabVIEW v9.0f2.
I want to use Light Show as a Sub VI to Furnace Cycle MAIN1 (Front Panel) - I need to use this Sub VI (sub of one light control) with many light on the Furnace Cycle MAIN1 front panel.  In the light show VI, I am using an enumerated control to simulate inputs from a future PLC and the boolean switch simulates power is applied to that PLC.  The light color is white when the PLC is not active or does not have an output to the light.  The light show VI is written in the form of a state machine.  I need to to have a stop boolean control to stop the Furnace Cycle MAIN1 program and all the sub vi's. Any help would be appreciated.  I am open for other code processes like arrays etc. to accomplish the same results.
Attachments:
Light Show Project.zip ‏69 KB

The Light Show SUB VI has a while loop in it. This would cause a problem when trying to communicate with it from your main VI as it will always wait for the subVI to complete executing before moving on to any other code that you want to run after it. I would recommend removing the while loop from the subVI and just keeping the case structure and its contents in the subVI. This way, you can have the Light Show subVI inside a while loop in the main VI. This will allow you to place a 'Stop' control in the main VI, which can be wired into the subVI as well.
I hope this helps you out. 
Vivek Nath
National Instruments
Applications Engineer
Machine Vision

Similar Messages

  • How to get the loop sequence time (i) out of the while loop in the sub-vi to the main vi?

    I tried to search for the answer but no much luck.  My situation is that I used a sub-vi containing a while loop in my main vi. Now I need to see the while loop sequence number (i) from that sub-vi in my main vi.  In the sub-vi I have the indicator to show this loop sequence flawlessly, but that's inside the loop itself.  If I use this indicator as a terminal in the sub-vi, I can only see the last sequence number in the main vi after the loop finished its execution.
    Is there a way to accomplish this? Thanks.

    Hi nobody,
    well easiest (but error prone) way is to use globals to move data from subvi to main vi. You can also give the reference of the main vi indicator to the subvi to write to a "value" property node. You can also use queues, and there are other techniques too
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Referencing sub templates in the main template

    Hi all,
    I ve developed a layout which is to be uploaded for print option to be used.
    But since there can be html tags in the data to be printed, I found a xsl file which has got transformations from html to xslfo.
    Now I need to include this sub template in the main template.
    Can any1 tell me how to do this.
    In order to use import functionality I must specify the path I guess.
    Thanks.
    Vignesh

    Hi,
    Then make the temp1 as 'Horizontal Alignment : Left , Vertical Alignment : Absolute from top ( provide the height ) '
    For temp2 as 'Horizontal Alignment : Right , Vertical Alignment : Absolute from top ( provide the same height as above ) '
    Adjust the widths of the templates accordingly to fit the page width.
    Reagrds,
    Ram

  • Adjusting the size of the "pop up" sub vi in the main vi

    I am trying to reduce the size of the "pop up" sub vi in the main vi. If I push everything upwards, the info downwards is lost. Similarly the side info is lost. How to adjust the size and yet keep all the info. I am using LV6.0. I have attached the file concerned.
    Attachments:
    RTF Test Setup.doc ‏84 KB

    There is obviously a misunderstanding here.
    You have full control over the front panel and you can make all the controls as small or large as you want. In addition, you can also place them wherever you want. It is up to you as the designer to place them how you want. If you want then all to be a few pixels by a few pixels, LabVIEW will allow that. Obviously, a string control that is 3 pixels wide and 2 high is unusable, but you can do it. In addition if you wanted all the controls to over lap that is fine, but again it will most likely be unusable for your user.
    If your question is the mechanics of moving and re-sizing controls, LabVIEW works the same as most products. You need the arrow tool, which you can get from the tools pallette (Windows>> Show Tools Pallette). With that tool you simply click on the control and move it where you want it. To resize it you hover over the borders of the control until you see the little resize squares and then re-size away. This is the same as how you would re-size an object in Word etc.
    If you are simply asking for some examples based on the front panel you attached, we on the forums can move them around and give you examples but we don't know what it is you as the designer or your "customers" want. Therefore anything we do is a shear guess and unlikely to be what you really want. By far the best option is for us to help answer for you the how so that you can create the front panel that you want.
    So can you re-phrase the question or help us understand what it is you want?

  • Sub report using Stored Procedure returns incorrect data

    Post Author: rikleo2001
    CA Forum: Data Connectivity and SQL
    Guys,
    I am using CR 9 in ASP.net application.
    One simple report and one Sub report, sub report is basically linked with Stored procedure accepting one parameter and returns a select query.
    Main report is linked with that sub report using that parameter field.
    Sub report is on demand sub report.
    Now when I execute that main report and click on on demand sub report I am getting Wrong order information.
    Here is out put on main report
    Order 1                                          on demandDetail
    Order 2                                          on demandDetail
    Order 3                                          on demandDetail  
         NOW If I click on Order 3 (On demanddetail link, it displays rondom order details, some time correct on too), I am really stuck and don't know where I am going wrong.
    Please help me to solve this issues.
    Many Thanks

    Post Author: rikleo2001
    CA Forum: Data Connectivity and SQL
    Hi Yangster,
    Thank you so much for your reply.
    On DEMAND Sub report is located in main report, IN DETAIL SECTION
    I am passing Order ID from main report linked to  {?morderid} in subreport under command object, and if I run it in design mode, it works perfectly alright, so problem is isolated to ASP.NET and Crystal report post back method on Crystal report.
    The example I give to you this is a simple example to identify issues in my real application and report.
    My main report contains summary of data base on unique identifier. that summary have 4 differant types of details which has to be on the same report (as Crystal report doesn't provide Nested subreport), so I decided to use 4 subreports on main report and all subreport using Stored procedure command object.(Sub report has it own complex processing requirement to fulfill).
    Please help me with any further ideas? for the sample which I presented to you this is only using one SP on main report with a simple processing.
    Many Thanks

  • Always used 1 main account.  Started using individual user accounts. So how do I use software or applications with a lot of data like Quicken under my own user account?

    I recently upgraded our family's mac to OS X.  I thought this was the perfect time to create and use "user accounts".  We had always used 1 main account.  So how do I use software or applications with a lot of data like Quicken under my own user account?  I wanted to be able to manage my own itunes library, iphone apps, messages.  But I still really need to use the Stuff I have in Quicken essentials.  I don't want to have to restart all my work done in Quicken already.

    I haven't used Quicken in a while, but most applications store your files in your Documents folder. Is that where your Quicken data file is? What you do next depends on how many family members need to get at that data.
    If multiple family members need to use the Quicken data file, try moving it to the Documents folder in the Shared account. That is an account that all accounts can see. It's at the same level as the other accounts. In other words, Shared is one level up from your Home account, or Hard Drive/Users/Shared.
    If you're the only one allowed to see that Quicken data, move the Quicken data file from the old main account to your account, and don't leave a copy behind. You can use the Shared folder as a way station for the transfer since you won't be able to see both accounts' Documents folders at the same time (because you're not allowed to peek into other people's accounts). Or you can use another disk or server for the transfer, as long as you can get to it when logged into either account.

  • How to use Two main windows with in a page in script ?

    Hi any body explain me...
    How to use Two main windows with in a page in script ?
    with  header data in one main window,
    & Item data in other main window.

    HI..,
    u need to go for <b>SPLITTING THE MAIN WINDOW</b> !!!
    Main windows in page windows allow you to format text in multiple columns. Define an area in the page window, in which to position the main windows.
    Here is the procedure !!
    -->Create a page window and assign it to a page.
    Choose <b>Edit --> Main windows</b>.
    A dialog box appears.
    -->Enter values in the fields <b>Area width</b> and A<b>rea height</b> in accordance with the input guidelines for main windows.
    -->Enter values in the fields <b>Spacing</b> and Number in the <b>Horizontal group</b> if you want to use multiple columns. You can ignore the fields in the Vertical group.
    Determine how many columns and line areas are required for label printing. Then enter the corresponding values in the fields in the <b>Horizontal and Vertical groups</b>.
    -->The value in the field Left margin varies from main window to main window if multiple columns are used. The following applies:
    <b>
    Left margin of current column + Window width + Horizontal spacing = Left margin of next column</b>
    In label printing, the field Upper margin also varies from main window to main window:
    <b>
      Upper margin of current main window +  Window height + Vertical spacing = Upper margin of next main window</b>
    -->Enter a value in the field Start position.
    This is a counter. Enter a starting value which is equal to or greater than 1.
    -->The main windows are added to the list.
    -->Save your form.
    reward if it helps u...
    sai ramesh

  • I am planning to buy mac mini 2.5Gzh. I will be using it mainly for video editing and I am planning to upgrade up to 8GB. Is it a good buy or should I try some other alternative.

    I am planning to buy my next desktop. I will be using this mainly for video editing. I am not a professional video editor, I normally do home made videos for youtube, like tutorial, DIY project etc. I use Nikon D3100 camera and some basic green screen techniques as part of recording. So my basic video editing would be just syncing audio, editing videos to cut un-necessary frames etc and some basic effects. I am also planning to buy final cut pro.
    So my question is should I buy the mac mini or Imac?

    Great advice from RRFS!
    For video editing, do go for 16 GB of RAM ffrom OWC & consider the twice as fast i7 2.6 model, see Geekbench scores here..
    http://www.everymac.com/systems/apple/mac_mini/specs/mac-mini-core-i5-2.5-late-2 012-specs.html
    http://www.everymac.com/systems/apple/mac_mini/specs/mac-mini-core-i7-2.6-late-2 012-specs.html

  • Clearing Bank Sub-account using F-03 creates FX diff for FX invoice

    I make payments in foreign currency with my online FX provider.
    I enter the invoice (FB60) in foreign currency (eg IDR 200,000,000).
    I then clear the invoice with a payment (F-53) again in foreign currency (eg IDR 200,000,000), overriding the SAP generated OB52 FX rate to match the FX rate that was actually used when purchasing the IDRs to make the payment.
    The withdrawal from our bank account (eg AUD 25,000) is posted via FF_5.
    The local currency amount of the Payment is the same. (eg AUD 25,000)
    Viewing the bank sub-account in FAGLL03 shows a debit and a credit of AUD 25,000.
    When I manually clear the bank sub-account using F-03, I set the currency to the local currency (AUD).  The amounts from the payment side now appear as different AUD amounts.
    I select the transactions that I want to clear.  There is a balance which becomes zero when you toggle between Clearing Currency and Local Currency when you click the "Clearing Curr <> Local Curr" button.
    I am forced to charge off the Clearing Currency difference and enter an FX gain or loss item. 
    When I simulate, SAP automatically generates offsetting FX gain or loss items.  They have Document Currency AUD zero amount, Local Currency AUD non-zero amount and post to the Cost Centre that the original expense was posted to on the FB60 invoice. 
    Is there a way to avoid these FX transactions as all I'm doing is a clearing for bank reconciliation purposes on amounts that are the equal?  There is no actual FX gain or loss.

    Hi,
    When you select open items within clearing procedures, the amount in local currency is recalculated as at the translation date/clearing date from the foreign currency amount.
    The solution is we have to set flag u2018No exchange rate differences for clearing in local currencyu2019 through SAP Configuration (Transaction code: OBY6).
    Regards,
    Krishna Kishore

  • How can show the result of a measuring that is done in a sub-program in my main panel?

    How can show the result of a measuring that is done in a sub-program in my main panel?

    In your subvi, wire the result(s) you want to ouput to the main program to an output terminal on the connector pane.
    For a tutorial on subvi's, search the help for "connector panes" anc click on tutorial.
    ~Tim

  • What is the use of MAIN WINDOW in SCRIPTS

    what is the use of MAIN WINDOW in SCRIPTS, y we con't create a script w/o main window.
    Title was edited by:
            Alvaro Tejada Galindo

    Hi
    See this
    What are the different types of windows in SAP Scripts?
    Windows are defined in the Layout sets which define the position and the text to displayed.
    The different types of windows are:
    MAIN - Main Window
    The main window is a continous window which can extend over several pages. If the text in the main window fills up a page, a new page is created.
    Only one main window can be defined in the SAP Script whereas upto 100 instances of main window can be created in a page.
    VAR - Variable Window
    This window can have the variable contents displayed on them. The contents of the window cannot exceed the window size. The content can be formatted for each page.
    CONST - Constant Window
    The constant window can have a fixed content and is formatted only once.
    Main Windows (MAIN)
    Each form must have one window of type MAIN. Such a window is called the main window of the form. For SAPscript forms, the main window has a central meaning:
    • It controls the page break.
    • It contains the text body that may cover several pages.
    • It allows to fix text elements at the upper and lower margins of the allocated page window (for example, for column headings).
    As soon as a window of type MAIN is full, SAPscript automatically triggers a page break and continues to output the remaining text in the main window of the subsequent page. Page windows of type MAIN have the same width throughout the form. The SAPscript composer thus avoids reformatting of the text after each page break.
    Variable Windows (VAR)
    The contents of variable windows is processed again for each page, on which the window appears. The system outputs only as much text as fits into the window. Text exceeding the window size is truncated; the system does not trigger a page break. Unlike constant windows, the page windows declared as variable windows may have different sizes on different form pages.
    Constant Windows (CONST)
    Starting with Release 4.0, the system internally processes windows of type CONST similar to windows of type VAR. Therefore, if you create a new window, always use type VAR.
    <b><REMOVED BY MODERATOR></b>
    Anji
    Message was edited by:
            Alvaro Tejada Galindo

  • Handling User Events in sub panel vis and main vis with same Event reference Number.

    Hi All, Iam trying to work to handle events in both subpanel vi and main vi.
    I have a main program, and 2 sub vi. I will load the sub VI in 2 sub panels in main vi. Each sub pael vi has controls on it.
    I have created 2 User events for 2 sub panels vi. One user event consits of a Cluster with 2 Booleans (x & Y) and Other User Event consists of cluster of 2 unsigned 8 Numbers (a & b). These are created and registered in the main Vi and event register refnum is passed to the subpanel vi from the main panel vi.
    I have Event structure in main panel and sub panel vis.
    In one sub panel vi, When the value of one boolean(i.e. X) in the clusters changes, the Events structure in sub panel vi should perform some operation in sub panel vi only. When the value of other boolean (i.e. Y) changes it should perform some operation in main vi. I will try to Generate user event with the x value and Y value changed based on the control clicks in the sub panel vi.
    The OTher panel vi should behave in the smae way when the a & b value changes.
    The "Generate User Event" is working fine some times and sometimes there in no event triggered in the sub panel vi or main vi.
    Please let me know what is the problem Ramesh.

    There is a lot of talking, but not much understanding.  It'd be better if you posted some example VI's of what you are trying to do so that the words will make sense.
    One thing I can tell you is that you don't want to have two event structures handle the same event reference number.  You want to have two event registrations with each one going to its own event structure.

  • Sub contractor using his own material

    Dear Experts ,
    I wanted to map a scenario in which I send the material to sub contractor , in which apart from processing the sub contractor uses his own material which is modvatable .
    And also in service po , when I send the machine for servicing, the service provider also uses his own material which again is cenvatable .
    In both the scenarios how do we map it SAP .
    Thanks

    Hi,
    Both the issues you have posted are different.
    So, please close this thread and open two different threads, for each problem.
    Regards,

  • Is it ok to buy student version of CC and i use it mainly for the University but ...

    Is it ok to buy student version of CC and i use it mainly for the University ... But i sometimes design (Logos, Posters .. etc..) for my friends and other peoples and i charge them for it  ? ... is legal ? because i really care about this small details.

    You are allowed to use student/teacher version for commercial purposes.
    Education FAQ

  • Is it ok to buy students version and use it mainly for University .. and sometimes i use it to design (logo, Poster, etc ..) for my friends and other peoples

    Is it ok to buy students version and use it mainly for University .. and sometimes i use it to design (logo, Poster, etc ..) for my friends and other peoples ?
    i care really about this small details

    Hi There,
    Yes, yon can use if you personal as well as commercial use.
    For more info check : Education FAQ
    Thanks,
    Atul Saini

Maybe you are looking for