<< 点击显示目录 >> 主页 PVI通信 > PVI帮助信息 > PVI Services > BR.AN.Namespace > BR.AN.PviServices > Variable Class > Variable Methods > Variable.ReadValueEx Method |
Reads the actual value of processvariable.
[Visual Basic]
Public Sub ReadValueEx()
[C#]
public int ReadValueEx();
0 if the read was successful else an error code.
The event ValueRead notifies, that the value was successful read.
Variable var = new Variable(cpuObj,"global_INT");
var.Connect();
var.Connected += new PviEventHandler(Var_Connected);
...
...
private void Var_Connected(object sender, PviEventArgs e)
{
Variable tmpVar = (Variable)sender;
int retVal = tmpVar.ReadValueEx();
tmpVar.ValueRead += new PviEventHandler(Var_ValueReadEx);
}
...
...
private void Var_ValueReadEx(object sender, PviEventArgs e)
{
Variable tmpVar = (Variable)sender;
this.lbValue.Text = tmpVar.Value.ToString();
}
Variable Class | BR.AN.PviServices Namespace
Generated from assembly BR.AN.PviServices [8.1.0.4]