Running multiple VIs?

Hi all!
I am still quite new to LabVIEW and I want to achieve listed below.
I have 3 different VIs:
1) VI 1 and 2 need starts simultaneously
2) Both VI 2 and 2 each contains a while loop internally
3) VI 3 is required to start after a time delay after starting of VI 1 and 2
4) All 3 VIs are stop after VI 3 complete its execution
Is it correct if I just simply put VI and VI 2 on the main VI for them to start together?
What can I do for 3) and 4)?
Attachments:
Pic.jpg ‏16 KB

JKSH wrote:
apok wrote:
Since you are new to LV, this can be intimidating....namely using notifiers,parallel loops and dynamic events.
Hi apok,
Why did you use user events instead of native events?
The OP has blocking subVIs that contain long-running loops; how does that intergrate with your architecture?
BTW, you can extend the Merge Errors VI to take 4 inputs (drag the bottom edge) -- no need to create an array first
answers:
producer/consumer architecture is highly effective in running multiple parellel loops or sub vi's with communications in between.
doesnt matter how long the sub.vi is running(that is still controlled by the producer loop), again producer/consumer architechture can communicate back whether with dynamic events(noticing that my example shows how vi3 can control the main vi by dynamic communication) or forth with data or UI control of the sub vi's by the producer loop through equeues or notifiers.
BTW, what you are probably seeing with merge error is an anomoly from translating between versions of LV, try it and see what i mean....believe me that i am not creating an array, its a bug. also, your use of flat sequences makes me question....
When Should I Use a Flat Sequence Structure?
Forcing execution with a flat sequence structure is useful for benchmarking code performance

