[proFit-list] Plugin Problems
Dirk Fröhling
dirk.froehling at t-online.de
Thu Jul 9 08:43:50 CDT 2009
Dear Kurt,
I tracked the problem down to a call of "SetFunctionParam".
To use my ODE Module plugin, the user has to provide a function called
"derivs" which calculates the derivatives of dependent variables at a
given time. The function expects the time, the variable values and
delivers the derivatives. Example declaration:
function derivs(t, y1, y2, y3, y4, dydt1, dydt2, dydt3, dydt4:
extended);
From ODEModule, I call the function like
SetFunctionParam(DefName, 1, x);
for (i = 1; i <= N; i++)
SetFunctionParam(DefName, i+1, y[i]);
for (i = 1; i <= N; i++)
SetFunctionParam(DefName, i+N+1, dydx[i]);
t = CallFunction(DefName, 0);
for (i = 1; i <= N; i++) {
dydx[i] = GetFunctionParam(DefName, i+N+1);
}
DefName is a Str255, i is short, x, y[i] and dydx[i] are double
values. N is four in this example.
Like I said, it works with pro Fit 6.0.6, but with 6.1.10 on Intel, it
doesn't. And I get the "ODE Module: Bad parameter value for this
function." message.
If I comment out the SetFunctionParam() calls, it "works" in a way
that it doesn't behave like I described below, e.g. plot all the
curves in one window without title etc.
Could this be a pro Fit problem with callback functions that use
double/extended values?
Best regards,
Dirk
Am 05.07.2009 um 07:59 schrieb pro Fit Support:
> Dear Dirk
>
> I am not aware of any such issues with pro Fit 6.1 on a general
> level. I assume that this may be related to your plug-in. I propose
> you send a copy of the whole Xcode project to profit at quansoft.com,
> together with a detailed description on how to run it and how to
> reproduce the errors. We then might be able to track down the issues.
>
> Best regards
>
> Kurt Sutter
> QuantumSoft
>
> On 4 Jul 2009, at 2:54, Dirk Fröhling wrote:
>
>> Hello,
>>
>> I recently upgraded from pro Fit 6.0.6 to 6.1.10. I once wrote a
>> plugin for the solution of systems of differential equations (ODE
>> Module, see http://www.dirk-froehling.privat.t-online.de/page2/page2.html)
>> . It still is a Carbon-based PPC version. Now I wanted to update it
>> to an Universal plugin (PPC/Intel), using XCode instead of
>> CodeWarrior.
>>
>> I managed to build the plugin successfully, but when I try it with
>> pro Fit 6.1.10 on an Intel Mac it does not work. When I use it with
>> 6.0.6 on the same Mac, it does work.
>>
>> Some observations on 6.1.10:
>>
>> - My calculation routines report errors. I guess this is due to
>> conversion problems of values the program gets from dialogs, but I
>> haven't verified that yet.
>>
>> - The program produces plots that should be drawn in different
>> drawing windows, but all the plots are drawn in one single window
>> whose title isn't set.
>>
>> - If I stop the program by clicking on the "Stop" button of a
>> dialog I included for this purpose, it ends with an error message
>> saying "ODE Module: Bad parameter value for this function." This
>> message is not from the plugin.
>>
>> - Like I said, none of these problems occur with pro Fit 6.0.6 and
>> the very same plugin.
>>
>> Has somebody experienced similar problems? Could it be a compiler
>> settings problem? I started using the sample program project from
>> 6.1.10.
>>
>> Regards,
>>
>> Dirk
>>
>> --
>> Fachhochschule Gelsenkirchen
>> Fachbereich Maschinenbau
>> Prof. Dr. Dirk Fröhling
>> Neidenburger Str. 10
>> D-45897 Gelsenkirchen
>>
>> Tel.: 0209/9596-171
>> E-Mail: dirk.froehling at fh-gelsenkirchen.de
>>
>>
>> _______________________________________________
>> proFit-list mailing list
>> proFit-list at quantum-soft.com
>> http://quantum-soft.com/mailman/listinfo/profit-list_quantum-soft.com
>
> _______________________________________________
> proFit-list mailing list
> proFit-list at quantum-soft.com
> http://quantum-soft.com/mailman/listinfo/profit-list_quantum-soft.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://quantum-soft.com/pipermail/profit-list_quantum-soft.com/attachments/20090709/090ce02a/attachment.html>
More information about the proFit-list
mailing list