Focus Stage repeat test 시 사용 code

PowerScript

장비 생산 시 Focus Stage를 20회 반복 구동하며 모터 등 구조물의 이상을 파악하는데 사용됩니다. 같은 코드로 Focus Stage 변수를 Z stage로만 변경한 파일로 Z stage 테스트 시에 사용합니다.

main 0 files
Focus Stage repeat …..js
Focus Stage repeat …..js 1069 bytes
var speed = 1.0;
var maxCount = 20;
var distance = 1000 * 1000 * 1000;
var strokes = spm.focusstage.range;

print("hw limit = " + strokes.full[0] + " ~ " + strokes.full[1]);
print("sw limit = " + strokes.safe[0] + " ~ " + strokes.safe[1]);
print("reset stage ...");
spm.focusstage.reset();
spm.sleep(1000);

for (count = 1; count <= maxCount; count = count + 1) {
    print("repeat count = " + count + " ------------------------------------------------");
    print("- position = " + spm.focusstage.pos + ",  moving down ...");
   
    try {
        spm.focusstage.move(-distance, speed);
    } catch (e) {
        spm.sleep(1000);
        print("- position = " + spm.focusstage.pos + ", lower hardware limit reached");
    }

    spm.sleep(1000);
    print("- position = " + spm.focusstage.pos + ", moving up ...");

    try {
        spm.focusstage.move(+distance, speed);
    } catch (e) {
        spm.sleep(1000);
        print("- position = " + spm.focusstage.pos + ", upper hardware limit reached");
    }

     spm.sleep(1000);
}
Comments (0)

No comments yet. Be the first to comment!

Snippet Information
Author: Youngseo.Park
Language: PowerScript
Created: Oct 28, 2025
Updated: 0 minutes ago
Views: 33
Stars: 2