07-13-2006 04:39 AM
I am writing DAQ software for a NI DAQ card (E-series) using Visual Basic 6. I got stuck with statements (for example DAQmxCreateTask) not being recognised by Visual Basic 6. I used "nicaiu.dll" public declarations to get Visual Basic to recognise the statements as recommended by Bilal Durrani (NI Engineer) on the discussion forum on 12-07-04. (For example: Public Declare Function DAQmxCreateTask Lib "nicaiu.dll" (ByVal taskName As String, ByRef taskHandle As Long) As Long)
My problem is that some of the DAQmx functions from example software I have, calls for DAQmx parameters that are still not recognised by Visual Basic 6. For example: The statement DAQmxCreateAIVoltageChan(taskhandle, channel, "", DAQmx_Val_Cfg_Default, minVoltage, maxVoltage, DAQmx_Val_VoltageUnits2_Volts, vbNullString) does not recognise the parameters DAQmx_Val_Cfg_Default and DAQmx_Val_VoltageUnits2_Volts. The NI reference documentation only shows that the parameters have a 32 bit integer value but gives no indication what those values should be.
I will prefer not to use ActiveX controls if possible.
Any suggestions or sample code will be highly valued.
Gerhard Heymann
07-14-2006 09:04 AM
07-20-2006 03:54 AM
Dear Ryan
I was using NI-DAQmx 7.1. On the basis of your recommendation I have now downloaded NI-DAQmx 8.1 from ni.com and my code is running beautifully!
Many thanks for your advice. It is much appreciated.
Best regards
Gerhard
07-20-2006 07:12 AM