![Denso Keyence Vision XG Series Manual Download Page 21](http://html.mh-extra.com/html/denso/keyence-vision-xg-series/keyence-vision-xg-series_manual_2483252021.webp)
21
画像処理システム/XGシリーズ
<ImplVar>
.WriteVariable
Usage
Writes a value to a specified scalar variable (global or local variable).
Syntax
<ImplVar>
.WriteVariable
<Variable name>, <Value>
, <Synchronization mode>
Argument: <Variable name> Specify a scalar variable name with one-byte characters
(character string).
<Value> Specify a value to write to the variable (Double type).
<Synchronization mode> Specify whether or not to reflect in
synchronization with a flow (integer).
0: Reflected immediately without
synchronization with flow (MW command)
1: Reflected at the end unit of flow (MS
command)
Description
A value is written to a specified scalar variable.
(This variable name is a name configured in the XG series.)
Example
Dim caoCtrl as Object
caoCtrl=cao.AddController("XG","CaoProv.KEYENCE.VWXG", "", "conn=eth:192.168.0.10")
caoCtrl.WriteVariable "#MyVar", 2, 0