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.

Similar Messages

  • 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 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();
    }

  • [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!!!

  • 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

  • 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 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 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.

  • How to improve the run time of this query

    Is there any way to improve this query,
    I have a table which SR_WId with atleast one subtype as 'Break Fix', 'Break/Fix','Break Fix/Corrective Maint','Break Fix-Corrective Maint'. then i can have other subtype as 'Break Fix', 'Break/Fix', 'Follow Up', 'Follw-Up','T&'||'M Break Fix','Break Fix/Corrective Maint','Break Fix-Corrective Maint'.
    Let me know if this is okay or to modify it.
    SELECT DISTINCT A.SR_WID AS SR_WID
    FROM WC_SR_ACT_SMRY_FS A
    WHERE EXISTS
    (SELECT NULL FROM WC_SR_ACT_SMRY_FS B
    WHERE B.ACT_TYPE = 'Maintenance'
    AND B.ACT_SUBTYPE in ('Break Fix', 'Break/Fix','Break Fix/Corrective Maint','Break Fix-Corrective Maint') AND B.NBR_OF_ACTIVITIES = 1 AND B.SR_WID = A.SR_WID
    GROUP BY B.SR_WID
    HAVING COUNT(B.SR_WID) >= 1)
    AND A.ACT_TYPE = 'Maintenance'
    AND A.ACT_SUBTYPE IN ('Break Fix', 'Break/Fix', 'Follow Up', 'Follw-Up','T&'||'M Break Fix','Break Fix/Corrective Maint','Break Fix-Corrective Maint')

    SELECT DISTINCT A.SR_WID AS SR_WID
               FROM WC_SR_ACT_SMRY_FS A
              WHERE EXISTS(
                       SELECT   NULL
                           FROM WC_SR_ACT_SMRY_FS B
                          WHERE B.ACT_TYPE = 'Maintenance'
                            AND B.ACT_SUBTYPE IN
                                  ('Break Fix',
                                   'Break/Fix',
                                   'Break Fix/Corrective Maint',
                                   'Break Fix-Corrective Maint')
                            AND B.NBR_OF_ACTIVITIES = 1
                            AND B.SR_WID = A.SR_WID
                       GROUP BY B.SR_WID
                         HAVING COUNT(B.SR_WID) >= 1 )
                AND A.ACT_TYPE = 'Maintenance'
                AND A.ACT_SUBTYPE IN
                      ('Break Fix',
                       'Break/Fix',
                       'Follow Up',
                       'Follw-Up',
                       'T&' || 'M Break Fix',
                       'Break Fix/Corrective Maint',
                       'Break Fix-Corrective Maint');First of all, you can omit the GROUP BY and HAVING part in the sub-select -
    we already know thath the only value for B.SR_WID can be A.SR_WID and
    COUNT(B.SR_WID) will always be at least 1, otherwise the sub-select will
    return nothing.
    As a second step, you could transform EXISTS() into IN():
    SELECT DISTINCT SR_WID
               FROM WC_SR_ACT_SMRY_FS A
              WHERE SR_WID IN(
                       SELECT B.SR_WID
                         FROM WC_SR_ACT_SMRY_FS B
                        WHERE B.ACT_TYPE = 'Maintenance'
                          AND B.ACT_SUBTYPE IN
                                ('Break Fix',
                                 'Break/Fix',
                                 'Break Fix/Corrective Maint',
                                 'Break Fix-Corrective Maint')
                          AND B.NBR_OF_ACTIVITIES = 1)
                AND ACT_TYPE = 'Maintenance'
                AND ACT_SUBTYPE IN
                      ('Break Fix',
                       'Break/Fix',
                       'Follow Up',
                       'Follw-Up',
                       'T&' || 'M Break Fix',
                       'Break Fix/Corrective Maint',
                       'Break Fix-Corrective Maint');

  • How to know the timings of the run time of thr report

    Hi,
    Can you please tell me how to know the run time of the query , i mean how much time it took for the query to dispaly the results .
    Also we have these queries in the workbook. How to refresh the work book . is it enough if i refresh the query.
    Thanks
    Sruthi

    Hi
    How can we check in RSRT tcode?
    And how can we do i RSRTRACE?
    Can  I know the procedure.

  • How can I test the running time of a method?

    c.What is the running time of your method smallest, as a function of n, the number of elements in the list? Use big-Oh notation.
    I quoated from a java problem..
    Anyone can tell me how I can test the running time? Thanks ! :D

    it depends on what is in the method. For example a for loop executed n times would have a O(n). A double for loop (each loopp run n times) will have O(n^2). Do this: determine how many times each loop in the method is run. This is the first term in your runtime equation. Do this for all other loops in the method and add them all together. Most other statements that are not iterative should have a constant runtime so O(1). For conditional statements, the runtime depends on the most time consuming portion of the statement. Once all these are added together, take the O(equation) which should just leave the biggest term. i.e. O(5n^2+3n+8) = O(n^2). Hope this helps.
    note: this does not apply to recursive methods

  • How to change the printer name in the User profile in the run time.

    Hi
    I am in need to change the printer name in the run time.
    Do any one hav idea about this?
    Thanks
    Karthik

    The user default settings can be changed using funtion module SUSR_USER_DEFAULTS_PUT.
    Import parameter USER_DEFAULTS-SPLD will hold the default printer name.

  • How to change the title of a report by programmation at the run time?

    Hi,
    I would like to change the title of my report at the run time.
    Is it possible?
    If someone can help me...
    Thanks,
    Mbo

    hello,
    what do you mean with "title" ?
    a couple of approaches :
    - Runtime Customization
    - lexicals
    - before report escape HTML
    regards,
    the oracle reports team --pw

Maybe you are looking for

  • I would like to access Toshiba L7+++ Smart TV by ip address

    Hi, I'd like to access my smart tv by ip address + port number. How can I do this?

  • Un-install 10g XE on  Windows XP

    Tried to replace a prior install and can't the OracleXEUniv setup to succeed. It complains that it finds an existing instance. I've removed all all Oracle references (services, registry, install directory, paths, etc.). Control panel still shows an e

  • Hide column based on condition on other column in table

    hi, am using BIP 10.1.3.2 to generate reports.In the template i need to hide one column based on condition on other.am using SQL query as my data source type.can anybody help me ?

  • Delay in signal between iMac / Macbook iTune to Apple TV

    Hello, I am having a problem getting my iMac (Mid 2011, OS X 10.8.2) to Airplay/Mirror with the Apple TV to include getting the iTunes to play audio or movies without the audio sounding choppy and the mirroring having this huge delay in movement. I a

  • Button flicker when viewed with a Mac

    Hi. I'm seeing a button flickering issue when I view my flash website on a Mac. I tested it on a PC and it looks fine but with a Mac it flickers. Here is how I created my buttons. I imported an image to the stage, selected it, pressed F8 and converte