How to avoid built-up for "cursor move" events?

I have a rather complicated program where several graphs need to be interactively updated according to cursors using "cursor move" events. The problem is that the recalculation is relatively slow and the behavior is less than satisfactory. Since the cursor position needs to be "tweaked" until the result is as desired, I cannot recalculate only at the "Cursor Release" event.
Lock front panel=enabled makes cursor movements tedious because the cursor movements is very
jumpy and non-interactive. Not user friendly!
Lock front panel=disabled queues up way too many move events and once the cursor is released
the graph continues to jump and recalculate for ages.
The attached demo (LabVIEW 8.20) shows one solution attempt that actually works pretty well: Skip the recalculation unless the cursor position from the event terminal is equal to the cursor position of the graph property node. This basically races through all unecessary intermediary recalculations on stale positions. However, the code can get complicated very quickly if there are multiple cursors.
In my opinion, cursor move events should not get queued up! The event buffer should hold only exactly one entry:
the most recent cursor position for each cursor. Can anyone think of a scenario where the extra cursor position trail is useful? The positions are pretty random anyway, right?
Does anyone have other (better!) ideas how to work around this problem? I definitely want to keep it simple and not throw lots of code at it.
The attached demo contains more details. It demonstrates the problem if "selective updates" is checked. If unchecked, it implements the above mentioned workaround.
LabVIEW Champion . Do more with less code and in less time .
Solved!
Go to Solution.
Attachments:
CursorDelay.vi ‏29 KB

Thanks for the example.
The more I think about this, I strongly prefer my original method. It uses minimal code compare to the other solutions offered here. As a demo, I am attaching an implementation to a slide control.
Fo those without LabVIEW 8.20.
All slide events have "lock front panel" disabled.
TIme delay is 500ms, simulating some complex calculation.
As you can see, it works extremely well:
NO shift registers, extra loops, queues, tuning parameters (min times, etc.), etc.etc.
Just a deceptively simple "equal" followed by a case structure.
The demo shows a typical recording if I quicky move the slide up and down, then release it. You can see that the raw event structure takes more than 40 seconds to stabilize while my selective solution follows the slider position almost perfectly despite the 500ms stall in each update.
See for yourself! Can anyone think of a drawback of this method? Even if the slide terminal is not in the same loop, a comparison of a local variable with the newval should do the trick just fine.
Message Edited by altenbach on 09-28-2006 12:43 PM
LabVIEW Champion . Do more with less code and in less time .
Attachments:
SLIDEDelay.vi ‏26 KB
SlideUpdate.png ‏21 KB

