Sort of the length of the sample segment longer that the iterations of the loop w/o shift registers?

Hi all

My loop runs about every s 0.06 and now I was prompted to add to program a function that will enjoy the latest 3 data and return the max/min value for two of the signals.  I can imagine a clumsy way by program to do this with SHIFT registers - take the max/min for each iteration, save-repeat-compare until you have enough iterations to fill 3 s of time.  But I can't help thinking there must be a cleaner way (better?) to do.

Any help?

Thank you


Try looking in a circular buffer.

Once you have determined how many times you put entries in the buffer, you will know exactly what is the size of a table to enter and do the Min/Max on.

Another option is to use a circular table.

I would be created to operate somewhat like a Global functional or motor of the Action.   The Subvi would then be used in your loop DAQ for new data "stack."   Then called in another loop or part of your code to read every three seconds.

Tags: NI Software

Similar Questions

  • Shift registers loop when the chain is connected to the registers

    Hello everyone! I just need to know how these shifts of registers. For example a photo added, I have a stacked sequence structure. Some time ago in a loop with inside case structures. As you can see, there is registry to offset looping with initial string and on the right side of passage registry there is string "entry". So my question is when we run the VI, to check the error case it is going to start from initial case and then transmit the information to the case of entry into the structure of the case. So basically, I need to know how the shift registers can be used with the structures of the case and while loop.

    With this you can post a photo that is executable code.  For us looking at your code is not better than watching a photo with text in Notepad.

    That being said here is some information on shift registers.

    To simplify your code, I highly recommend getting rid of the outer sequence structure.  Stacked sequence structures serve generally to cause new problems to users, and sequence variables compound which.  If you want the code to run before the main States are called, you can have a status of initializing in your state machine and do be more manageable.

  • Photos App: sort out the problem with the album "all photos".

    photos App: problem of sorting with the album "all photos".

    I activated my iCloud library and as little shared albums.

    In 'Moments' pictures are sorted right (as), but when I go to Album > all photos,.

    so, I see a lot of fotos mixed up. In the option, I see that "all photos" are sorted by date 'added' that still does not make sense...

    It's annoying because when I access photos (iOS) to some 3rd - party - app, it does not show 'moments' but albums like "all pictures" that is not sorted...

    Thanks for the help in advance

    The albums predefined in the Photos on a Mac are sorted differently, in order to have different ways to access your photos.

    • The sight of Photos with Moments and Collections is sorted by the date of Capture.
    • The album 'All the Photos' is sorted by the date that you imported photos, not dates, that the photos were taken.

    Albums that you set yourself can be sorted by title or date of capture. So you can set your own album "my photo all ' as a smart album (file > new Smart Album) by using a rule 'Date's after... ', for example:

    This smart album will contain took all the pictures taken since January 1, 1000 and can by sorted according to the date of capture.

  • How can I get the address book to sort by the name of 'Family' (using v 31.3.0).

    After a computer crash, I had to load Thunderbird (v31.3.0) in my computer running Windows 8.1, and I managed to import my address book backup file in Thunderbird (v31.3.0).
    My problem is that I don't see an option to sort the address book by name of 'Family', which was available with the version of Thunderbird, I had before the crash.
    How can I get the address book to sort by the name of "family"?

    "Address book".
    Select address book
    "View' > 'Show name as' > last/first". "

    You can sort by name.
    Click on the 'Name' column header to change the sort order,
    Reversed, then click on the 'Name' column header again to reverse the order.

    'View' > ' sort by ' > select 'Name' and 'Crescent '.

  • When I sort the bookmarks in "organize bookmarks" they are not sorted under the bookmarks dropdown. Latest additions are not integrated in the genre

    When I sort the bookmarks in "Organize bookmarks" they are not sorted in the menu deroulant on a standard page. Recently added favorites are not included in the sort.

    See this:

  • How can I get a digital WDT which includes all samples, not only that of the current stage of time...?

    See block labeled "digital data" in my attachment for reference. Currently, we can consider that the point of digital data for the current time step (it is removed before the following appears). However, I like it showed all the samples in the table as in the example that appears on this link under "digital waveform control":

    Thanks a lot for your suggestions! I am new to Labview, so I appreciate your help.

    Hey westerman111,

    If you are looking to produce your display includes information of the previous steps of Solver solution, you'll need to buffer the previous data. How to implement this in a loop of Simulation of design by & control uses the under control design Simulation & > Simulation > utilities > It will allow you to save previous information generated in the simulation for letter simulation environment.

    I've attached an example that should help you get started using the

    I'd also sure that what you are trying to achieve is suitable for the control loop & Simulation. I know you said that you were new to LabVIEW, so I wanted to make sure that you went to sea in the right direction. Is there a particular reason, why you use the control loop & Loop Simulation instead of a standard time or a forum? The loop control design simulation & is unique in that it calculates the solution of a dynamic system to a no prescribed time and the ODE solver. It also provides tools to interact with the model you solve during execution. However, if you are looking for measurements (instead of the simulation of the dynamic model) and data acquisition I advise to use the standard features of LabVIEW.

    Here are a few useful references for the departure with the two LabVIEW Control Design and Simulation Module.

    Tutorial: Introduction to Simulation (Control Design and Simulation Module)

    Getting Started with LabVIEW

  • How to write multiple entries with KHz sampling frequency in a file outside the loop?


    I am able several entries of string tension using the wizard DAQ (1 sample on request) and it is placed inside a timed loop of frequency 1 KHz.

    This timed loop is placed inside an another while loop.

    Problem is with writing data to a file, although I can see 100 samples of 100 ms in the graphics cable to the out of the way, but the extent of writing to output file stores either only from 19 to 20 samples per second (when he wrote inside the timed loop) or does not store any (if placed outside the timed inner loop).

    I tried to set up producer consumer structure but in the loop of the consumer, I can't write the data in queue to a file saying data type mismatch. I placed the loop starting queue item and consumer out both loops and the element of queue inside the timed loop exit DAQ fed to the queue item.

    Can you please help me solve this problem file writing?

    I haven't looked so writing code from the top of the head, but access to the files is slow, and if you open and close the file, it is quite slow. What do you usually do it write to the file at a slower pace, for example once per second and write all the 1 k samples at a time. Try and also keep Ref file open during the test.


  • Samples buffered not updated in the loop For


    I'm having some trouble with DAQmx Read.

    I have 2 cards USB 6509 making a digital output to solve some multiplexers and I want to measure differential voltage

    using 2 boards of 6255 USB. I have a sample clock shared for 6255 boards through a PFI line. Unfortunately

    6509 boards do not allow for the synchronization of hardware I can say.

    So, to synchronize the functions I used a flat sequence to ensure that multiplexers are processed before acquiring the data of voltage

    and as you can see on the VI (LabVIEW 8.6) I use a loop to run 16 iterations and build a table with these data.

    The problem is that sometimes I get is error 200287 or 200010. And when I don't get an error, the data of 16 iterations

    is the same and it is incorrect because I'm monotoring the data to enter into the 6255 boards using a multimeter and data do not match.

    I seems to me that the analog input is read-only data iteration and I can't understand why.

    Also this VI takes a long time to run and it freezes for a few seconds on a few iterations.

    Can someone take a look at the VI and enlighten us please?

    I'm really stuck on this part.

    Thanks in advance.

    See you soon.



    Well-that the code has sufficient space to improve performance!  Other than samples obvious to read the error that was made out, I recommend:

    • Use "master of" to commit the task before starting the loop - as you have tasks enter the loop 'unverified' and so for each iteration tasks are verified, reserved, committed, started, stopped, no committed, without reserve and unverified. That's a lot of unnecessary work behind the scenes!
    • Do not pass 30000 as a sample to the slave task rate HAVE read the actual sampling frequency of the main task of a task property node and pass a LARGE value this actual sampling frequency to the task of the slave (sample rate can get under duress and you cause a bit of a problem)
    • Bring your constants out of the loop, that the 8.6 compiler doesn't have some of the modern optomizations available for reading constant each iteration is frowned on
    • Check your version of DAQmx.  You want more 9.1 to avoid the bug of the autostart.
  • sorting of the column 'To' of windows live mail is not sort correctly

    Windows Live Mail email sort problem

    I'm trying to sort email in the "To" column, but it does not properly sort by the name of the recipient. In fact, the kind that result is meaningless.

    Ask in the Windows Live Solution Center Mail Portal. Brian Tillman [MVP-Outlook]
    If a response may help, please vote it as useful. If a response to the problem, please mark it as an answer.

  • is it possible to apply the sort on the columns added to a dynamic display object?

    Hi all

    We use JDeveloper Studio Edition Version and deployed on GlassFish Server Open Source Edition (build 5) and connect to the SQLServer database.

    We have created a dynamic display object in the AM Impl, all objects in view columns are added dynamically.

    All lines are displayed correctly, but when sorting columns data disappear. (point of view are being refreshed, of course).

    is it possible to apply the sort on the columns added to a dynamic display object?

    This is how we show data in the JSF page:

    < af:table lines = ' #{bindings. " DynamicVO.rangeSize}' fetchSize = "#{bindings." DynamicVO.rangeSize}.

    emptyText = "#{bindings." DynamicVO.viewable? "{'No data to display.': 'Access Denied.'}".

    var = 'row' rowBandingInterval = '0' value = ' #{bindings. " DynamicVO.collectionModel}.

    selectedRowKeys = ' #{bindings. " DynamicVO.collectionModel.selectedRow}.

    selectionListener = "#{bindings." DynamicVO.collectionModel.makeCurrent}.

    rowSelection = "single" id = "t1" >

    < af:forEach elements = "#{bindings." Var DynamicVOIterator.attributeDefs}' = 'def' varStatus = 'vs' >

    "< af:column headerText =" #{def.propertyMap.label} "sortable ="true"sortProperty =" #{} ".

    ID = "clmn$ {vs.index}" >

    < af:outputText value = "#{row []}" id = "ot1" / > "

    < / af:column >

    < / af:forEach >

    < / af:table >

    Thanks guys, I created a custom class that contains a model that can be sorted in a pod of support and I have to the adf work table it and it is very good about sorting.


    Rows = "#{pageFlowScope.crudBean.dynamicTable.collectionModel.RowCount} '"

    contentDelivery = 'immediate' var = 'row' rendered = 'true '.

    Binding = "#{backingBeanScope.crudBackingBean.tasksTable} '"

    selectionListener = "#{backingBeanScope.crudBackingBean.customListener} '"

    "rowSelection ="single"id ="t1"partialTriggers =": pt_gr2 "columnStretching =" column: clmn0 ">

    inlineStyle = "width: 100px;"  ID = "clmn$ {vs.index}" > "

  • Default sort of the classic report does not seem to work


    THM 2

    I have a classic report consisting of an underlying sql with 3 unions. The columns include a party_name (varchar) and two numeric fields.

    for example only select total_cost, cost_to_company, party_name, apex_item.checkbox2(1,party_id)


    Select a.party_id, a.party_name party_name, a.cost_to_company, table a.total_cost when certain conditions


    Select a.party_id, a.party_name party_name, a.cost_to_company, table a.total_cost when certain conditions


    Select a.party_id, a.party_name party_name, a.cost_to_company, table a.total_cost when certain conditions


    In our real-world scenario, these three applications are on different tables and different even if some elements are all the same (including the type of data, etc.), where the union

    Because I need activate sorting using the report attributes. I put the tri reporting attributes such as 1 - total_cost desc, 2 - Party_name growing.

    However, when we run the report, if the total_cost for different parts is 0, the sorting should be based on party_name. That does not seem to happen. It still sorts out randomly. I'm wonderingm if it's because there are trade unions and no order of in the query.

    No idea how to solve this problem?

    Nothing to do with unions.

    It looks like it is connected to your thread previous marking dynamically of columns in a "BOLD" for the highest value report. Is it? If so, where are the links generated to conditionally and other HTML elements? They are more likely to cause sorting problems. Instead of posting question after question about one aspect of the problem after another, you get a solution much faster together by creating an example on and specifying the complete requirements.

  • Hi, I'm on a PC running windows 10. I just started using Lightroom CC and wildfire and feature drop for the sorting of the pictures in collections has stopped working. can someone suggest something please?

    Hi, I'm on a PC running windows 10. I just started using Lightroom CC and wildfire and feature drop for the sorting of the pictures in collections has stopped working. can someone suggest something please?

    Your catalog backup and reset the preferences as mentioned wobertc

    Press the shift and Option on Mac, or the shift and Alt PC (windows) keys. Select Reset preferences

    ~ Assani

  • I'm new in indesign scripting, please tell me how to write a script to get the contents of an XML element and then sort all the content

    I'm new in indesign scripting, please tell me how to write a script to get the contents of an XML element and then sort all the content


    Can the code below is useful for you, but I do not know how to sort.

    Change the tag based on your employment application.

  • Graph waveform repeats with each iteration of the loop

    Hi guys,.

    I got some great responses from you many already, so I hope you can help me once more!

    I try now to simply take a voltage that is measured by a sensor, I tied to AI1, and I built a graph of very simple waveform using a DAQ assistant. I have the setup terminal to CSR, the acquisition value continuous sample mode and read samples and rate game to a control on the Panel before which I can control myself. All this is a while loop that is needed to collect data over time.

    However, the problem I have is that for each loop of the loop, it seems, to reset the graph, so my x-axis never increases over time, ideally I want it to do is to show results through from 0 to 100 on the x-axis to say, and then, when it comes to 101, he will start again on the extreme left of the graphic to the right to a crossing another 100 points given) (there's a term for this, but I forgot, sorry!). To be honest, this kind of logic like everything in the loop will be restarted, but after trying to chart the loop it does not work, so I'm fresh out of ideas.

    I think I might have to do is to manually build segments of data acquisition (DAQ mx) and have only certain parts of them in the loop, although I can't be sure. I tried various examples and online on the database of NOR (including tension-int acq & graphic clk which works well in the examples, but not at my request) but no luck for now

    If anyone can think of what could be the problem, then please let me know. FYI the sensor is optical fiber if it makes a difference. I have attached the file VI that I did does not really...

    See you soon!


    Since you use a chart there is no way to fix it. If you choose to go to a XY chart you could solve this problem. See the example below.

  • How for-loop to calculate RMS with length of 100 samples window and step 1 sample window

    Hello world

    I'm trying to make a transition from Matlab to Labview signal processing needs... Specifically, I need to smooth out and quantify a randon, two-phase sampling signal ~ 128000 in length... In matlab, I so calculate the RMS with a length of 100 samples window and no window of 1 sample to smooth.linear evelope signal; do my calculations of amplitude...

    I have a problem to do in Labview... The matlab code that I would use normally is:


    Variables to assign % RMS

    x = signal of interest;

    window_length = 100;

    window_step = 1;

    Calculation of % RMS

    EMG = x ^ 2.

    index = 0;

    nWindows = floor (nrows - (window_length - window_step)) / window_step;

    EMG_rms = zeros (nwindows, matches); % The pre-allocating memory

    j = 1:window_step:length (EMG) - window_length + 1;

    index = index + 1;

    EMG_rms (index, = sqrt (average (EMG (j: j + window_length-1,));))



    I tried many times with the loop for, but no luck... Ingore smileys... They must be a colon (:, to indicate all lines) followed by a)...

    Any suggestions?

    Thank you

