2.3.8 Synthetic measurement values
Using the script engine, it is possible to change the measured val-
ues recorded by the MEphisto Scope before processing. There are
two functions to be accessed with the recorded measurement val-
ues.
As soon as these functions are provided, the measured signal is
"processed" using these functions.
public override void Calc(double [,] data, int count)
and
public override void Calc(ref double channel1, ref double channel2,
int index).
Example:
Below is a code example that includes all the above commands.
public override void Main()
{
while (true)
{
// Load a preset
Scope.LoadPreset(„c:\\Test.xml“);
Sleep(5000);
// Digital IOs
Debug(„Set and get digital IOs“);
// Set all IO as Output and Bitpattern 0x5555
Scope.SetDigitalIO(0xffff,0x5555);
Sleep(1000);
// Set all IO as Input and read inputs
uint status = Scope.SetDigitalIO(0x0000,0x0000);
Debug(„Inputs: 0x“ + status.ToString(„X“));
Sleep(1000);
// Set all IO as Output and Bitpattern 0x5555
Scope.SetDigitalIO(0xffff,0x5555);
Sleep(1000);