EPSON 自带CCD图像处理包的典型应用框架

        EPSON 自带CCD图像处理包的典型应用框架

       


Function main 
'******************************************** 
' Very important statement below: Use the * //非常重要的是在实际运行时,用合适的Z数值代替预定义的 ZHeight 。
' Z height which you wrote down earlier in * 
' Step 3 of "Teaching Robot Points for use * 
' with Vision Guidance. Substitute the * 
' Z height value (a negative number) which * 
' you wrote down in the place of the xx * 
' shown below. * 
'******************************************** 
#define ZHeight -xx  
Real area, x, y, u 
Boolean found 
Integer answer 
String msg$, answer$ 

Power Low 'Run robot at a slow speed and accel 
Tool 1 'Use Tool 1 for positioning 
Jump safept 'Move robot to safe start position 

Do 'Continue looping until user stops 
      Jump camshot  'Move robot to take picture 
      VRun blobtut 'Run the vision sequence blobtut 
      VGet blobtut.washer.RobotXYU, found, x, y, u 
         If found = TRUE Then  //判断 found 的值很重要,在将机器人移动到装配位置之前,判断是否找到了要装配的工件。如果没找到,进行另外的分支处理。
            VGet blobtut.washer.area, area 
            Print "The washer was found!" 
            Print "The washerarea is: ", area, "Pixels" 
            washpos = XY(x, y, ZHeight, u) 'Set pos to move to 
            Jump washpos  
            msg$ = "The washer was found!" 
         Else 
            msg$ = "The washer was not found!" 
         EndIf 
      msg$ = msg$ + Chr$(B) + Chr$(10) + "Run another cycle(Y/N)?" 
      Print msg$ 
      input answer$ 
         If Ucase$(answer$)<> "Y" Then 
            Exit Do 
         EndIf 
Loop 

Fend 

 
 
 
 
 


  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值