Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

How Can I Dynamically Determine Device Names using DAQmx and VB6 only?

When I use NI-DAQ Traditional and VB6 I'm able to locate all the boards that have been initialized by MAX.  Now that I'm finally switching to DAQmx I'm looking for the same functionality. 
 
In NI-DAQ Traditional I used: Init_DA_Brds(DeviceNumber, deviceNumberCode) and stepped throught he first 10 boards and trapped errors.
 
In NI-DAQmx I see the function DAQmxGetSysDevNames(deviceNames, buffSize) but it does not seem to return any values.  Maybe I have the aguments wrong; deviceNames as a string (also tried it as a variant) and buffSize as a long.
I understand this is the forum "board" is for Measurement Studio for VB6, but there does not seem to be a better board for my question.
0 Kudos
Message 1 of 3
(6,846 Views)
Hello bboyce,

I just put together an example program that demonstrates how to use the DAQmxGetSysDevNames property and attached it below.  I hope this helps you out.  Before sending the deviceNames string to the function you need to do the following:

deviceNames = String$(buffSize, 0)

Regards,

Jesse O.
Applications Engineering
National Instruments
Jesse O. | National Instruments R&D
Message 2 of 3
(6,830 Views)
Thanks.  Works great.  Saved me a bunch of time!
0 Kudos
Message 3 of 3
(6,826 Views)