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
 using pkFind function

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
nicolas777 Posted - 06/24/2010 : 10:06:02 AM
Origin 8.0.63.988 SR6
v8.0988
Operating System: Windows

I wrote a loop-based program that runs the pkFind function on several data columns contained in several data sheets.
If the function pkfind cannot find any peaks, it stops and shows an error message asking me to change my parameters.
But I would like it not to stop and to move on to the next sheet.

How can I do that ?

Thanks

Nicolas Murer
2   L A T E S T    R E P L I E S    (Newest First)
SteffenG Posted - 07/23/2010 : 09:25:25 AM
Use the -sb option switch within your pkfind-command. This will prevent the X-Function to report errors and results to the results log.

Look inside of the LabTalk-Help for chapter 'X-Function Execution Options'. There you will find a complete list of option switches for all X-Functions.

Example:
pkfind -sb dir:=b method:=max smooth:=200 ocenter:=peakindex ocenter_x:=peakx ocenter_y:=peaky iy:=(targetx,targety);

Regards,
Steffen
VincentLiu Posted - 06/25/2010 : 03:37:49 AM
You could use a pair of curly braces ("{" and "}") to enclose a part of the script that might generate an error. Then Origin will encounter the error and resume with the rest part of the script, which is outside the braces.

The following page has given a example to show you how to do this.

http://wiki.originlab.com/~originla/wiki/index.php?title=Script:Error_Handling

OriginLab Technical Services

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