[Urgent!!]How to control the running time??

Hi,
I'm an undergraduate researcher in the University of Michigan. I used NI labVIEW FPGA on my current project and now i meet a problem.
I have a labview code that has runs with 3 subroutines. they execute one after another for a given time period for each iteration of the entire code. that is i built them in a flat sequence structure inside a large while loop and each of the subroutine is a while loop with several subvi's in it. not that complicated but i have to specify how long each subroutine runs. now i have a problem to set that execution time. i don't know exactly what kind of timing function i shall use. i tried the "Elapsed time" function but that only works for the first iteration. from the second iteration on each subroutine only runs for once, instead of continuing to run until the given time elapsed. so i don't know how to correctly control the running time. It's reallly urgent, so could you please give me some suggestions about it? Thanks a million!!
Xiaofei

Thank you for your suggestion!
sorry but that this method won't help because my code is sort of difficult to put into a for loop .
the logic is like this: first the output is set to 0 for a user-defined amount of time (means no excitation). secondly it gets excitation and gets output but no data saving is allowed for a user-defined amount of time. at the same time, one paramater is automatically changed. (the reason for not saving data is that there is a transient response when the parameter changes). thirdly, data saving begins with the same
parameters as before, also for a user-defined amount of time. and then after these three steps one iteration is done. for iterations there is a different parameter, the user defines the range of the parameter and the number of different values in between and the code will do the increment at equal intervals automatically. my problem now is that i don't know how to correctly control the time. i have tried various ways but no one works.
the second problem is that i don't know how to let it run and not saving data and then saving data without changing everything else. what i have now is to call the same VI twice, once for only running and no data saving and the other for saving data. but then the problem is that in between these two routines, the output suddenly becomes zero and gets excited again after i call it.  My professor said that i cannot let the output become zero, otherwise there is no meaning in waiting for the excitation to become stablee. but then i don't know how to call a VI only once and let it do the saving for only the latter part of the running time. i have been working on this thing for two weeks now and still have no idea....Sorry the problem is long and tedious, but if anyone have any idea about it, please let me know, i will be most grateful. Thanks a million!!!

