Attribute VB_Name = "ProcessData"
Public Sub GetDataFromHardware()
    If ScrollMode = 0 Then
        Result = sdGetData(DeviceIndex, Ch1Voltage, Ch2Voltage, Ch1HardwareData(0), Ch2HardwareData(0), Controlstate, FiltAndTrigger, levers, level(0), StartCapture, PulseTrigger, PulseTriggerMode, PulseWidth)
    Else
        TimeState.Timer = Timer
        TimeState.Time = Time
        Result = sdGetScrollData(DeviceIndex, Controlstate, levers, TimeState, Ch1Voltage, Ch2Voltage, Ch1ScrollData(0), Ch2ScrollData(0), Ch1DisplayData(0), Ch2DisplayData(0), TriggerPosition, Ch1InGND, Ch2InGND)
    End If
End Sub
Public Sub CopyDataToBuffer()
    If ScrollMode = 0 Then
        If Ch1InGND = False Then
            Result = sdChannelDataBuffer(Controlstate, InterpolationLineMode, Ch1BufferData(0), Ch1HardwareData(0))
        Else
            Result = sdChannelInGND(Ch1Position, Ch1BufferData(0))
        End If
        If Ch2InGND = False Then
            Result = sdChannelDataBuffer(Controlstate, InterpolationLineMode, Ch2BufferData(0), Ch2HardwareData(0))
        Else
            Result = sdChannelInGND(Ch2Position, Ch2BufferData(0))
        End If
    End If
End Sub
Public Sub GetDisplayData()
    If ScrollMode = 0 Then
        Result = sdGetDisplayData(Controlstate, Ch1DisplayData(0), Ch1BufferData(0))
        Result = sdGetDisplayData(Controlstate, Ch2DisplayData(0), Ch2BufferData(0))
    End If
End Sub
Public Sub DataToDisplay()
    Dim i
    If XYMode = False Then
        If Ch1Enabled = True Then
            Result = sdDisplayData(MainForm.DisplayPicture.hdc, DisPicture, PointOrLine, Ch1DisplayData(0), CH1_color)
        End If
        If Ch2Enabled = True Then
            Result = sdDisplayData(MainForm.DisplayPicture.hdc, DisPicture, PointOrLine, Ch2DisplayData(0), CH2_color)
        End If
    Else
        Result = sdDisplayDataXYMode(MainForm.DisplayPicture.hdc, DisPicture, PointOrLine, Ch1DisplayData(0), Ch2DisplayData(0))
    End If
End Sub
