![Denso Keyence Vision XG Series Manual Download Page 9](http://html.mh-extra.com/html/denso/keyence-vision-xg-series/keyence-vision-xg-series_manual_2483252009.webp)
9
画像処理システム/XGシリーズ
4. Provider Execution Procedure
The basic process of the provider is implementation (declaration) -> execution. This provider takes a connection
process at the time of implementation. The operation can be repeated as many times as needed. A program example is
shown below.
Sub Main
On Error Goto ErrorProc
(1)
'Declare error process routine
Dim caoCtrl as Object
(2)
'Declare provider variable
Dim vntResult as Variant
(3)
'Declare result acquisition variable
caoCtrl = cao.AddController("XG", "caoProv.KEYENCE.VWXG", "", "conn=eth:192.168.0.10") (4)
"State from trigger to data receiving process"
(5)
EndProc:
'End process
Exit Sub
ErrorProc:
'Error process
End Sub
(1)
Declare the provider error processing routine as needed. (Connection error detection at declaration)
(2)
Declare the provider implementation variable as Object type. The variable name can be specified arbitrarily.
(3)
Declare the result acquisition variable. The data type depends on the command.
(4)
Execute implementation with the provider declaration command cao.AddController. The parameters required for
settings vary by provider. From this point the provider commands are available using the implementation variable
caoCtrl.
(5)
Now the program can be stated using the provider commands.