Alternate execution of VIs

Hello.
Please,can you tell can I make some VI to execute one by one in main VI.
For example,we chose option "Start test" and then DAC Voltage begins to execute,after that it writes some data to database,then next VI goes and so on.
After all VIs executed we have report based on database with the results this VI's  work.
Thank you!

You have a lot of options. The simplest is just to have error in/error out connections on each of your subVIs. LabVIEW is a dataflow language and by wiring error out to error in of some other subVI, the dataflow connection enforces execution order. A sequence structure does the same thing but doesn't need dataflow. I'm not a big fan of sequence structures though. A more sophisticated aprroach would be a state machine. There are shipping examples of this and templates of these are part of the design patterns you can choose from when you select File>New.

Similar Messages

  • FPGA code only works on alternate executions

    Hi,
    I have some code I wrote for FPGA which, by itself, works fine. I tried to use "Open FPGA VI Reference" as part of a previous (non-FPGA based) VI. However, I find that the full code only works on alternate executions. I thought this may be because the FPGA VI is not being reset properly. However, I have used "Close FPGA VI Reference" and chose "Close and Reset" and the problem remains.
    Any help is appreciated,
    Thanks.

    Hi Gary,
    I hope you are doing well today! What version of LabVIEW FPGA are you using? When you say you are doing 'alternate executions', what exactly do you mean? Do you run your host VI, stop it and then run it again? Have you tried just using Close instead of resetting the FPGA VI? Also, what are you using the reference for? What are you invoking? It would, also, be better if you post a screenshot of your VI.
    Adnan Zafar
    Certified LabVIEW Architect
    Coleman Technologies

  • Multiple Execution of VIs in TestStand

    Hi everybody,
    I'm trying to run multiple VIs with TestStand. Right now I'm using the
    ActiveX command : Engine.NewExecution to start multiple Sequences which
    contain 1 VI. To communicate between these Sequences, I have to use
    StationGlobals. Is there a possibility to use one Sequence File with
    all my Subsequences and LabVIEW steps, that could be called once and
    then executes the steps at the same time, so that I don't have to use
    StationGlobals and different Files.
    Thanx Jens
    Sent via Deja.com http://www.deja.com/
    Share what you know. Learn what you don't.

    Jens,
    If you are calling VIs of the same name and if those VIs display their
    front panel, those VIs cannot be set to reentrant. However, we made a
    step type that works around this issue. You can download an example
    named, "Step Type that Executes LabVIEW Code Modules in Parallel" from
    the NI examples database at:
    http://digital.natinst.com/explprog.nsf/web%2Fswgrp?
    OpenView&Start=1&Count=500&Expand=7.1#7.1
    This example also requires TS 1.0.1. If your VIs don't display their
    front panels, then you should make your VIs reentrant as I mentioned in
    a previous message.
    You can always get to the examples DB from www.natinst.com/support
    Paul
    In article <7sg52h$77c$[email protected]>,
    [email protected] wrote:
    > Thank you very much,
    > you are rig
    ht, I want to execute the same vi twice with TestStand (I'm
    > already using StationGlobals for the communication). I will upgrade
    > then the next days.
    >
    > Best Regards
    > Jens
    >
    > In article <7sd87g$3bj$[email protected]>,
    > [email protected] wrote:
    > > Hi Jens,
    > >
    > > You will need to use station globals or a file to communicate. Each
    > > execution makes its own runtime copy of FileGlobals and these
    runtime
    > > copies are not shared between the different executions.
    > >
    > > I'm not sure if you are attemption to run VIs of the same name at
    the
    > > same time. If so, you can set those VIs to be Reentrant. But you
    > > will need to upgrade to TestStand 1.0.1. You can upgrade at
    > > www.natinst.com/advisor. It is a free upgrade.
    > >
    > > Thanks,
    > > Paul Mueller
    > > National Instruments
    > >
    >
    > Sent via Deja.com http://www.deja.com/
    > Before you buy.
    >
    Sent via Deja.com http://www.deja.com/
    Before you buy.

  • Will execution of VISA tasks with one DAQ (Dev1) in one VI block VISA tasks with the second DAQ (Dev2) in a second VI?

    Hi all,
    I have two functional VIs.  One loops a set of read and write tasks with Device 1 (NI USB-6008).  The second loops a set of write tasks with Device 2 (another NI USB-6008).  VI 2 has a massively slower timescale than VI 1, meaning that it must run in a separate loop.  Otherwise, VI 2 was created by copying and modifying VI 1, and shares variable names with it (though not, for example, global variables).  Both VIs are intended to run at the same time on the same PC.
    However, if VI 1 is running at the same time as VI 2, none of the read or write operations to Device 1 in VI 1 are executed---but the VISA read and write operations to a serial device do work.  Upon stopping VI 2, all the functions in VI 1 work fine.
    Though I configured the channels for the tasks using the DAQmx GUI, I execute the tasks using the DAQmx read and write commands, and have properly set the "create task" and "stop task" VIs outside the beginning and end of my loop, respectively.
    Does anyone have suggestions for what might be causing this?  My thoughts so far:
    a. Perhaps there is some conflict in variable names in memory between the two VIs?
    b. Can LabVIEW for some reason not read and write two devices from two separate VIs? 
    c. Do I need to avoid using DAQmx to configure these tasks (some sort of memory conflict)?
    I know I can make it all work if I combine everything into one massive VI, but for my application it is far easier and better to have them in two separate VIs.
    Thanks in advance for your help!
    Solved!
    Go to Solution.

    In case anyone was wondering, I found the solution:
    When I copied the original code to a new VI, it turns out that the timed loop structures in the new VI had the same object name in LabVIEW's execution structure as the timed loop structures in the original VI.  This was effectively preventing whichever VI was executed second from executing its timed loop.  (The serial read/write contined to work because it was in a different timed loop.) 
    I found this error when I ran the VI in highlight execution mode, and noticed that the "error" output on the timed loop flashed.  When I wired it into my error stream, I found error -808, which explained the problem above.
    I fixed it by right clicking on the timed loop, changing it to a while loop, and then changing it back to a timed loop and reconnecting any broken wires.  LabVIEW gave the new timed loop object a new name, and all was well in the universe.

  • SQL Server Express Performance Limitations With OGC Methods on Geometry Instances

    I will front load my question.  Specifically, I am wondering if any of the feature restrictions with SQL Server Express cause performance limitations/reductions with OGC methods on geometry instances, e.g., STIntersects?  I have spent time reading
    various documents about the different editions of SQL Server, including the Features Supported by the Editions of SQL Server 2014, but nothing is jumping out at me.  The
    limited information on spatial features in the aforementioned document implies spatial is the same across all editions.  I am hoping this is wrong.
    The situation....  I have roughly 200,000 tax parcels within 175 taxing districts.  As part of a consistency check between what is stored in tax records for taxing district and what is identified spatially, I set up a basic point-in-polygon query
    to identify the taxing district spatially and then count the number of parcels within in taxing district.  Surprisingly, the query took 66 minutes to run.  As I pointed out, this is being run on a test machine with SQL Server Express.
    Some specifics....  I wrote the query a few different ways and compared the execution plans, and the optimizer always choose the same plan, which is good I guess since it means it is doing its job.  The execution plans show a 'Clustered Index Seek
    (Spatial)' being used and only costing 1%.  Coming in at 75% cost is a Filter, which appears to be connected to the STIntersects predicate.  I brute forced alternate execution plans using HINTS, but they only turned out worse, which I guess is also
    good since it means the optimizer did choose a good plan.  I experimented some with changing the spatial index parameters, but the impact of the options I tried was never that much.  I ended up going with "Geometry Auto Grid" with 16 cells
    per object.
    So, why do I think 66 minutes is excessive?  The reason is that I loaded the same data sets into PostgreSQL/PostGIS, used a default spatial index, and the same query ran in 5 minutes.  Same machine, same data, SQL Server Express is 13x slower than
    PostgreSQL.  That is why I think 66 minutes is excessive.
    Our organization is mostly an Oracle and SQL Server shop.  Since more of my background and experience are with MS databases, I prefer to work with SQL Server.  I really do want to understand what is happening here.  Is there something I can
    do different to get more performance out of SQL Server?  Does spatial run slower on Express versus Standard or Enterprise?  Given I did so little tuning in PostgreSQL, I still can't understand the results I am seeing.
    I may or may not be able to strip the data down enough to be able to send it to someone.

    Tessalating the polygons (tax districts) is the answer!
    Since my use of SQL Server Express was brought up as possibly contributing to the slow runtime, the first thing I did was download an evaluation version of Enterprise Edition.  The runtime on Enterprise Edition dropped from 66 minutes to 57.5 minutes.
     A reduction of 13% isn't anything to scoff at, but total runtime was still 11x longer than in PostgreSQL.  Although Enterprise Edition had 4 cores available to it, it never really spun up more than 1 when executing the query, so it doesn't seem
    to have been parallelizing the query much, if at all.
    You asked about polygon complexity.  Overall, a majority are fairly simple but there are some complex ones with one really complex polygon.  Using the complexity index discussed in the reference thread, the tax districts had an average complexity
    of 4.6 and a median of 2.7.  One polygon had a complexity index of 120, which was skewing the average, as well as increasing the runtime I suspect.  Below is a complexity index breakdown:
    Index
    NUM_TAX_DIST
    1
    6
    <2
    49
    <3
    44
    <4
    23
    <5
    11
    <6
    9
    <7
    9
    <8
    4
    <9
    1
    <10
    4
    >=10
    14
    Before trying tessellation, I tweaked the spatial indexes in several different ways, but the runtimes never changed by more than a minute or two.  I reset the spatial indexes to "geometry auto grid @ 32" and tried out your tessellation functions
    using the default of 5000 vertices.  Total runtime 2.3 minutes, a 96% reduction and twice as fast as PostgresSQL!  Now that is more what I was expecting before i started.
    I tried using different thresholds, 3,000 and 10,000 vertices but the runtimes were slightly slower, 3.5 and 3.3 minutes respectively.  A threshold of 5000 definitely seems to be a sweet spot for the dataset I am using.  As the thread you referenced
    discussed, SQL Server spatial functions like STIntersect appear to be sensitive to the number of vertices of polygons.
    After reading your comment, it reminded me of some discussions with Esri staff about ArcGIS doing the same thing in certain circumstances, but I didn't go as far as thinking to apply it here.  So, thanks for the suggestion and code from another post.
     Once I realized the SRID was hard coded to 0 in tvf_QuarterPolygon, I was able to update the code to set it to the same as the input shape, and then everything came together nicely.

  • Time Delay to wait for a solenoid to open

    I have a Shutter that opens fine but I need to wait with some Time Delay before I continue to process some information.
    I am using Labview 7.0 and have a DaqPad-6016.

    It would be helpful to see your code to see exactly what you are doing.
    However, LabVIEW does have several options for waiting. I have attached a screenshot showing some of these. The time delay is especially useful with DAQ because you can wire your task's error wire through the wait. This will cause the delay to explicitly happen in between the execution of VIs.
    -Sal
    Attachments:
    wait.JPG ‏42 KB

  • Augmentation du temps d 'exécution / labView

    Bonjoçur,
    Nous avons un programme (séquenceur de test 'maison') développé sous LabView.
    Nous avons le problème suivant  :
    - le temps exécution des pas de test augmentent progressivement, quelque soit l'activité du banc. Que le banc soit en pleine produciton ou en attente (un VI qui attend une saisie opérateur de caractères), le temps d'exécution des VIs augmente. Il suffit d'arrêter notre logiciel et de la redémarrer pour revenir au temps initial d'excution.
    - Il n'y a pas d'augmentation de la mémoire utilisée ou de la charge CPU.
    - Je ne peux joindre les sources qui sont trop conséquentes.
    - Le phénomène ne dépend pas de la version de Labview.
    Quelqu'un a-t-il des idées?
    merci.
    Cordialement.
    Benoit.

    "We have a program (test sequencer 'home') developed under LabView.
    We have the following problem:
    - The execution time of test steps gradually increase, regardless of the activity of the bench. That bench is in full produciton or pending (a VI that is waiting for a operator to input characters), the execution time VIs increases. Simply stop our software and restart to return to the initial time of implementation programs.
    - There is no increase in memory usage or CPU load.
    - I can attach the source, it is very large.
    - The phenomenon does not depend on the version of Labview.
    Does anyone have any ideas?"
    >
    Le programme d'essai produisant des fichiers de sortie ou les données d'essai graphique? T-il créer de tableaux, ou de faire beaucoup de manipulation des tableaux. Étant donné que ni les augmentations de l'utilisation de mémoire ou de CPU (ce qui est attendu de ces symptômes) il est étrange.  
    Peut-être qu'il est fatigué? :-)
    >
    Is the test program producing output files or graphing test data? Does it create any arrays, or do a lot of array manipulation. Since neither the memory or CPU usage increases (what would be expected with these symptoms) it is odd.  
    Maybe it is tired? :-)
    Putnam
    Certified LabVIEW Developer
    Senior Test Engineer
    Currently using LV 6.1-LabVIEW 2012, RT8.5
    LabVIEW Champion

  • Real time task synchronization

    I am using LabVIEW real time and I want to "trigger" a lower priority task at the end of the highest priority task if it isn't already done. What is the best solution ? I have read somewhere on NI site that the synchronisation palette doesn't guarantee determinism but unfortunately the real time fifos do not provide a blocking read call. Is there a potential real time problem when using occurences ? I would just like a simple deterministic mechanism to wake up a task if it isn't already awake.
    Thanks in advance.

    Monsieur,
    Je vous invite à consulter la doc ci-dessous pour plus d'infos sur comment LabVIEW gère les priorités lorsque plusieurs VIs s'exécutent en parallèle.
    * How Does Priority Affect the Execution of VIs?
    http://digital.ni.com/public.nsf/websearch/84081F249CEF7AB7862569450074168C?OpenDocument
    * How is Priority of Execution Assigned when Loading and Executing Multiple VIs in LabVIEW?
    http://digital.ni.com/public.nsf/websearch/44AB5BEDC20CB43C862565D4000D9885?OpenDocument
    Les RT FIFOs sont le meilleur moyen pour transférer des données entre threads (typiquement, un thread critique avec un thread normal ou lower).
    Les RT FIFOs ne cassent pas le déterminisme d'une application RT contrairement aux variables locales ou globales.
    La gestion de l'exécution est entièrement faite par le Scheduler du moteur LabVIEW RT. Vous n'avez pas le contrôle sur son mode de fonctionnement.
    Vous n'avez pas du tout intérêt à synchroniser avec les outils de LabVIEW une tâche critique RT avec une tâche non critique car vous allez forcément casser le déterminisme de l'application RT. Vous pouvez cependant synchroniser des portions de code du VI non critique (occurence pour déclencher du code sur génération d'un événement logiciel, rendez-vous pour synchro démarrage multi-VIs, sémaphores ...).
    Cordialement.
    Matthieu Gourssies
    National Instruments

  • Error 0x5B4 Message Poppup

    Dear All,
    I’m using the NI Simulation Model Interface Tool kit 1.0 for accessing the Matlab Simulink DLL files. When I am trying to close the reference (SIT Finalize model.vi) it’s popping up the   following error, LabVIEW tool will hang, we need to close LabVIEW using Task Manger and we need to restart LabVIEW again; this problem occurs every alternate executions.
    Waiting for a response.
    Regards,
    -Baskar
    Attachments:
    Error Msg.doc ‏28 KB

    It's been answered, please refer this thread Re: (ERROR) [JMS_DELETE_MESSAGE_ERROR] {0} message delete error.
    -Thanks

  • Cannot change or delete a Visit List with old execution date

    Hi all.
    I'm creating a FM that updates Visit List.
    Its works ok while the "execution date" field in the VL its bigger than today's date.
    I cannot even change or delete it through /DSD/VC_VL.
    When I try to delete or change the VL I got this message Visit list 9XXXXXXXXX cannot be changed (execution date is before today's date).
    And when I try to change the header, all the fields are grey.
    Any ideas?
    Thanks.

    Hello ,
    Can you please clarify for what product your question is in relation to. From reading your post it is not clear.
    Regards,
    Patrick Dinneen
    Support Engineer, SAP CS Support Delivery

  • Configure the priority/execution system of Sub-VIs

    Hi,
    I wonder if it is possible to configure a VI to run with different priorities or in different execution systems when called on different occations. It seems to me that the only way to influence this is by changing the properties of a VI and then saving it. That would leave me having n just slightly different VIs for n settings.
    Sören

    Hello,
    VI server exposes properties which allow you to change the priority and execution of a VI dynamically.  However, these properties cannot be set while the VI is running, and therefore a VI cannot set its own priority or execution system.  This means that you have to use a plug-in architecture (dynamically called VIs) in order to dynamically choose the priority and execution system of VIs.  I've attached a short example written in LV 7.1.  If you are unfamiliar with VI server or dynamically calling VIs, the LabVIEW Intermediate II course covers these topics and I'm sure there is also plenty of good content on these forums and in the developer zone.
    Regards,
    Ryan K.
    Note:  You should be careful when adjusting the priorities and execution systems on a VI, as you can often end up with undesired results due to priority inversion.
    Attachments:
    Priority Demo.zip ‏20 KB

  • List execution priorities of all VIs in project

    Hello all,
    I'm using LabVIEW 2012.  Is there any way to list the execution priorities of all the VIs in a project please?
    Thank you!
    Zola

    I don't see "real-time" on the list of execution priorities, but I do see "high", "time critical", and "subroutine".  I don't know of any easy way to find out that information.  I doubt it exists because I think it would be very rare for anyone to do what you are asking.
    That said, I don't think it would be difficult to write a small VI that would loop through your .vi files and read the Execution priority through a property node.  I did the following in about 3 minutes.  You just need to create an array of file names.  Perhaps using directory information to build the list.
    Attachments:
    Example_VI.png ‏14 KB

  • Verify Labview Vis before starting execution in release mode

       I have a TestStand sequence that calls a number of Vis. When I switch from development mode to the run-time engine, sometimes the TestStand sequence crashes at certain Vis. I then find that when I switch back to developement mode and open the vi, it has a start next to the filename, which indicates that the file needs to be saved. When I save the files, that step works fine in run-time mode, but then the sequence crashes on the next step that has this problem.
       How can I find out which files need to be resaved before running something with the run-time engine? Is there a way to precompile everything so this doesn't happen?

    Steve,
    It sounds like you are running your VIs with the LabVIEW runtime engine.  For this operation, we recommend that you do a TestStand deployment using the Deployment Utility.  The TestStand Deployment utility will save all of your VIs and make sure that they are packaged correctly so you can call them from TestStand without the LabVIEW development environment installed.
    Please see Chapter 14 of the reference manual for detailed instructions for deployment.  You also might find this knowledge base helpful: Deploying TestStand Systems
    Josh W.
    Certified TestStand Architect
    Formerly blue

  • Sequencial execution of two VIs in LabView

    Hi,
    I am sure other people have encountered the similar problem, but I can not seem to find relevant posts
    on the NI forum.
    I have two VIs.  I like to execute one VI first (which is a while loop), and a second later execute the 2nd VI. 
    Since the first VI runs "forever", the 2nd VI would never get executed if I put the two VIs in a sequence
    in a main VI.
    What is the best way to do this? I apologize for the newbie question.
    Best regards,
    Jianglai 

    You can use queues or notifiers to do this. Here's an example using notifiers that runs a second vi once after the first vi has run in the loop.
    See the Master/slave or producer/consumer design patterns (they are included in the LabVIEW templates) if you need to run the second vi more than once.
    Systems Test Engineer
    Certified LabVIEW Architect (CLA)
    Attachments:
    Notification from loop.vi ‏15 KB

  • Execution of RT driver VIs in custom device

    Hi All
    I am building a custom device wherein I am expecting some user input.( user provides input on the main page of the custom device).
    Once the input is provided , based on it i am reading specific data from file and creating channels and section.
    Previously creation of channels and section i was doing in initailiazation code.  But now As i am expecting user input i cannot create those channels in initialization(reason is before getting input channels will be created which i dont want. My channel creation depends on the user input ).
    So this channel creation logic I am now writing in RT driver VI along with my main logic of reading and writing of channels. For this I just want to know when does exactly RT driver VI starts its execution ?
    If the RT driver Vi starts execution after adding custom deivce in veristand and after giving the user input then my purpose will be solved.
    I hope i have explained my question correctly.
    Solved!
    Go to Solution.

    The driver starts after the system definition is deployed.  I don't think you can add channels in the driver VI.  Nor do I think you want to, because you won't have an interface to them in the system definition.  Without an interface to the channels, i.e. mapping, how will you get data into and out of them?  I think your plan to create channels based on user input and config data is fine.  I suggest you implement in the main page or in custom pages under the main page.
    -Steve K

Maybe you are looking for

  • HT203254 MacBook Pro: Distorted video or no video issues

    It's too bad these problematic laptops are still floating around. I was unlucky enough to buy one. It lasted 10 hrs before the video died. What an incredible waste and my 3rd "PRO" apple laptop to die out of warranty. Are there any documents on how t

  • Field BSEG-HKTID. does not exist in the screen SAPMF05A 0332

    Dear ALL, Our client is ECC 6.0 we are facing a problem while posting the park document Field BSEG-HKTID. does not exist in the screen SAPMF05A 0332    Message no. 00349 Diagnosis    The specified field does not exist on the screen. Procedure    Chec

  • Save my object in mysql db

    I have create my class with this constructor method: public Offerta(final Destinatario destinat, final Date date, final String numeroofferta, final String totale) this.destinat = destinat; this.date = date; this.numeroofferta = numeroofferta; this.ar

  • PS4 crashes when I use the crop tool

    I have CS4 Design Standard and it is loaded on my IMAC and Powerbook.  When I use PS4 on my imac and use the crop tool, it just hangs up and I have to shutdown and restart.  However, it works perfectly on my powerbook.  Any suggestions?

  • What kind of configuring does Apple do when buying an iPad?

    I've noticed that when you buy an iPad-mini Retina wi-fi + cellular at store.apple.com, and you select the options that you want, that the following statement appears when you select the carrier: "Your iPad will be configured to operate with the carr