The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Just cannot find the mistake

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
Selinger78 Posted - 10/25/2005 : 08:45:54 AM
Origin Version (6.0):
Operating System: Win2k

I tried to automize my plots using a script file (with lots of help from the forum!).
Somehow there must be a mistake in the code...
The script works only sometimes, even with the same data the graphs are not always displayed when using the script file. Last time after a programm restart e.g. just one (instead of two) graph windows appeared and this one was empty.
So does anybody with some more experience see an obvious mistake:

[main]

getfile *.dat;
open -w %A;};

wks.col1.Width=15;
wks.col2.Width=15;
wks.col3.Width=15;
wks.col4.Width=15;
wks.col5.Width=15;
wks.col6.Width=15;

wks.col1.name$="time";
wks.col2.name$="temperature";
wks.col3.name$="eline";
wks.col4.name$="ellipse";
wks.col5.name$="transmitted";
wks.col6.name$="outerring";

col(transmitted)=col(transmitted)*10^1,4;
col(transmitted)=col(transmitted)*10^(-4);


wks.col3.label$="e-line";
wks.col5.label$="transmitted beam";
wks.col6.label$="anisotropic ring";
wks.col4.label$="ellipse";

worksheet -s 1;
worksheet -s 3;
worksheet -s 4;
worksheet -s 5;
worksheet -s 6;


//windowname=%H;


win -t P "00_langzeitmessung-4-dioden über der zeit.OTP" %H _E_full range;
//lay -i %W_time;
lay -i %W_eline;
lay -i %W_ellipse;
lay -i %W_transmitted;
lay -i %W_outerring;

set %W_eline -c 2;
set %W_ellipse -c 3;
set %W_transmitted -c 4;
set %W_outerring -c 5;

//Rescale;


win -t P "00_langzeitmessung-4-dioden über der zeit - bis 100s.OTP" %w _E_up_to_100_s;
//lay -i %W_time;
lay -i %W_eline;
lay -i %W_ellipse;
lay -i %W_transmitted;
lay -i %W_outerring;

set %W_eline -c 2;
set %W_ellipse -c 3;
set %W_transmitted -c 4;
set %W_outerring -c 5;

//layer.x.rescale=1; // manual
//layer.y.rescale=2; // normal

//Rescale;



3   L A T E S T    R E P L I E S    (Newest First)
Selinger78 Posted - 10/26/2005 : 05:25:13 AM
As always you were right.
Don't know how the bracket came there. With your first 3 lines it works fine. I also changed the template-names just to be sure to produce no more errors or strange outputs.

Thank you!
Selinger78

Mike Buess Posted - 10/25/2005 : 11:11:33 AM
1. The unnecessary "};" at the end of the open command is sure to produce wierd results. (Assuming it's not just a transcription error.) Also, I don't see where you've defined %W. First three lines should be

getfile *.dat;
open -w %A;
%W=%H;

2. The '?' character is not allowed in file names. (your graph template) That could also be creating problems.

3. Your worksheet -s commands merely select the columns one at a time ending up with only col 6 selected. Does no harm but serves no purpose since you add the columns one at a time to each graph layer.

Mike Buess
Origin WebRing Member
Selinger78 Posted - 10/25/2005 : 09:00:22 AM
I just noticed the following:
When I start the script in a new Project an empty graph with just axis appears. When I delete this window an open the first template from the script manually then I get the dat displayed but all in red color.
When I then delete this graph window again and rerun the script then everything is correct - both graphs are displayed with right colors and legends.
has anybody an idea how the manage this?
Regards,
Selinger78



The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000