How can i output a voltage on PCI-6229 port with visual basic 6 ?

10-11  Source: Network gathering  Views:3 

Advertisement
Hello,
PCI-6229 card is using DAQmx, that not support VB 6 officially.
However, members of this forum found out a way to write/read on digital port with vb6 and DAQmx.
This was working well for me indeed.
Then, i wanted to output a voltage on AO. I followed the same procedure they used for DI/DO but in vain.
Apparently, the function DAQmxCreateAOVoltageChan()* causes trouble.
Using the .exe of the program, i get this error :
"error -200077 : Requested value is not a supported value for this property."
Thank you for any ideas that can sort this out.
* Public Declare Function DAQmxCreateAOVoltageChan Lib "nicaiu.dll" (ByVal TaskHandle As Long, ByVal lines As String, ByVal nameToAssignToLines As String, ByVal min As Single, ByVal max As Single, ByVal units As DAQmxUnits, ByVal customScaleName As String) As Long
call : DAQmxErrChk DAQmxCreateAOVoltageChan(TaskAnalog, txtChanAnalog.Text, "", Min, Max, DAQmx_Val_Volts, 0)
Hello,
What is your buffer size ? The buffer should be 0 or greater than 2. You can get this error if your buffer size is equal to 1.
Regards,
Isabelle
National Instruments France
Isabelle
Ingénieur d'applications
National Instruments France
Related articles