Slow Custom Derived Function

38 views
Skip to first unread message

Mike Thake

unread,
Apr 16, 2012, 12:06:35 PM4/16/12
to IADS, michael.p...@boeing.com
All,

I created a custom derived function using the "Creating an IADS Custom
Derived Function using Visual C++ 6.0" tutorial (which was very
helpful, by the way), but I seem to be having some trouble. Let me
preface this by saying that I have little programming experience, none
of it being in Visual C++.

My custom function works correctly in IADS, but is very slow. I am
inputting parameters at a sample rate of 20 Hz, but my derived
function is outputting data at about 0.1 Hz. I have created two text
boxes in my analysis window, with the Update Rate set to zero, for
both the input and output. Update rate on the actual parameters in
the Parameter Defaults Table is also 20 Hz. The inputs are flying and
the outputs are crawling.

My performance is fine...~64 Display Updates/Sec and CPU's are between
0 and 3%.

My function is not intensive, as it is *simply* taking in 15 separate
ASCII parameters and combining them to make a single 15 character
string...like an sprintf function.

I imagine I just did a poor job of programming and something is
bogging down the custom function code. Anyone have any suggestions on
how to speed this up or how to start troubleshooting?

Thanks,
Mike

James Bretz

unread,
Apr 16, 2012, 12:23:20 PM4/16/12
to IADS, michael.p...@boeing.com
Hi Mike,

Glad the tutorial helped, but looks like not quite enough ;)

If the display update rate is running at ~64, then the function isn't
bogging down due to performance. There must be some other problem. Hmmm...
Sounds like you have all the basis covered.

I'm assuming that the inputs actually "change" at 20Hz. Did you confirm that
too? Try dropping all the parameters into text objects and displaying them
as Hex (or whatever). Do their values also change at a fast rate or do they
change closer to .1 hz?

If they do change faster than 0.1Hz then it could possibly be a bug in the
derived engine. I have heard of a similar issue, but the input data wasn't
based on parameters (it was being simulated with GetValue functions).

Let me try to do some experiments and I'll attempt to reproduce.
Alternatively, if you can send me the data (privately jim at iads-soft dot
com) and your derived function project, I can step through the derived
engine code and see what's happening,
Jim

> --
> You received this message because you are subscribed to the Google Groups
> "IADS" group.
> To post to this group, send email to ia...@googlegroups.com.
> To unsubscribe from this group, send email to
> iads+uns...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/iads?hl=en.
>

Reply all
Reply to author
Forward
0 new messages