Variable.ReadValueEx Method

<< 点击显示目录 >>

主页  PVI通信 > PVI帮助信息 > PVI Services > BR.AN.Namespace > BR.AN.PviServices > Variable Class > Variable Methods >

Variable.ReadValueEx Method

BR.AN.PviServices .NET


Reads the actual value of processvariable.

[Visual Basic]

Public Sub ReadValueEx()

[C#]

public int ReadValueEx();

Return Value

0 if the read was successful else an error code.

Remarks

The event ValueRead notifies, that the value was successful read.

Example

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();
}

See Also

Variable Class | BR.AN.PviServices Namespace


Generated from assembly BR.AN.PviServices [8.1.0.4]