How to make my program faster?

I have a program which produces two elements array. In normally the program ends in microseconds, however when I organize my program to send the array as a data to DAQ.mx write and the array will be the voltage output from my NI USB-6012 DAQ, my program ens in 40 seconds. How can I make my program faster? Is there any solution?
I have attached the normal program and with DAQ.vis.
Attachments:
step step 1.vi ‏15 KB
step step 2.vi ‏34 KB

Program 1 runs 5 times and program 2 runs 41 times per loop. the total number of inner iterations is 25 vs. 1681 for a 67x difference.
Program 1 and program 2 have no timing information, thus spin at a undefined rate.
Program 2 does single point hardware IO and also has no timing information. The speed will depend on the hardware.
Running at a hardware dependent rate is not a good idea in general, because the speed will vary with every change in hardware and is not deterministic. You don't even know what occurs first at each iteration: the input or the output.
If speed is important, what you should do is use an improved variation (Yes, use FOR loops and ramps!) of program 1 to generate the final data array, then do a single "Nchan,Nsamp" IO, running input and output synchronized hardware timed off the same clock. This way you can select any acquisition speed up the the maximum supported by your DAQ hardware. It will be fast and at an exactly defined rate as it should be!
Try it!
I am not familiar with your hardware: USB-6012. can you give a link to the product page?
LabVIEW Champion . Do more with less code and in less time .

