Jump to content

soupy

Members
  • Posts

    49
  • Joined

  • Last visited

Posts posted by soupy

  1. I actually just got finished wasting an entire day on this exact issue. In my case it was due to the front panels of the dynamic VIs not being included in the builds. this results in the invoke nodes working on the VI refs to return error 1013 (http://digital.ni.com/public.nsf/allkb/BFDB388E06A4EAA086256FE9007D6174). this will not be obvious if you are not handling these errors....

    To fix this issue, do one of the following:

    • in the dynamic VI, goto File --> VI properties --> Window Appearance --> Customize... and check "Show front panel when called"
    • on the block diagram of the dynamic VI, place a reference to any front panel control (it does not have to be wired up)
    • Go into the executable build specification and add the VI as "always included".

  2. We use errors to indicate a task failure, so all subsequent operations are not performed. Because of this, we NEVER overwrite an error or change its code because it makes it hard to determine the origin of the error. We use warnings to alert the user of non-critical things (i.e. "Your DAQ card will require calibration in 30 days, contact QA for a replacement"). If an error is generated after a warning, the warning is overwritten.

    To handle all of this logic, we use this VI to create an error:

    post-9124-0-22251000-1300373488_thumb.pn

    It has the features:

    • can create error or warning
    • code is an enum (similar to ogtk enum)
    • created errors will overwrite warnings
    • created error will not overwrite previous error
    • created warning will not overwrite previous warning
    • call chain is included in error source
    • optional custom text can be pre-pended to source

    typically we create a 42:generic error and just describe it with custom text or error details (i.e. Excel tab "foo" is not found)

    Note: our software is used internally, so we are always a phone call away to describe what an error message means so messages can be a little more cryptic. if you are producing software for external release, you will have to generate messages that are a little more user-friendly

  3. I find it most useful for transferring files (mostly photos and app installers) to/from my android phone without the need to find the USB cable (that i always lose). The web interface makes it nice so you can even do this at work!

  4. Maybe they really are math operations or string utilities, but I don't see many programmers creating large libraries of those.

    What a coincidence. I was just about to move my large collection of string functions into a library. From your comment, do you think this is a bad idea, or is it just not that common?

  5. I don't understand the auto-tool hate.

    1.) It is an option, you can turn it off.

    2.) Its function is based on what pixel you are hovering over. Memorize the pixel context, turn down your mouse sensitivity and quit complaining.

    3.) Yes, it doesn't switch to the paintbrush tool, but if you bind the tools palette to Ctrl+T (who tiles windows anyway?) then you're in business.

    Seriously, auto-tool gets the job done if you know how to use it. Your inability to use a tool doesn't invalidate its usefulness.

    • Like 1
  6. QUOTE (Neville D @ Sep 23 2008, 06:13 PM)

    The Windows Performance Monitor I mentioned earlier, does EXACTLY that.

    N.

    I'm sorry, I hadn't had time to fully investigate that VI yet. You are correct, it does exactly that (and more!). I'll make a VI just for processor usage and post it shortly.

    Thanks all for the help!

  7. QUOTE (crelf @ Sep 19 2008, 05:32 PM)

    Thanks, but it appears that eTree perfmon no longer exists on the internet. All the links for it are dead. Do you know of any web site that would still have it, or do you have it?

  8. I have some processor intensive data acquisition and control programs that run on windows servers. Data integrity is extremely critical. I want to get all of the metrics I can to prove that data is good and determine how far away I am from "bad" data. Does anyone know a method to acquire the current CPU usage? A total usage will suffice, but levels for each core would be super awesome!

    Thanks in advance,

    -Andy

  9. QUOTE (bazookazuz @ Jul 7 2008, 10:24 PM)

    Thanks!

    I used to use EWMA for all general filtering because it used minimal memory and was easy to use. Once I found out that you could do a boxcar average with minimal memory usage as well (see above post) I switched to it because it has better response time. I noticed the most improvement in response time when measuring the fill-rate on a high-noise system. In my case we would only fill for a few minutes, so response time was critical or we would over-fill.

    As for the jitter issue i proposed above, I did some tests over the weekend and I did not see any signs of jitter errors. I ran noisy sine waves into the filter for an equivelnat of one week of run time at 100Hz.

    Cheers!

    Never mind, the code I posted above does not work. I thought it did, but it turn out to just be a slightly different version of the EWMA method. Apparently, there is no free lunch. Back to the drawing board...

  10. QUOTE (Aristos Queue @ Jul 13 2008, 08:02 AM)

    In the VI's menus, choose

    Tools >> Profile >> Performance and Memory...

    Beware, the above method uses a good bit of processing power in itself.

    I can't use it because I don't have the processing margin to support the performance calculations. :angry: Please tell me if I'm missing something here.

    To get around this, I run performance tests on individual subVIs before integrating them into the main VI. If I am trying to find the performance hog in the main VI, I probe it with tick timers. I like tick timers because they tend to be more reliable than than the windows clock. Note that tick timing will not work if your loop rate is greater than 100Hz.

    I like to use the attached tick timer VI. Let me know if it needs any improvements.

  11. QUOTE (torekp @ Jul 1 2008, 08:12 AM)

    Excellent, bazookazuz.

    I personally prefer to use exponentially weighted moving averages for most applications. The formula for it is EWMA(i+1) = EWMA(i)*(1-lambda) + latestDataPt*lambda. It's even simpler to compute, and does a nice job of smoothing. The only problem case I've ever seen where you wouldn't want EWMA is where machine error occasionally gives you wild numbers in the (usually negative, for some reason) billions while your real data is order ~ 1. In that case, boxcar moving average is better, because it comes back to sanity faster.

    Thanks!

    I used to use EWMA for all general filtering because it used minimal memory and was easy to use. Once I found out that you could do a boxcar average with minimal memory usage as well (see above post) I switched to it because it has better response time. I noticed the most improvement in response time when measuring the fill-rate on a high-noise system. In my case we would only fill for a few minutes, so response time was critical or we would over-fill.

    As for the jitter issue i proposed above, I did some tests over the weekend and I did not see any signs of jitter errors. I ran noisy sine waves into the filter for an equivelnat of one week of run time at 100Hz.

    Cheers!

  12. I completely have the Filter Pt-by-Pt VI because it is not included in the base package (which some of my users use) and it is horribly inefficient.

    I prefer to use the attached method. It is polymorphic and works for filtering single or multiple channels. You only need two single point buffers for each channel you are filtering and the size of the average does not effect performance. I believe that you could experience some jitter when using this method, but it has not been an issue for my applications. I don't think it can get any better than this, expecially for averages lasting thousands of points.

    Note that whenever filtering data you need to make sure that a +/-Inf or NaN cannot get "caught" in your shift registers. In this example I chose to ignore those values and just pass the last valid data. You can use this to filter out invalid data points, just convert them to NaN before passing them to the filter. I like to use this method to filter out bad thermocouple values that are caused by broken wires, etc.

    Thoughts? Comments?

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.