Similar Messages

  • How To avoid column heading for only total line in ALV list Display

    Hi,
    How To avoid column heading for only total line in ALV list Display.

    Hi,
    to change colunm header field catlog is built
    look at the example below
    Changing column text headers
    use this to change, hide, or alter the ALV columns
    CLEAR: gt_fcat.
    READ TABLE gt_fcat WITH KEY fieldname = 'TEXT1' " ***
    *TEXT1 is your field name
       ASSIGNING <gtfcat>.
    IF sy-subrc = 0.
       <gtfcat>-coltext   = 'Date Type'.
       <gtfcat>-no_out    = ' '.
       <gtfcat>-tooltip   = 'Date Type Text from IT0019'.
       <gtfcat>-seltext   = 'IT0019'.
    keep seltext to '' if u want to hide
    ENDIF.
    regards
    austin

  • How to check with table for cursor..?

    How to check with table for cursor..?
    Here I have Table temp_final_plan
    Here i want to update if already exit...below is the procedure....
    CREATE OR REPLACE PROCEDURE spu_final_profit_plan
    AS
    -- Constant declarations
      ln_errnum number := 0;
    -- Variable declarations
       ls_errmsg app_errors.err_msg%TYPE;
       ls_appmsg app_errors.app_msg%TYPE;
       ls_appid  app_errors.app_id%TYPE;
    -- Cursor declaration for final_update_el
    CURSOR cur_final_update_el IS
        select '910' ent,
               '9127316' center,
               post_acct,
               sum(avg_mtd_01) sum_avg_mtd_01,
               sum(avg_mtd_02) sum_avg_mtd_02,
               sum(avg_ytd_01) sum_avg_ytd_01,
               sum(avg_ytd_02) sum_avg_ytd_02
          from mon_act_cypy
         where rec_type = 'A'
           and sum_flag = 'D'
           and yr = '2008'
           and substr(ctr_or_hier, 1, 2) = 'el'
           and ent || sub_ent in
               (select ent || sub_ent
                  from ent_ref
                 where roll_ent || roll_sub_ent = '999100')
         group by post_acct
        having sum(avg_mtd_01) <> 0
            or sum(avg_mtd_02) <> 0
            or sum(avg_ytd_01) <> 0
            or sum(avg_ytd_02) <> 0;
    -- Cursor declaration for final_update
    CURSOR cur_final_update IS
        select b.plan_ent b_plan_ent,
               b.plan_ctr b_plan_ctr,
               a.post_acct a_post_acct,
               sum(a.avg_mtd_01) sum_avg_mtd_01,
               sum(a.avg_mtd_02) sum_avg_mtd_02,
               sum(a.avg_ytd_01) sum_ytd_mtd_01,
               sum(a.avg_ytd_02) sum_ytd_mtd_02
          from mon_act_cypy a,
               plan_unit_tbl b
         where a.ent || a.ctr_or_hier = b.ent || b.ctr_or_hier
           and a.rec_type = 'A'
           and a.sum_flag = 'D'
           and a.yr = '2008'
           and b.hier_tbl_num = '001'
           and a.ent || a.sub_ent in
               (select ent || sub_ent
                  from ent_ref
                 where roll_ent || roll_sub_ent = '999100')
         group by b.plan_ent, b.plan_ctr, a.post_acct
        having sum(a.avg_mtd_01) <> 0
            or sum(a.avg_mtd_02) <> 0
            or sum(a.avg_ytd_01) <> 0
            or sum(a.avg_ytd_02) <> 0;
    -- Begin the procedure body
       BEGIN
    -- Insert / Update final profit plan for final_update query using cursor
       FOR rec_final_update_el IN cur_final_update_el
       LOOP
       EXIT WHEN rec_final_update_el%NOTFOUND;
       IF rec_final_update_el. THEN
          UPDATE temp_final_plan
             SET sum_avg_mtd_01 = rec_final_update_el.sum_avg_mtd_01,
                 sum_avg_mtd_02 = rec_final_update_el.sum_avg_mtd_02,       
                 sum_avg_ytd_01 = rec_final_update_el.sum_avg_ytd_01,       
                 sum_avg_ytd_02 = rec_final_update_el.sum_avg_ytd_02,       
           WHERE ent = rec_final_update_el.ent
             AND center = rec_final_update_el.center
             AND post_acct = rec_final_update_el.post_acct;
       ELSE
          INSERT INTO temp_final_plan VALUES(rec_final_update_el.ent,
                                             rec_final_update_el.center,
                                             rec_final_update_el.post_acct,
                                             rec_final_update_el.sum_avg_mtd_01,
                                             rec_final_update_el.sum_avg_mtd_02,
                                             rec_final_update_el.sum_avg_ytd_01,
                                             rec_final_update_el.sum_avg_ytd_02);
       END IF;
       END LOOP;
    -- Insert / Update final profit plan for final_update query using cursor
       FOR rec_final_update IN cur_final_update
       LOOP
       EXIT WHEN rec_final_update%NOTFOUND;
       IF rec_final_update. THEN
          UPDATE temp_final_plan
             SET sum_avg_mtd_01 = rec_final_update.sum_avg_mtd_01,
                 sum_avg_mtd_02 = rec_final_update.sum_avg_mtd_02,       
                 sum_avg_ytd_01 = rec_final_update.sum_avg_ytd_01,       
                 sum_avg_ytd_02 = rec_final_update.sum_avg_ytd_02,       
           WHERE ent = rec_final_update.b_plan_ent
             AND center = rec_final_update.b_plan_ctr
             AND post_acct = rec_final_update.a_post_acct;
       ELSE
          INSERT INTO temp_final_plan VALUES(rec_final_update.b_plan_ent,
                                             rec_final_update.b_plan_ctr,
                                             rec_final_update.a_post_acct,
                                             rec_final_update.sum_avg_mtd_01,
                                             rec_final_update.sum_avg_mtd_02,
                                             rec_final_update.sum_avg_ytd_01,
                                             rec_final_update.sum_avg_ytd_02);
       END IF;
       END LOOP;
    -- EXCEPTION handling section
       EXCEPTION
    -- Fire OTHERS Exception case by default
       WHEN OTHERS THEN
    -- ROLL BACK Transaction, if any failure
       ROLLBACK;
       ln_errnum := SQLCODE;
       ls_errmsg := SUBSTR(SQLERRM, 1, 100);
    -- Log the ERRORS into APP_ERRORS table using SPU_LOG_ERRORS procedure
       spu_log_errors(ln_errnum, ls_errmsg, ls_appid, ls_appmsg);
    -- End of the stored procedure
    END spu_final_profit_plan;
    [\pre]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    I'm not sure what you mean by, 'How to check with table for cursor..?' but I'll offer a comment on your Code Snippet. I think you want to know how to check if a record exists so you know if you need to perform an INSERT or an UPDATE.
    Here is a snippet of your code. I'll put my comments in "Comment" style in your code.
    -- Insert / Update final profit plan for final_update query using cursor
       FOR rec_final_update_el IN cur_final_update_el
       LOOP
    /* There is no need to test for %NOTFOUND since you are using Cursor FOR Loop! 
    ** This construct automatically exits when the last record is processed. */
       EXIT WHEN rec_final_update_el%NOTFOUND;
    /* Is this where you would like to know how to Check if the record already exist??
    ** I asked this because, 'rec_final_update_el.' is not valid syntax.  Are you looking for
    ** an Cursor Attribute or Method you can check here? 
    ** I would suggest a Primary Key or Unique Index on ENT, CENTER, and POST_ACCT
    ** on the TEMP_FINAL_PLAN table. Then simply perform an INSERT and code an
    ** Exception to UPDATE when you get a DUP_VAL_ON_INDEX exception.  Otherwise,
    ** you will need to simply run an Implicit or Explicit Cursor to test if the row exists and
    ** use this return value to determine if you should INSERT or UPDATE.  */
       IF rec_final_update_el. THEN
          UPDATE temp_final_plan
             SET sum_avg_mtd_01 = rec_final_update_el.sum_avg_mtd_01,
                 sum_avg_mtd_02 = rec_final_update_el.sum_avg_mtd_02,       
                 sum_avg_ytd_01 = rec_final_update_el.sum_avg_ytd_01,       
                 sum_avg_ytd_02 = rec_final_update_el.sum_avg_ytd_02,       
           WHERE ent = rec_final_update_el.ent
             AND center = rec_final_update_el.center
             AND post_acct = rec_final_update_el.post_acct;
       ELSE
          INSERT INTO temp_final_plan VALUES(rec_final_update_el.ent,
                                             rec_final_update_el.center,
                                             rec_final_update_el.post_acct,
                                             rec_final_update_el.sum_avg_mtd_01,
                                             rec_final_update_el.sum_avg_mtd_02,
                                             rec_final_update_el.sum_avg_ytd_01,
                                             rec_final_update_el.sum_avg_ytd_02);
       END IF;
       END LOOP;I hope I've answered your question, but if I haven't please provide more details so we can better understand your request.
    Craig...

  • How to get built.xml for ear file in jdeveloper?

    Hi,
    I am using JDeveloper to create EAR file for my ADF Fusion Application. I think Jdeveloper use ant to create EAR file. I know how to get built.xml for my war file.
    Can anyone tell how to get that built.xml that create EAR file in Jdeveloper.?

    This blog explains:
    http://adfhowto.blogspot.com/2011/03/ojdeploy-deploying-adf-application-from.html
    Based on the blog, I simply copied an existing project "deploy" target definition and augmented the project's build.xml with a new target "deployApp" that omits the Project parameter to ojdeploy. This causes ojdeploy to build the workspace-level deploy profile instead. I also omitted the output directory parameter (default is app's /deploy folder) and assume that there is only one application deployment profile (i.e. the default for profile parameter is the '*' wildcard). You can augment the build.properties file if you need to get fancier than that.
    <target name="deployApp" description="Deploy Complete YourFoo Application"
    depends="init">
    <taskdef name="ojdeploy"
    classname="oracle.jdeveloper.deploy.ant.OJDeployAntTask"
    uri="oraclelib:OJDeployAntTask"
    classpath="${oracle.jdeveloper.ant.library}"/>
    <ora:ojdeploy xmlns:ora="oraclelib:OJDeployAntTask"
    executable="${oracle.jdeveloper.ojdeploy.path}"
    ora:buildscript="${oracle.jdeveloper.deploy.dir}/ojdeploy-build.xml"
    ora:statuslog="${oracle.jdeveloper.deploy.dir}/ojdeploy-statuslog.xml">
    <ora:deploy>
    <ora:parameter name="workspace"
    value="${oracle.jdeveloper.workspace.path}"/>
    <ora:parameter name="profile"
    value="${oracle.jdeveloper.deploy.profile.name}"/>
    <ora:parameter name="nocompile" value="true"/>
    </ora:deploy>
    </ora:ojdeploy>
    </target>

  • How to avoid multiple listing for same artist?

    How to avoid multiple listing for same artist?

    Sounds like there might be blanks in the artist name.
    For instance "Lou Reed" and "Lou Reed_" will not match.
    (Pretend the underscore _ is a blank).
    Select all the Lou Reed songs, Get Info, and type "Lou Reed" in the artist field. That should fix it.

  • How to make each playlist for each movie songs ? when i tried to add songs all movie songs comes in row , its very difficult to find which movie song belongs?

    how to make each playlist for each movie songs ? when i tried to add songs all movie songs comes in row , its very difficult to find which movie song belongs?

    Thank you! I put some self help hypnosis tracks to listen to on my iPod. I did not want to go to the next track automatically, I wanted to listen to them individually, one at a time. (If I fell asleep, I did not want to 'wake up' in the middle of a different track.) Your information helps me understand that I need to re-load this playlist onto my iPod from my  Mac computer, only first, I need to UNCHECK the boxes in front of each track so the iPod will STOP each time after playing the selected track. It is too bad that so many functions are not availabvle within the iPod, but that is probably why they can make it so compact.

  • Programmatically fire graph cursor move event

    Is it possible to programmatically fire the Graph Cursor Move Event ?  Assigning a value to the Cursor Index or Cursor Position property node does not seem to do it.
    Solved!
    Go to Solution.

    The graph cursor move event contains processing code for data on the graph along with front panel display of those results.  Data is put onto the graph during data acquisition which occurs in another event.  When that data acquisition event finishes I need to cause the processing code to execute once to update the front panel display so its results are shown for the new acquired data.
    I could put the processing code into a different event that fires on say a button value change.  Then the graph cursor move event would fire that button event change by setting its value change property.  The data acquisition event could also fire that button event.

  • How to create custom infotype for training and event management

    hai freinds can any one tell me how to create custom infotype for training and event managment with following fields
    PS No – PA0000-> PERNR
    Name   - PA0001 -> ENAME
    IS PS.No. – PA0001-> PS no. of Immediate Superior
    IS name PA0001 -> ENAME
    thanx in advance
    afzal

    Hi,
    Your question is not clear for me. Since it is a TEM infotype, it could be a PD infotype.
    If you wish to create a PD infotype, use transaction PPCI to create the infotype.
    But before that you need to create a structure HRInnnn (where nnnn is the infotype number) with all the fields relevant for the infotype.
    If you wish to create a PA infotype, use transaction PM01 to create the infotype.
    But before that you may be required to create a strcuture PSnnnn  (where nnnn is the infotype number) with all the fields relevant for the infotype.
    Regards,
    Srini

  • How to create a playlist for the movies I have?

    Hope someone can help me here. How do you set the movies to play continuously? I can't seem to create a playlist for the movies. You can create playlist for podcast videos and musics but how do you creat playlist for the 3 movies I have got on my iphone?
    Any help will be greatly appreciated.

    Not exactly true. As absurd as it sounds, if you have just one music track in your playlist, then you can select it from the Playlists section on the iPhone and play your videos, movies etc. one after the other.
    I have created a completely empty music track in Garageband which I drag onto the end of each and every video playlist I create. An ugly solution, but it works.
    You have to remember to check the playlist in both the Video and Music sections in iTunes->Devices->Your iPhone.

  • How Large is Too Large for a Movie These Days?

    Hi, we're developing our portfolio site which will have a LOT
    of images that must be very high quality. So to keep quality up I
    know we have to sacrifice file size (or vice-versa).
    We've divided each of the sections of images into separate
    movies so there is usually less than 8 images per movie. That way
    someone would only need to wait if they clicked to see a specific
    movie.
    - My question is: What is considered 'large' for a movie file
    in these days of broadband?
    We are not planning on having preloaders for the individual
    movies, and would like them to come up pretty quickly (so no
    sluggishness or blank screens). I'm also looking into how to have
    the movies loading in the background so that there would be less or
    no delay once they are called up.
    As an example, one of our larger sized movie tests showed a
    size of around 350k for med-high quality, and about 750k for really
    good quality. We prefer to have the quality of the latter, but
    don't want people to get frustrated waiting.
    On our local med-fast broadband (3.0Mb/Sec DSL) the large
    movie loads up pretty much instantly and looks great. But we don't
    want to alienate anyone.
    THANKS!

    I think you simply have to judge your audience - are they
    likely to have ultra fast broadband or ten year old dial up
    connections ?
    My rule of thumb is to work for the lowest connection likely.
    In the UK most medium to large commercial organistaions (my
    market) have at least a 4mb connection so I optimise everything for
    that. (Always bearing in mind that it's shared by hundreds or
    thousands of users at any given location).

  • How to process TR created for 122 mov ?

    Dear All,
    How to process the TR created in the background for 122 mov. through QA module ?
    I have not processed the TR created for the GR document.  When I try to process it, the open qty in the TR is the difference between (Total GR Qty - Return Qty).
    Hence the TR created for 122 mov is Open.
    Please guide me how we process such TR's.
    Hope my query is clear.
    Regards,

    Hi Prakash & Vineet,
    Thanks a lot for your reply's.
    See my scenario goes like this & hope this is a common one in case of vendor rejections.
    when we create a GR an Inspection lot & TR will be created for the whole GR Qty say (100) with Stock type as Q (Quality).
    Suppose If I do the UD for the Inspection lot where I accept 70 Qtys & Reject 30 Qtys then automatically a TR will be created for the 30 Qtys.
    Since I have already rejected 30 qtys, only 70 qtys will be open in the TR which was created at the time of GR (which is yet to be processed).
    So this TR can be converted into a TO & Stock can be placed in the Destination Storage type & Bin.
    Now coming to the rejected qty which is getting knocked off  in the interim bin itself the stock level in MM-IM & WM is balanced.
    But my concern is TR which was created against the Rejected Material Doc (122) is Still Open. So what do we do with such TR's which are open?
    In LB02 we can either delete this TR or change the Status to Processed. 
    I hope many of you might have come across this scenario. So how did you manage this? Is there any T.CODE available where we can delete or change the status of TR's as processed in a mass way ?
    Hope my query is clear now.
    Thanks & Regards,

  • How to avoid extended checks for the events used in ALV.

    Hii,
    I hav delvpd an alv report in which i hav used events for which i haven't declared PERFORM for the same. but when i had checkd in the Extended program checks it says that form interface is not called directly.. check for dynamic PERFORMS...
    how to avoid this error in the extended check program.

    Another option can be calling the routine from the program itself with a check that never satisfies.
    like:
    if 1 = 2.
    perform top_of_page.
    endif.
    form top_of_page.
    endform.
    Regards,
    Joy.

  • How to set error message for 541 Movement type

    Dear gurus,
                I want to know that is it possible to set error message through any configuration? My requirement is that when we create issue document using m.t 541 it will not allow me to process that document without releasing PO document.so for that i want to set error message.
    <removed by moderator>
    Message was edited by: Jürgen L

    Hi,
       The subcontracting goods issue can be done even without PO reference. If your organization is strictly following the goods issue against PO only and you want to restrict the goods issue if the PO is not released, then you may check the below option. Please note that the below option is available in standard only from EHP 4 or above.
    1. Refer the KBA: 1915825 - Transfer Posting reference to a Purchase Order in MIGO and activate the PO reference option in MIGO - Transfer posting.
    2. Restrict the use of 541 movement in MB1B - Go to OMJJ and enter movement type as 541. Now go to "allowed transactions" folder and remove MB1B. Now the user cant use 541 in MB1B.
    3. Maintain the field - Purchase order as mandatory field for the movement type 541 in OMJJ.
    4. Train the users to use MIGO - Transfer Posting - Purchase order option for goods issue with 541 movement.
    5. If the PO is not released, system wont allow to use the PO in MIGO - Transfer Postings.
    6. If the user is selecting Transfer Posting - Other, system wont check the PO and hence it will allow to post the goods issue even if PO is not released. You may take organizational measures to restrict the usage or you may check for authorization concept - Refer the note: 773003 - MIGO: No authorization object for action/reference document
       If you are below EHP 4, there is no standard functionality available for the requirement as of my knowledge. If so, you may go for development to restrict the same.
    Regards,
    AKPT

  • Cursor move event dicrease frequency

    Hello!
    A long time ago I remember I saw a forum post or a community doc, where it was explained how to decrease a certain Event to be triggered too frequently.
    I have a graph with a cursor, and when the user starts to move the cursor, I do some minor calculations and output some values into indicators. I would like to discard some of the "mouse move" events, so when the user pulls the cursor "too fast", I do not overload the CPU with processing. I know I could just use the "cursor release" event, but it is not that nice, the user does not get feedback about the values between the two locations.
    So I cannot really remember what was the trick to discard the too frequent triggering, it involved some time stamp comparison I think...
    Could someone help me out, how to properly solve this task?
    thanks!
    Solved!
    Go to Solution.

    In newer LabVIEW version you can limit the size of the event queue. Try this first. (See this completed idea).
    In earlier version I would compare the current cursor position with the position obtained from a property node and execute an empty case structure unless they are equal. The old discussion is here. (Also make sure to disable "lock front panel until event completes").
    The cursor idea in in this reply, see the right side of the following image.
    LabVIEW Champion . Do more with less code and in less time .

  • How to execute a method on mouse move event on an Image

    Hi All,
    I want to execute a method on mouse move event or mouse click event to an image.
    how can i achieve this?
    TIA,
    Vishal

    I am not sure if commandImageLink or goImageLink solve your requirement.
    But as a workaround you can use set of ClientListener and ServerListener with af:image to achieve what you need.
    using then you can capture client event and convert that into server event which you can use to call a bean method.
    Inside this bean you can call a web service or method binding.
    My first link in previous post shows that very well....
    OR
    http://naive-amseth.blogspot.com/2011/02/calling-methodbindingwebservice-on.html
    Amit
    Edited by: amseth on Feb 15, 2011 12:25 AM

Maybe you are looking for