08-01-2012 05:59 PM
I am trying to read the task attributes from MAX using various DAQmx commands with VB6. I have found that a straight forward Load Task (DAQmxLoadTask) generates a valid taskhandle from a known taskname in MAX which can be used to get the measurement data using the analog in Read command (DAQmxReadAnalogF64). The results appear to be already scaled according to my setup in MAX. What I would like to do is read the task names from the setup in MAX, select one in VB and then read the channel names and channel units from MAX as well as the measurement data. I tried the following commands without an error but always see a null result in the output string variable.
Curiously, the command, DAQmxGetTaskNumChans, successfully delivers the number of channels in the MAX setup. With this information I can get the measurement data, but I do not have the engineering units or custom channel names for my output file header to include with my measured data.
I was wondering if the problem is related to any incompatibility with newer versions of daqmx? Or perhaps some other reason?
I am using Windows XP, VB6 with service pack 6, an NI DAQPAd 6015 and NI-DAQmx 9.2.2.
Solved! Go to Solution.
08-06-2012 03:29 PM
Thanks for posting, check the link below which seems to be the reason of our problem:
08-06-2012 05:54 PM
This does help and my commands can now return the desired information. Specifying ahead of time the size of the unknown names in the receiving string name means there are plenty of trailing blank spaces which must be trimmed from the names to be useful.
Thanks for your input.