I have this NI visual basic example for AI, but I really don't understand what it's reading. I think it's reading voltage, but when i turn of my power supply it still shows fluctuations. For example, in the attached picture, it shows the y value reading to be at the 6.5 range.... I am confused because my power supply is off. But I guess it's probably not reading voltage?? I have everything connected correctly. I don't know what the x and y values represent.
I have a power supply and would like to use this program to read the voltage it's putting out and then display it, using this program. Could somebody please tell me how to make the program do this. Here's the code:
Option Explicit
Private Sub CWGraph1_Click()
End Sub
Private Sub CWHelpButton1_GotFocus()
End Sub
Private Sub Form_Load()
End Sub
Private Sub Label1_Click()
End Sub
Private Sub Start_Click()
If CWButton1.Value Then
CWAI1.StopCondition.Type = cwaiContinuous
Else
CWAI1.StopCondition.Type = cwaiNoActiveCondition
End If
CWAI1.Configure
CWAI1.Start
End Sub
Private Sub Stop_Click()
CWAI1.Stop
' Only need to call Reset to free up
' resource if you don't plan to run
' another acquisition
CWAI1.Reset
End Sub
Private Sub CWAI1_AcquiredData(ScaledData As Variant, BinaryCodes As Variant)
CWGraph1.PlotY ScaledData
End Sub
Private Sub CWButton1_ValueChanged(ByVal Value As Boolean)
If Value Then
CWAI1.StopCondition.Type = cwaiContinuous
Else
CWAI1.StopCondition.Type = cwaiNoActiveCondition
End If
End Sub
Private Sub CWAI1_DAQError(ByVal StatusCode As Long, ByVal ContextID As Long, ByVal ContextDescription As String)
MsgBox "Error: " & StatusCode & vbCrLf & "Context: " & ContextDescription & vbCrLf & CWDAQTools1.GetErrorText(StatusCode)
End Sub
Private Sub CWAI1_DAQWarning(ByVal StatusCode As Long, ByVal ContextID As Long, ByVal ContextDescription As String)
MsgBox "Warning: " & StatusCode & vbCrLf & "Context: " & ContextDescription & vbCrLf & CWDAQTools1.GetErrorText(StatusCode)
End Sub
**********
Thank you so much.