Count the # of time the instr excutes in 1 sec.

Dear all,
I am currently working on part of a sweeping carrier program and now I need to determine the # of samples generated in 1sec. I tried to connect a 1 sec elapsed timer to the loop condition of the while loop and also a indicator to monitor the n value of the count. The result I obtained is quite low (about 35377 samples/sec). I need more than 781250sample/sec as I need to feed into my AWG hardware later.
To basically monitor the # of sample generate per sec, I wonder if I had connect the timer and the indicator correctly. If my program in deep can only generate 35377 sample/sec, please advice me how I can modify my program to generate more that 781250 sample / sec.
I have attached my program as below.
For you info, I am using the following sets of parameter:
Sweep rate = 50
Upper limit of span = 200
Lower limit of span = -200
start frequency = 0
Thanks alot and please help.     
Zhi Hong
Message Edited by Zhi Hong on 07-16-2008 10:42 PM
Attachments:
Sweep rate and Span 52.vi ‏97 KB

I ran this on a fairly old machine and got about 8800 iterations.
I would recommend that you rewrite your VI so that the values are calculated using LabVIEW primitive math functions rather than using the Formula node.  I believe the Formula node is probably an order of magnitude slower.
You can probably simplify the code a bit.  The only difference between left and right cases is the choice of either addition or subtraction in the first line.  You could merge the two cases.  Just carry a boolean, or an integer of +1 or -1 in a shift register that you can multiply to the second half of that formula and add to the first half.
Also, if you can figure out how many samples you will be generating ahead of time, initialize an array of at least that large and use replace array subset in the loop rather than autoindexing at the tunnel.   This may save processor time as the arrays grow and are moved around in memory at the auto indexing tunnels.
Are these calculations that have to be done on a continual basis to feed the waveform generator?  Or will they be done once at the beginning, or occasionally during operation?  Is it really critical that hundreds of thousands of elements of an array are generated in less than a second?
Message Edited by Ravens Fan on 07-17-2008 12:25 AM

