Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I program VB6 to output a simple steady state analog signal?

I am new to both VB6 and NI-DAQmx and I am trying to get my PCI-6722 ("Dev1") to write a steady state anaolog signal to the ao0 output upon  a command.  With the following code, I am trying to have it output 1 volt to ao0 but keep getting the erro code "Run-time error '-200077 (fffcf273)': Measurments: Request value is not a supported value for this property."

 

I'm sure I'm doing something wrong, but I'm not sure what it is.  Any suggestions?

 

 

Private Sub Command10_Click()

Dim taskHandle As Long

 

 

DAQmxErrChk DAQmxCreateTask("", taskHandle)

DAQmxErrChk DAQmxCreateAOVoltageChan(taskHandle, "Dev1/ao0", "", 0, 5, DAQmx_Val_Volts, "")

DAQmxErrChk DAQmxWriteAnalogScalarF64(taskHandle, 1, 10#, 1#, "")

 

0 Kudos
Message 1 of 2
(6,941 Views)
nevermind. I got it!
0 Kudos
Message 2 of 2
(6,926 Views)