Adaptation of the acquisition data

The acquisition class of a channel describes the connection between the scope and the respective value of the machine controller. Therefore, for example, the name and size of a variable are expected at this point.

The acquisition object is hierarchically positioned below an AcquisitionInterpreter, which possesses further variable-independent information. Furthermore, the AcquisitionInterpreter is a member of a channel and, depending on the chart type, a channel may contain several AcquisitionInterpreters for the various axes. An acquisition can be appended directly to a channel as in the sample and the interpreter is automatically generated.

private void SetAcquisitions(Channel channel)
{
    AdsAcquisition acquisition = new AdsAcquisition();
    acquisition.AmsNetIdExchange = "localhost";
    acquisition.TargetPort = 851;
    acquisition.SymbolBased = true;
    acquisition.SymbolName = "Variables.fSawtooth";
    acquisition.DataType = Scope2DataType.REAL64;
    acquisition.SampleTime = (uint)(1 * TimeSpan.TicksPerMillisecond);
    AcquisitionInterpreter AcquisitionInterpreter = new AcquisitionInterpreter();
    AcquisitionInterpreter.Acquisition = acquisition;
    channel.AddMember(AcquisitionInterpreter);
}