Similar Messages

  • Dynamically run multiple VIs and return values

    Dear Experts:
    I would like to dynamically run 8 VIs from a main VI that esentially do the exact same thing.  The only thing that is different is the data passed to the VIs and the data returned.  The VI has a loop that can possible run for ever and each of the 8 loops can be started at different points in time.  I figure I would use a functional global to pass controls to the VI (loop).  I am not sure how I will get data from each loop.  I can't use a functional global for this because there is no sequencial timing. The number 8 might change so I can't just make 8 loops in main.
    I would like to be a little more clear.  How do you return individual data from a VI that has been dynamically launched 8 times at different points in time?

    The data type of the queue needs to be a cluster.  One element being an ID of some sort (this ID should be passed into the subVI) and another element being the actual data.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Best way to run multiple VIs on cRio

    I've built a VI that has tabbed control and the ability to stop and start the data acquisition.  I'm going to serve this VI out on the web server/remote front panel of the 9074; however, while I would like others to see the data (about 5 charts located on different tabs), I don't want others to be able to turn the data logging on and off - I want to be able to restrict that.
    I thought I could simply write another VI with only displayed data and deploy it, but I'm wondering if I have to implement it in some sort of VI server.  Is this correct, or can I simply build a separate web page with the new "display only" embedded VI and only pass around the address to that page?  (I am okay with having a different named web page for public access; mine will have a cryptic name.  I'm not worried about the security of it, just the oops, I didn't mean to turn off the logging - out of sight, out of mind is what I'm going for).
    Can I just build and deploy both VIs as startup VIs, or do I have to implement them programmatically?
    Thanks. 

    Thanks for the reply.
    Yes, you are correct; I am using the web publishing tool to create the page.
    Re Monitoring: I thought about that, and that would work, but I don't seem to have the option to allow Snapshot on the CompactRIO (maybe if it were hosted on a PC or a different chassis?)  It just shows a broken link when I load the page into and serve it from the cRio, so I just assumed it wasn't supported on the VxWorks server.  Maybe I'm doing it wrong (definitely not out of the question).
    Re Shared Variables: Since I'm really only using the "raw" values coming back from the data acquisition modules, which I thought were also shared variables, I guess that's kinda what I'm doing.  Is my assumption correct?
    I thought about the executable route, but I wanted to see if the web version would work first, as it would be easier to maintain (one central location for the app instead of having to maintain a list).  May still try it (never tried it before).  What I don't want is this extra VI causing a heavy load on the data acquisition processes to a detriment... but I don't have a lot of system load so I think I'm okay in that regard.
    I'll try to deploy the second VI and it's associated webpage again and see what happens.  Hopefully, both apps can access the data acquisition modules.

  • Teststand: Running Multiple LabView vi's simultaneo​usly

    I am looking for a way to run multiple VIs simultaneously.. One will serve as an interface, one will log data to a database, and several others will interface with a number of hardware components.

    Hi,
    One way would be to run your VI's in seperate executions from a sequence file.
    I've attached an example (TS 2.0.1f1 and labview 6.1 ).
    The sequences are set so as the MainSequence will not complete until all three sequences are closed.
    I have also added in the database.vi addition code encase the user pressed the terminate.
    There are additional example on the NI website if you want to set the sequences to 'Do not wait'.
    Hope this helps
    Regards
    Ray Farmer
    Regards
    Ray Farmer
    Attachments:
    MultipleVIExecutions.zip ‏40 KB

  • How can multiple vis share input from a DAQ simutaneously

    How can multiple vis share data input from a DAQ simutaneously?
    Recently I am building a EMG measurement platform and somehow DAQ data need to be shared by several vis at the same  time.
    Are there any ideas?

    If you may need to add/delete tasks that will need th edata you may want to consider a publich/subscribe pattern. Basically your DAQ task will post a message to a single queue. The process listening on this queue (message broker) will determine if there are other processes registered to receive this message. When a device registers for a message it provides a queue to receive it on. The message broker will then post the message to all interested processes. The nice thing about this pattern is that you have dedicated code to handle broadcasting the message and it is very easy at run time to change the number of processes that get the message. The DAQ task will always send the message and will not care how many processes are listening.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • What is the best approach to converting LV7.1 tags to LV2012 shared variables in multiple VIs?

    What is the best approach to upgrading from LV7.1/DSC tags to LV2012/DSC shared variables, in multiple VIs running on multiple platforms? Our system is composed of  about 5 PCs running Windows 2000/LV7.1 Runtime, plus a PLC, and a main controller running XP/SP3/LV2012. About 3 of the PCs publish sensor information via tags across the LAN to the main controller. Only the main controller is currently being upgraded. Rudimentary questions:
    1. Will the other PCs running the 7.1 RTE (with tags) be able to communicate with the main controller running 2012 (shared variables)?
    2. Is it necessary to convert from tags to shared variables, or will the deprecated legacy tag VIs from LV7.1 work in LV2012?
    3. Will all the main controller VIs need to be incorporated into a project in order to use shared variables?
    4. Is the only way to do this is to find all tag items and replace them with shared variable items?
    Thanks in advance with any information and advice!
    lb
    Solved!
    Go to Solution.

    Hi lb,
    We're glad to hear you're upgrading, but because there was a fundamental change in architecture since version 7.1, there will likely be some portions that require a rewrite. 
    The RTE needs to match the version of DSC your using.  Also, the tag architecture used in 7.1 is not compatible with the shared variable approach used in 2012.  Please see the KnowledgeBase article Do I Need to Upgrade My DSC Runtime Version After Upgrading the LabVIEW DSC Module?
    You will also need to convert from tags to shared variables.  The change from tags to shared variables took place in the transition to LabVIEW 8.  The KnowledgeBase Migrating from LabVIEW DSC 7.1 to 8.0 gives the process for changing from tags to shared variables. 
    Hope this gets you headed in the right direction.  Let us know if you have more questions.
    Thanks,
    Dave C.
    Applications Engineer
    National Instruments

  • Running multiple instances of a top level vi

    The following question is copied from a 1999 post which I am also interested in an answer to. It wasn't answered in '99, but maybe there are more people around today who could comment;
    "I am interested in running multiple copies of a top-level vi in Labview
    operating under Windows95/98/NT much like you could run several copies of
    notepad.exe simultaneously. Whenever I attempt to start a second copy of a
    vi (or .exe), in either the development or runtime environment, Labview just
    brings the first copy to the foreground. Is it possible to alter this
    behavior?"

    I think it is not a bug but an "open feature". What to do if there is 2 or more calls to the same VIT on the diagram? Should a new instance be created for each node or the same instance reused? It depends of the programmer's intents... The problem has been swept under the carpet allowing only one subVIT instanciation per diagram.
    Back to the topic, one would have to be very careful to code an application where the same hierarchy of VIs has to run in multiple copies in parallel. User interface VIs has to be instanciated dynamically user VITs. What to do with subVIs with unitialized shift registers that shouldn't share their data amongst different hierachies? It is doable but requires a careful design. However for simple user display and
    input, a VIT does the job.
    The easiest way is to duplicate and run an executable file copy. That is because when a second instance of a LabVIEW executable is run, it detects the already running instance, passes the control to it and quit. With a different file copy of the executable, the application can be relaunched with its own application space where you can run the same hierarchy of VIs without conflicts.
    LabVIEW, C'est LabVIEW

  • Create multiple VIs using a for loop

    Hi,
    I'm still pretty new to LabVIEW, so this question might be easy for you guys here..
    I'll simplify what I'm trying to do.
    I've got two numeric controllers that act as the rows and columns of a matrix.
    I'd like to take those numbers from these two controllers and use them to create a matrix of a certain picture.
    Example:
    The rows controller is given 3, and the columns controller is given 4.
    Using these numbers I would like the end result to show a certain image (let's say, a cube) multiplied on a 3 by 4 matrix.
    Let's say the picture is an X, then the end result should be:
    XXXX
    XXXX
    XXXX 
    I think I should be using a double for loop (one inside the other obviously), and I should also create the "position" property in order to display each picture of the cube in it's right place.
    The problem is that I don't know how to CREATE the pictures over and over again, while being able to control each one's position property.
    Any help would be GREATLY appreciated!
    Solved!
    Go to Solution.

    1) By "multiple VIs" I meant that I think that I need to create express VIs on the fly while running the for loop. I might be totally wrong here.
    2) Yes, by "numeric controllers" I meant numeric controls in the front panel.
    3) The matrix I'm referring too isn't an object nor a VI in LabVIEW but a virtual matrix that is the end result. I used the term "matrix" because the end result is actually a matrix (of rows and columns) of pictures..
    I'll try to elaborate and even simplify it more:
    Let's say I want to display one picture. That's easy, no problem there.
    Now let's say that I'd like to display n pictures on a one dimensional array. Just one row.
    What I think I need to do is to read from the numeric control in the front panel the number (n) of pictures, and then create them in a for loop, while using the "position" property to set the distance between each picture (using coordinates).
    My original question was just like the above, but for a two dimensional matrix/array. So I guess we can even simplify it even more, by saying it's only one dimensional.
    My way of action here might be totally wrong, and there might be an easier way or another way to go about this...
    Thanks for the quick answer!!  

  • What am I doing wrong when running multiple applications with the Web Server enabled ?

    I am running multiple Vi's (applications) on the same Nt Workstation and the Web Server is enable for all applications. However, I am able to view only one Panel from the browser. Only the first application that is started can be viewed. What am I doing wrong ?

    Only one application can act as a web server at the default http port 80.
    To solve this either run all VIs into a single application or use different
    http ports for each application. For example an application can use the
    default port 80 and others use ports 8080, 8081, 8082 etc.
    In the browser, you enter the URL for non default ports as
    http://hostname:8080/...
    HTH
    Jean-Pierre Drolet
    "zemaitis" a ecrit dans le message news:
    [email protected]..
    > I am running multiple Vi's (applications) on the same Nt Workstation
    > and the Web Server is enable for all applications. However, I am able
    > to view only one Panel from the browser. Only the first application
    > that is started can be viewed. What am I doing
    wrong ?
    LabVIEW, C'est LabVIEW

  • How do I use the Profile Manager to run multiple PHP sessions?

    I have a website that tracks the session and state of users as they traverse through the site. Several users can "work together" simultaneously. To test this cooperative functionality, I ran multiple Firefox profiles simultaneously on my computer, using Firefox's Profile Manager. After logging in as two users (one on each separate running Firefox instance), one of my Firefox instances still works, while the other one does not seem to track the session.
    How do I create and run multiple Firefox instances to allow me to test the functionality of such sites? I believe this worked a few months ago. Perhaps this is a new bug?
    I even tried running normal Firefox and Firefox Extended Support Release simultaneously, but I ran into the same error.

    Disregard the question. The solution has nothing to do with any "Firefox bug". Turns out that my session wasn't being managed properly. Or rather, I was accidentally deleting other users' information when new users logged in. So if I had user 1 and user 2, and user 2 logged in after user 1, some of user 1's information would be deleted, resulting in the errors.
    Oops; sorry about the false alarm. :)
    (Was hoping to retract the question, but it looks like others have a similar problem.)

  • Running multiple files

    Hello
    I am trying to run multiple files with my java app on a Unix server. I compiled with javac, and run it thus:
    java SNL *.mef
    meaning I want to run all of the files with .mef suffix. Unfortunately it does nothing. If I just run one file at time this way:
    java SNL bach.mef
    it will work just fine. My main method looks like this:
    public static void main(String[] args) throws IOException {
    if (args.length != 1) {
    System.exit(-1);
    } else {
    File file = new File(args[0]);
    SNL parseSNL = new SNL(file);
    Any help would be greatly appreciated.
    JM

    public static void main(String[] args) throws IOException {
      if (args.length != 1) {
        System.err.println( "Usage: java SNL x.mef y.mef ..." );
        System.exit(-1);
      } else {
        for( int i=0; i<args.length; i++ ) {
          File file = new File( args[i] );
          System.out.println( "Parsing " + file.getAbsolutePath() + " ..." );
          SNL parseSNL = new SNL(file);

  • Having trouble running multiple instances of Firefox in XenDesktop 7.1

    We recently upgraded our Citrix environment to XenDesktop 7.1. We published Firefox, but only one user at a time can have the program open. When we try to run multiple sessions, we get this error message "Firefox is already running, but is not responding. To open a new window, you must first close the existing Firefox process, or restart your system."
    We've had it published in previous Citrix environments with no problems. How do we need to configure Firefox in XenDesktop so that multiple users can run the program at the same time? Thanks.

    I do not understand virtualisation.
    I can however say that ordinarily Firefox needs each user to have a separate profile and for Firefox to open simultaneous multiple instances with separate profiles the ''-no-remote'' argument needs to be used.
    * http://kb.mozillazine.org/Using_multiple_profiles_-_Firefox
    * http://kb.mozillazine.org/Opening_a_new_instance_of_your_Mozilla_application_with_another_profile

  • PowerShell using start job to run multiple code blocks at the same time

    I will be working with many 1000’s of names in a list preforming multiple function on each name for test labs.
    I notice when it is running the functions on each name I am using almost no CPU or memory.  That led me to research can I run multiple threads at once in a PowerShell program. That lead me to articles suggesting start-job would do just want I am looking
    for. 
    As a test I put this together.  It is a simple action as an exercise to see if this is indeed the best approach.  However it appears to me as if it is still only running the actions on one name at a time.
    Is there a way to run multiple blocks of code at once?
    Thanks
    Start-Job {
    $csv1 = (Import-Csv "C:\Copy AD to test Lab\data\Usergroups1.csv").username
    foreach ($name1 in $csv1) { Write-Output "Job1 $name1"}
    Start-Job {
    $csv2 = (Import-Csv "C:\Copy AD to test Lab\data\Usergroups2.csv").username
    foreach ($name2 in $csv2) { Write-Output " Job2 $name2"}
    Get-Job | Receive-Job
    Lishron

    You say your testing shows that you are using very little cpu or memory in processing each name, which suggests that processing a single name is a relatively trivial task.  
    You need to understand that using a background job is going to spin up another instance of powershell, and if you're going to do that per name what used to require a relatively insignificant amount of memory is going to take around 60 MB.  
    Background jobs are not really well suited for multi-threading short-running, trivial tasks.  The overhead of setting up and tearing down the job session can be more than the task itself.
    Background jobs are good for long-running tasks.  For multi-threading short, trivial tasks runspaces or a workflow would probably be a better choice.
    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

  • Running multiple copies of an App on one NetWeaver server

    Hi there,    (V12 with ERP/ECC transactions)
    We are setting up our landscapes/environments for development, beta testing, final QA and production.  I am wondering if we can combine development and beta testing on the same system. 
    The obvious concern is that they will have copies of the "same" transactions.  If we don't do anything special, the data source name is hard coded in the transaction and as we are on the same MII server, they can't point to different data sources unless we edit the transactions.  Is there a way to have a transaction use a configuration of some sort to dynamically specify the actual data source?
    Are there any other issues attempting to do this?
    Thanks,
    --Amy Smith
    --Haworth

    Thanks Jeremy,
    Thanks for the suggestion Jeremy. 
    Our server is not capable of another instance.  It is not easy to get our SAP Basis people to install and configure a new system and we are not allowed to do it ourselves.  I was trying to find a way to use our existing instance of NetWeaver/MII to run multiple copies of the application.  In J2EE apps I have worked on, it is as simple as copying the software, changing the URL, changing the application config files for the data source and deploying the new duplicate app under a different name.
    Seems that in MII the transaction "hard" links the data source name to the data source definition and that link is not dynamically configurable.  Would that be a fair statement?
    Thanks again,
    --Amy Smith
    --Haworth

  • How can i run multiple instances of Photoshop EXE at the same time on windows 7

    Alright. You may ask why do you need multiple ?
    Assume that i have 10000 PSD files in 10 different folders
    I have a script that just save as them as PNG
    And these files are each 3000x3000 px
    My computer has 8 cores and 1 photoshop exe is only using 1 cpu core
    Also i have SSD raid system it has 750 mb read write per second
    So right now i am wasting my time with running only 1 photoshop exe instead of at least 4

    I'm not aware of a way to run multiple instances or different versions of photoshop at the same time on windows.
    Assuming of course they are all installed on the same operating system.
    On mac versions you can running two different versions of photoshop at the same time, but i don't think that's possible on windows where it
    appears that only one version of photoshop can run at a time.

Maybe you are looking for

  • Sharepoint file name restrictions

    Hi Is there any way in Sharepoint 2010 to get it to allow filenames beginning with "." and/or containing the "_" and "&" character within a document library?  Any solution welcome except renaming all documents containing such characters as this is no

  • E72 "Activate power saving". Consequences????

     I want to know DETAILS what happens when I push ON/OFF button and select "Activate power saving". What are the negative effects of this? Noise cancellation still works or NOT? Does GPS work? What else??? "The Nokia E72 features active noise cancella

  • QSM Architectu​re

    Hi Guys, Please, I would like to know about LabVIEW Queued State Machine - Producer/Consumer Architecture. This is like event structure in the producer loop and state machine in the consumer loop. Any representation vi may helps. Sasi. Certified LabV

  • Iphone 3G[S] 3.1.3 messageing fail

    Hi everyone, I recently updated my iphone 3G[S] to 3.1.3 and since then i have not been able to send pictures through text message, i was wondering if anyone els is having this problem if so how can i fix it because Apple wont let me go back to 3.1.2

  • Photos now displaying on web?

    My photos will no longer display on the web, just a box with an X. I must have changed one of the jpeg options inside 'save for web' window. I'm designing webs with Expression Web 4 and I'm using Internet Explorer...