<< 点击显示目录 >> 主页 PVI通信 > PVI帮助信息 > PVI Services > BR.AN.Namespace > BR.AN.PviServices > Variable Class > Variable Properties > Variable.WriteValueAutomatic Property |
Gets or sets the WriteValueAutomatic state of this instance.
[Visual Basic]
Public Property WriteValueAutomatic() As Boolean
Public Get
End Get
Public Set
End Set
End Property
[C#]
public bool WriteValueAutomatic { public get; public set; }
If this property is set true (default case) a value object is written automatically by assigning it to its connected variable object.
For writing values to structure members it is useful to set this property false:
Variable structVar = new Variable(cpuObj,"stVar" );
structVar.Connect();
structVar.WriteValueAutomatic = false;
// Setting member values
structVar.Value["elem_BOOL"] = true;
structVar.Value["elem_SINT"] = 15;
structVar.Value["elem_DINT"] = 345578;
// Writing whole structure
structVar.WriteValue();
structVar.WriteValueAutomatic = true;
Variable Class | BR.AN.PviServices Namespace
Generated from assembly BR.AN.PviServices [8.1.0.4]