X_1Step_Error_Test

PowerScript
main 0 files
X_1Step_Error_Test..js
X_1Step_Error_Test..js 703 bytes
//X Stage

baseDir = '/'

targetDefocus = 317.5
motorStep = 0.79375
unitRepeat = 4
unitDefocus = motorStep * unitRepeat

repeatNum = parseInt(targetDefocus / unitDefocus)

path = baseDir + 'Start.jpeg'
spm.vision.capture(path)
spm.sleep(1000)

for (i = 0; i < repeatNum; i++) {

	currRepeat = i + 1
	print('Repeat#' + currRepeat)

		for (j = 0; j < (unitRepeat + 1); j++) {

			spm.xystage.move(-635, 0)
			spm.sleep(100)

		}
	
	spm.xystage.move(3175, 0)
	spm.sleep(100)

	path = baseDir + currRepeat + '.jpeg'
	spm.vision.capture(path)
	spm.sleep(1000)

}

spm.xystage.move(targetDefocus, 0)

path = baseDir + 'End.jpeg'
spm.vision.capture(path)
spm.sleep(1000)
Comments (0)

No comments yet. Be the first to comment!

Snippet Information
Author: daeyeon.won
Language: PowerScript
Created: Oct 23, 2025
Updated: 0 minutes ago
Views: 12
Stars: 2