Sample Vision Capture

PowerScript

Sample Vision capture to find specific position

main 0 files
Sample Vision Capture..js
Sample Vision Capture..js 592 bytes
LeftTopX = -248
LeftTopY = 1915
RightBottomX = 1632
RightBottomY = -2447
var FOV = [480, 360]
var FilePath = "C:/Park Systems/SmartScan/vision/AutoCapture/"

spm.scan.stop();

var X = Math.ceil([(RightBottomX - LeftTopX)/FOV[0]]);
var Y = Math.ceil([(LeftTopY - RightBottomY)/FOV[1]]);

spm.xystage.moveTo(LeftTopX, LeftTopY, 0.8, 0.8);
for(var j = 00 ; j <Y  ; j+=1)
{
i=00
for(var i = 00 ; i < X+1 ; i+=1)
{
spm.sleep(1000)
spm.vision.capture(FilePath+j+i+".jpg");
spm.xystage.move(FOV[0],0, 0.8, 0.8);
}
spm.sleep(500)
spm.xystage.move(-FOV[0]*i,-360, 0.8, 0.8);
};
Comments (1)
alex_an
alex_an 1 month ago

This code is interesting application!

Snippet Information
Author: edward.park
Language: PowerScript
Created: Oct 28, 2025
Updated: 0 minutes ago
Views: 24
Stars: 2