The most effective way to the U16-> U32 Array pack for DMA data transfer?

I have a RT controller who wants to send data to an FPGA using DMA.  In LabVIEW 8.2, I have no choice but to switch to the low blocks of data however U32 my my input data is an array of U16.  This leaves me two choices: 1) wire U16 table directly into the DMA node that will be rude to U32 but I lose 16 bit * #of table 2) Pack the U16 elements in a U32 table before sending it to the bottom.    I have #2 and I have a method that works (and seems to be quite effective) but I have the feeling that I'm doing the hard (or roundabout way).   Is their a simpler (but equally effective) way to do this procedure?  Thank you

Here's a solution that swaps the bytes and key elements the same. There are several ways to do so.

(for efficiency, you can place the table 'remodel' inside a case structure then, it happens only if necessary)

Tags: NI Software

Similar Questions

  • The most effective way to log data and read simultaneously (DAQmx, PDM) high data rates

    Hello
     
    I want to acquire the data of several Modules cDAQ using several chassis to
    high data rates (100 k samples per second if possible). Let's say the measurement time is 10 minutes and we got a large number of channels (40 for example). The measured data is written to a PDM file. I guess, the memory or the HARD disk speed is the limits. For the user, there must be a possibility to view the selection of channels in a graph during the measurement.

    My question: what is the best and most effective way to save and read data at the same time?

    First of all, I use an architecture of producer-consumer and I don't want to write and display the data in the same loop. I expect two possibilities:

    [1] to use the 'DAQmx configure logging.vi' with the operation 'journal and read' to write the data to a PDM file. To display the data in a second loop, I would create a DVR samples documented and 'sent' the DVR for the second loop, where the data will be displayed in a graph (data value reference). This method has the disadvantage that the data of all channels is copied into memory. Correct me if I'm wrong.

    [2] use 'DAQmx configure logging.vi', but only with the "journal" operation to write the data to a PDM file. To view the selected data, I had read a number of samples of the TDMS file in the second loop (I'm currently writing the TDMS file). In this case, I have only one copy data from the selected channels (not), but there will be more HARD drive accesses necessary.

    What is the most effective and efficient solution in this case?

    Are there ways to connect and read data with high frequencies of sampling?

    Thank you for your help.

    You say that the measurement time is 10 minutes. If you have 40 channels and you enjoy all CHs at 100 kHz, it is quite a number of values.

    In this case, I always try to approach under the conditions of use. If a measure is only 10 minutes, I just connect all PDM data and create a graphic module that could be in the same loop of consumers where connect you the data. You can always work on the raw data files big offline afterwards, the extraction of all the information you need (have a look at the product called NI DIAdem: http://www.ni.com/diadem/)

    The main issue is that the user needs to see in the graph (or perhaps a chart can be useful too). Lets say that the graph is 1024 pixels wide. It makes no sense to show multiple data to 1024 points, Yes? Every second will produce you 100 data points k per channel. What is the useful information, which should see your username? It depends on the application. In similar cases, I usually use some kind of data reduction method: I use a moving average (Point by point Mean.VI for example) with a size of the interval of 100. This way you get 100 data points of 1000 per channel every second. If you feed your graph every second with these average values, it will be able to data points in 1024 of the store (as a default) by channel (curve), which is a little more than 10 minutes, so that the user will see the entire measurement.

    So it depends on the frequency at which you send data to the consumer. For example, collect you values 1024 by iteration of the producer and send it to the consumer. Here you can make a normal means calc or a bearing (according to your needs) and he draw a graphic. This way your chart will display only the values of the last 10 seconds...

    Once I programmed some kind of module where I use a chart and not a graph, and the user can specify the interval of the absolute timestamp that is traced. If the data size is larger than the size of the chart in pixels, the module performs an average calculation in order to reduce the number of data points. Of course, if you need to see the raw data, you can specify an interval that is small. It all depends on how you program zoom functions, etc... In my case I hade a rate of 1 Hz, so I just kept all data in RAM limiting the berries to keep 24 hours of data, so that technicians could monitor the system. In your case, given the enormous amount of data, only a file read/write approach can work, if you really need access to all of the RAW data on the fly. But I hope that the values of working capital means will be enough?

  • The most effective way to retrieve a number of virtual machines in an org?

    Hi all, what is the most effective way to retrieve a MV of County in an org. I am currently recovering all CDV in an org, then all the vApps, then all of the virtual machines and pushing them into a table, then do a vms.length on the table filled by all virtual machines.

    It takes a horrible time, and there MUST be a better way.

    Open to any suggestion. Thank you

    Good, as administrator of the organization then: (I have not tried as a normal user account)

    var vdcs = new Array();
    var orgVMCount = 0;
    var vcdHost = org.getHost();
    
    var queryService = vcdHost.getQueryService();
    var expression = new VclExpression(VclQueryOrgVdcField.ORGNAME, org.name, VclExpressionType.EQUALS);
    var filter = new VclFilter(expression);
    var params = new VclQueryParams();
    params.setFilter(filter);
    
    var resultSet = queryService.queryRecords(VclQueryRecordType.ORGVDC,params);
    while (resultSet != null) {
    
        var records = resultSet.getRecords(new VclQueryResultOrgVdcRecord);
        for each (var record in records) {
            var vdcVMCount = getVdcVMCount(record.href, vcdHost);
            System.log("VDC "+record.name+" VM Count: "+vdcVMCount);
        }
        orgVMCount += vdcVMCount;
        resultSet = resultSet.getNextPage();
    }
    System.log("Total Organization VM Count: "+ orgVMCount);
    
    function getVdcVMCount(vdcHref, host){
        var vmCount = 0;
    
        var qs = host.getQueryService();
        var exp = new VclExpression(VclQueryVMField.VDC, vdcHref, VclExpressionType.EQUALS);
        var exp2 = new VclExpression(VclQueryVMField.ISVAPPTEMPLATE, false, VclExpressionType.EQUALS);
        var exps = new Array(exp,exp2);
    
        var expFilter = new VclFilter(exps,VclFilterType.AND);
        var queryParams = new VclQueryParams();
        var vmArray = new Array();
        queryParams.setFilter(expFilter);
        var rs = qs.queryRecords(VclQueryRecordType.VM,queryParams);
        while (rs != null){
            var vmRecords = rs.getRecords(new VclQueryResultVMRecord);
            vmCount += vmRecords.length;
            rs = rs.getNextPage();
        }
        return vmCount;
    }
    

    It takes a little more code because the ".ORG" field is not available for the non-Admin queryVMField, but the. VDC IS, so we start by retrieving the TDC for the Org, then for each one, ask the number of vm for VDC.

    Post edited by: Burke - had accidentally initialization of orgVMCount as new Array(); -changed second line to 'var orgVMCount = 0;

  • The most effective way to browse the similar named fields?

    Hello

    I have a 5-page document on every page that contains appx. 50 similarly named fields.    For example Viol1Num, Viol2Num, Vio3Num...  Viol50Num.

    I'm looking for an effective way to program a loop to watch each field in Javascript, I can do some manipulations in these areas on what the user has entered.

    In FormCalc, I've used the 'foreach' function similar to:

    foreach (Field1, Field2, Field3 Field50)

    "BLAH".

    ENDFOR

    However, who gets really long especially when it comes to the following pages, where I have to start adding "topmostSubform.Page2." in front of each domain name so that I can access it from the first page, all fields on the following pages.  Also, I need to do it in Javascript, no FormCalc.

    For example, in JS, I use this loop to mark all fields read-only:

    
    
    
        
    for (var nPageCount = 0; nPageCount < xfa.host.numPages; nPageCount++) {
    
    
       
    
     var oFields = xfa.layout.pageContent(nPageCount, "field");
    
    
       
    
     var nNodesLength = oFields.length;
    
    
       
    
     for (var nNodeCount = 0; nNodeCount < nNodesLength; nNodeCount++) {
    
    
       
    
    
     oFields.item(nNodeCount).access = "readOnly";
    
    
       
    
     }
    
    
       
     }
    
    
    
    

    How could I do something similar to that for I can browse each field and perform actions on it without having to list every single domain name?

    I tried to change to watch the fields instead of field properties, but I couldn't run.

    Thank you.

    I solved my problem.   It took a few fighting in javascript using xfa.resolveNode.

    I have 5 pages, each consisting of a series of 60 fields named Viol1Num, Viol2Num, Viol3Num... Viol60Num.

    If when the javascript is executed, it detects an empty field, then insert a '3' in it.

    Here it is the javascript code that runs to the second page of this document.

       While (LoopCounter< 61)="" {="">
       If ((LoopCounter! = 21) & (LoopCounter! = 22)) {}
       If ((xfa.resolveNode("topmostSubform.Page2.Viol"_+_LoopCounter_+_"Num").rawValue == null) |) ((xfa.resolveNode("topmostSubform.Page2.Viol"_+_LoopCounter_+_"Num").rawValue == "")) {
       xfa.resolveNode("topmostSubform.Page2.Viol"_+_LoopCounter_+_"Num").rawValue = 3;
       }
       }
       LoopCounter = LoopCounter + 1
       }
  • The most effective way to import data from Excel in InDesign?

    Hi all

    I'm designing for a prospectus of college which includes 400 + courses list. For the moment, these lists exist as a huge Excel sheet with fields such as course type, course code, description, etc.

    I am familiar with Excel data import in InDesign and the tables/creation of table styles and other formatting, but the problem I have is that the data are in several columns by courses in the Excel worksheet, but will be in a single column per course with several lines in the InDesign document. I can't find a way to easily convert these columns in lines.

    Someone can help me with an effective way to get the data in the page layout without laborious copying and pasting or formatting?

    Thanks in advance!

    Hello

    In excellent paste / transpose

  • most effective way to retrieve the channel number

    Hello guys,.

    I use this Regexp to extract numbers in a string, and I doubt that there is a more effective way to achieve this:
     SELECT  regexp_replace (regexp_replace ( REGEXp_REPLACE ('  !@#$%^&*()_+= '' + 00 SDFKA 324 000 8702 234 |  " ' , '[[:punct:]]',''), '[[:space:]]',''), '[[:alpha:]]','')  FROM dual
    {code}
    
    Is there a more efficient way to get this done ?
    
    Regards,
    Fateh                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                

    Hello

    Using regular expressions, you can remove everything that is not a number by saying:

    REGEXP_REPLACE ( str
                , '[^[:digit]]'
                )     
    

    When ^ is the first character inside the brackets, it means "everything except the following.

  • The most effective way to store lines

    DB version: 10gRel2 and 11G


    If I want to keep a single column as structure, I would like to use associative arrays for performance reasons. Who is the most effective method to store a multicolumn line?


    You guys are using something like this
    DECLARE
      type v_emprec_array is table of emp%rowtype INDEX BY BINARY_INTEGER;
      v_emprec v_emprec_array;
    BEGIN
      select * bulk collect into v_emprec from emp where empno=7369;
    or this
     declare
      TYPE rec_UpdateEmp IS RECORD
               (
              Inpt_emp_id         t_InptId,
              Stat_Code               gt_StatCode,
              Tms_Proc                pa_TmsProc,
              Tms_Po_Flag             pa_TmsPoFlag,
              Sngl_Unit_Flag          pa_SnglUnitFlag,
              Pkt_Profile_Id          gt_ProfileId,
              Pkt_Type                pa_PktType,
              host_inpt_id            pa_HostInptId
              );
              
          rec                         rec_UpdateEmp;
      

    Ref Cursor is a better option

    create or replace procedure emp_dtls
    (
     p_sal number,
     p_result out sys_refcursor
    )
    as
    begin
     open p_result for
      select ename,sal from emp where sal>p_sal;
    end;
    /
    
    SQL> var myvar refcursor
    SQL> exec emp_dtls(2000,:myvar);
    
    PL/SQL procedure successfully completed.
    
    SQL> print myvar
    
    ENAME             SAL
    ---------- ----------
    JONES            2975
    BLAKE            2850
    CLARK            2450
    SCOTT            3000
    KING             5000
    FORD             3000
    ADAMS            7654
    
  • The most effective way to create a rendering iPad3

    Hello

    I published three issues in my app now, in which case the last two had made for the iPad3. Both times I followed the same steps, but I find them to be a unnescessarily bit of time, so I wonder if there are faster ways to achieve this.

    Here's my way of doing it;

    1. I have a folio entirely converted in 768 x 1024. The entire development process is done on iPad2 with images of 144dpi.

    2. it's all over, and I'm ready to duplicate the entire folio in 1536 x 2048.

    3. in inDesign, I create a new folio, with the same name and the details (but with 1536 x 2048)

    4. I have an appointment online for the producer of Folio, click on my way to the new empty folio and click 'Add '.

    -This is my main question. Is it possible to add many/all articles at once? As I do, is to add one and a single article in time, and it becomes very painful and long.

    5. After all the items are added, apparently fine, but I can't publish the folio. It gives me an error, indicating that the folio contains a content in the wrong resolution.

    6. I go to inDesign and update of each article. (even once, would take a long time)

    7 folio rendering is finished and ready to publish.

    Is there a better way to do this? Advice would be greatly appreciated.

    Eddie

    Do not use Add. Use the import multiple items ordered... and that's where a sidecar.xml file is very important.

    Bob

  • The most effective way to import text ('tag' or 'style' pre-text?)

    Once again, my apologies to all the good people here who are so useful that I shows ignorance about the FrameMaker product.

    Always in collaboration with FrameMaker 9, still working on an old background of PageMaker (and print background before that).

    I remember being able to import the tag pre or pre style plain text in PageMaker.  For example, I could put in something the equivalent of a bunch of text that looks like this:

    [body] Lorem ipsum... bibbibity bobbity dooo...

    [subtitle] Presentations to the delicious taste

    [body] More fun text

    And then import this text in PageMaker is pick up these defined styles and make the material much faster import process.

    Is there a way to do the same to that of FrameMaker 9?

    Please feel free to direct me to materials that are in the line/manuals help, but please note that I am following in the paths of a person who used to work and find the manuals and other materials for the software I have * absolutely * know was purchased (I was a systems administrator and know the staff in charge of) (, so I know it was bought and installed using a systems administrator no user has rights to install on their system of my work here) can be which is not simple.

    Thanks in advance

    Oh, a thought here suite.  If something like the above is possible, is it also possible to do the same with materials in the tables?  In other words, can I pre-define the components of a table and see FrameMaker 9 import these materials and create a table for me "automatically"?

    Once again, thank you

    Barry,

    You can use a text editor such as Notepad and the markup of the content in XML format. If this tag is compatible with your ESD, then you can import it into your FrameMaker document for copy or reference and he enrolled in full.

    Tables are a bit more complicated, because you need also some read/write rules to tell FrameMaker which part of the marked-up content is an object table. You can find the details in "DEVELOPING STRUCTURED APPLICATIONS WITHvADOBE® FRAMEMAKER® 9 ' which is supplied with the FrameMaker application.

    Good luck

    Van

  • Query SQL with multiple tables - what is the most effective way?

    Hello I learn PL/SQL. I have a simple procedure, where I need to find the number of employees and departments by location according to location_id user input.

    I have 3 Tables:

    LOCATIONS
    Location_id (pk)
    location_name
    ...
    DEPARTMENTS
    department_id (pk)
    Location_id (fk)
    department_name
    ....
    EMPLOYEES
    employee_id (pk)
    department_id (fk)
    Employee_Name
    ....

    1 location can have 0 - SEVERAL departments
    1 employee has 1 Department

    Here's the query I come up with for PL/SQL procedure:

    / * Ecount, Dcount are variable NUMBERS * /.

    SELECT SUM (EmployeeCount), COUNT (DepartmentNumber)
    IN Ecount, Dcount
    Of
    (SELECT COUNT (employee_id) EmployeeCount, department_id DepartmentNumber
    Employees
    GROUP BY department_id
    HAVING department_id IN
    (SELECT department_id
    Ministries
    WHERE location_id = userInput));

    I get the correct result, but I wonder if my query is on the right track and if there is a more "efficient" method to do so.
    Thanks in advance for help a beginner.

    Hello

    Welcome to the forum!

    Something like this will be more effective:

    SELECT    COUNT (employee_id)               AS ECount
    ,       COUNT (DISTINCT department_id)     AS DCount
    FROM       employees
    WHERE       department_id IN (     SELECT     department_id
                        FROM      departments
                        WHERE      location_id = :userInput
                      )
    ;
    

    You should also try a join instead of the IN subquery.

    For efficiency, do only the things you need to do.
    For example, you need not a number of employees in each Department, in order to not calculate one. This means that you will not need the notice online, so do not have.
    You needn't PL/SQL for this work, so don't use PL/SQL, if you do not have to (I know this question was out of context, then you may have good reasons to do this in PL/SQL.)

    Perform all the filtering as soon as possible. Do not waste it effort on the things that will not be used.
    An example of this is: never use a HAVING clause when you can use a WHERE clause. What is the difference between a WHERE clause and a HAVING clause? The WHERE clause is applied until the aggregate functions are calculated and the HAVING clause is applied after; There is no other difference. Therefore, if the HAVING clause is not reference an aggregate function, it could be done in a WHERE clause instead.

  • How to choose the maximum number of items for DMA FIFO to the R series FPGA

    Greetings!

    I'm working on a project with card PCIe-7842R-R series FPGA of NOR. I use to achieve the fast data transfer target-to-host DMA FIFO. And to minimize overhead costs, I would make the size of the FIFO as large as possible. According to the manual, 7842R a 1728 KB (216KO) integrated block of RAM, 108 000 I16 FIFOs items available in theory (1 728 000 / 16). However the FPGA had compilation error when I asked this amount of items. I checked the manual and searched online but could not find the reason. Can someone please explain? And in general, what is the maximum size of the FIFO given the size of the block of RAM?

    Thank you!

    Hey iron_curtain,

    You are right that the movement of large blocks of data can lead to a more efficient use of the bus, but it certainly isn't the most important factor here. Assuming of course that the FIFO on the FPGA is large enough to avoid overflowing, I expect the dominant factor to the size of reading on the host. In general, larger and reads as follows on the host drive to improve throughput, up to the speed of the bus. This is because as FIFO. Read is a relatively expensive operation software, so it is advantageous to fewer calls for the same amount of data.

    Note that your call to the FIFO. Read the largest host buffer should be. Depending on your application, you may be several times larger than the size of reading. You can set the size of the buffer with the FIFO. Configure the node.

    http://zone.NI.com/reference/en-XX/help/371599H-01/lvfpgaconcepts/fpga_dma_how_it_works/ explains the different buffers involved. It is important to note that the DMA engine moves data asynchronously read/write on the host nodes and FPGAs.

    Let me know if you have any questions about all of this.

    Sebastian

  • Where is the windows 7 language pack for UK English

    I'll implement the group policy for location specfic UK.

    I find the settings for the US only

    checked online can find all language packs except UK!

    It's a joke.

    http://msdn.Microsoft.com/en-us/goglobal/ee461121.aspx
    For example, the English language pack contains the recognition engines of two speeches, one for English and one for British English

    Where can I find the British English language pack Windows 7?
    http://answers.Yahoo.com/question/index?QID=20100207170104AA4Eh56

    JS
    http://www.PAGESTART.com

    Never be afraid to ask. This forum has some of the best people in the world to help.

  • How can I increase the space put into service for a data store in vSphere

    Using vSphere client 4.0.0 (208111) and vCenter Server 4.0.0 (162856)

    I have a 850 GB data store set up that shows only 525 GB configured.  My users are bumping into the ceiling and I need to give them more space.  I can't find a setting that allows me to do this.  What are my options here?

    Thank you

    How many Virtual Machines on your ESXi host? What is the size of the virtual disk to a virtual machine that has the problem? You can change the size of the disk in editing parameters for the virtual machine with problems?

  • The most effective way to insert form data into multiple tables and w/autonum

    Hi all, this is my first post here. I am new to APEX and PL/SQL. I have ColdFusion and SQL, and I'm used to perform CRUD operations in my CF Tags application files. From what I've read so far, so if this is accurate, it seems that it is more efficient to perform most of the CRUD operations on the database side, I hope that for advice on the best way to accomplish what I ask - even if I'm trying to do is better off in my new APEX application I am open to this information as well.

    I have a form whose data must reside in two tables. Table A is a one-to-one relationship table and stores General information for each request. Table B is a table of one-to-many observations and should store unique records for each type of comment entered on the form, of which there are 3 comment fields on the form, I'd end up with 3 disks in table B for 1 in table A. I am generating an AutoNumber for table A with a sequence and relaxation. I want to do is take the AutoNumber I just created and use it for insertion in the Table B each insertion I have to do. This is where I am stuck.

    I would like to comment on 1) where I should put all these operations and 2) how best to go about what I want to do coding. In ColdFusion, it is as simple as inserting the record in Table A, immediately asking to table A more recent recording and storing (auto) ID in a variable and then using this var for any other table insertions, I had to do. I know it must be at least a little easier in the Oracle world, I just need a nudge in the right direction. Thank you!

    OraclePledge,

    You're pretty close to not having worked with oracle a lot.

    This section is backwards:

    insert into sch.tbl_main(cust_lname,cust_fname,acct_num)
    values(:P3_CUST_LNAME,:P3_CUST_FNAME,:P3_ACCT_NUM);
    
    select "SCH"."TBL_MAIN_SEQ".currval
          into
          v_ID
          from dual;
    

    Even if it will work if you only have a single user, it's a potential bug with two or more users. First select the key (if it's first use nextval rather than currval) can use it in the insert statement.

    See you soon,.
    Janet Tyson

    Published by: Tyson Janet on June 23, 2011 10:48

  • What is the most effective way to bring up the 1 of 4 images at any time?

    Thanks for reading this.  I have the same exact image need to attend different places in my program.  Right now, I created a movieclip with the image and I pasted in my step 4 different times and given to each instance a different instance name.  I would make a more effective program if I changed the location in the script of the video and has said the Stop program on a different image for each image, I need?

    What I'm trying to do, is to have a user to select from 4 different options and if they choose option 1, for example, the image of LED for option 1 light up and the other 3 lights will be off.  So, right now, if they choose option 1 I put ownership .visible to false for the other 3 images.  Is there a better way?

    The visible property control is very good.  If there is no need to show three of four, and they are identical in all cases, it may be better to simply have an and control its position.

Maybe you are looking for