AutoAlign Test for Extraction of Vision Parameters

PowerScript
main 0 files
AutoAlign Test for …..js
AutoAlign Test for …..js 1887 bytes
passDir = 'C:/Users/RRD_LAB/Desktop/20220114_autoalign_param/Pass/'
failDir = 'C:/Users/RRD_LAB/Desktop/20220114_autoalign_param/Fail/'

smplHeight = 17500
zPosAfterPickup = 39000
df = 39509.6 - 40000

var paramCam = {
	'light': 20,
	'exposure': 70,
	'contrast': 100,
	'autoContrast': false,
	'autoWb': true
}

for(i = 1; i < 10; i++) {

	val_Light = 10 + 10 * i
	paramCam['light'] = val_Light
	
	for(j = 0; j < 10; j++) {

		val_Exp = 10 + 10 * j
		paramCam['exposure'] = val_Exp

		for(k = 1; k < 10; k++) {

			val_Contrast = 10 + 10 * k
			paramCam['contrast'] = val_Contrast
			
			try {
				spm.zstage.moveTo(smplHeight)
				spm.sleep(500)
				spm.focusstage.moveTo(smplHeight + df)
				spm.sleep(500)

				spm.vision.config = paramCam
				spm.sleep(1000)

				spm.fx.analyzer.findProbe()
				spm.sleep(1500)

				path = passDir + 'Near_Sample_Pass_Light_' + val_Light +'_Exp_' + val_Exp + '_Contrast_' + val_Contrast + '.jpeg'
				spm.vision.capture(path)
				spm.sleep(1500)
			} catch(e) {
				spm.sleep(1000)
				path = failDir + 'Near_Sample_Fail_Light_' + val_Light +'_Exp_' + val_Exp + '_Contrast_' + val_Contrast + '.jpeg'
				spm.vision.capture(path)
				spm.sleep(1500) }

			try {
				spm.focusstage.moveTo(zPosAfterPickup + df)
				spm.sleep(500)
				spm.zstage.moveTo(zPosAfterPickup)
				spm.sleep(1000)

				spm.vision.config = paramCam
				spm.sleep(1000)

				spm.fx.analyzer.findProbe()
				spm.sleep(1500)

				path = passDir + 'Above_Sample_Pass_Light_' + val_Light +'_Exp_' + val_Exp + '_Contrast_' + val_Contrast + '.jpeg'
				spm.vision.capture(path)
				spm.sleep(1500)
			} catch(e) {
				spm.sleep(1000)
				path = failDir + 'Above_Sample_Fail_Light_' + val_Light +'_Exp_' + val_Exp + '_Contrast_' + val_Contrast + '.jpeg'
				spm.vision.capture(path)
				spm.sleep(1500) }
		}
	}
}
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: 17
Stars: 2