Most efficient way to extract the amplitude of a signal and display on an intensity graph

Hi All,
I am having difficulty to display the amplitude of an voltage signal (voltage picked up by NI DAQ card).
what I am trying: Voltage signal (Dynamic data type)--> 2D array of dynamic data type (using 2 nested for loops) --> normal 2D array with scalar values --> intensity graph
I have difficulty to convert the dynamic 2D array to scalar 2D arry.
I only want to extract the amplitude of the imcoming signal.. any body can give some advice? thanks in advance..
Charlie

Hi Hillary,
Thanks for your reply.
Yes, I did tried to use Amplitude and Levels Express vi, it should be the one I am looking for, but I found it not work in my case, I need to put the value of amplitudes into a 2D array.
If I use Amplitude and Levels Express vi, it will give me a 3D array, I have found the solution, just convert the dynamic data to single scalar. (see pic attached)
Anybody can help me to solve the following 2 problems:
1. The speed of this program is too low, i think ii due to the DAQ assistant in the 2 for loops (for creating 2D array), it should be able to re-write using DAQmx (as "centerbolt" told me), I am working on this now, if anybody can help, I will appreciate that.
2. Is there any other way to creat the 2D array (for purpose of increasing speed also).
Thanks,
Charlie

Similar Messages

  • Most efficient way to return the totalcount along with pagewise data [via pagenumber/pagesize as input]

    I have following query to return the page data
    declare @pageSize INT = Null
    ,@pageNumber INT = Null
    declare @totalcount int
    set @pageSize =15
    set @pageNumber = 1
    select *
    from (SELECT ROW_NUMBER()
    OVER(
    ORDER BY dbo.coordinator_event.CoordinatorId) AS RowNumberForPaging
    ,dbo.coordinator_event.EventId
    ,dbo.coordinator_event.NumberOfParticipantAllowed
    ,dbo.coordinator_event.RegistrationClosingDate
    ,dbo.coordinator_event.CoordinatorId
    ,dbo.royalevents_royalevent.title_en AS EventTitleEnglish
    ,dbo.royalevents_royalevent.StartDateTime
    ,Count(dbo.event_attendee_registration.FullName) ParticipantRegistration
    , COUNT(*) OVER(PARTITION BY 1) as TotalRows
    FROM dbo.coordinator_event
    inner JOIN dbo.royalevents_royalevent
    ON dbo.coordinator_event.EventId = dbo.royalevents_royalevent.base_id
    left JOIN dbo.event_attendee_registration
    ON dbo.coordinator_event.CoordinatorId = dbo.event_attendee_registration.CoordinatorId
    and royalevents_royalevent.base_id = event_attendee_registration.EventId
    where coordinator_event.CoordinatorId = 3
    group by dbo.coordinator_event.EventId
    ,dbo.coordinator_event.NumberOfParticipantAllowed
    ,dbo.coordinator_event.RegistrationClosingDate
    ,dbo.coordinator_event.CoordinatorId
    ,dbo.royalevents_royalevent.title_en
    ,dbo.royalevents_royalevent.StartDateTime
    ) MyTable
    WHERE RowNumberForPaging >= ( ( ( @pageSize * @pageNumber ) - @pageSize ) + 1 )
    AND RowNumberForPaging <= ( @pageSize * @pageNumber )
    ORDER BY CoordinatorId
    I want's two thing with it. One thing is about how i can easily return @totalcount as separate parameter instead of part of the result set and secondly if there is a way i can optimize above row_number query to achieve paging
    Kamran Shahid Application Developer (MCP,MCAD,MCSD.NET,MCTS,MCPD.net[web])

    What is your SQL Server version?
    I think there is no way to get the count except for using temp table, e.g.
    select *
    INTO #TempResults
    from (SELECT ROW_NUMBER()
    OVER(
    ORDER BY dbo.coordinator_event.CoordinatorId) AS RowNumberForPaging
    ,dbo.coordinator_event.EventId
    ,dbo.coordinator_event.NumberOfParticipantAllowed
    ,dbo.coordinator_event.RegistrationClosingDate
    ,dbo.coordinator_event.CoordinatorId
    ,dbo.royalevents_royalevent.title_en AS EventTitleEnglish
    ,dbo.royalevents_royalevent.StartDateTime
    ,Count(dbo.event_attendee_registration.FullName) ParticipantRegistration
    , COUNT(*) OVER(PARTITION BY 1) as TotalRows
    FROM dbo.coordinator_event
    inner JOIN dbo.royalevents_royalevent
    ON dbo.coordinator_event.EventId = dbo.royalevents_royalevent.base_id
    left JOIN dbo.event_attendee_registration
    ON dbo.coordinator_event.CoordinatorId = dbo.event_attendee_registration.CoordinatorId
    and royalevents_royalevent.base_id = event_attendee_registration.EventId
    where coordinator_event.CoordinatorId = 3
    group by dbo.coordinator_event.EventId
    ,dbo.coordinator_event.NumberOfParticipantAllowed
    ,dbo.coordinator_event.RegistrationClosingDate
    ,dbo.coordinator_event.CoordinatorId
    ,dbo.royalevents_royalevent.title_en
    ,dbo.royalevents_royalevent.StartDateTime
    ) MyTable
    WHERE RowNumberForPaging >= ( ( ( @pageSize * @pageNumber ) - @pageSize ) + 1 )
    AND RowNumberForPaging <= ( @pageSize * @pageNumber )
    select @TotalCount = TotalRows from #TempResult
    SELECT .. FROM #TempResult
    ORDER BY CoordinatorId
    See also this very recent article about the subject you ask:
    Paging
    a Query with SQL Server
    For every expert, there is an equal and opposite expert. - Becker's Law
    My blog
    My TechNet articles

  • What is the most efficient way of passing large amounts of data through several subVIs?

    I am acquiring data at a rate of once every 30mS. This data is sorted into clusters with relevant information being grouped together. These clusters are then added to a queue. I have a cluster of queue references to keep track of all the queues. I pass this cluster around to the various sub VIs where I dequeue the data. Is this the most efficient way of moving the data around? I could also use "Obtain Queue" and the queue name to create the reference whenever I need it.
    Or would it be more efficient to create one large cluster which I pass around? Then I can use unbundle by index to pick off the values I need. This large cluster can have all the values individually or it co
    uld be composed of the previously mentioned clusters (ie. a large cluster of clusters).

    > I am acquiring data at a rate of once every 30mS. This data is sorted
    > into clusters with relevant information being grouped together. These
    > clusters are then added to a queue. I have a cluster of queue
    > references to keep track of all the queues. I pass this cluster
    > around to the various sub VIs where I dequeue the data. Is this the
    > most efficient way of moving the data around? I could also use
    > "Obtain Queue" and the queue name to create the reference whenever I
    > need it.
    > Or would it be more efficient to create one large cluster which I pass
    > around? Then I can use unbundle by index to pick off the values I
    > need. This large cluster can have all the values individually or it
    > could be composed of the previously mentioned clusters (i
    e. a large
    > cluster of clusters).
    It sounds pretty good the way you have it. In general, you want to sort
    these into groups that make sense to you. Then if there is a
    performance problem, you can arrange them so that it is a bit better for
    the computer, but lets face it, our performance counts too. Anyway,
    this generally means a smallish number of groups with a reasonable
    number of references or objects in them. If you need to group them into
    one to pass somewhere, bundle the clusters together and unbundle them on
    the other side to minimize the connectors needed. Since the references
    are four bytes, you don't need to worry about the performance of moving
    these around anyway.
    Greg McKaskle

  • I am giving my old MacBook Air to my granddaughter.  What is the most efficient way to erase all the data on it?

    I am giving my old MacBook Air to my granddaughter.  What is the most efficient way to erase the data?

    You have two options.....
    One is to do a clean reinstall of your OS - if you still have the USB installer that came with your Macbook Air...
    The second option is to create a new user (your granddaugher's name).....Deauthorize your Macbook Air from your Itunes and Appstore.....
    Restart your Macbook after you've created your granddaughter's user name, login under your granddaughter's username and delete your username.
    Search your Macbook for your old files and delete them.....
    Good luck...

  • Most efficient way to get document names?

    I was wondering what is the most efficient way to get the document names in a container? Use the built in 'name' index somehow, or is there an 'efficient' XPath/XQuery?
    We've been using the XPath /* which is fine with small instances, but causes a java heap out of member error on large XML instances i.e. /* gets everything which is not ideal when all we want are document names.
    Thx in advance,
    Ant

    Hi Antony,
    Here is an example for retrieving the document names on c++:
    void doQuery(XmlContainer &container,
    XmlQueryContext &context,
    const std::string &XPath)
    XmlResults results(container.queryWithXPath(0, XPath, &context));
    // Iterate through the result set as is normal
    XmlDocument theDocument;
    while(results.next(theDocument))
    std::cout << "Found document named: "
    << theDocument.getName() << std::endl;
    Regards,
    Bogdan Coman

  • [11g] most efficient way to calculate size of xmltype type column

    I need to check the current size of some xmltype column in a BIU trigger.
    I don't think it's good to use
      length(:new.xml_data.GetStringVal());
    or
      dbms_lob.GetLength(:new.xml_data.GetClobVal());
    What's the most efficient way to get the storage size?
    I don't need the string serialized size.
    It could also be the internal storage size (incl. administration data overhead).
    - thanks!
    regards,
    Frank

    > May I ask for what reason you need to know it?
    I need to handle very large XML document output, which currently hits the internal xmltype limitation of 4GByte, when aggregating XML document fragments for this.
    > You'll get a relevant answer if you give us relevant information :
    > - exact db version
    SELECT * FROM PRODUCT_COMPONENT_VERSION;
    product
    version
    status
    1
    NLSRTL
    11.2.0.3.0
    Production
    2
    Oracle Database 11g Enterprise Edition
    11.2.0.3.0
    64bit Production
    3
    PL/SQL
    11.2.0.3.0
    Production
    4
    TNS for Linux:
    11.2.0.3.0
    Production
    > - DDL of your table
    > XML stored as XMLType datatype can use different storage models, depending on the version.
    I don't use dedicated storage clause.
    But i am hitting the problem already for aggregation into some xmltype variable in PL/SQL
    - BEFORE writing back to a result table.
    Can i avoid such problems, when writing to a table DIRECTLY w/o intermediate xmltype PL/SQL variable
    - depending on the storage clause?
    The reason why asking how to get the size of some xmltype (in table column and/or in PL/SQL variable) is, that i am thinking of a threshold detection.
    In case threshold is reached: outsource XML fragment so far to some separate CLOB storage, and insert a smaller meta-information reference representing that in the output document.
    Finally leave up to the client system to use <xs:include> (or alike) to construct the complete document.
    rgds,
    Frank

  • What is the best, most efficient way to read a .xls File and create a pipe-delimited .csv File?

    What is the best and most efficient way to read a .xls File and create a pipe-delimited .csv File?
    Thanks in advance for your review and am hopeful for a reply.
    ITBobbyP85

    You should have no trouble doing this in SSIS. Simply add a data flow with connection managers to an existing .xls file (excel connection manager) and a new .csv file (flat file). Add a source to the xls and destination to the csv, and set the destination
    csv parameter "delay validation" to true. Use an expression to define the name of the new .csv file.
    In the flat file connection manager, set the column delimiter to the pipe character.

  • The most efficient way to search a large String

    Hi All,
    2 Quick Questions
    QUESTION 1:
    I have about 50 String keywords -- I would like to use to search a big String object (between 300-3000 characters)
    Is the most efficient way to search it for my keywords like this ?
    if(myBigString.indexOf("string1")!=1 || myBigString.indexOf("string2")!=1 || myBigString.indexOf("string1")!=1 and so on for 50 strings.)
    System.out.println("it was found");
    QUESTION 2:
    Can someone help me out with a regular expression search of phone number in the format NNN-NNN-NNNN
    I would like it to return all instances of that pattern found on the page .
    I have done regular expressions, in javascript in vbscript but I have never done regular expressions in java.
    Thanks

    Answer 2:
    If you have the option of using Java 1.4, have a look at the new regular expressions library... whose package name I forget :-/ There have been articles published on it, both at JavaWorld and IBM's developerWorks.
    If you can't use Java 1.4, have a look at the jakarta regular expression projects, of which I think there are two (ORO and Perl-like, off the top of my head)
    http://jakarta.apache.org/
    Answer 1:
    If you have n search terms, and are searching through a string of length l (the haystack, as in looking for a needle in a haystack), then searching for each term in turn will take time O(n*l). In particular, it will take longer the more terms you add (in a linear fashion, assuming the haystack stays the same length)
    If this is sufficient, then do it! The simplest solution is (almost) always the easiest to maintain.
    An alternative is to create a finite state machine that defines the search terms (Or multiple parallel finite state machines would probably be easier). You can then loop over the haystack string a single time to find every search term at once. Such an algorithm will take O(n*k) time to construct the finite state information (given an average search term length of k), and then O(l) for the search. For a large number of search terms, or a very large search string, this method will be faster than the naive method.
    One example of a state-search for strings is the Boyer-Moore algorithm.
    http://www-igm.univ-mlv.fr/~lecroq/string/tunedbm.html
    Regards, and have fun,
    -Troy

  • What's the most efficient way to serve a file from a servlet?

    I have a servlet that does various different things depending on the needs. Sometimes it dynamically generates content, and sometimes all it does is send a file out, with no alteration.
    What is the most efficient way to just send a file?
    One option:
    OutputStream os = response.getOutputStream();
    InputStream is = new FileInputStream(...)
    (send all the bytes from is to os, the regular way using a buffer)Another option is to say:
    RequestDispatcher rd = response.getRequestDispatcher(fileName);
    rd.forward();Any other options? What's the prefered way of doing this?
    I know the rule of "don't optimize too early" but this is a situation where we need to get the maximum amount of files served with the hardware we have, and it's going to be a lot of static files, so efficiency is important.
    Thanks

    Ok, that's what I thought. It would be nice if there were a "response.sendStream(InputStream input)" method in the ServletResponse class. Even nicer would be a sendFile or sendChannel or something. This is probably a common usage and it's a place where the container has many opportunities for optimization. For example, it could call the operating systems send_file kernel call so the entire transfer would be done directly from the disk controller to the ether card (on systems that support that).
    For now I'll just do my own buffered copy.

  • What is the most efficient way to compare two Lists?

    List A{itemId,itemName} [1,xyz] [9,iyk] [4,iuo] .......
    List B{itemId,item price} [2,999] [9,888] [1, 444].......
    Assume A will be a much larger list than B
    I am trying to find all the items with same itemiId. what would be the most efficient way to do that?
    Thanks!

    Tinkerbell. wrote:
    BigDaddyLoveHandles wrote:
    You wrote:
    Can we assume that an itemId only occurs once in each list? You're the one making claims and assumptions, not me.No in #4 I asked the OP to verify an assumption.An assumption that couldn't possibly be true. Why are you wasting our time?

  • What is the most efficient way to have full access to the front panel on RT Labview?

    I have a RT machine that needs to do its job and also port the front panel to an external machine over the network. What is the most efficient way to do it? Using as little of the RT time as possible but providing full functionality to the RT front panel.
    So far I have been using it directly from Labview - running the VI on a remote (RT) and have the front panel on local Labview (WINDOWS). I know I can do it with also through WWW (not very happy with that though).
    LV2009 SP1.
    Thanks

    Running a compiled executable on the RT target, rather than running it within the development environment, is probably slightly more efficient but limits you to the web interface.  If you're running within the LabVIEW environment, I doubt there's a noticeable difference in efficiency from the RT perspective between the web server and the LabVIEW front panel, although that's mostly a guess (I would expect the RT system to send identical data in each case, once the front panel is loaded).  Those are your only options in modern LabVIEW versions.  In LabVIEW 7.1 you could build an executable that acted as the front panel for an RT system, but that feature does not exist in recent versions.  However, a quick search turned up this document with code to approximately duplicate that behavior, perhaps it will work for you?

  • What is the most efficient way to convert a static site to a responsive site using Dreamweaver?

    I need to convert an old site made in Dreamweaver to be responsive to any monitor size. What is the most efficient way to do this?

    Depending on what you have to work with and how it was coded, it might be doable and then again not.  Suffice it to say, there are no magic buttons that will do this for you. Also consider that mobile & tablet users interact differently with their web devices. So your navigation & forms must be finger friendly.  Also images & content must make mobile users happy without killing their dataplans.  There's a lot of planning that goes into making a good Responsive Web site.
    Nancy O.

  • What is the most efficient way to turn an array of 16 bit unsigned integers into an ASCII string such that...?

    What is the most efficient way to turn a one dimensional array of 16 bit unsigned integers into an ASCII string such that the low byte of the integer is first, then the high byte, then two bytes of hex "00" (that is to say, two null characters in a row)?
    My method seems somewhat ad hoc. I take the number, split it, then interleave it with 2 arrays of 4095 bytes. Easy enough, but it depends on all of these files being exactly 16380 bytes, which theoretically they should be.
    The size of the array is known. However, if it were not, what would be the best method?
    (And yes, I am trying to read in a file format from another program)

    My method:
    Attachments:
    word_array_to_weird_string.vi ‏18 KB

  • What is the most efficient way to post several stories to multiple html pages

    What is the most efficient way to post five stories to multiple html pages?
    Currently they are all html files saved in DW with some divs sharing content and other divs are unique.
    I've experimented with saving stories as library items and dropping into other html but wondered if there is a more efficient or dynamic process.

    Server-Side Includes.
    http://forums.adobe.com/message/2112460#2112460
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb

  • Moving content from iMovie to iMovie - what's the most efficient way?

    If I edit and create movies in iMovie08 on one iMac and I want to transfer the content to iMovie08 another iMac 200 miles away , what's the most efficient way? I prefer not to burn DVDs, because I want to do further work on the movies on the second iMac's iMovie (so I can share them with iTunes and sync them with Apple TV).

    >PDPageAddCosContents(destPage, PDPageGetCosContents(srcPage));
    Does this method (PDPageGetCosContent) exist? It would be easy enough
    to create, but I don't see it in the document.
    More seriously, I have a vague memory that it is a Really Bad Thing to
    share the same Contents objects between multiple pages. Maybe
    something to do with page deletion, can't remember.
    >PDPageAddCosResource(destPage, PDPageGetCosResources(srcPage));
    These two methods are not symmetric, and PDPageAddCosResource doesn't
    work that way, sadly...
    Aandi Inston

Maybe you are looking for

  • Need help reinstailling windows 8 to windows 7

    hello i need help really bad ihave a satellite C655D-S5200 and i just instailled windows 8 and i dont like it and want to go back to windows 7 but i tryed everything and it just keep saying that there is no windows 7 on my computer. So what do i do t

  • Solutions for previewing HDV via video monitors ?

    I have recently been given the task of setting up a video editing suite combining: FCP6 HVR-1500 decks Panasonic BT-LH1700WE LCD video monitors FX7E HDV cameras I've read that it is not possible to preview HDV via firewire and this seems to be the ca

  • Help to create a SQL query

    I have one query which is giving me employee details like job, name organizaiton. Also there is one custom table in which I am updating one flag like attribute20 to 'Y' depending upon some condition. Now I want to make a query like it show only recor

  • Firewall blocks some services when sharing internet connection

    Hello, I have some issues regarding internet sharing that I hope someone could successfully troubleshoot : 2 computer, iMac G5 2.0 and an original "17 PowerBook G4 1.0, both running 10.4.7. The iMac is connected to the internet via Ethernet and share

  • Solaris 10 TCP bug?

    I have a palm M505 with a wireless lan jacket. The networking was fine with solaris 7,8 and 9 but fails under Solaris 10. Every now and again the tcp packets seem to get stuck in a loop. see snoop log. any ideas (It's definately related to Sol 10 as