日本ナショナルインスツルメンツ
技術部
成瀬様
ご返信、ありがとうございます。
教えていただいたHelpやsample file 等を見たのですが、
私の望んでいるような記述を見つけることができませんでした。
現在使用しているプログラムは、以下のようなのですが、
グラフ上にプロットされたデータの実際の値を potential() などの配列に格納するには
どこの部分にどのように、記述したらよいのでしょうか。
お手数かけますが、よろしくお願い致します。
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim acquiredData() As
NationalInstruments.AnalogWaveform(Of Double) = DaqTaskComponent1.Read
WaveformGraph1.PlotWaveforms(acquiredData)
End Sub
Private Sub DaqTaskComponent1_Error(ByVal sender As
System.Object, ByVal e As
NationalInstruments.DAQmx.ComponentModel.ErrorEventArgs)
'TODO: Handle DAQ errors.
Dim message As String = e.Exception.Message
MessageBox.Show(message, "DAQ Error", MessageBoxButtons.OK, MessageBoxIcon.Warning)
DaqTaskComponent1.StopTask()
End Sub
Private Sub DaqTaskComponent1_ReadCompleted(ByVal
sender As System.Object, ByVal e As
DaqApplication1.DaqTaskComponentReadCompletedEventArgs) Handles
DaqTaskComponent1.ReadCompleted
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim acquiredData() As
NationalInstruments.AnalogWaveform(Of Double) = DaqTaskComponent1.Read
WaveformGraph2.PlotWaveforms(acquiredData)
End Sub
Private Sub DaqTaskComponent1_Error0(ByVal sender As
System.Object, ByVal e As
NationalInstruments.DAQmx.ComponentModel.ErrorEventArgs) Handles
DaqTaskComponent1.Error
'TODO: Handle DAQ errors.
Dim message As String = e.Exception.Message
MessageBox.Show(message, "DAQ Error", MessageBoxButtons.OK, MessageBoxIcon.Warning)
DaqTaskComponent1.StopTask()
End Sub
Private Sub WaveformGraph1_PlotDataChanged(ByVal
sender As System.Object, ByVal e As
NationalInstruments.UI.XYPlotDataChangedEventArgs) Handles
WaveformGraph1.PlotDataChanged
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
End Class