Author |
Topic |
|
frankwagner
France
Posts |
Posted - 03/10/2006 : 12:36:23 PM
|
Hello,
Is this a bug?
Using a particular function I stay blocked on the initialization code script tab every time I open it!!! I need to close the fitter, and reopen it in order to get to another tab. -- strange, it does not do this with other functions.
Thanks for your comments,
Frank
Details below:
I have a function (Origin C): double u; // argument of arctan const double z = pi*w^2*n/(lambda*M2); // raleigh length u = sqrt(F/thresh - 1); p = 1.0 - exp(-defden * 4.0/3.0*pi*w^2*z*(u^3/6.0 + u - atan(u)) ); parameters are: thresh,defden. Indepentent variable: F
and a parameter initialization code (origin C): int i=1; while (p_data[i]==0) {i++;}; thresh=F_data[i]; defden = 1e4; // defects / mm3 as general staring value enable automatic... is checked (or unchecked) and some constants: n=1.5 lambda=1064.0e-6/*mm*/ w=15.0e-3/*mm*/ M2=2 entered on the same script tab.
|
|
Leo_Li
China
Posts |
Posted - 03/13/2006 : 9:02:35 PM
|
Hi frankwagner,
We would like to know your Origin version number?
Leo OriginLab Corp. |
|
|
frankwagner
France
Posts |
Posted - 03/14/2006 : 03:12:59 AM
|
The Origin version is 7.5 SR4 (7.5853 B853), and I'm working on Windows XP (SP2) with automatic update function. |
|
|
frankwagner
France
Posts |
Posted - 03/14/2006 : 03:26:42 AM
|
I found the problem. When I remove the unities from the constant field the tabs switch correctly. Could you change this please. It's quite useful to have the unities written as comment after the unities.
In "scripts" "parameter initialization"
"lambda=1064E-6" is ok but "lambda = 1064E-6 //mm;" blocks the tab.
Best regards,
Frank |
|
|
Mike Buess
USA
3037 Posts |
Posted - 03/14/2006 : 05:50:51 AM
|
Hi Frank,
Comments belong after the semicolon...
lambda = 1064E-6; //mm
Mike Buess Origin WebRing Member |
|
|
frankwagner
France
Posts |
Posted - 03/14/2006 : 06:21:17 AM
|
quote:
Hi Frank,
Comments belong after the semicolon...
lambda = 1064E-6; //mm
Mike Buess Origin WebRing Member
I think Origin does not accept any comments in the "constants" field.
I tried it. In the C-file, a comment after the semicolon yields: const double lambda=1064E-6; const double //mm;
And the code does not compile compiling... _nlpcourbeSeuilVol3D2defauts.fit FEEDBACK macros not defined \OriginC\NLSF\_nlpcourbeSeuilVol3D2defauts.fit(42) :Error, invalid identifier, check using as name:
(I wrote the comments in a text file.. less elegant, but it works)
Frank |
|
|
Mike Buess
USA
3037 Posts |
Posted - 03/14/2006 : 09:41:20 AM
|
quote: (I wrote the comments in a text file.. less elegant, but it works)
You can also put them in the initialization script section at the bottom of that tab...
// comment about lambda
That way they're saved with the fdf file.
Mike Buess Origin WebRing Member |
|
|
|
Topic |
|