How do I determine the size of an event queue?

Hi,
I'd like to be able to programmatically determine how many events are in queue so that I can change how they are processed based on how far behind the loop is.
Is there a way to easily do this in labview? 
I suppose I could create an identical parallel event loop that just counts the events as they come in, and then subtract the ones that get processed by the main event loop, but it seems like there should be an easier way.
I'm using LV 8.1
Thanks,
Greg

So you are recomending running two event loops, one waiting for the faster events and one waiting for the slower events?
I wouldn't put it that way.
Any event that takes 'long' (eg. a significant amount of time), should be processed in a consumer loop.
So the event arives in the normal event structure, and is than feed to a consumer loop via a queue.
In the LabVIEW examples there is a framework example called 'Produces/consumer with events' (or something like that).
If you have a specific type of event generating very fast and you are only interested in the last a notifier might be usefull.
Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas
LabVIEW, programming like it should be!

Similar Messages

  • How do I determine the size of an event (cmd I does not show any size for events).

    How do I determine the size of an Event in iPhoto? (Cmd + I does not show size information at the event level).

    If you're running iPhoto 8 (09) select the event and look at the Info pane at the lower left hand corner of the window.  It will give you the number of photos and size:
    for iPhoto 9 (11) open the Event, select all of the photos in it and open the Info drawer at the right by typing Command+i.  The number of photos and size will be at the top of the Info drawer.
    OT

  • How Can I Determine the Size of the 'My Documents' Folder for every user on a local machine using VBScript?

    Hello,
    I am at my wits end into this. Either I am doing it the wrong way or it is not possible.
    Let me explain. I need a vb script for the following scenario:
    1. The script is to run on multiple Windows 7 machines (32-Bit & 64-Bit alike).
    2. These are shared workstation i.e. different users login to these machines from time to time.
    3. The objective of this script is to traverse through each User Profile folder and get the size of the 'My Documents' folder within each User Profile folder. This information is to be written to a
    .CSV file located at C:\Temp directory on the machine.
    4. This script would be pushed to all workstations from SCCM. It would be configured to execute with
    System Rights
    I tried the script detailed at:
    http://blogs.technet.com/b/heyscriptingguy/archive/2005/03/31/how-can-i-determine-the-size-of-the-my-documents-folder.aspx 
    Const MY_DOCUMENTS = &H5&
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objShell = CreateObject("Shell.Application")
    Set objFolder = objShell.Namespace(MY_DOCUMENTS)
    Set objFolderItem = objFolder.Self
    strPath = objFolderItem.Path
    Set objFolder = objFSO.GetFolder(strPath)
    Wscript.Echo objFolder.Size
    The Wscript.Echo objFolder.Size command in the script at the above mentioned link returned the value as
    '0' (zero) for the current logged on user. Although the actual size was like 30 MB or so.
    I then tried the script at:
    http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_27869829.html
    This script returns the correct value but only for the current logged-on user.
    Const blnShowErrors = False
    ' Set up filesystem object for usage
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objShell = CreateObject("WScript.Shell")
    ' Display desired folder sizes
    Wscript.Echo "MyDocuments : " & FormatSize(FindFiles(objFSO.GetFolder(objShell.SpecialFolders("MyDocuments"))))
    ' Recursively tally the size of all files under a folder
    ' Protect against folders or files that are not accessible
    Function FindFiles(objFolder)
    On Error Resume Next
    ' List files
    For Each objFile In objFolder.Files
    On Error Resume Next
    If Err.Number <> 0 Then ShowError "FindFiles:01", objFolder.Path
    On Error Resume Next
    FindFiles = FindFiles + objFile.Size
    If Err.Number <> 0 Then ShowError "FindFiles:02", objFile.Path
    Next
    If Err.Number = 0 Then
    ' Recursively drill down into subfolder
    For Each objSubFolder In objFolder.SubFolders
    On Error Resume Next
    If Err.Number <> 0 Then ShowError "FindFiles:04", objFolder.Path
    FindFiles = FindFiles + FindFiles(objSubFolder)
    If Err.Number <> 0 Then ShowError "FindFiles:05", objSubFolder.Path
    Next
    Else
    ShowError "FindFiles:03", objFolder.Path
    End If
    End Function
    ' Function to format a number into typical size scales
    Function FormatSize(iSize)
    aLabel = Array("bytes", "KB", "MB", "GB", "TB")
    For i = 0 to 4
    If iSize > 1024 Then iSize = iSize / 1024 Else Exit For End If
    Next
    FormatSize = Round(iSize, 2) & " " & aLabel(i)
    End Function
    Sub ShowError(strLocation, strMessage)
    If blnShowErrors Then
    WScript.StdErr.WriteLine "==> ERROR at [" & strLocation & "]"
    WScript.StdErr.WriteLine " Number:[" & Err.Number & "], Source:[" & Err.Source & "], Desc:[" & Err.Description & "]"
    WScript.StdErr.WriteLine " " & strMessage
    Err.Clear
    End If
    End Sub
    The only part pending, is to achieve this for the 'My Documents' folder within each User Profile folder.
    Is this possible?
    Please help.

    Here are a bunch of scripts to get folder size under all circumstances.  Take your pick.
    https://gallery.technet.microsoft.com/scriptcenter/site/search?query=get%20folder%20size&f%5B0%5D.Value=get%20folder%20size&f%5B0%5D.Type=SearchText&ac=2
    ¯\_(ツ)_/¯

  • How do I determine the size of my iTunes library

    How do I determine the size of my iTunes library?

    In Music view, you will see the song count, size, and total playing time in the Status Bar at the bottom. 
    If the Status Bar is not present, enable it either via View > Show Status Bar, or by holding the CTRL key while you press the / key.

  • How do I determine the size of an object on a particular layer?

    Whether it's a rectangle, circle, line, etc. how do I determine what the size of an object is on a particular layer?

    Right click on the rulers and set the scale to pixels in the dialog
    Go to View>new guide and select the position of the guide lines along horizontal and vertial axes
    Window>info brings up the Info Palette. The information in the right lower corner provides a readout of any selection that you make, e.g. with the marquee tool
    View>grid allows one to bring up a non-printable grid which is useful for orientation. The grid can be set up with subdivisions to suit via Edit>preferences>guides and grid
    You can open a duplicate layer at the top of the stack, then using the brush tool create a straight line for visual projection. The layer can be deleted at any time. To create a straight line, click on the begin point, hold down the shift key, and click on the end point
    Hope that one of these options is useful for your purpose. Please post your progress.

  • How do I determine the size of my iPhoto library?

    I am running out of disk space and I assume that it is due to my photos.
    #1 - how do I determine if this is the case?
    #2 - how can I figure out the size of my library so I buy the correct sized external HD?
    #3 - what is the best practice for moving iPhoto to an external HD? Do people move over only "older" photos or just run iPhoto off the external HD completely?
    Thank you so very much!
    Jen

    #2 - how can I figure out the size of my library so I buy the correct sized external HD?
    Go to your Pictures Folder and find the iPhoto Library there. Use the Finder's File -> Get Info command to get the size of the Library. When you purchase an extenral disk, make sure to format it Mac OS Extended (Journaled). Also, allow room to grow.
    #3 - what is the best practice for moving iPhoto to an external HD? Do people move over only "older" photos or just run iPhoto off the external HD completely?
    There isn't a "best practise" there's only what you need to do. IF the Library is on the external, then you can only view it with the external attached. Are you on a Laptop? Desktop? If you're on a desktop it probably doesn't matter. If you're on a Laptop it might.
    Regards
    TD

  • How do I determine the size of my photo library

    I want to know the size of my photo file so that I can determine how much space I need to store them in iCloud (iPhoto version 9.6)  Os Version 10.10.2
    Thanks
    Dan

    Depends on what you mean and... you can't store an iPhoto Library in the Cloud.
    If you use the size determination in the iPhoto Window, that reports the approximate size if you export everything at the 'Current Setting' (which you would not want to do. See below*)
    If you check the size of the package in the Finder (Pictures / iPhoto Library) that reports the disk space used for the combined size of the Masters, Previews, Thumbnails, Caches, Database and metadata files.
    Though, as I say, it's not really an issue as you can't put an iPhoto Library in the Cloud.
    *This User Tip
    https://discussions.apple.com/docs/DOC-4921
    has details of the options in the Export dialogue.

  • How do I determine the size of an object?

    After an object is instantiated, is there anyway to determine its size (in bytes)?

    Why do you want to know? Java handles memory management for you.
    IIRC for Sun JVM 1.4:
    Objects: four bytes for each reference, boolean, byte, short, int, float or character field, eight bytes for each long or double field, plus sixteen bytes header information.
    Arrays: length * (four for reference, int or float; one for boolean or byte; two for short or character; eightfor long or double), plus sixteen bytes header information.
    Pete

  • How do you determine the size of a table in mb

    Hi,
    I have a table which holds a number of pdf docs - I need to find out how large the table is in mb
    How do you do it - is there an sql command ?
    Thanks in anticicpation
    SD.

    Many thanks ............
    select sum(bytes)/1024/1024
    from user_segments
    where segment_name in (select segment_name from user_lobs
    where table_name = 'SUPPORTING_DOCUMENT')
    or segment_name = 'SUPPORTING_DOCUMENT'
    This sql does the trick and tallies with some rather manual calcuations I have done in sql sum(doc_size) on the docs table.
    As a newbie please could you explain segments ?
    Thanks in anticpation
    SD.

  • How do I determine the size of an image ( bytes not dimensions )?

    I am working on an application which downloads images from the web and caches them for speed reasons. I want to allow the users to browse the cache and dump selected images to free up memory. Ideally I would display the image size in bytes for each cache entry, but I haven't seen any way to access this info.
    I do not want dimensions. getIconHeight() * getIconWidth() doesn't address bit depth at all, which can make a huge difference. If there was some getBytes() method I could use that, but I haven't found one yet.
    Help?

    Only if you use a stream and count the bytes. I'm loading it like this:
    ImageIcon foo = new ImageIcon( new URL( "http://foo/bar/baz.gif" ) );

  • How to determine the size of an InputStream??

    Hello,
    I need to get the size of an inputstream. In fact, I am working with java.nio.channels and need to tranfer a file from within a Jar to the FileSystem.
    I have created a ReadableByteChannel from the jar resource, and a FileChannel from the FileSystem destination. The problem is that to use the FileChannel .tranferFrom(..) I need the size of the src file. But, ReadableByteChannel has no size() method.
    How can I determine the size of this InputStream??
    advanced Thanx
    here is code:
    private void copyResourcesToFileSystem(){
              try{
                        String name = getFileName(); // gets the name
                        ReadableByteChannel srcChannel =
                             Channels.newChannel(this.getClass().getClassLoader().getResourceAsStream(("dtd/"+name)));
                        File newFile = new File(TempDirCreator.getXmlDir(),name);
                        FileChannel dstChannel = new FileOutputStream(newFile).getChannel();
                        dstChannel.transferFrom(srcChannel, 0, srcChannel.size());  // doesn't work -- there is no ReadableBC.size()
                        // lets close the show
                        srcChannel.close();
                        dstChannel.close();
              }catch(IOException x){x.printStackTrace();}
              catch(Exception ex){ex.printStackTrace();}
         }

    In general the "size of an InputStream" is a meaningless concept. It's possible to have an InputStream that never terminates. So if you can't get a size from whatever you're reading from, you're out of luck.
    I missed where you explained why you need the size. I've never felt the need to know how many bytes would be passing through my code when copying from input to output.

  • How to determine the size of an iMovie09 project?

    Hello:
    I recently created a nice video of about 2 hours in iMovie09. I "shared" it to iDVD but it was about 10% too big to burn. I went back to iMovie09 and removed some time to make the project smaller but how can I determine the size of my iMovie09 projects before I send them to iDVD? I know that both time and audio will affect the size of the iMovie09 project so the time of the video is not necessarily an accurate indicator.
    Thanks!

    Welcome to iMovie Discussions.
    As long as your movie is under about 1hr 50 minutes it should fit on a DVD.
    The thing which determines how much time is available on your DVD is usually the complexity of any Menus which you add in iDVD.
    With a simple Menu, which may "eat up" 10 mins of space, you should have room for 1h 50mins of movie.
    With complex, multi-level menus, your movie running time may be reduced by about 25 mins, or possibly more.
    Keep menus simple, and you should have space for about 1hr 50mins. It's always running time which counts, NOT "size" (in GB) of your movie.

  • How do you determine the optimal size for Mozilla Firefox?

    How do you determine the optimal size for cache in Mozilla
    Firefox? I am using Firefox 7.0.1 on a 64-bit Windows 7 Ultimate operating system with 3GB RAM and 300 GB hard drive, but I have other computers running Windows XP. If the answer doesn't apply to all current versions of Firefox on all supported Windows operating systems, please explain the differences. Is there a formula for calculating the best cache size?

    I found that the best idea is to let Firefox decide that itself.

  • How to determine the size (in pixels) of the current mode

    Hello.
    I am looking for a was to determine the size (horizontal and vertical pixels) of the current mode (SAPGUI window). I have already looked through the methods provided by class CL_GUI_CFW...
    CL_GUI_CFW=>GET_METRIC_FACTORS provides the size of you display (i.e. 1600 x 1200 pixels) and some other information I am not able to interprete.
    Futhermore I have had a look at the Methods CL_GUI_CFW=>COMPUTEPIXEL, but I don´t know how to use them.
    Has anybody of you any experiences in this topic? I would be grateful ...
    MIKE

    Sorry Manoj,
    but i didn´t find out, why these programs should be able to solve my issue. They just display a picture using the CL_GUI_PICTURE control.
    I am looking fo a way to resize a given control to the very maximum, so that it fills the whole SAPGUI window!
    Thanks anyway...
    MIKE

  • How do you Determine the Largest Size/Fastest Speed Hard Drive

    In general, how do you determine the maximum hard drive size/speed you can upgrade to?

    As long as the drive your are considering physically fits as already stated there is no maximum size you can install. Please complete your profile so we know what machine you have.
    If your machine is covered by a warranty or AppleCare I would recommend against installing another HD as this may invalidate the warranty. I would recommend in that case using a Firewire 800 external HD instead.
    Regards,
    Roger

Maybe you are looking for