To measure and hold the peak value of voltage while measuriong using an accelerometer

i would like to measure and hold the peak value of voltage while measuring using an accelerometer,when the voltage goes above certain range . also save highest 5 values.

You could have a shift register on your acquisition loop that is initialized to hold an array of 5 values. Start with all 5 element holding something less than the expected normal input value.
Now each time through the loop, test the new reading to see if it's greater than the minimum value in the 5-element array. If not just go on and repeat the loop.
If the new reading is greater than the minimum value in the 5-element array, append the new reading to the array, sort it in decending order and drop the last element (the old minimum value).
The array will hold the 5 greatest values and the max of the array will be the peak value.
Mike...
Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion
"... after all, He's not a tame lion..."
Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

Similar Messages

  • How do hold the peak ponits or valley?

    Dear All,
    I have a sampled wave, then I want detect the peak points (or valley points) and hold the point until next peak points (or valley points) appears.
    Now I can use the example "Peak Detector.vi" to get the points I want.
    But I don't know how to put the data to the graph. The attached picture shows the idea I want.
    If you need more detail to solve my problem, plz tell me, thank you so much!!
    Solved!
    Go to Solution.

    hello,
    here is one way 
    detecting all pics index to build parts of array with each min/max value then assembling them
    tell if it works
    Regards
    Tinnitus 
    CLAD / Labview 2011, Win Xp
    Mission d'une semaine- à plusieurs mois laissez moi un MP...
    RP et Midi-pyrénées .Km+++ si possibilité de télétravail
    Kudos always accepted / Les petits clicks jaunes sont toujours appréciés
    Don't forget to valid a good answer / pensez à valider une réponse correcte
    Attachments:
    hold_val.vi ‏20 KB

  • How to measure and limit the data volume?

    Morning.
    I need a tool to measure and limit the data volume of internet usage. My internet tariff allows a maximum of 5 GB data volume per month. Exceeds my usage that amount the bandwidth will reduce to only 64 kB/s or the exceeding data volume must be paid extraordinarily expensive.
    Do you know a tool that measures the data volume in a given time period and can alert or limit the internet connection for instance if the data volume at the half of the months has exceeded more than the half of the data volume for the entire month?
    Kind regards, vatolin

    You could generate large amount of data and then use any SNMP Viewer (BMC Dahsboard, Solarwinds, Nagios, CiscoWorks etc.) to see the throughput of the interfaces at peak. But why bother? Cisco has been commented by numerous research firms (Gartner etc.) to be very precise about their stated throughputs.
    Regards
    Farrukh

  • Comparing and picking the right value form one of the line item in a doc.

    Hi Gurus,
    I have requirement such that I have to show the tax jurisdiction code of only one item. That is if there are 5 line items with in a document and each one has diffeerent tax jurisdiction code, then we should be showing only one tax jurisdiction code for a document. Line items are not displayed in report. The condition to pick up tax jurisdiction code is the one which has least ending zeros.
    Supppose
    Doc1          Item          Tax Jurisdiction code
    1800000002       1          CNQC00000000000
    1800000002       2          CNQC00000000000
    1800000002       3          CN0000000000000
    1800000002       4          CNQC00000000000
    1800000002       5          TXJOHNCLEBUR000
    I have to display  the value of tax jurisdiction code corresponding to item 5  as its has least  zeros in it.
    So what I am trying to do is add another custom z object tax jurisdiction code and the value for this is populated using a routine in the update rules, such that comparing all the tax jurisdiction code for all the corresponding items in a document.
    Now the question is if I am reading all values of document no. line item and tax jurisdiction code into an internal table form communication structure for a data package. And in the update rule I will be writing a routine comparing the values of tax jurisdiction code from internal table and populating the desired value. Now the big question for me is if there are two line items of a document in one data package and another 3 line items of the corresponding same document in data package 2 then how can we compare the values of Tax jurisdiction code of all the 5 line items of a document.
    If this can be achieved using customer exit on the front end let me know and just inputs how the abap code would be or if not do I have to write abap in updates rules. I just want to know how to compare different values of Tax Jurisdiction code and select the one with has least ending zeros. For information the tax jurisdiction code is of type character and length 15.
    Any help is really appreciated.
    Thanks,
    Raj

    Yes, it's possible. Just use a regular text item. Create an LOV using the LOV wizard. When you define the query for the LOV's record group, enter a statement that selects from the other database table. Set the return value of the appropriate LOV column to be the text item on the form. Finally, assign the LOV to that text item, so that the LOV pops up when the user presses the LOV key with the cursor in that text item. You can also set the LOV so that it automatically displays when the cursor enters the text item.
    Just look up LOV in online help if you need more info.

  • My ipad mini does not restart when i press and hold the home and power buttons for a minute or more. what do i do? i really need to access some information on it. please help.

    my ipad mini does not restart when i press and hold the home and power buttons for a minute or more. what do i do? i really need to access some information on it. please help.

    You need to connect to iTunes and restore.
    iOS: Not responding or does not turn on
    You may need to put the device into recovery mode, this is covered in the link on this page.
    Did you back up the device?

  • I cannot shut dow my MacBook Pro using the apple icon (as it was suppose to be), actually I have to press and hold the on/off buttom. I have taken twice for Mac dealer and they did not solve the problem. What must I do?

    I cannot shut dow my MacBook Pro using the apple icon (as it was suppose to be), actually I have to press and hold the on/off buttom. I have taken twice for Mac dealer and they did not solve the problem. What must I do? I would to remark that I have installed 2 antivirus and uninstalled one of them. Since then I have facing this troublesome issue. Thanks

    Uninstall the other AV software. They are not needed. All they do is cause trouble like you are having now.
    If you have been forcing the Mac to shut down with the power switch you may nave corrupted your disk. You should repair it with disk Utilty to remove any corruption the shutdwons may have cased.
    Allan

  • How do you get a cd out of the imac g5 drive if the computer doesn't know it's in there.  I've tried shutting it off and holding the mouse button, but nothing works because the computer can't eject what it isn't registering to be there in the first place.

    I can't get access to the cd that is probably slid past where it is supposed to go.  The computer doesn't note it is in there.  This happened once before and I used another cd to tap it into place, and then I could eject the cd.  It's a library music cd and nothing I've done to eject it, works.  The dvd drive is empty to the computer, even though I've tried to trick it by getting it to burn a cd or dvd.  It says insert disc.  Hope someone knows how to pop it into place or open the thing up to get access to the drive.  That cd is due! 

    power off your machine.  hold down your left mouse button.  power on your machine.  This should eject the cd.
    Eject cd
    Here is a web page on twelve ways to eject the cd.
    http://www.osxfaq.com/dailytips/01-2003/01-16.ws
    You indicate you are running on a g5, but 10.6 doesn't run on on a G5.
    On a PowerPC-based Macintosh (but not an Intel-based Macintosh), you may use Open Firmware to eject a CD or DVD disc when normal methods for ejecting it have not succeeded.
    Immediately after the startup sound, press and hold the key combination Command-Option-o-f. Enter commands:
    eject cd
    mac-boot
    http://docs.info.apple.com/article.html?artnum=106752

  • HT1430 My iPhone 4 will not power on.  When connected to iTunes it shows battery at 100%.  Pressing and holding the sleep/wake button does nothing; just a black screen.

    My iPhone 4 will not power on.  When connected to iTunes via my computer, it is recognized and shows fully charged battery.  Pressing and holding the sleep/wake button does nothing; just a black screen.  Any suggestions?

    Only way is to bring it to the Apple Store and use the warranty if it hasn't expired

  • How do I delete apps in os5? I press and hold the icon and they all begin to shake but the little x does not appear allowing me to delete.

    How do I delete apps in os5? I press and hold the icon and they all begin to shake but the little x does not appear allowing me to delete.

    You can't delete any of the Apple built-in apps e.g. Music, App Store, Game Centre etc. If you don't get the 'x' on any of the apps that you've downloaded then check that Settings > General > Restrictions > Deleting Apps isn't set 'off'

  • HT1310 when i starst my mac i get a flashing folder with a question mark. i tried rebooting and holding the option button then i get 2 boxes, one with a refresh arrow and one with a forward arrow neither of them seem to do anything. now what

    when i starst my mac i get a flashing folder with a question mark. i tried rebooting and holding the option button then i get 2 boxes, one with a refresh arrow and one with a forward arrow neither of them seem to do anything. now what

    Here is an article that describes what it is supposed to do:
    Startup Manager: How to select a startup volume
    If no Volumes are shown, it is telling you there are no potentailly bootable Volumes attached. That means your boot drive has died or the bootable image on it is unrecognizable.
    What Mac Pro ? by year, GHz, number of processors, screen size?
    What Mac OS X ?

  • Call C# method from javascript in WebView and retrieve the return value

    The issue I am facing is the following :
    I want to call a C# method from the javascript in my WebView and get the result of this call in my javascript.
    In an WPF Desktop application, it would not be an issue because a WebBrowser
    (the equivalent of a webView) has a property ObjectForScripting to which we can assign a C# object containg the methods we want to call from the javascript.
    In an Windows Store Application, it is slightly different because the WebView
    only contains an event ScriptNotify to which we can subscribe like in the example below :
    void MainPage_Loaded(object sender, RoutedEventArgs e)
    this.webView.ScriptNotify += webView_ScriptNotify;
    When the event ScriptNotify is raised by calling window.external.notify(parameter), the method webView_ScriptNotify is called with the parameter sent by the javascript :
    function CallCSharp() {
    var returnValue;
    window.external.notify(parameter);
    return returnValue;
    private async void webView_ScriptNotify(object sender, NotifyEventArgs e)
    var parameter = e.Value;
    var result = DoSomerthing(parameter);
    The issue is that the javascript only raise the event and doesn't wait for a return value or even for the end of the execution of webView_ScriptNotify().
    A solution to this issue would be call a javascript function from the webView_ScriptNotify() to store the return value in a variable in the javascript and retrieve it after.
    private async void webView_ScriptNotify(object sender, NotifyEventArgs e)
    var parameter = e.Value;
    var result = ReturnResult();
    await this.webView.InvokeScriptAsync("CSharpCallResult", new string[] { result });
    var result;
    function CallCSharp() {
    window.external.notify(parameter);
    return result;
    function CSharpCallResult(parameter){
    result = parameter;
    However this does not work correctly because the call to the CSharpResult function from the C# happens after the javascript has finished to execute the CallCSharp function. Indeed the
    window.external.notify does not wait for the C# to finish to execute.
    Do you have any solution to solve this issue ? It is quite strange that in a Window Store App it is not possible to get the return value of a call to a C# method from the javascript whereas it is not an issue in a WPF application.

    I am not very familiar with the completion pattern and I could not find many things about it on Google, what is the principle? Unfortunately your solution of splitting my JS function does not work in my case. In my example my  CallCSharp
    function is called by another function which provides the parameter and needs the return value to directly use it. This function which called
    CallCSharp will always execute before an InvokeScriptAsync call a second function. Furthermore, the content of my WebView is used in a cross platforms context so actually my
    CallCSharp function more look like the code below.
    function CallCSharp() {
    if (isAndroid()) {
    //mechanism to call C# method from js in Android
    //return the result of call to C# method
    } else if (isWindowsStoreApp()) {
    window.external.notify(parameter);
    // should return the result of call to C# method
    } else {
    In android, the mechanism in the webView allows to return the value of the call to a C# method, in a WPF application also. But I can't figure why for a Windows Store App we don't have this possibility.

  • Read two CSV files and remove the duplicate values within them.

    Hi,
    I want to read two CSV files(which contains more than 100 rows and 100 columns) and remove the duplicate values within that two files and merge all the unique values and display it as a single file.
    Can anyone help me out.
    Thanks in advance.

    kirthi wrote:
    Can you help me....Yeah, I've just finished... Here's a skeleton of my solution.
    The first thing I think you should do is write a line-parser which splits your input data up into fields, and test it.
    Then fill out the below parse method, and test it with that debugPrint method.
    Then go to work on the print method.
    I can help a bit along the way, but if you want to do this then you have to do it yourself. I'm not going to do it for you.
    Cheers. Keith.
    package forums.kirthi;
    import java.util.*;
    import java.io.PrintStream;
    import java.io.BufferedReader;
    import java.io.FileReader;
    import java.io.IOException;
    import krc.utilz.io.ParseException;
    import krc.utilz.io.Filez.LineParser;
    import krc.utilz.io.Filez.CsvLineParser;
    public class DistinctColumnValuesFromCsvFiles
      public static void main(String[] args) {
        if (args.length==0) args = new String[] {"input1.csv", "input2.csv"};
        try {
          // data is a Map of ColumnNames to Sets-Of-Values
          Map<String,Set<String>> data = new HashMap<String,Set<String>>();
          // add the contents of each file to the data
          for ( String filename : args ) {
            data.putAll(parse(filename));
          // print the data to output.csv
          print(data);
        } catch (Exception e) {
          e.printStackTrace();
      private static Map<String,Set<String>> parse(String filename) throws IOException, ParseException {
        BufferedReader reader = null;
        try {
          reader = new BufferedReader(new FileReader(filename));
          CsvLineParser.squeeze = true; // field.trim().replaceAll("\\s+"," ")
          LineParser<String[]> parser = new CsvLineParser();
          int lineNumber = 1;
          // 1. read the column names (first line of file) into a List
          // 2. read the column values (subsequent lines of file) into a List of Set's of String's
          // 3. build a Map of columnName --> columnValues and return it
        } finally {
          if(reader!=null)reader.close();
      private static void debugPrint(Map<String,Set<String>> data) {
        for ( Map.Entry<String,Set<String>> entry : data.entrySet() ) {
          System.out.println("DEBUG: "+entry.getKey()+" "+Arrays.toString(entry.getValue().toArray(new String[0])));
      private static void print(Map<String,Set<String>> data) {
        // 1. get the column names from the table.
        // 2. create a List of List's of String's called matrix; logically [COL][ROW]
        // 3. print the column names and add the List<String> for this col to the matrix
        // 4. print the matrix by inerating columns and then rows
    }

  • Changing the predefined sap logo and whats the px value for font size

    Hi,
    I am  unable to remove a Sap logo on ajax fwk: masthead . I want to replace my logo with that sap logo .
    but when i  try to set url to logo to that image .it doesn' change.
    Help me to resolve the problem
    and whats the px value for font size more than 10

    Hi,
    The URL to set logo  should work when you edit it in the correct theme. Usually cache issues prevent us from seeing the desired result. By Clearing cache your issue should get resolved. Otherwise if need be you can edit the com.sap.portal.navigation.masthead par file and define the manner in which you want your logo to be displayed in the masthead. Download the par file and open it in NWDS. Search for "logo" keyword you will find it. Edit the current image and upload the PAR file again. 
    Regards
    Anand Sekar

  • Got a black screen on the iPod Touch 4th Generation. Tried restoring it and holding the lock and hold buttons but this didnt work. Do i need a brand new screen?

    Got a black screen on the iPod Touch 4th Generation. Tried restoring it and holding the lock and hold buttons but this didnt work. Do i need a brand new screen?

    If you successfully restored to factory settings/new iPod via iTunes (Not via Settings>General>Reset>Erase all Content and Setting) and still have the problem that indicates a hardware problem. Could be the screen or something else.
    Make an appointment at the Genius Bar of an Apple store..
    Apple Retail Store - Genius Bar

  • I used to be able to get ö by pressing and holding the o key.

    Maverick version OS X 10.9.4 (13E28)
    Up until this morning, 16 Sept, on any word processor (Pages, Word for Mac, PlainText, Notes) I could access European alternatives to each of the vowels of the alphabet by pressing and holding the letter key.
    Now all I get is a repeat of the letter.
    The question is: how do I return to the pre Sept 16 situation?

    Thank you all for your responses.
    I am most definitely the non-technical user compared to you guys. I’m never going to be in the position of responding with confidence to anyone requesting help in this forums; you folk may therefore have this information at your finger-tips.
    One of the best features of mac os x that I discovered only purchasing the iMac in 2013 was feature that by pressing and holding down a letter key a list of alternative language options appears. This feature disappeared on Sept 16. At the same time the outcomes of pressing and holding a combination of keys (most used Shift + Down Arrow) or a single key also disappeared. The most obvious of the single key outcomes was the continuous movement of the cursor along a line when Left or Right arrow was pressed and held down.
    Initially, the replacement outcome was if I pressed and held a letter key I simply got multiple repetitions of the same letter. Not finding my problem in the support forums I posed the initial problem.
    While this solved the problems of multiple repetitions it did not solve anything else.
    I finally sought help from Apple Support Chat over a 36 hour period.
    1st senior supervisor & 1st Solution
    2nd senior supervisor confirms 2nd solution (and confirms if 2nd solution does not work there is a 3rd solution).
    These two senior supervisors were intrigued by the problem and both shared the same view of problem and the same solution.
    PROBLEM - there is no location within Mavericks OS X that enables anyone to either switch-on or switch-off the outcomes of pressing and holding a key or a combination of keys. Consequently there is no easy quick fix.
    Since neither senior supervisor had, previously, been faced with this particular problem they could only project ideas for causes, software incompatibility or a serious hardware problem, which could only be fully resolved by returning my iMac to Apple ReSeller (3rd solution). Having no desire to entrust my iMac to the slightly dubious Estonian postal service, doing this would require two return journeys (taking and collecting 10 days later) involving 4x6 hours of motorway driving plus a 4x3 hour ferry and costs in excess of €350.
    SOLUTION - 3 were suggested to be tried in sequence if the first did not work. Reinstall Mavericks using instructions found at http://support.apple.com/kb/ph13871; (ii) Erase and Install Mavericks using instructions found at http://support.apple.com/kb/PH14243 and (iii) return to Reseller.
    As had no effect, I attempted (ii) which involved a lot of hassle, but has returned all the functions of the keys.
    The downside is that I still don’t know what caused the problem. The only app I downloaded to the iMac on the September 15th was a Garmin Fitness app. “Once bitten twice shy” I shall download the Garmin Fitness app to my Airbook and will keep you folks informed…….

Maybe you are looking for

  • Image logo not displayed in the signature in mail

    hi, I have a problem which is very very urgent to solve. I setup an account in the application namely mail in the mac system (imac) I am having. The signature I setup contains the text as well as a logo (image). When I send mails from that mac to oth

  • Query in jsp

    Hi, I am an employee of megasoft ltd Designated as Project Trainee working on Jakarta Struts. While developing an application, I have encountered with an error while running a jsp file in a struts application. I have a folder called struts_example pl

  • Change order type based on sold to party

    Hi all, Is there any user exit to change the order type based on Sold to party. Eg: if any user select some sold to party during sales order creation then using sold to party the order type is changed. Any suggestions welcome. Regards,

  • Pages documents layout changes from Tiger to Leopard

    Hello, Last month I finally upgraded from Mac OS X 10.4.11 to 10.5.6. I am still using Pages 3.0.3, but now I find the documents I created in Tiger, when opened in Leopard, have very different page breaks. Was there a font that changed that could cau

  • Using a camera with mac book

    How do I: Use a camera to record a business site and then view the recording with my Mc Book Pro? The Mac Book would not necessarily be continuously connected to the camera. Thanks