How to set up the execution in a way independent while loops?

Hello

I hope someone here can help point me in the right direction for that.  My system at this stage is still quite simple, I just data collection of 2 resistance probe and a pressure sensor, their output in the Panel before and sometimes to write.  I have put architecture in place to call parallel loops running at the frequency I would ideally like to do.  that is, I want the RTD to update every seconds and the pressure transducer for updating chaque.5s, I want to write to the file at a rate defined by the user and I want the Panel before updating a half second (correspondence with the pressure transducer).

Now, in the structure, I wrote, it should run all the while loop once before it can restart the sequence.  Technically, the code works, but it takes ~1.5s to the RTD to collect and update and so the whole VI takes ~1.5s to complete.

I don't care if the RTD is slow to update, but as I use the sensor as a gauge of the cell pressure I need to know at a high frequency that the pressure is in the cell, and I don't want to wait 2 seconds for the information.

I know I'm starting to get into a much more advanced architecture for this and ive spent the last googler 6 hours trying to find a procedure for how it works but I can't figure out a way to have the whiles stop waiting for RTD loop finish.  I guess that this is to divide the VI in several screws and construction of a library, but the resources I could find about it were not very useful for a beginner like me.  If someone could point me in the right direction on where I should look then that would be great!

Thank you

Zach

Zach,

Because you created the tasks of data acquisition elsewhere, we do not understand how you have set up. Continuously, starting and stopping tasks may be slower than setting up of a permanent task and let it run.

You have not indicated that you use the DAQ hardware.  It is often better to leave in the DAQ hardware clock set ignition rather than rely on software distribution. The pressure loop reads 1000 samples at a time and calculates their.  If you're not sampling at 2000 s/s or faster, the loop ends late due to waiting for data.  In two loops DAQ, you do not use the calendar information.  Acquire the data in tables rather than waveforms.

The Dequeue functions in the loop at the bottom have no wait times for this loop will not iterate until all three queues have data. As the pressure loop runs faster than the loop of RTD, the queue of pressure slowly fills.

The upper and lower loops are vying for the data.  The preview queue item does not delete data from the queue, but the functions of the Dequeue elements in the loop of the low fact.  If data is deleted form the queue before the upper loop resembles it, it will never be saved. With your installation there is no way to ensure that you get all the data or that you do not read and record the same data more than once.

You don't have anything set up to stop one of the loops.  You use the Cancel button to stop your VI?  If Yes, STOP! Other aprticpant on the Forums said: "using the button abandon to stop a VI is similar to the use of a tree to stop a car.»  It works, but can have unintended consequences. "Things like closing of files, freeing up the queues, by closing the task of acquiring data, and other things can occur when the program is interrupted.  You do not shut down your computer by pulling the plug.  Stop your program also neatly.

Ok.  I have highlighted some of the things that can keep your program to run as desired.  What can you do about them?

1. you probably don't need call loops.  Normal so the loop should be good enough.

2 put a stop button on the front panel. Put the terminal in loops (bottom) and connect it to a function to send a Notification and the status of the Terminal loop (stop sign).  Put wait Notification functions in each of the other loops.  Put a period shorter than the time loop minimum on all of them if the lops can work.

3. see the comments above regarding the DAQ bed material.

4 use the Dequeue timeouts to adjust the pitch of the loop the loop where the data is used.  Also make sure that all data is removed.  You need to think about your time together and what are the bottlenecks.  Except if you expect this system to grow to much larger dat sets, I probably acquire ALL data (pressure and RTD) at the same rate and reduce the displayed amount by the average like you do for pressure data now.  If you want different final data rates, just average different amounts of data.

5. it might be useful to learn how to work the State machines.  Display, averaged and recorded files could be managed in a loop by a simple state machine while allowing for more flexibility in the calendar.

6. Another good reason to consider a state machine is that initialization and shutdown processes can easily be handled in the corresponding States. At this point you do nothing with errors. A state machine would enable you to handle errors (for example, the cancellation of the selection of the user files) without stopping the program.

Lynn

Tags: NI Software

