Sample Program - Denso Keyence Vision XG Series Manual

Image processing system
Table of Contents

Advertisement

8. Sample Program

Sub Main
On Error Goto ErrProc
Dim caoXG as Object
Dim vntResult as Variant
Dim pTargetPos as Position
takearm keep = 0
pTargetPos = P11
caoXG = cao.AddController("XG", "CaoProv.KEYENCE.VWXG", "","Conn=eth:192.168.0.10")
caoXG.ChangeInspectSetting 1, 2
caoXG.Trigger -1
delay 200
vntResult = caoXG.ReadVariable("#XPos") 'Receive data
letx pTargetPos = posx(P11) + val(vntResult)
approach p, pTargetPos, @p 20, s = 100
move l, @e pTargetPos, s = 10
call Hand.Close
depart l, @p 50, s = 100
EndProc:
"State necessary end process"
exit sub
ErrProc:
"State necessary error process"
Goto EndProc
End Sub
'Declare error process routine
'Declare provider variable
'Declare character-string variable
'Declare P-type variable
'Provider implementation
'Change to SD1 setting 2
'Trigger
'Expand X component of received data to position data
'Go to position after correction
'Normal end routine
'Abnormal end routine
34
画像処理システム/XGシリーズ

Hide quick links:

Advertisement

Table of Contents
loading

Related Products for Denso Keyence Vision XG Series

Table of Contents