Similar Messages

  • How to make slow reports fast?

    Hi all,
    How to make slow reports fast? What could be the various reasons and optimizations/solutions?
    Thanks,
    Charles.
    ++++++++++++++++++++++++++++++

    Its an on going process. Couple of steps you will have to follow: Did you perform any SQL trace ..?
            Did you perform any ABAP trace...?
            How much business data these reports are processing.Is there a possibility you can do some changes.
    SQL Trace ( SAP in built tool) will give you a fair idea about each and every SQL statements in your report. And you can anlyze bad ones. And also propse optimized SQL or
    index if needed.
    ABAP Trace(SAP in bulit tool), you can find out amount of ABAP run time thats being elapsed by each and individual abap module.
    Also the amount of business data is every  important. While designing the report alogorithm this is very important factor.

  • How to make my program forcefully errror

    hi 2 all
    how to make my program forcefully error out even i have to get data
    regards
    siva

    Hi Mate,
    Just remove the quries which you execute
    Thanks
    Kash
    www.mkashu.blogspot.com

  • How to make labview program to get average value of 200 reading from multimeter (by using loop)

    Hello
    How to make labview program to get average value of 200 reading from multimeter (I using using loop) to read voltage from mulmeter  but I like to get average value of all of 200 reding how can I do that?
    Thanks
    Wee
    Solved!
    Go to Solution.

    Another idea with less programming - take advantage of the "free" array that comes with a Chart - i.e. the  History Data.
    1) Wire your DMM data to a Chart. (You can set the chart to invisible if you don't plan on using it in the GUI).
    2) Set the Chart History Length to 200 (right click on the chart, click on Chart History Length...)
    3) On the block diagram, use the History Data Property Node, wire it to Mean.vi, and you're done.
    Easiest running average ever.
    Message Edited by Broken Arrow on 04-07-2010 11:36 AM
    Richard
    Attachments:
    EasyAvg.jpg ‏8 KB

  • How to make a program for backgroung processing used servlet

    how to make a program for backgroung processing used servlet

    well i need the coding part written in servlet ,in which servlet is always ready for accepting a client request.

  • How to make my program case - in sensitive?

    Hi,
    Iam writing a SELECT query in report for retrieving the address number by giving address details like street, city and post code.But my program is case sensitive such that if the user inputs either in Upper Case or Lower Case, it will not work.
    For eg: suppose the city is Cape Town. If the user inputs like CAPE TOWN or cape town ( via Selection Screen ), then it won't work.
    How can i  make my program case- in sensitive?? please suggest..

    This is possible. I have done something similar to it in my search programs.
    For this we need to make a subroutine. In this subroutine we first need to convert the case into upper case using
    TRANSLATE string TO UPPER CASE.
    then prefix and postfix this string with &,
    _and if this does not work then we have to break the srting entered by the user on basis of spaces and prefix and postfix it with &. _
    Now pass this string to the query and it will definitely get the result.

  • How to make the search faster  in a table ?

    hi ,
    i have got a table wich has one field as a primary key , and this table got 500000 records in it
    wich i try to pop up the (LOV)  it takes about one minute to be retreived
    i dodnt know how to make it faster ?
    could anyone help me how to make faster ?
    and what index should i put on this table ?

    thanks for your help
    and here is the the
    CREATE TABLE MOBWORKSHOP.MOBWSH_GUARANTY
      GRNTY_NO          VARCHAR2(10 BYTE),
      I_CODE            VARCHAR2(30 BYTE),
      SERIAL_NO         VARCHAR2(30 BYTE)           NOT NULL,
      GRNTY_START_DATE  DATE,
      GRNTY_EXPIR_DATE  DATE,
      GRNTY_VALIDTY     NUMBER(1),
      CAUSE_ID          VARCHAR2(10 BYTE),
      NOTE              VARCHAR2(60 BYTE),
      AD_U_ID           NUMBER(5)                   NOT NULL,
      AD_DATE           DATE                        NOT NULL,
      UP_U_ID           NUMBER(5),
      UP_DATE           DATE,
      BRN_NO            NUMBER(6)                   NOT NULL,
      BRN_YEAR          NUMBER(4)
    TABLESPACE MOBWRKSHPTRANS
    PCTUSED    0
    PCTFREE    10
    INITRANS   1
    MAXTRANS   255
    STORAGE    (
                INITIAL          64K
                MINEXTENTS       1
                MAXEXTENTS       UNLIMITED
                PCTINCREASE      0
                BUFFER_POOL      DEFAULT
    LOGGING
    NOCOMPRESS
    NOCACHE
    NOPARALLEL
    MONITORING;
    CREATE UNIQUE INDEX MOBWORKSHOP.MOBWSH_GUARANTY_PK ON MOBWORKSHOP.MOBWSH_GUARANTY
    (GRNTY_NO)
    LOGGING
    TABLESPACE INDX_TRANS_MOBWRKSHP
    PCTFREE    10
    INITRANS   2
    MAXTRANS   255
    STORAGE    (
                INITIAL          64K
                MINEXTENTS       1
                MAXEXTENTS       UNLIMITED
                PCTINCREASE      0
                BUFFER_POOL      DEFAULT
    NOPARALLEL;
    ALTER TABLE MOBWORKSHOP.MOBWSH_GUARANTY ADD (
      CONSTRAINT MOBWSH_GUARANTY_PK
    PRIMARY KEY
    (GRNTY_NO)
        USING INDEX
        TABLESPACE INDX_TRANS_MOBWRKSHP
        PCTFREE    10
        INITRANS   2
        MAXTRANS   255
        STORAGE    (
                    INITIAL          64K
                    MINEXTENTS       1
                    MAXEXTENTS       UNLIMITED
                    PCTINCREASE      0
    ALTER TABLE MOBWORKSHOP.MOBWSH_GUARANTY ADD (
      CONSTRAINT MOBWSH_QRNTY_I_CODE_FK
    FOREIGN KEY (I_CODE)
    REFERENCES MOBWORKSHOP.ITEM_DETAILS (I_CODE),
      CONSTRAINT MOBWSH_CANCEL_CAUS_FK
    FOREIGN KEY (CAUSE_ID)
    REFERENCES MOBWORKSHOP.GUARANTY_CANCEL_CAUSES (CAUSE_ID));
    i made  a button to show  (LOV) and when i press the putton it take about one minute to view the LOV

  • How to make download spped fast?

    Having problem with download speed. We rented a movie and itunes estimates over 1000 min. We had 100mb/sec connection. How we can make the download faster?

    Its an on going process. Couple of steps you will have to follow: Did you perform any SQL trace ..?
            Did you perform any ABAP trace...?
            How much business data these reports are processing.Is there a possibility you can do some changes.
    SQL Trace ( SAP in built tool) will give you a fair idea about each and every SQL statements in your report. And you can anlyze bad ones. And also propse optimized SQL or
    index if needed.
    ABAP Trace(SAP in bulit tool), you can find out amount of ABAP run time thats being elapsed by each and individual abap module.
    Also the amount of business data is every  important. While designing the report alogorithm this is very important factor.

  • Help on how to make a program on Calendar of the year

    I'm new to java programming.
    Our teacher assigned me to make a program for a calendar of the year.
    I'm confused on what to do. Could you give me some tips on how to
    make a successful calendar of the year program?
    What shall I study first to create an output like this....?
    The program should run like this!!!!
    Enter the year from 1990 to year 2050.
    Enter the month of the year entered.
    Then displays the calendar.
    Ex.
    SEPTEMBER 2002
    Sun Mon Tue Wed Thu Fri Sat
    1 2 3 4 5 6 7
    8 9 10 11 12 13 14
    15 16 17 18 19 20 21
    22 23 24 25 26 27 28
    29 30
    Hoping that you would reply.
    Thank you very much!!!

    Don't want to do your homework. You should think about how you might do it yourself first.
    However, the class java.util.Calendar will be useful to you. Read up on that in the API docs.

  • How to make materialized view fast refresh parallel

    We have Oracle 11.2.0.1 on Redhat 5.2. We use a dozen of fast refresh materialized views in our application.
    From time to time MV refresh takes longer time than the refresh interval.
    One of way to improve performance of MV refresh is to make the refresh parallel, e.g. http://www.dba-oracle.com/t_materialized_views_refreshing_performance.htm
    - Use parallel DML - Oracle author Michael Armstrong Smith notes "I've done parallel materialized view refreshing
    on tables recently and improved the load times considerably. Rather than having one load which took 2 hours,
    I run 4 parallel loads, one for each partition. The length of time for the whole process is now determined by
    how long the biggest partition takes to load. In my case, this is 40 minutes, with two 30 minute loads and one
    20 minute load.  Overall I am saving 1 hour 20 minutes. I can now add further partitions and do the same thing.
    My only limitation is the parallel loads because I don't have unlimited processing power.
    {code} My master tables are not partitioned, but think parallel will still better than non-parallel.
    Now the question, how to make refresh parallel. According to the paragraph cited above, Use parallel DML appears doing the job. Can someone  confirm that.
    We use {code}
    alter materialied view MV_OFFENSE parallel REFRESH FAST start with sysdate next sysdate+ 1/24;
    {code}to schedule refresh. Does the parallel clause here parallels query the MV or refresh the MV?
    Any other way to make MV refresh parallel?
    Thanks                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Doc http://download.oracle.com/docs/cd/E11882_01/server.112/e16579/refresh.htm#i1006319 says:
    >
    In a data warehousing environment, assuming that the materialized view has a parallel clause, the following sequence of steps is recommended:
    1.
    Bulk load into the fact table
    2.
    Enable parallel DML
    3.
    An ALTER SESSION ENABLE PARALLEL DML statement
    4.
    Refresh the materialized view

  • How to make a program for rebooting linux kernal

    i'am using fedora core 2. i want to make a program for rebooting the kernal locally.

    nkay, how about:
    sudo reboot

  • How to make a program restart at the click of the mouse or a key on....

    How would I make a program restart at the click of the mouse or a key on the keyboard?

    Yes, definitely, thats what I would want to happen but I'm not sure how to go about the coding. Would I have to use a key listener? Or would I have to construct the method from scratch?

  • Does Anybody Know how to make Safari 3 Faster?

    Does Anybody Know how to make Safari 3 a little bit faster for WIndows?

    Come on does anybody know plzz?

  • How TO Make my program executable?

    please list steps to make my program executable jar ??
    please write steps from 0 ot the end?
    thank u

    jar cvfm MyJar.jar MyManifest.txt -C . *.javawhere do you type that? I tried in a command console
    but it didnt work...Make sure jar.exe is in your path.
    and what do u mean by com.acme.MyMainClass? do I have to put the com.acme?No, you would replace it with the fully qualified name of your own class of course. You are allowed to use your own brains too.

  • How to make a program that will ask for a name the first time the program is used and if is not the first time will not ask the name?

    I want to make a program that will ask for the ID of the testing machine the first time the program is running, then will never ask for it. I'm using Labview 6.0

    Hi
    There are a Couple of methods you can use for this.
    Method 1 -
    You can create an ini file and save a boolean Key "First Instance" as True. Now In your Program you read this Key, If it is True then you can show your ID Dialog VI.If False do not run the VI. At the Conclusion of Id Dialog you can update this registry enrty to False. So In effect you have created One time Event. In fact you can save ID as another Config entry.
    The Drawback and advantage is that such an INI file can be edited by someone moderately knowledgeable about the Program
    Method 2
    Use Unitialized Shift Register in A while Loop. Please see LV2 style Globals entry under this forum. You can read and write to this Variable and it retains the Value it last had within it.
    You can read
    this Global the Very first time and say if it true you display your ID Vi. If False you dont. When you display your ID Vi you can Update your Global Like Before.
    If you need Example Let me Know.
    Good Luck
    Mache!!
    Good Luck!
    Mache

Maybe you are looking for

  • How to sync two computers to a iPhone 4

    I have two computers. In my home computer (iTunes) I have all my music.  In my office computer I have Outlook and all contacts, notes and tasks.  How do I sync both contents to my iPhone 4?

  • ABAP dump coming at the time of displaying error message.

    Hi to all I have written a code in user exit . At the time of saving ABAP dump is coming instead of showing error message. Error analysis     The program attempted to issue a " " message during "Exit Command" processing. This is an illegal operation.

  • Importing "24p Cinema" footage from Canon AVCHD camera ?

    Hi all, I have bought a CANON HFS10 Vixia AVCHD camera, I`ve made some footage using the "24p cinema" mode. When using media browser in PPCS5 and importing it, it still indicates (like in CS4) under "properties", that the footage is "29.97 fps", as C

  • Merging of same records in columns while printing

    Dear All, Kindly let me know how to merge same records in a column while printing. I used ALV_GRID_DISPLAY and merged using sort in LIST but not able to get the same while printing. Regards, Karthik

  • 404 Error when running a servlet!

    hello everyone I have written a simple servlet that prints hello world. I have saved it in : c:\program fles\apache tomcat 4.0\webapps\myapps\ web-inf\classes\oz\TestServlet.java I call it from the browser : http://zaf:8080/myapps/web-inf/classes/oz/