Similar Messages

  • Is there a way to count the number of times an array moves from positive to negative?

    I have an array of values, and I need to find the number of times that the array changes signs (from positive to negative, or vice versa). In other words from a graphical standpoint, how many times a certain line crosses the x-axis. Counting the number of times the array equals zero does not help however, because the array does not always equal exactly zero when it crosses the axis (ie, the points could move from .1 to -.1).
    Thanks for you help. Feel free to email me at [email protected] I only have lv 5.1.1 so if you attach any files, they cannot be version 6.0.

    Attached is a VI showing the # of Pos and Neg numbers in an array, with 0 considered as non-Pos. It is easily modifiable to other parameters - including using the X-axis value as your compare point versus only Zero.
    This is a modified VI from LV (Separate Array.vi)
    Compare this with your other responses to find the best fit.
    Doug
    Attachments:
    arraysizesposneg.vi ‏40 KB

  • Need to count the number of times the Basic Finish data chages

    HI Expertes,
    I have a requirement I need to count number of times the Basic finish date chaged for PM work order. I went throug our forums I got some info like using a standard function module
    CHANGEDOCUMENT_READ_HDRS_ONLY
    CHANGEDOCUMENT_READ_HEADERS
    CHANGEDOCUMENT_READ_POSITIONS
    But all the above function module will not be suitable for my requirement since  CHANGEDOCUMENT_READ_HDRS_ONLY it gives whole changes but my requirement is just need number of changes occurred in Basic Finish date but CHANGEDOCUMENT_READ_POSITIONS can give the filed number which has been changed but still I need change id.
    So kindly suggest me wether there is any other Standard FM to get number of changes occurred in Basic Finish date?
    Thanks,
    Rajesh

    Hi Debbie,
         To count the number of groups please try the folling steps:
    1) Create a formula @reset and place this formula in the page header
        whileprintingrecords;
        numbervar i:=0;
    2) Create another formula @evalgroup place this in the group header where you want to count the values.
        whileprintingrecords;
        numbervar i:= i+1;
    3) Create another formula @display and place this in report footer.
        whileprintingrecords;
        numbervar i;
    In order to display the count of details which are printing in the detail section place the eval formula in the detail section and the @display formula in the group footer.
    Hope this helps!!!
    Regards,
    Vinay

  • Find one character in a string and count the amount of times its found

    Hey SQL Forum experts.
    I have a string that is about 3000 characters long.
    I'm trying to search my string for the value '{'.
    Then I want to count how many times this value is found.
    How do I form the Oracle SQL to do this?

    Hi Colin,
    Try the following:
    SQL> var s varchar2(100)
    SQL>
    SQL> exec :s := 'Colin {{ Mackenzie {{{'
    PL/SQL procedure successfully completed.
    SQL> select length(:s) - length(replace(:s, '{')) Matches from dual;
       MATCHES
             5
    SQL> exec :s := 'I have a string that is about 3000 characters long'
    PL/SQL procedure successfully completed.
    SQL> select length(:s) - length(replace(:s, '{')) Matches from dual;
       MATCHES
             0Regards.

  • How can i count the times one TAG occurred in a XMLTYPE?

    hi all
    is there method i can use to count the times one specified TAG occurred in a XMLTYPE?
    i just konw the method getClobVal,existNode,extract,...
    but none seems can help this
    anyone can help me?

    i see
    i think i know how to use Xpath func
    but when i try the following statement on sqlplus( Release 9.2.0.4.0),it says :"the XPATH is not supportted"
    declare
    l_xml xmltype;
    num number;
    begin
    select XML_BODY into l_xml from KD_SHIMEN_SEISEI w where FILE='SMNDATA';
    --get value OK!
    num := xmltype.extract(l_xml,'/Tag1[1]/Tag2/text()').getNumberVal();
    --sum or count ,failed,Xpath not support?
    num := xmltype.extract(l_xml,'sum(/Tag1/Tag2/text())').getNumberVal();
                   DBMS_OUTPUT.PUT_LINE(num);
    end;
    can u explain this?

  • How do I count the number of times a particular year occurs in a range of dates?

    One column in my spreadsheet is a date and time.  I want to be able to count how many times a particular year occurs.
    Is there a way to combine the COUNTIFS and YEAR functions, or is there something easier to use?
    I'm using Numbers '09.
    Thank you for your assistance.

    You could use COUNTIFS with the two conditions being ">="&DATE(year, 1,1) and "<"&DATE(the next year, 1,1)

  • Count the number of times a character is in a string using pl/sql

    I need to count the number of times ":" appers in the string ":XXX:CCC:BBB:".
    I have sound some solution using SQL but I do not want the context switch.
    Also I am on 10g so I can not use REGEXP_COUNT.
    Any help would be great.

    Hi,
    length(REGEXP_REPLACE(':XXX:CCC:BBB:','[[:alnum:]]'))counts all kinds of punctuation, spaces, etc., not just colons. Change any (or all) of the colons to periods and it will still return 4. Use '[^:]' instead of '[[:alnum:]]' if you really want to count just colons.
    Also, "SELECT ... FROM dual" is usually needed only in SQL*Plus or similar front end tools. In PL/SQL, you can call functions without a query, like this:
    x := NVL (LENGTH (REGEXP_REPLACE (txt, '[^:]')), 0);

  • IPad 3 'usage' over 'time since last full charge' counting the time wrong

    Over the week i saw that my iPad 3 is counting the usage time wrong. It is supposed to be from 8-14 hours you know, from 100% to 0% or something like that, but it shows me the same time from being standby. Like right now it says it has been in standby for 1 day, and the usage says the same! I thought it was an app but i deleted all the opened apps and turned it off and on, then just left t there and it still copied the time. Please help?
    PS i have the latest software update - the one that came up a week go

    Over the week i saw that my iPad 3 is counting the usage time wrong. It is supposed to be from 8-14 hours you know, from 100% to 0% or something like that, but it shows me the same time from being standby. Like right now it says it has been in standby for 1 day, and the usage says the same! I thought it was an app but i deleted all the opened apps and turned it off and on, then just left t there and it still copied the time. Please help?
    PS i have the latest software update - the one that came up a week go

  • What is the simplest way to toggle the counter terminal when time has elapsed in the Complete PWM Example?

    I have successfully downloaded and executed this: http://www.ni.com/white-paper/2991/en
    and I know it works because I can see the pulse train on channel #1 on my osciloscope. 
    I have modified the sample code from the website to use pulse width and frequency knobs that may change dynamically:
    What I would like to do is toggle the "Dev1/ctr1" to "Dev1/ctr0" every 10 seconds.  I have investigated into the "Elapsed Time" express vi and I am able to successfully count the number of times the time has elapsed, however when 10 seconds have gone by I cannot simply update toggle input to "CO Pulse Freq" with a different counter input because it has already past that object and is busy running in the loop above.  How can I reset the pulse to execute with a different counter input?
    In short, the Elapsed Time express VI works perfectly by itself, but when the time has elapsed how do I force restarting the pulse train with "Dev1/ctr0"?
    Solved!
    Go to Solution.

    assuming you want to toggle control from 1 to 0 and back every ten secs and zeroing out the other channel...index the array to write values to one or the other channel.
    Spoiler (Highlight to read)
    note: if needed...use shift registers to hold onto the last freq/pulse width values for the last channel when toggling to the other. use 'n channel' for multiple counters, concatenate multiple channels on your counter constant
    Spoiler (Highlight to read)
    Attachments:
    toggle.vi ‏47 KB

  • Need  the query to calculate the time taken to excute it.

    hi all,
    i need the query to calculate the time taken to excute it.
    for ex:
    select * from emp;
    how much time it will take to give o/p
    Thanks in advance
    satya

    Just to add to what was said - the execution can each time be DIFFERENT as the factors that governs performance are NOT CONSTANT.
    If Oracle has no idea how long the query is going to take before executing it, then how can you and your code know?
    Oracle's CBO estimates the cost (expense) of the query. This is an indication of how expensive a query is - and the more expensive the query, the more resources need to be used, the longer the query will take. The less expensive the query, the fewer resources it need, the faster it will take.
    And that is it. How fast or how slow? Oracle does not know. How much faster a query with a cost of 10,000 versus a query with a cost of 1? Oracle does not know.
    Why? Because the platform is not constant. Just what data is at this exact moment in the db buffer cache? Just how much CPU capacity is available for the new few seconds? Just what will the sustained throughput be of the I/O subsystem and channels for the next minute? Just how many memory pages need to be swapped between cache and memory? Etc. etc.
    All these factors change every single second. So forget about attempting to accurately calculate up-front the time it will take for a query. IT IS NOT POSSIBLE.

  • Hey! On excel I want to count how many time a text come back in the spreadshit (sum) thx, hey! On excel I want to count how many time a text come back in the spreadshit (sum) thx

    Excel:
    line of cellule with 3 different text. I want to count have many time a text come in the line... Thx for helping me, it is for my job!!

    Hopefully I am understanding your question.
    A typical way to count how many times a word appears in a line of text in a cell is to substitute spaces for the word, one less space than the length of the word. Example:
    A1 has the string "brown red brown green"
    A2 =LEN(A1) - LEN(SUBSTITUTE(A1,"brown","    "))  
    "brown" has five letters so there are four spaces in the substitution text)
    If you want to do several cells at once, counting the total number of times the word appears, concatenate the cells with a space between them
    A1 and A2 have text in them
    A3 =LEN(A1&" "&A2) - LEN(SUBSTITUTE(A1&" "&A2,"brown","    "))

  • How to count how many times the caller calls by using UCCX script?

    Hi there,
    My customer wants to do a few changes for their script as below:
    At the beginning of the script they are planning to add a new menu item, it will announce their new privacy policies and to continue the user must press the number one to continue to the Welcome.  If they do not press 1 then the message should repeat itself and if they again do not press 1 they should be transferred over to a live operator who will explain things and then be able to transfer them back to the message so that they can press 1 and continue.
    I modified their script as attached file, but i don't know how to count how many times the caller calls in "Get Reporting Statistic".
    Any helps would be appreciated.
    Thanks.

    Hi Aaron,
    At beginning, i want to use a variable to get number of mistake for the same caller, then we will send the call to right place to fulfill the customers' needs. 
    Do you have any suggestion for the new posted script?
    Thanks.

  • The delay of "confirm member" payment had counted me 3 times

    Hello,somehow,the delay of "confirm member" payment had counted me 3 times which means i have received 3 Adobe Creative Cloud order confirmation payment .So, what can i do to cancel all of the orders?And can you please help me to cancel my membership?

    Hi There,
    Kindly contact our support team via:  http://helpx.adobe.com/in/contact.html?step=CCSN_adobe-id-signing-in_stillNeedHelp
    If you are unable to use chat option kindly try below mentioned steps.
    Try different browser.
    Delete cookies and cache
    If you are still not able to chat, Kindly reply with the below mentioned information.
    OS version:
    Browser Version:
    You can also try: http://helpx.adobe.com/x-productkb/global/phone-support-orders.html 
    Thanks,
    Atul Saini

  • Count the time that the output is active

    I have made a program with a state machine, but I have one problem. I don't know how I can count the time that the output is active. I have tried several things, but the timer doesnt do what I want. The one time it counts up, also when the output is not active, or it starts counting again (start at 0) everytime its active.
    Furthermore I have made a delay before the output is active and a delay when a other output is active. The first time it runs it works, but the next time it also doenst work. I think the source of this problem is the same as the one from the counter but I dont know for sure.
    Can anybody help me with this? See the attachment for my VI. The counter is in case "pump up 10".
    Attachments:
    Probeersel state machine2.vi ‏92 KB

    I have made a quick draft copy .You can further implement additional logic.
    Attachments:
    Probeersel state machine2.vi ‏43 KB
    States.ctl ‏5 KB

  • How to count " How many times the ' commit work ' Statement is executed.

    Hi all sap Champions,
    One of the client requirement, That is
    How to count " How many times the ' commit work ' Statement is executed.
    It's urgent.
    Please can anybody help me for this.
    Thanks
    Basu

    hi,
    when report try like this.
    declare a variable as
    data: counter type i value 0.
    COMMIT.
    counter = counter + 1.
    write:/10 counter 'NO. OF TIMES COMMIT WORKED'.

Maybe you are looking for

  • Are there any other internet/online channels for Vista media center?

    Hi, I was just wondering if there are any other internet/online channels I can get for Vista Media Center? I only have about 9 at the moment, and would like preferby free ones. I don't have satelite or cable tv so would like online ones, is there any

  • Screen Dump to printer

    For a 1280x1024 screen, I build (it takes up to 5 minutes each to build) a 1272x876 one-bit-per-pixel set of graphs on each BufferedImage and would like to print selected BufferedImages to my laser printer (which I believe prints at 600 dots per inch

  • ODS Object Help Please!!!!

    Hi, Im having the following problem. I have an ODS Object with 80 requests. All the data has been uploaded via excel csv files. Ive found that request no. 40 is incorrect and I cant delete it without deleting requests 41 through to 80. How can I :- 1

  • Strange compilation error...

    I have some java programes in a directory. Separetely all my files gets compiled properly. When i call any class of other file it returns error like bellow. IT WAS WORKING TILL YESTERDAY very well, but suddenly since today morning this is giving bell

  • Mail Stationery the te

    I tried to use the Mail Stationery to send a mail to a relative. All those templates look great but... I typed more text than possible and the template just gives me this sound that there are no more actions to do. That is annoying if you can only ty