Similar Messages

  • How to control the looping time of the for loop in 10 microseconds in labview?

    I need to create a +/- 9 volt square wave with period of 20us using a D/A card (Not NI card). I can write command to the card using outport provide by Labview. Right now, I can generate square wave with 4ms period which is limited by the resolution of the wait until next ms icon I used inside the for loop. Could anyone tell me how to control the execution time of the for loop to about 10 us? Your help would be much appreciated.

    I'm not sure if this will hep, but this answer seems to answer this question
    http://exchange.ni.com/servlet/ProcessRequest?RHIVEID=101&RPAGEID=135&HOID=50650000000800000029410000&UCATEGORY_0=_30_%24_12_&UCATEGORY_S=0&USEARCHCONTEXT_QUESTION_0=microsecond+resolution+1ms&USEARCHCONTEXT_QUESTION_S=0

  • How to disable the run-time popup menu in the sequence display on TestStand Operator Interface, that allow the use to skip the test?

    How to disable the run-time popup menu in the sequence display on TestStand Operator Interface, that allow the use to skip the test?

    Hello,
                  Regarding the skip/force pass/force fail options, when I set the ControlExecFlow to True in Teststand 3.1 and 3.5, in the Sequence Editor the menu options for skip/force pass/force fail are not active for Technician but, when I launch the Operator Interface logged with Technician the options are active. The problem is that if the technician sets one step to one of these options, and change the user to Operator, the test step remains skip/force pass.
                  Is there any possibility without modifying the Operator Interface (at programming level), to reload default values of the steps when changing the user to Operator?
    Thank you,
    Best regards,
    paio

  • How to shorten the running time of NXT brick (TETRIX & MATRIX toolkit)

    Hi
    How to shorten the running time of NXT brick ?
    (TETRIX & MATRIX toolkit running time)
    Software is LabVIEW 2012 for LEGO MINDSTORMS
    Thanks.
    Solved!
    Go to Solution.
    Attachments:
    TETRIX_Toolkit_running_time.vi ‏20 KB
    MATRIX_Toolkit_running_time.vi ‏13 KB

    Hi 40123157,
    You are using the module in an appropriate way, and there is no easy way to improve the loop iteration time beyond what you have done. Here are my suggestions:
    1) i2c commands do take a long time. In your application, it may speed up if you only execute Move Motors only when the motor speed has changed.
    2) For this particular example, you are not using the output of Motor Status. If this VI doesn't need to execute it may be removed.
    3) If you must speed up execution beyond this, as an advanced user of LabVIEW, you can create a copy of the Move Motors VI and modify it as you choose. All you have to do for the 'DC Motors' input is use cluster to array on the cluster, as shown below. I think you can speed it up by executing all setup before the loop (set connection type and setup sensor), and removing calculate power value if you're only sending values between -100 and 100.  
    4) Drawing to the screen may be slowing you down here.

  • How to obtain the running time of a task?

    How to obtain the running time of a task? I want to write a program about task progress.
    My email: [email protected]
    Thanks!

    First, Thanks for your code.
    But, I want obtain running time before running it.
    Example:
    class a extends JFrame{
    a() {
    initComponent() ;
    new progressBar(this); // my fancy. (may be other type variant.)
    void initComponent() {
    class progressBar {
    JProgressBar proBar = null ;
    Timer taskTime = null ;
    Double longTime = null ;
    progressBar(JFrame frame) { //JFrame or other.
    longTime = // ??????? You know ?????
    void monitor() {
    taskTime = new Timer(1000, new ActionListener() {
    public void actionPerformed(ActionEvent event) {
    //repaint the proBar code.
    taskTime.start();
    }

  • How to control the sleep time exactly

    i have a thread that sleeps for 15 minutes and wakes up does some thing( send some mails ) and sleep. the problem i am facing is the thread is not running exactly in 15minutes intervals.
    EX:
    14:12:06
    ( no mails sent )
    14:27:06
    ( no mails sent )
    14:42:06
    ( sends some mails )
    14:57:29
    (no mails )
    15:12:29
    so that means whenever there is some processing to bo done (sendng mails ) it takes more than 15minutes.
    how to control this sleep time to exactly 15 minutes no matter what it does ?

    If you need exact time to elapse, you have two options:
    1. use util.Timer set at fixed intervals;
    2. mark current System.millis (I never remember exact terms) when sending starts and then adjust sleeptime every time you are going to send next mail. Here you can find info on this
    http://developer.java.sun.com/developer/Books/threads/
    Ch. 9 swing counter (note that it does not apply to swing only, it's just technique).

  • How to get the running time on the page

    Hello ,
    I want to display the running clock and the user who loggin in .
    Pls let me know how to get the running clock display and the username who log in.
    thakns
    kumar

    Hi,
    You can use javascript clock and substitution string APP_USER
    Place this to HTML region source
    <input type="text" id="clock" /><span>&APP_USER.</span>
    <script language="JavaScript">
    function runClock(){
    theTime = window.setTimeout("runClock()", 1000);
    var RightNow = new Date();
    var hrNow = RightNow.getHours();
    var mnNow = RightNow.getMinutes();
    var scNow = RightNow.getSeconds();
    var miNow = RightNow.getTime();
    var mon = RightNow.getMonth() + 1;
    var date = RightNow.getDate();
    var year = RightNow.getFullYear();
    var day = RightNow.getDay();
    if(hrNow == 0) {hour = 12;var ap = " AM";}
    else if(hrNow <= 11) {ap = " AM";hour = hrNow;}
    else if(hrNow == 12) {ap = " PM";hour = 12;}
    else if (hrNow >= 13) {hour = (hrNow - 12);ap = " PM";}
    if(hrNow >= 13) {hour = hrNow - 12;}
    if(mnNow <= 9) {min = "0" + mnNow;}
    else{min = mnNow}
    if (scNow <= 9) {secs = "0" + scNow;}
    else {secs = scNow;}
    var zday=new Array(7)
    if (day==0) {zday="Sunday"};
    if (day==1) {zday="Monday"};
    if (day==2) {zday="Tuesday"};
    if (day==3) {zday="Wednesday"};
    if (day==4) {zday="Thursday"};
    if (day==5) {zday="Friday"};
    if (day==6) {zday="Saturday"};
    var zmon = new Array(12)
    if (mon==1) {zmon="January"};
    if (mon==2) {zmon="February"};
    if (mon==3) {zmon="March"};
    if (mon==4) {zmon="April"};
    if (mon==5) {zmon="May"};
    if (mon==6) {zmon="June"};
    if (mon==7) {zmon="July"};
    if (mon==8) {zmon="August"};
    if (mon==9) {zmon="September"};
    if (mon==10) {zmon="October"};
    if (mon==11) {zmon="November"};
    if (mon==12) {zmon="December"};
    $x('clock').value=""+zday+", "+zmon+" "+date+", "+year+" "+hour+":"+min+":"+secs+ap+"";
    runClock();
    </script>Use styles to get look you like to input and span tag
    Br,Jari

  • Pxie-6556 - How to control the rise time in the digital lines (hsdio)

    Hi,
    Is there any way to control the rise time in the PXIe-6556 digital lines?
    Even in a low frequency signal 10kHz the rise time is about 2ns.  
    Tks,
    Solved!
    Go to Solution.

    Hello engfpe,
    The PXIe-6556 is a 50 Ohm system, meaning the output is source series terminated to be 50 Ohms and all our cables and accessories are 50 Ohms.  With this setup regardless of the data rate you should have a clean rising or falling edge regardless of the data rate. The quality of the output (rising or falling edge) at your device will be related to the impedance matching of your cables. 
    The PXIe-6556 cannot adjust the slew rate by itself.  However you can insert some simple passive components to do this for you.  I've attached below to images.  The first is a schematic showing one way of slowing down the edge.  The second is the a simulated waveform showing the original edge rate before slowing it down, and the slowed down edge.   This simulation is not of the PXIe-6556 but instead a generic digital output for concept.  In the schematic R1 is set to 34 Ohms because U1.8 has the additional 16 Ohms inside it.  TL1 is the 50 Ohm output simulating the cable on the PXIe-6556.  R2, R3 and C1 are components you could insert after the PXIe-6556 cable before it goes to your device/cables.  In this setup the cable going to your device is TL2 which is also 50 Ohms but it could be another impedance in which case you would change R3 to match.
    You can see in the attached images you can significantly slow down the edge with this setup by altering C1.  I hope this helps,
    Jesse O. | National Instruments R&D
    Attachments:
    edge_compare_schematic.jpg ‏94 KB
    edge_compare_waveform.jpg ‏44 KB

  • How to know the run time of a program..?

    Hi Gurus,
    How to know the exact run time of a program....?
    Suppose i've a program....I've changed the code to improve the performance.
    Now i want to compare run time of older and new one...How to do this...?
    Pls help me ....
    Thanks and Regards,
    Nagarjuna

    Hi,
    go thru the below mentioned code............
    data:   start TYPE i,
              end TYPE i,
              dif TYPE i.
    GET RUN TIME FIELD start.
    SELECT SINGLE bukrs belnr gjahr blart budat
    FROM bkpf
    INTO (cc, doc, fy, doc_ty, pst_dt)
    WHERE bukrs = p_bukrs
    AND belnr = p_belnr
    AND gjahr = p_gjahr.
    GET RUN TIME FIELD end.
    dif = end - start.
    WRITE: /001 'Time for select',
    067 ':', dif, 'microseconds'.
    Reward all helpful answers.
    Thanks

  • How to control the maximum time that a dynamic sql can execute

    Hi,
    I want to restrict the maximum time that a dynamic sql can execute in a plsql block.
    If the execution is not completed, the execution should be terminated and a exception should be raised.
    Please let me know, if there is any provision for the same in Oracle 10g.
    I was reading about Oracle Resource Database Resource Manager, which talks about restricting the maximum time of execution for Oracle session for a user.
    However I am not sure, if this can be used to control the execution of dynamic sql in a plsql block.
    Please provide some pointers.
    Thank you,
    Warm Regards,
    Navin Srivastava

    navsriva wrote:
    We are building a messaging framework, which is used to send time sensitive messages to boundary system.I assume this means across application/database/server boundaries? Or is the message processing fully localised in the Oracle database instance?
    Every message has a time to live. if the processing of message does not occurs within the specified time, we have to rollback this processing and mark the message in error state.This is a problematic requirement.. Time is not consistent ito data processing on any platform (except real-time ones). For example, messageFoo1 has a TTL (time to live) of 1 sec. It needs to read a number of rows from a table. The mere factor of whether those rows are cached in the database buffer cache, or still residing on disk, will play a major role in execution time. Physical I/O is significantly slower that logical I/O.
    As a result, with the rows on disk, messageFoo1 exceeds the 1s TTL and fails. messageFoo2 is an identical message. It now finds most of the rows that were read by messageFoo1 in the buffer cache, enabling it to complete its processing under 1s.
    What is the business logic behind the fact that given this approach, messageFoo1 failed, and the identical messageFoo2 succeeded? The only difference was physical versus logical I/O. How can that influence the business validation/requirement model?
    If it does, then you need to look instead at a real-time operating system and server platform. Not Windows/Linux/Unix/etc. Not Oracle/SQL-Server/DB2/etc.
    TTL is also not time based in other s/w layers and processing. Take for example the traceroute and ping commands for the Internet Protocol (IP) stack. These commands send an ICMP (Internet Control Message Protocol) packet.
    This packet is constructed with a TTL value too. When TTL is exceeded, the packet expires and the sender receives a notification packet to that regard.
    However, this TTL is not time based, but "+hop+" based. Each server's IP stack that receives an ICMP packet as it is routed through the network, subtracts 1 from the TTL and the forwards the packet (with the new TTL value). When a server's IP stack sees that TTL is zero, it does not forward the packet (with a -1 TTL), but instead responds back to the sender with an ICMP packet informing the sender that the packet's TTL has expired.
    As you can see, this is a very sensible and practical implementation of TTL. Imagine now that this is time based.. and the complexities that will be involved for the IP stack s/w to deal with it in that format.
    Making exact response/execution times part of the actual functional business requirements need to be carefully considered.. as this is very unusual and typically only found in solutions implemented in real-time systems.

  • How to avoid the run time error  "java.lang.OutOfMemoryError"

    hi
    i have written a code to read a txt file ,i used FileReader to read a file . the code is working well for small txt files. but when i tried to read a large file(greater than 2MB), a run time error called "java.lang.OutofMemoryError" appeared .
    plz suggest the methods to read txt files of large capacity(greater than 25MB) .if possible give an example.

    thanks for ur replies
    i am new to java programming .i am a student persuing B.Tech final semester .i got struck in my project while reading a large txt file(greater than 3MB) . i am now giving a part of code that i had used in my project .it working fine with the txt files less than 3MB ,but when i am treing to read a file greater than 3MB , it is displaying a run time error "java.lang.outofmemoryerror"
    i have tried using "java -Xmx" ,it is working , but is there any better option ??
    here is the part of code:
       FileReader fin;
        al=new ArrayList();
         try
              fin=new FileReader(filename);
         catch(FileNotFoundException e)
           System.out.println("File not foumn");
         return;
    while((i=fin.read())!=-1)
           al.add(new Character((char)i));
         fin.close(); 
         Object obj[]=al.toArray();plz help me
    --santosh                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to set the running time of Thread??

    Hello all
    i am new and fresh student to learn Java.
    i want to set a limit time to run a thread.

    public void interrupt()
    Interrupts this thread.
    First the checkAccess method of this thread is invoked, which may cause a SecurityException to be thrown.
    If this thread is blocked in an invocation of the wait(), wait(long), or wait(long, int) methods of the Object class, or of the join(), join(long), join(long, int), sleep(long), or sleep(long, int), methods of this class, then its interrupt status will be cleared and it will receive an InterruptedException.
    If this thread is blocked in an I/O operation upon an interruptible channel then the channel will be closed, the thread's interrupt status will be set, and the thread will receive a ClosedByInterruptException.
    If this thread is blocked in a Selector then the thread's interrupt status will be set and it will return immediately from the selection operation, possibly with a non-zero value, just as if the selector's wakeup method were invoked.
    If none of the previous conditions hold then this thread's interrupt status will be set.
    Throws:
    SecurityException - if the current thread cannot modify this thread
    to quote the api
    but in your case Aldaris it would have no effect
    but if you wrote the code as..public void run(){
    while(!interrupted()){
      System.out.println("Pete_The_Hat");
    }then it would break the loop :-)

  • How to reduce the run time of ABAP code (BADI) when it is reading huge data from BPC Cube and thus writing  back huge data to the cube.

    Hi All ,
    In Case of reading huge amount of record from BPC Cube  from BADI code , performing calculations and writing back huge amount of data into the cube , It takes lot of time . If there is any suggestion to read the data  from Cube  or writing data into the cube using some Parallel Processing  methods , Then Please suggest .
    Regards,
    SHUBHAM

    Hi Gersh ,
    If we have a specific server say 10.10.10.10 (abc.co.in) on which we are working, Then under RZ12 we make the following entry  as :
    LOGON GROUP          INSTANCE
    parallel_generators        abc.co.in_10         ( Lets assume : The instance number is 10 )
    Now in SM59 under ABAP Connections , I am giving the following technical settings:
    TARGET HOST          abc.co.in
    IP address                  10.10.10.10
    Instance number          10
    Now if we have a scenario of load balancing servers with following server details (with all servers on different instance numbers ) :
    10.10.10.11   
    10.10.10.13
    10.1010.10
    10.10.10.15
    In this case how can we make the RZ12 settings and SM59 settings such that we don't have to hardcode any IP Address.
    If the request is redirected to 10.10.10.11 and not to 10.10.10.10 , in that case how will the settings be.
    I have raised this question on the below thread :
    How to configure RZ12  and SM59 ABAP connection settings when we have work with Load Balancing servers rather than a specific server .
    Regards,
    SHUBHAM

  • How to control the starting time in terms of expression?

    Hallo again!
    I know there must be some ways to trigger the expression to start not immediately, but at any time I wish.
    For e.g. I have here a code:
    veloc = 35;
    amplitude = 30;
    decay = 1.0;
    y = amplitude*Math.cos(veloc*time)/Math.exp(decay*time);
    value + [0,y]
    And I would like to delay the start in 2sek not just by pulling the layer to the right, but to do it in terms of a code.
    Could anybody give me a hint?
    would be very thankful

    I think this is more what you're looking for:
    timeToStart = 2;
    t = time - timeToStart;
    if (t >= 0){
      veloc = 35;
      amplitude = 30;
      decay = 1.0;
      y = amplitude*Math.cos(veloc*t)/Math.exp(decay*t);
    }else{
      y = 0;
      value + [0,y]
    Dan

  • How to clear the run time error in ref cursor

    good morning every one,
    the code as follows
    create or replace
    procedure Country_sel(key in varchar2)
    as
    cc Res_RelcountryLan.countrycode%type;
    len Res_Language.langname_en%type;
    lid Res_Language.langid%type;
    ab Res_Language.Abrivation%type;
    type refcursorr is ref cursor;
    cur refcursorr;
    d_stmt varchar2(100);
    begin
    d_stmt := 'select RCL.countrycode,RL.langid,RL.langname_'||key||',
    RL.Abrivation from  Res_RelCountryLan RCL inner join Res_Language RL ON RCL.LangId = RL.LangId';
    open cur for d_stmt;
    loop
    fetch cur into cc,lid,len,ab;
    if cur%found then
    dbms_output.put_line(cc||lid||len||ab);
    else
    exit;
    end if;
    end loop;
    close cur;
    commit;
    end  Country_sel;when i am running this code im getting
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    ORA-06512: at "RASOOL.COUNTRY_SEL", line 11
    ORA-06512: at line 6can you please help me in getting rid of this problem.
    thanking you,
    prakash

    d_stmt varchar2(100); Increase the size of d_stmt. Your a assigning a larger string
    d_stmt := 'select RCL.countrycode,RL.langid,RL.langname_'||key||',RL.Abrivation from  Res_RelCountryLan RCL inner join Res_Language RL ON RCL.LangId = RL.LangId'; The size of the above string is more than 100 characters.

Maybe you are looking for

  • Font size in basic list output

    Hello, I am outputting a report with line size of 220. When i print the report, the font size appear small. Viewable but small. I know when we increase the line-size, the font gets low, but is there anyway to increase the font size .. Thanks a lot. S

  • How do I disable auto-caps on MacBook Pro 10.6.6

    *I hate autocaps!* When I want a cap, I'll hit the shift key. Autocaps runs system wide on my MacBookPro5,4. It's a nightmare for passwords. I never know when it's giving me a cap or not. Also, in things like the terminal it will cap a command that c

  • Cannot download in raw using Nikon D610

    Since changing my camera I have been unable to download raw files, can only download JPEG etc

  • Folio Overlay is Missing! InDesign CC won't update..?

    I am working in InDesign CC and want to create scrolling text in my pdf - for publishing on the iPad. I have looked at various tutorials and they all call out "Folio Overlay" which seems to be missing from my Windows tab. I was prompted to update, wh

  • CF & MS-SQL SSL communication?

    I'm looking to do SSL communication between our CFMX8 server and MS-SQL 2005 server using the built in SQL SSL encryption. I wanted to do some testing prior to enabling the features to see it in a broken connection state so when I got it working I kn