Maybe you are looking for

  • "iTunes cannot be verified.

    Software update showed on the screen. I went as usual. Repeated when you restart after update attempts, I get the dialogue, "iTunes cannot be verified; "Try again from App Store then restart"- or almost identical to those words. I signed up on iTunes

  • 9.3 update to opening links

    Hi, since the download of 9.3 on my IPhone 6 +, the phone works as before, but when I open Safari or e-mail and press a link/hyperlink screen freezes and will not continue to the next site? can all ideas, I go back an update?

  • Reboot to slow down or stop on my Satellite L40 - 18R

    I have a Toshiba Satellite L40 - 18R laptop I am happy with it, except for a few things, my laptop is the version with a 1.6 GHz - CPU Pentium dual-core, 2 GB of RAM and I bought a 200 GB 7200 RPM Hitachi travelstar (internal). I use Vista Home premi

  • Yoga 900 wake from sleep

    Hello My 900 Yoga has awakened from his sleep in my backpack many times. I tried to find a setting to disable the keyboard while the computer is in sleep, but I couldn't find one. I asked support about this problem and they are not too a solution. I

  • When I turn on my HP Pavilion dv7-1245DX Turion 64 windows vista computer does not load

    My laptop is a HP Pavillion DV7 1245 DX/Turion 64 bit running Windows Vista. When I turn on my laptop, the fans run, the lights are on, but windows only is not loading. I left on for a few hours and windows not loading always not. I would like to kno