Example #1
0
 protected void ViewInputButton_Click(object sender, EventArgs e)
 {
     Scope.ClearData();
     PInvoke1.GetValuesOut(result1, 1000);
     for (int i = 0; i < 1000; i++)
     {
         Scope.Plots[1].PlotY(result1);
     }
 }
Example #2
0
        protected void PlotGraphButton_Click(object sender, EventArgs e)
        {
            PInvoke4.Run();

            //convert inputs to values the LabVIEW dll wil use
            ushort signal    = Convert.ToUInt16(SignalDropDownList.SelectedIndex);
            double amplitude = Convert.ToDouble(AmplitudeNumericEdit.Value);
            double frequency = Convert.ToDouble(FrequencyNumericEdit.Value);
            string device    = DaqSystem.Local.Devices[AvailableDeviceDropDownList.SelectedIndex];

            PInvoke.SetParameters(signal, device, frequency, amplitude);

            PInvoke2.GetValues(result, 1000);
            for (int i = 0; i < 1000; i++)
            {
                Scope.Plots[0].PlotY(result);
            }

            PInvoke1.GetValuesOut(result1, 1000);
            for (int i = 0; i < 1000; i++)
            {
                Scope.Plots[1].PlotY(result1);
            }
        }