Similar Questions

  • Why the execution time increases with a while loop, but not with "run continuously?

    Hi all

    I have a problem of severe weather that I don't know how to fix it because I don't know exactly where it comes from.

    I order two RF switches via a data acquisition card (NI USB-6008). One job at the same time can be selected on each switch. Basically, the VI created for this feature (by a colleague) resets all the outputs of acquisition data and active then those desired. It has three entrances, two chain simp0le controls and a cluster table, that contains the list of all the outputs and some practical information to know what is connected (specific to my application).

    I use this VI in a complex application, and I have some problems with the execution time, which increased whenever I said the VI, so I did a test VI (TimeTesting.vi) to determine where the problem came. In this special VI I record the execution time in a csv file to analyze then with excel.

    After several tries, I found that if I run this criterion VI with the while loop, execution on every cycle time increases, but if I remove the while loop and use the funtionnality "Continuous run", the execution time remains the same. In my high level application, I have while loops and events, and so the runtime increases too.

    I someone could explain to me why execution time increases and how can we avoid this? I have attached my VI test and the necessary subVIs, as well as an image of a graph that shows the execution time with a while loop and «run permanently»

    Thanks a lot for your help!

    Your SetReset_DO VI creates a channel whenever it is called.  And that you never delete a task.

    When running continuously, that it's as if it only runs once and LabVIEW has internal mechanisms to close references that will not be used again.  When a VI is used as a Subvi, LV does not know if she will be called again, and lacks these things until the first level VI stops. You have a memory leak.

    Just as you open and close your file outside the loop for, create your channel out of the loop.

    Lynn

  • where can I get advice on how to set up the iPad for a partially sighted person

    Where can I get advice on how to set up the iPad for a partially sighted person. Are there apps that can help the user, perhaps activated by voice?

    Paul,

    Go to http://help.apple.com/ipad/9/#/iPad9a2465f9and see all the topics under accessibility.

  • How to set up the password disk HARD on Equimum L40-141?

    Hello

    Can someone tell me how to set up the hard drive on my laptop password above please?

    Thank you
    Jane

    Hello

    Have you checked the settings in the BIOS?
    My BIOS contains an option for the HARD drive password parameter.

    But just a question; Why do you want to set the HARD drive password?
    Is this really necessary?

    You need to know if the HARD drive has been fixed, and that something will go wrong, I mean that if you would forget the HARD drive password, the HARD drive would be locked and is no longer usable.
    So be careful with this password if you want to know my opinion; Don t pay.

    Welcome them

  • Qosmio F60 - L10 - how to set up the tv with integrated antenna tuner?

    Good evening
    I have a toshiba qosmio f60, I read your answer about tv tuner.
    My question is: how to set up the tv with integrated antenna tuner? Thank you

    The tuner is already configured!
    You must use Windows Media Center.
    Here, you have to choose the tuner and need to look for available DVB - T channels.

    Notes; Signals DVB - T depends on the country and region.
    In my area I needed an external antenna because the signal is too weak.

  • How to set on the Sony NEX-6 automatic exposure bracketing

    How to set on the Sony NEX-6 automatic exposure bracketing

    Hi FotoEdge,

    You can adjust the automatic exposure of the support under Menu section. Instructions and information on this option is referred to in the #58 manual page.

  • How to set up the multimedia keys (only the last 3 buttons)

    Hello

    How to set up the multimedia keys (only the last 3 buttons)? The first button works, you open the browser and the other open WMP.
    But the last 3 buttons (play/pause, Stop, forw/rewd) aren´t work with WMP. How can I fix?

    Thank you

    Hello

    Can you please tell us what model of laptop Satellite A do you have?

  • Qosmio F50 - 10Z - how to set up the bar multimedia?

    Greetings, have a question... because after a long time, trying to make it work, I can not find the problem...

    On my laptop, I reinstall Windows Vista, download all the drivers for the Toshiba for Qosmio F50 driver page, for Vista... and even how to set up the multimedia bar? With Dolby, sound on / off, light power... He s doesn't work do not. Are there special software required? Or can I put it somewhere?

    Thanks for help

    Use this-> http://eu.computers.toshiba-europe.com/innovation/download_drivers_bios.jsp?service=EU research of Value Added Package 1.1.19

  • How to set up the Windows network access program?

    original title: how to set up the N A P

    How to access my windows network access program

    Hi bryan stacy,.
     
    -Are you talking about in the center of network share or the network connection folder?
     
    If you are referring to the network connection folder, see the following link for more information:
  • How to set up the wireless keyboard

    How to set up the HP Pavilion new elegant laptop 15 and an external monitor with the lid closed. As the use of the laptop as a desktop with external display. Follow the work as long as the flap of the laptop is open.

    If you use Windows 7, and then click Start-> Control Panel-> hardware and sound-> Power Options. It should be a list on the left side of the window, choose the one that says "choose the closing the cover. Select do nothing to do. Should work even in Windows 8, as well.

  • printer HP from Mac 10.5.8 deskjet 970cse how to set up the printer for the printing of the project

    printer HP from Mac 10.5.8 deskjet 970cse how to set up the printer for the printing of the project

    Hello

    You can find out how to access and change the settings of quality below:

    http://support.HP.com/us-en/document/c01662356

    Kind regards

    Shlomi

  • How to set up the order of priority of a start-up program

    Hello

    I'm using Pavilion laptop dv7-2110, Windows Vista 64 bit PC.

    Can someone explain to me how to set up the order of priority of a startup programs.

    Problem: Kaspersky Internet Security appeaps on the taskbar after Skype Torrent etc.

    Thank you in advance.

    You can access the start utility by typing "msconfig" in the start menu-> "search programs and files". From there, go to the Startup tab and you can select the programs to start and which not.

    Regarding the priority, I don't think there is a way, anyway you shouldn't be worried that your anti-virus starts just after other programs that it does not put you in danger.

    If you wish for a quick start you should probably disable most of the non-critical programs in the list, don't worry you do not break your computer if you uncheck anything that you don't know what it is, but I recommend that you don't have before checking what it is.

    Hope this helps

  • Eclipse plugin Simulator - how to set up the network

    Hi I installed Blackberry JDE Eclipse plug-in successfully. My test app works fine on Simulator until he tried to open an HTTP connection to a URL (a real web address like www.google.comor localhost):

    Here's the code I used:

    S StreamConnection = null;
    Try

    {

    s = (StreamConnection) Connector.open (getUrl ());

    HttpConnection httpConn s = (HttpConnection);

    State int = httpConn.getResponseCode ();

    ...

    }

    So my question is how to set up the simulator so that it can open the connection to the network.

    Of BlackBerry MDS Simulator is packaged and installed with the plugin Eclipse and can also be downloaded separately if necessary. You can configure to start the MDS Simulator with your simulator of aircraft in debug/run dialog box. For more information about these steps, see the Eclipse plug-in for the next topic test a BlackBerry Application that uses an HTTP connection.

    To understand the parameter deviceside and information about network gateways, see the following resources:

    DB-00396: that is - different ways to establish an HTTP connection or socket
    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800451/800563/What_Is...

    Video of transport network:

    http://NA.BlackBerry.com/eng/developers/resources/VideoLibrary.jsp#tab_ddetail_subtab_jde

    On BlackBerry's wireless data Transport Management - Part 1

    http://www.BlackBerry.com/knowledgecenterpublic/livelink.exe?func=LL&objid=832210&objAction=browse&s...

  • ACS 5.2 How to set up the local user lockout policy?

    Hi all!

    IM faced with Discover how to set up the local user to the point account lockout policy 5.2 ACS.

    4.2.1 there is the option "failed attempts to go beyond", see link for more details:

    http://www.ciscosystems.com/en/us/docs/net_mgmt/cisco_secure_access_control_server_for_windows/4.2.1/User_Guide/UsrMgt.html#wp273167

    But to the point 5.2 I can't find the option:

    http://www.Cisco.com/en/us/customer/docs/net_mgmt/cisco_secure_access_control_system/5.2/user/guide/acsuserguide.html

    Can somebody spread some light where I configure this?

    BR /Crille

    Just found a bug number indicating it is not supported.

    CSCth12406 Details of bug
    ACS 5 has no option to disable a local account on the unsuccessful attempts
    Symptom:
    ACS 5 doesn't have an option to disable the local account in the internal identity on failed attempts store

    Conditions:
    When ACS 5 is used to only to authenticate users using internal identity store, there is no way to configure a strategy of locking of account for failed attempts.

    Workaround solution:
    Currently there is no work around

  • How to set programmatically the current node in a tree view of the ADF.

    Hello

    I'm trying to understand how to set programmatically the current node in a tree view of the ADF.

    My use case example is quite simple; If we take the sample application ADF Summit where under Management Summit, we have a tree view on the left with a list of high level of the country which in turn contain a subset of customers; then, in the right pane, we the customer detail information.

    What I'm trying to achieve is a solution by which I can add a new customer, commit and then to the tree show the client newly created as the currently selected entry.

    I use a pop-up dialog box to create my new entry of the customer and everything works well in this area, and my newly created folder is saved in the database.

    I know how to force the tree to cool off, but what I can't understand is how to do so, it highlights the newly created folder.

    Any help would be much appreciated.

    Refer

    https://blogs.Oracle.com/jdevotnharvest/entry/how_to_programmatically_disclose_a

    http://www.Oracle.com/technetwork/developer-tools/ADF/learnmore/78-man-expanding-trees-treetables-354775.PDF

Maybe you are looking for