Slider control value update delay

Hi,
I'm running V6.0.2, and I have a TCP connection that needs to recieve
an value every 500ms. However, when the slider that provides the
value is being adjusted via a continuos mouse drag for more than a
moment it stops the while loop until the value is updated (presently
about every second, as near as I can tell). How can I make sure the
slider doesn't hold up the while loop while it is being dragged?
Thanks,
Ryan

Hi Ryan,
The easiest way to go about this is to use front panel DataSocket since it sounds like you want to publish the data on your slider. You can look at 'Front panel datasocket read' and 'Front panel DataSocket write' examples that are shipped with LabVIEW. All you do is right-click on your control (slider) >> Data Operations >> DataSocket Connection. You enter the DataSocket protocol something like dstp://ipaddress/data and you're ready to write or read (publish or subscribe) data. As long as your VI runs, you will be sending out data.
If for some reason you can't use DataSocket please let me know and we can find an alternative solution for TCP.
I have also attached a couple of VIs (build in LV 7) that show you how to use the event structu
res to only write the data after the mouse up event on the slide control. You can download the LV eval from ni.com/labview and view this VI.
Good luck
Feroz
Attachments:
DS_Slide_Reader.vi ‏35 KB
DS_Slide_Writer.vi ‏65 KB

Similar Messages

  • Slider control

    Hello again, i am experimenting with the 'slide control'. In the example I’m looking at there is a slider control which updates a numerical label immediately to the left of the slider on the main view (I’m sure you've all seen this before). It’s part of another newbie iphone program taken from another book, and one particular line of code is confusing me. It's within the slider action method, and within this list of commands is some kind of cast command? I understand how casting works with commands like
    int t= (int) floatValue/7; // sort of thing...
    but how does the command (in bold) work?
    -(IBAction) sliderChanged:(id)sender {
    *UISlider *slider =(UISlider )sender;
    int progressAsInt =(int)(slider.value+0.5f);
    NSString *newText = [[NSString alloc] initWithFormat:@"%d",progressAsInt];
    sliderLabel.text =newText;
    [newText release];
    }

    Mike200 wrote:
    Hello again, i am experimenting with the 'slide control'. In the example I’m looking at there is a slider control which updates a numerical label immediately to the left of the slider on the main view (I’m sure you've all seen this before). It’s part of another newbie iphone program taken from another book, and one particular line of code is confusing me. It's within the slider action method, and within this list of commands is some kind of cast command? I understand how casting works with commands like
    int t= (int) floatValue/7; // sort of thing...
    but how does the command (in bold) work?
    First of all, always wrap source code in two lines of:
    like so:
    -(IBAction) sliderChanged:(id)sender {
    UISlider *slider =(UISlider *)sender;
    int progressAsInt =(int)(slider.value+0.5f);
    NSString *newText = [[NSString alloc] initWithFormat:@"%d",progressAsInt];
    sliderLabel.text =newText;
    [newText release];
    Since id is the base class of all Objective-C objects, and since you know that any slider action is going to be passed the slider itself as the sender, you can just cast the id into a UISilder. There is actually less going on here than in your first cast example. When you cast from a float to a int, you actually change the value. When you cast from one pointer type to another, no code change takes place - it is all in the compiler.

  • Dynamic Update in real time with slider control

    We have requirements to display complex data in a graphical format. So far this has gone well by leveraging ADF and DVT components (dvt:Map, dvt:gauge, dvt:bargraph, af:tables, af:inputNumberSlider, etc.); however, we recently have been asked to add real-time animation of these controls over time. In brief, the user requires the ability to control the on-screen visualization of data by sliding the control on an af:inputNumberSlider (or equivalent) that represents a multi-month time scale. While sliding this control, the user expects to see the data visualization controls dynamically update in real time, keeping up with the rate at which the user moves the slider control. Think of this like a flip book animation where the slider controls the page the user is looking at and they can flip through the pages forwards or backwards at any desired speed. The time slider increments are one hour.
    Our current application architecture:
    Oracle ADF Fusion Web Application (v 11.1.1.5)
    EJB 3.0
    Eclipselink
    Oracle 11g
    Any kind of help is highly appreciated.
    Thanks,
    Mehabub

    Hi,
    the af:inputNumberSlider does not provide this functionality. Your alternative is a custom component (or any component that raises a client JS event) and call an af:serverListener in a custom event to send the notification to the server.
    Frank

  • How to update person or group column with peopleeditor control values

    Hi,
    I have created custom aspx page and added "PeopleEditor" control(can select multiple users)  in that page. Now I am trying to update person or group column with peopleeditor control values.I am not getting any error if I select single user
    in PeopleEditor control but getting error if I select more than one user.
    UpdateItem(listItem, "ListColumnName",
    listItem.ParentList.ParentWeb.EnsureUser(peopleeditorId.CommaSeparatedAccounts));
    Can anybody help me out to resolve the issue?
    Thank you in advance!!!
    AA.

    First get all the users/groups from the PeapleEditor by using PeapleEditor.ResolvedEntities
    foreach (PickerEntity pickerEntity in peopleEditor.ResolvedEntities)
    SPPrincipalType principalType = (SPPrincipalType)Enum.Parse(typeof(SPPrincipalType), pickerEntity.EntityData["PrincipalType"].ToString());
    if (principalType == SPPrincipalType.User || principalType == SPPrincipalType.SecurityGroup)
    string loginName = pickerEntity.Key;
    //your code here
    else if (principalType == SPPrincipalType.SharePointGroup)
    string groupName = pickerEntity.Key;
    //your code here
    Add all the users/groups in an instance of SPFieldUserValueCollection
    and then update your list item.
    SPFieldUserValueCollection users = new SPFieldUserValueCollection();
    users.Add(new SPFieldUserValue(web,user.ID,user.Name));
    item["YourUserColumn"] = users;
    item.Update();

  • Updating control values without mouse clicking elsewhere on screen

    I have an application where I want to update the values in text and numeric controls without clicking elsewhere on the screen to the accept values. I haven't run accross this issue in the past because I have always had a stop button, which acts to accept the values. But with this application, I am using an Event Structure to monitor the front panel close (red X) to close the VI. I was thinking I could add another event to monitor if the mouse moves, if so then I could use a property node to accept values in the text and numeric controls. But what property node? Any other ideas?
    Doug Ferguson
    www.southerndaqsolutions.com

    use the event for the specific control---> value change.  It will tell you when the user clicks out of the control. If you want to know AS they are changing it, then you can set the control to synchronous display from the context advanced menu.
    Paul <--Always Learning!!!
    sense and simplicity.
    Browse my sample VIs?

  • Does anyone know why the sharpness slide control in the edit facility of iPhoto hasn't worked on any iMac after the iPhoto update near the end of 2011?

    Does anyone know why the sharpness slide control in the edit facility of iPhoto hasn't worked on any iMac after the iPhoto update near the end of 2011?

    Does anyone know why the sharpness slide control in the edit facility of iPhoto hasn't worked on any iMac after the iPhoto update near the end of 2012 ? (not 2011)

  • Intensive slider control use may lead to LabVIEW hang and system instability when coupled to event loop "Value Change"

     Occasionally, over the past year or two, I have noticed on different machines and versions of LabVIEW (8.0 and 8.5) that intensive operation of the LabVIEW slider control (holding down the left mouse button and shaking the mouse quickly back and forth to move the slider for several seconds) may cause LabVIEW to hang with high CPU usage (50% on my current test machine, which has a Pentium IV "hyperthreaded" processor, so 50% is the max that a single thread can take up). In some instances, after the LabVIEW process is forced to quit, the system itself becomes unstable (more high CPU usage) or hangs, up to and including the need for a hard restart. I have seen this behavior both when handling slider change events the "old fashioned" way with a while loop and a case structure; and also when using a while loop with an event structure handling the "Value Change" event for the slider. 
    Attached is an .rtf file dump of the front panel and block diagram of a simple test VI that replicates this problem in my hands (using an event structure). The loop count runs to at least several hundred iterations before the crash occurs.
    At least for the "old fashioned" loop handling method, adding a forced wait of a few dozen msec per loop didn't seem to be a workaround. I haven't tried this idea with the event structure, but don't expect joy to follow. The possibility of a system hang discourages aggressive experimentation. 
    Is this a known issue? Can anyone else replicate it (carefully)? In any case, I'd welcome other suggestions for workarounds.
    Thanks,
    Darin Nelson
    Attachments:
    Hang Slider.rtf ‏683 KB

    Thanks for all your responses, and especially to those who are waggling their mice around trying to reproduce this. I'll respond to (most aspects of) the last several posts in one message.
    LabViewGuruWannabe:
      I'll see if I can get the original code to post in a separate message, I posted the .rtf originally because I thought there might be filtering on forum posts (I'm sort of new here). But I doubt you re-created it wrong.
      The "more modern" test hardware was an Intel Core2 , 2.4 GHz, 2Gb RAM, on an Intel 965 family motherboard. As I said, it took me two tries to trigger the error on this hardware; in the case where it triggered, I was at almost 12000 iterations before things went south. 10000 iterations, therefore, might not be enough--or you might never get it, for all I know. My Pentium 4 Hyperthreaded machine (3.2 GHz, 2 Gb RAM) triggers the hang much more easily (always within 2500 iterations, usually within 1000), so there seems to be some hardware dependence here. Maybe the workaround is just to use hardware recent enough that no one not under the influence of strange compulsions will accidentally trigger the hang.
    TonP:
      After reading your suggestion, I tried something even more radical  -- getting rid of the handling code altogether. I took the slider node out of the while loop, and removed all code inside the "Slide" case of the event structure.
     On my Pentium 4 machine, the hang triggered after 677 iterations.
    Brian Beal:
    <!--
    /* Style Definitions */
    p.MsoNormal, li.MsoNormal, div.MsoNormal
    {mso-style-parent:"";
    margin:0in;
    margin-bottom:.0001pt;
    mso-pagination:widow-orphan;
    font-size:12.0pt;
    font-family:"Times New Roman";
    mso-fareast-font-family:"Times New Roman";}
    span.EmailStyle15
    {mso-style-typeersonal;
    mso-style-noshow:yes;
    mso-ansi-font-size:10.0pt;
    mso-bidi-font-size:10.0pt;
    font-family:"Courier New";
    mso-ascii-font-family:"Courier New";
    mso-hansi-font-family:"Courier New";
    mso-bidi-font-family:"Courier New";
    color:windowtext;
    mso-text-animation:none;
    font-weight:normal;
    font-style:normal;
    text-decoration:none;
    text-underline:none;
    text-decoration:none;
    text-line-through:none;}
    @page Section1
    {size:8.5in 11.0in;
    margin:1.0in 1.25in 1.0in 1.25in;
    mso-header-margin:.5in;
    mso-footer-margin:.5in;
    mso-paper-source:0;}
    div.Section1
    {pageection1;}
    -->
     Huh, I never even noticed that checkbox existed. Anyway, yes, I
    kept the default to lock out the front panel while the event process. If I
    disable it… I still get the hang.
    Message Edited by dman on 02-04-2008 06:36 AM

  • Tiled vi pane background​s can cause slow slider control updating

    In diagnosing a slow responding slider control I found that the problem was having selected a Pane background image that was set to Brushed Metal and Tiled.
    It turns out that it was the tiled setting that caused the slowdown (which was very pronounced).  It may not be commonly known, but if you right click on a vi pane scroll bar you
    have a right click menu that has the option of setting the background image jpg.

    Hmm, yes, it's actually pretty noticeable even all you have on the front panel is a slide control (you can see the slider trailing the mouse pointer when you move it up and down). It also seems to be specific to the metal brushed theme and doesn't happen when other backgrounds are tiled...
    Let me do some more testing here...
    Misha

  • Why does LabVIEW pause while I operate the slide control?

    I have a slide control inside a while loop. Something on the screen reacts immediately to the control as I slide it. This used to work, but now everything pauses while the control is being operated except for the control's own digital display. Even an indicator wired directly to the control, and also inside the loop, pauses until the control is let go then suddenly jumps to the control's current value. Both an indicator and a probe wired to the iteration count show the same thing.
    When I copied that same control into another VI with only a loop and an indicator, it works fine just as before.
    I've checked all the VI setup stuff and I can't see anything in the diagram that would cause this. I a
    lso tried deleting all of the control's local variables and attribute nodes to no avail.
    I'm using LabVIEW 5.0 in NT Workstation 4.0
    Does anyone have any idea what's going on.
    I'd appreciate any help.
    thanks,
    Louis

    Do you have a small wait inside of the while loop? I don't have any problem in version 5.1 or 6 when I put one inside. I typically use a delay of about 25 msec.

  • Team Foundation Server 2013 Refresh button not refreshing Custom Control values in TFS Templates

    Hi all,
    We have recently migrated from Team Foundation Server 2010 to Team Foundation Server 2013 Update 2. In TFS 2013 template design we found the refresh form control (inbuilt control of TFS) which is unable to refresh the custom control values that is built
    by us. Is there any way that we can programatically modify to enable the refresh button work with custom control.
    Please find below screenshot link for reference.
    http://postimg.org/image/z4mo3t8r9/
    SaranRam

    Hi SaranRam,
    The refresh button is there to allow the data that populated the work item to be refreshed. The data that you want refreshed is part of the rendering of the form and would only be refreshed when the browser refreshes. Refer to MrHinsh's reply in this
    page.
    Best regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Change control values on button press

    Hi, I've got a situation where I have several numeric controls where you can change different values. I also have several subVIs with control references (as described in this article: http://labviewwiki.org/Control_References) that takes in references to these numeric controls on the mainVI. These subVIs continously read the values in their own threads.
    So whenever I change a value on any of the controls, the values does of course change in the subVIs, since they reference to the value of the control.  How would I make the actual value only change only after I clicked the ok button?
    To illustrate this I made a VI with an event structure and a separate while loop that continoulsy reads a reference to the control and updats an indicator. I can think of a few cumbersome solutions, whereas I have two controls for every value. The second control would then be hidden and only written to in case of the Ok button press. But having two controls to do something simple as this seems superfluous.
    Message Edited by Siniz on 10-20-2009 10:36 AM
    Solved!
    Go to Solution.
    Attachments:
    ValueChangeOnButtonPress.vi ‏19 KB

    Given what you want to do then I would suggest that you use an Action Engine to contain your data. This has the advantage of decoupling the UI from the subtasks. I would recommend that your action engine consist of an array of clusters. Each cluster would contain the data values, in your case Ki, Kd and Kp for each controller. This has the advantage of reducing the individual values you are dealing with and treats the data for a given controller as a whole. The subtasks could either poll the data looking for a value change. You could even keep track of that in your Action Engine so you would only need to poll to see if the data changed. If it did, then read the data. You would need an index or ID to specify which controller's data you would want to access. The action engine allows you to grow your application if more controllers are added. You should use a typedef to define the cluster. If you wanted to make this more event driven you could use a single notifier shared by your subtasks that would simply indicate a data change event. Part of the data for the notifier could specify which data. That way only interested subtasks would take action. This type of architecture wouldn't add lots of wires to your diagram especially if you used a named notifier.
    Regardless of the way you choose to pass the data to the subtasks I would take a look at your UI. I haven't seen it so I can't comment on it specifically. However is you have 40 controls on the front panel at the same time it most likely is a confusing interface. There are ways to reduce the complexity and still provide the same functionality. If you haven't already looked at I would recommend getting the book The LabVIEW Style Book by Peter Blume. If you did reduce your UI to only work with a single controller or a couple of related controllers at a time the Action Engine approach would work nicely since you take your data from the FP and only update the data that has changed. From a UI perspective you have less controls to worry about on your UI and it will probably be easier for the user to understand. From the application's perspective you have decoupled the subtasks from the UI in a very clean way. Another approach would be to use LVOOP for your controller data and processing. Then you simply instantiate a new instance of the class (an object) for each controller that your system is using. This has an added benefit of allowing you to use different controllers and load them at runtime using dynamic dispatching.
    PS You are good for the overall Kudo count. Thanks.
    Message Edited by Mark Yedinak on 10-20-2009 12:33 PM
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • Can a slide control have a range of 180 to 0 to 180?

    I've got a slide control and I want its range to be 180 to 0 to 180.  No negative numbers are displayed or shown in the data.  This is how a aircraft cockpit roll indicator is marked as well as some other gages.  Electricaly the indicator is like this:
    0 volts equals 180 degrees roll to the left,
    5 volts is 0 degrees,
    and 10 volts equals 180 degrees roll to the right.
    Can slide controls work this way?  I would of thought there would be some sample code or something for aircraft cockpit gages but my searchs have been nill.  Thanks for any help.

    You should be able to modify the control slider to do that.  The value would output 0 to 10 as you indicte for voltage but change the slider control to not display the numeric values with the ticks.  The use free text to lable the tick marks.  I don't know if you can actualy have the control equal to the same value in two different slider postions, but if you need to have 180 to 0 to 180, make the range have negative values and convert them to positive values in code.  You will still have to not show the slider values and use free text. 
    Message Edited by paulmw on 11-14-2006 11:25 AM
    Attachments:
    slider.JPG ‏7 KB

  • No Quantity/ value update at Movement type

    Hello All,
    At Material type level with valuation area SAP controls check / uncheck Quantity/ Value updating (OMS2)
    In our specific business scaenraios, we use material type (HALB) with valuation area combination with / without Quanity & Value updating. Hnece, above setting will not work in our scenario.
    is it possible to have control of Quantity/ Value updating by using a custom movement (ex: copy of 101 to 1Z1)?
    Really appreciate your thoughts!
    Thanks
    Siva

    Hii shiva, lots of threads are available regarding this .
    have u gone thru.plz search sdn, u will get good reply.
    quantity and value update
    Quantity update and value update in case of account assignment category
    Material Type that updates Value but no Quantity
    Quantity and value updates for stock.
    quantity/value updation query
    hope u will get sm idea.
    Note : Do not use SMS Speak.Avoid links while answering,try to give your own suggestions.
    Edited by: Jeyakanthan A on Jul 22, 2011 10:25 AM

  • Quantity/value updating

    Dear expert:
    i create a PO (with account assignment) with a material belongs to a material type has not set quantity and value updating. i get a material document when i do goods receipt against this purchase order. i know there will no quantity and value update, but i wonder where the data is stored. please give me some clue.
    thanks and best regards,

    Hi David,
    When you are creating PO with qty & value updating untick, system will ask for account assignment mandatory (ex: K cost centre) while creating PO & when you do GR the qty part will go to cost centre consumption & value will be booked for that cost centre used. you can see controlling document in GR, for PO without cost cenre you see accounting entries here you see cost centre entries.
    Regards
    Rang
    Message was edited by:
            Ranganath Mysore

  • Pie chart in combintion with a Slider control in Dashboards 4.0

    Hi,
    Following the my requirement for creating a dashboard.
    1) i have to display employee count for different regions in a pie char for a particular month.
    2) This month needs to be selected from a slider control(Horizontal).
    3) The slider control needs to show Month and year (MON-YYYY format) for the last 13 months.6 months above the slider and 7 months below the slider.
    4) So when a user selects a particular month by dragging to the particular month in slider, then the pie chart should display employee count for the selected month.
    5) And Also the slider control by default should show last month employee count in pie chart when the dashboard is opened every time.
    So Any body knows how to implement this requirement please send me the solution in a step by step approch.
    Thanks in Advance,
    Regards,
    Nanda Kishore.

    Hi,
    Set up your data like this
    For the months we just use 0 for the selected month and we mark our min & max.
    (I just took a few months, just as test, in real, you have to have all your months, off course)
    Link the slider component, data to B2, min to B3 and max to B7
    Create combobox, link labels to cell B3:B7
    setup of data insertion, see screenshot below. (destination: j4:J7)
    for behaviour column do as follows...
    Your pie chart component
    results in
    now you have to put some makup on your dashboard, (hide the combobox - hide the values -6,0and 7), create some textcomponents to show the correct months (create a key row (-6 >0>7) and a month-text row), you can use vlookup or via a combobox to fetch the correct month-text
    Have fun with it

