Two different running loops one after another with different time intervals

Hello

I am currently using LabVIEW 2013. I'm new to LabVIEW.

I take 10 values to data acquisition during the 9-10 sec time interval within a period of 10 seconds.

I thought runs two loops. 1st loop will run for 9seconds out giving zero and the second loop will launch with 1 second left taking all the required 10 values. can someone help me in this way to do it. If you can suggest me any other idea.

Thank you.

Your task of data acquisition is to take 10 samples in 1 second (I assume that you also spaced).  10 samples/s = sampling frequency of 10 Hz (Hz = events/second).  To configure DAQmx tasks, MAX is your friend.  Open MAX, find your device (plugged in), open a panel of Test and find a way to let him taste at 10 Hz and collect 10 samples.  Test to see if it works.  Get it now to save as task.

Now, when you configure your block diagram, drop a DAQmx Start Task (or even read DAQ) and wire an empty constant to the task in.  See the little arrow for menu drop-down?  If you click on it, one of the choices should be the task DAQ, you just saved.  Select that and it will work.

Now, all you have to do is wait 9 seconds before acquiriing your 10 points.  There are functions of synchronization that can allow you to do this.

Bob Schor

Tags: NI Software

Similar Questions

  • Why does my 7th generation nano play different versions of the same song (acoustic, demo, replacing) one after another before she switches to a different song.

    Why does my 7th generation nano play different versions of the same song (acoustic, demo, replacing) one after another before she switches to a different song?

    Maybe the current list of the song has the songs listed in alphabetical order, and you have the iPod nano to play in the order of the list...  How do you think iPod nano to read the list of songs?

  • Folders of bookmarks in Safari in the Favorites bar not open click when you access one after another

    Question: The records of Safari bookmarks in the bookmarks bar not open click when you access one after another

    Diagnostic steps:

    (1) create 2 or more folders in the bookmarks with the individual sites in their breast.  (Examples of folder name: career, finances and health)

    (2) safari > display > display favorite bar. All the Favorites should be visible in the main window of Safari with all these files

    3) click on the folder named career and then go directly to Finance. (the record finance should open with a single click)

    (4) or try to open the folder of health directly after clicking on career record. The health record is expected to open in one click. This does not currently happen

    Currently, 2 click are required to open a folder in the Favorites bar. To activate the button and the second displays the Web sites it contains.

    It is annoying and seems as if the browser is obsolete.

    If opening cursor hover is not what apple wants for these records, we are fine with it. But the least we should do, it's that these files opens in one click.

    Thank you.

    Send feedback to Apple. They will not respond, but at least know that there is a problem. If enough people send feedback, it can become the problem solved as soon as possible.

    Your comments

  • URL one after another?

    When it is clicked on mgsA [3], the URL is opened one after another (current url + requested url)!

    For example assumes that the swf file is in www.main.com and the Msgto {3} is www.sub.com

    When it is clicked on Msgto [3], the URL opens as http://www.main.com/www.sub.com

    receiveLoad.onData = {function (src)}

    var messageA:Array = src.split(",,,");

    messageA.pop ();

    var charCount = 0;

    var formatIndices = new Array();

    newszlatest.html = true;

    for (var i: Number = 0; i < messageA.length; i ++) {}

    var msgA:Array is get [i].split(",,");.

    "newszlatest.htmlText += Msgto [0] +" "+.split("") Msgto [1] [0] +"< br >"+ Msgto [2] +" < br > < b > < /b > link < a href = "" + Msgto [3] + "' target ="_blank">" + Msgto [3] + "< \a > < br >" + hrF(newszlatest,"_",0x333333) + '< br > < br >'; ".

    formatIndices [i] = {startAt: charCount, endAt: charCount + Msgto [0] .length};

    charCount = newszlatest.text.length;

    }

    for (var j: Number = 0; j < formatIndices.length; j ++) {}

    newszlatest.setTextFormat (.startAt formatIndices [j], formatIndices [j] .endAt, format1);

    }

    }

    I need to fix it so that it opens only www.sub.com in the new window.

    You must use Msgto {3} is like http://www.sub.com

    Note that I added a http://

  • Photos create two different times.

    Sometimes Photos create two different times with pictures of the day. How can I join in an instant?

    Thank you.

    You can not - moments is totally automatic and you have no control of it--tell Apple what you want - http://www.apple.com/feedback/photos.html

    LN

  • Execute SQL commands two one after another

    Dear all,

    I have these two lines of code that I need to run individually. Is there anyway that I can get them both to run simultaneously?

    CREATE TABLE TBL_DATE AS SELECT DUAL FROM SYSDATE;
    CREATE TABLE TBL_DATE_2HRS_AGO AS SELECT (SYSDATE - 2/24) FROM DUAL;

    Perhaps inbed in a procedure or something? It should not be simultaneous, even if they are run one after the other.

    Thank you

    Still not very clear to me, but maybe you are looking for sth. like

    BEGIN
       EXECUTE IMMEDIATE 'CREATE TABLE TBL_DATE AS SELECT SYSDATE dt FROM DUAL';
       EXECUTE IMMEDIATE 'CREATE TABLE TBL_DATE_2HRS_AGO AS SELECT (SYSDATE - 2/24) dt FROM DUAL';
    END;
    /
    

    ?

  • Help! Records is 'My Computer' are more grouped separately, like a normal folder view with icons appearing one after another

    I have Windows XP Pro SP3, after I shut down my computer one day and handed back upward, the look has changed to 'MY COMPUTER', they were prominent groups such as "Shared folders", "Hard drive" and "devices with removable storage".  Now, the Group disappeared and all that remains is the drives and folders in a page layout, like how a regular all types one after the other.  How to get back the old look with them separate?

    Click view > rearrange icons by > Type and view > rearrange icons by > show in groups .

  • Running slow even after reimage... time to replace the 5100 disc drive?

    My laptop 5100 is very slow and I hear the drive access very regularly and it affect playback of the media while doing other tasks. Even after recess with the CD that accompanies it improves a lot.

    I'm assuming the drive is dying, but open to suggestions. Out of curiosity he would make a difference if you had everything on one big partition or multiple?

    According to Device Manager the drive is a MK6021GAS. A few questions for those who have the necessary expertise to respond to...

    (1) do I replace with the same Toshiba player?

    (2) can I replace it with a larger drive?

    (3) everyone has replaced these discs successfully?

    (4) any recommendations on where to buy?

    BTW, this laptop was purchased in Australia if it makes a difference.

    Thank you very much
    Richard

    Hello

    (1) you must not buy exactly the same HARD drive, but it is always recommended to use the compatible module.
    (2) theoretically Yes. . I think 60 GB is really enough for this camera, but I think that 80 GB HARD drive is recognized correctly.
    (3) the disc replacement is very easy and you can do it alone. In the lower corner, near the battery, you will find the HARD drive cover. I'm not sure, but it is fixed with a screw. Remove carefully and you will see how the HARD drive is placed there.
    (4) Google a bit. You will find a large number of suppliers. You can also buy it in every store of PC. eBay is also an alternative.

  • Saving data with automatic time intervals

    Hello world

    I am a new user with LabVIEW (I just started using it 3 weeks ago) and I'm having a problem with the registration data and recording.

    Basically, we want to do is monitor data for four different variables countinuosly but to record in intervals of time specified and automatic. Specifically, we would like to save countinuosly of data only for five minutes every hour. After 5 minutes, only the backup function must be stopped for 1 hour, then return to save 5 minutes without closing the major loop. In addition, we would like to collect all the data in this way in one exel file per day for three weeks or more, so rather than create a data file for each record, we stand at their gathering in one file per day.

    Finally, if possible, we would like to extract the average data for a day in a single file.  We are not interested in changing the rate of data acquisition, we only focus on the savings rate. We tried several timed function (as the elapsed time, delay time, wait) and loops timed, but it was impossible to synchronize different loops or implement synchronization for the issuance of savings without blocking the work of the main loop.

    The data are collected via the function "write to file action.

    any kind of help will be really appreciated!

    Here, we submit our front panel block diagram of our VI.

    Best regards

    Use a shift register to keep track of your departure time.  If the difference between the start time and the current time less than 5 minutes, save the data.  If the time difference is one hour, save the new time as the start time.

  • Create a waveform using PCI-6723 AO with various time intervals on the trailing edge of the sample of 200 Hz clock and 0.1% duty cycle

    I use the PCI-6723 card and I am trying to produce a model of waveform using the analog output channel. The wave consists of 5 different voltage levels. The main problem is that the first 4 voltage levels are supposed to have 926 microseconds time intervals and the time interval the last voltage level is supposed to be 1,296 milliseconds. In addition, the waveform must be triggered on the trailing edge of a sample clock of 200 Hz with a 0.1% Duty Cycle. Is it still possible? If so, any help would be greatly appreciated. Thanks in advance!

    Here is what I currently have, but it does not fulfill my purpose.

     int32   written;
        float64 data[5] = {-0.23, 0.38, 1.12, 1.78, 0.10};  //volts
        //long  time[5] = {  926,  926,  926,  926, 1296};  //microseconds
    
        // DAQmx Configure Clock
        DAQmxErrChk (DAQmxCreateTask("",&taskHandleFRQ));
        DAQmxErrChk (DAQmxCreateCOPulseChanFreq(taskHandleFRQ,"Dev3/ctr0","",DAQmx_Val_Hz,DAQmx_Val_Low,0,200,0.001));
        DAQmxErrChk (DAQmxCfgImplicitTiming(taskHandleFRQ,DAQmx_Val_ContSamps,1));
    
        // DAQmx Start Code
        DAQmxErrChk (DAQmxStartTask(taskHandleFRQ));
    
        // DAQmx Configure Code
        DAQmxErrChk (DAQmxCreateTask("",&taskHandle));
        DAQmxErrChk (DAQmxCreateAOVoltageChan(taskHandle,"Dev3/ao0","",-10.0,10.0,DAQmx_Val_Volts,NULL));
        DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandle,"/Dev3/Ctr0Out",1000.0,DAQmx_Val_Falling,DAQmx_Val_ContSamps,5));
    
        // DAQmx Write Code
        DAQmxErrChk (DAQmxWriteAnalogF64(taskHandle,5,0,10.0,DAQmx_Val_GroupByChannel,data,&written,NULL));
    
        // DAQmx Start Code
        DAQmxErrChk (DAQmxStartTask(taskHandle));
    

    Bingo. This code seems to work much better. Looks like I had to reduce my number of samples per 1 to fit the waveform desired in 5 milliseconds of the sample clock delay.

    However, if someone knows a better way to achieve these results, I am open to all ideas.

    void CDevDlg::OnRdr1e1()
    {
        float64     data[4000];
        float64     volt[5] = {-0.23, 0.38, 1.12, 1.78, 0.10};  //volts
        int x=0,d;
    
        for(int v=0; v<4; v++)
        {
            for(d=0; d<741; d++)
            {
                data[x++] = volt[v];
            }
        }
        for(d=0; d<1036; d++)
        {
            data[x++] = volt[4];
        }
    
        // DAQmx Configure Clock
        DAQmxErrChk (DAQmxCreateTask("",&taskHandleFRQ));
        DAQmxErrChk (DAQmxCreateCOPulseChanFreq(taskHandleFRQ,"Dev3/ctr0","",DAQmx_Val_Hz,DAQmx_Val_Low,0,200,0.001));
        DAQmxErrChk (DAQmxCfgImplicitTiming(taskHandleFRQ,DAQmx_Val_ContSamps,800000));
    
        // DAQmx Start Code
        DAQmxErrChk (DAQmxStartTask(taskHandleFRQ));
    
        // DAQmx Configure Code
        DAQmxErrChk (DAQmxCreateTask("",&taskHandle));
        DAQmxErrChk (DAQmxCreateAOVoltageChan(taskHandle,"Dev3/ao0","",-0.5,2.0,DAQmx_Val_Volts,NULL));
        DAQmxErrChk (DAQmxCfgSampClkTiming(taskHandle,"",800000,DAQmx_Val_Rising,DAQmx_Val_ContSamps,4000));
        DAQmxErrChk (DAQmxCfgDigEdgeStartTrig(taskHandle,"/Dev3/Ctr0Out",DAQmx_Val_Falling));
    
        // DAQmx Write Code
        DAQmxErrChk (DAQmxWriteAnalogF64(taskHandle,4000,1,10.0,DAQmx_Val_GroupByChannel,data,NULL,NULL));
    }
    
  • Ink cartridge 5 hp7520: two black cartridges 7520 one full another empty but not printing black

    My black picture is empty (do not know why, do not use photo) the largest on the right side is almost full, but that's the impression not something black.  the colors are very well.   I tried to play with the setting but am at a loss.

    Help, please.  Thank you!

    Groll

    Welcome to the Community Forum of HP.

    It's just one of those things - you must have all five cartridges to print with that printer.

    Experience:

    The Photo black is not just for the pictures - this type of black is "jet black" and is used for special types of printing needs "black-black" including pictures, graphics and photos.

    Black regular print gray-black, gray, mixtures with other colors and prints some blackish fonts.

    You bought into this concept when you purchased this printer - maybe - not deliberately, but so much.  Additional 'Photo Black' is one of the reasons for this printer is capable of reproducing really excellent color photographic Images.

    ======================================================================

    The facts about Photo Black

    The following is provided by our own Provost Expert Bob_Headrick .

    The document explains how to use the ordinary black and photo black ink cartridges used in the 7520 Photosmart and printers Photosmart 7525.

    Partial extract:

    The smallest cartridge is the photo cartridge, used for printing of dark areas when the photo paper is selected in the driver, or 'automatic' paper selection is enabled, the media type is detected as photo paper.  It can also be used in some cases when you print graphics on plain paper.  If you are printing on plain paper make sure "plain paper" is selected in the selection of the type of media for the driver.

    Photosmart 7525 may require ink in all colors (including photos and black) to avoid any clogging of printheads.  See here for more information on how the ink is used.  PhotoSmart 7525 is an IIC printer in the terminology of this document.

    Bob Headrick, Microsoft MVP Windows Expert - consumer, HP Expert

    Message:

    Question about Photosmart 7525 / ink Photosmart 7520 - five

    ======================================================================

    If you wish, you can buy authentic HP inks from HP:

    HP SureSupply

    The delivery is free - and delivery is super fast, at least here in the USA.

    Reference:

    Drivers and software of printer features complete e-all-in-one HP Photosmart 7520

    When you see a post that will help you,

    Who inspires you, gives a cool idea,

    Or you learn something new.

    Click the 'Thumbs Up' on this post.

    My answer-click accept as Solution to help others find answers.

  • Run an update after another on the toad sql and sqlplus

    I need to do the following updates. First run Update1 and Update2
    --UPDATE 1
    update cm_item_loc l
    set l.primary_supp = (select supplier
                        from cm_item_supp_country s
                        where primary_supp_ind = 'Y'
                        and l.item = s.item);
    
    -- UPDATE 2
    update cm_item_loc l
    set (local_item_desc, local_short_desc) =
        (select item_desc, short_desc
        from cm_item_master i
        where l.item = i.item);
    I hace sqlplus and Toad, but I don't know how to do it in any of them

    a toad - press f5 to run your code as a script.

    in plu sql, create a file in your start sqlplus in directory and reference it with a symbol

    SQL> @test.sql
    
    D
    -
    X
    
    1 row selected.
    
    Elapsed: 00:00:00.00
    
    no rows selected
    
    Elapsed: 00:00:00.00
    SQL> 
    
  • Read Flash files multiple one after another

    HI - this has left me speechless. New to Flash and do not understand how to on this subject. Been Googling etc, but just get more confused.

    I have a series of animations to graphics etc in another flash file. Tried to put everything on a timeline but became way too confusing so thought I would put each part in a separate flash file.

    Is what I want to do, once a file came to an end following to play load and so on. It is all part of a presentation so that the user will click on the keyboard to progress to the next file.

    I use Flash CS4 on Mac with Action Script 3.0.

    Any help much appreciated.

    Ok.  now it makes sense.

    Simply add your loader to the display list:

    var ldr:Loader = new Loader ();

    addChild (ldr);

    loadNext ("square.swf");

    function loadNext(swfName:String) {}

    LDR. Load (new URLRequest (swfName));

    }

  • How to draw 2 strings one after another?

    Hello

    I have this code, and I would like to know how can I draw the right of the string 's2' after the first string "s1" on this Panel, so that what is behind her while they move you?

    Also, how can I do some of the channels drawn clickable (for example links) so that when I press on them some actions are performed?

    Thank you very much.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    
    
    public class VertMovingTextPanel extends JPanel implements ActionListener {
        
        Timer t = new Timer(5,this);
        int x = 10 , y = 0 ;
        public VertMovingTextPanel() 
        {}
        
        public void paintComponent (Graphics g){
            super.paintComponent(g);
            String s1 = "Alert number 1";
            String s2 = "Alert number 2";
            g.drawString(s1, x, y);
            //g.drawString(s2, x, y);
            t.start();
            
        }
           
        
        
        public void actionPerformed (ActionEvent e)
        {
            if (y < 0 || y > 600 )
            {
                y = 0;
            }
            y ++;
            repaint();
            
        }
        
        public static void main(String[] args) {
          JFrame frame = new JFrame("Alerts");
          VertMovingTextPanel vp = new VertMovingTextPanel();
          frame.add(vp);
          frame.setVisible(true);
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          frame.setSize(600,600);
        }
    }

    Use g.getFontMetrics () .getHeight () and adapt there.

  • Treatment of JMS messages in order one after another

    It's my use case that I wan to implement in OSB.

    1. I have a queue that will receive the messages in the huge number of a single sender.
    2. I have a proxy that will read each message and process the message and send it out.

    In step 1, I want each message to be read in order and at step 2 end run, then I want to read the next message in the queue.

    I need to give an acknowledgement to JMS message processing is complete and it can make the next available message to the proxy.

    What is the best option to implement this use case?

    Concerning

    The WebLogic jms to order unit is the best approach for this.
    http://download.Oracle.com/docs/CD/E12840_01/WLS/docs103/JMS/uoo.html

Maybe you are looking for