Maybe you are looking for

  • Camera App Photo Preview Blurry

    Heres an interesting issue i found on my iPhone 5. If i use the camera app to take a photo, then swipe left to view the photo.  The last taken photo is extemely blurry. Most camera preiews do this then load the clear photo, but thisone stays blurry. 

  • No audio on saved motion project

    I'm sure I will be embarassed by the answer... it will be so painfully simple. I have created a motion project, checked to make sure that all of the audio is connected and playing. When I saved then imported back to fcp, there is NO audio. I found th

  • Work Flow between PP and AE

    I am newB to AE and wanted to ask the following: If I am in PP and have a timeline with a bunch of clips and decide I want to apply an AE effect to one (lets say a 10 sec clip which is sourced from a 10 minute long footage file) Now I cant copy the c

  • Drop box and Ideapad A1, cant remove pictures??

    Just got my brand new A1 ideapad and when i go to the gallery there are pictures in there from dropbox.  How do i get rid of them when I have no pictures on my dropbox account?  Anyone else having this?

  • Macbook pro 15" i7 vs retina

    Hi people, I was wondering if the difference between the macbook pro 15" i7 and the retina one is toomuch, because I´m gonna buy a new one and in order to make my budget, bieng specific is because I work with photoshop, ilustrator an indesign all day