Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

problem with VB/Samples/DAQ/Analog Input/Continuous Acquistion

Hi,
I have DAQMx 8.0 and Measurement Studio Professional Edition (version 6.0 ). I loaded the VB Sample Continuous Aquisition and when I pressed Start on the gui, I get
 
Run TIme error 10459
Configuring Channels
The NI-DAQ DLL could not be called due to an interface error.
 
What is the cause of this? How do I fix it?
 
Also in the same example we have a line of cide
 
CWAI1.Channels(1).ChannelString = ......
 
I didnt see this ChannelString property in the documentation of CWAI.
What does Channel(1) mean?
 
Thanks,
Saroj Bono
0 Kudos
Message 1 of 9
(8,896 Views)

I also tried the solution in:

 

http://forums.ni.com/ni/board/message?board.id=250&message.id=12976

 

but I am already in the user group with full permissions.

0 Kudos
Message 2 of 9
(8,887 Views)

Hello Saroj,

From the looks of that line of code that you sent it appears that you are using or trying to use Component Works commands to call your DAQ board. 

ComponentWorks uses our older Traditional DAQ calls, so you will not be able to use DAQmx 8.0 if you want to run that program.  Instead, you will need to install Traditional DAQ 7.4.1 and it should allow you to run that program and avoid the error.

Regards,

 
0 Kudos
Message 4 of 9
(8,878 Views)
 

Alternatively, you can use DAQmx in VB6. See this article for more information:
https://www.ni.com/en/support/documentation/supplemental/21/using-ni-daqmx-in-text-based-programming...

 

 

 
0 Kudos
Message 5 of 9
(8,871 Views)
Are you guys saying I cant use CWGraph with DAQMx 8.0 either?  This seems ridiculous. It implies that Measurement Studio is obsolete since the legacy drivers are obsolete and it can only use legacy dlls. Please confirm this so we can return the Measuement Studio 6.0 that we bought. If it cant support the current DAQ dlls, it is of no use to us.
thanks,
saroj
0 Kudos
Message 6 of 9
(8,862 Views)
 
I am not saying that you cannot use CWGraph with DAQmx, and I agree that it would be ridiculous for the CW user interface controls to somehow have a dependency on a particular driver. You can use any of the Measurement Studio ActiveX user interface or analysis controls with any hardware library (including 3rd party hardware libraries).
 
The issue at hand is that the implementation of the DAQ ActiveX controls is tied directly to the driver itself. The CWAI, CWAO, etc. controls were developed on top of the Traditional DAQ driver. They were created years before the DAQmx driver existed.
 
The DAQmx driver API is radically different than the Traditional DAQ driver, not only in its public API, but also throughout the entire software stack. The API incompatibility that prevents the ActiveX controls from working with the DAQmx driver applies to the ANSI C interface as well as the ActiveX interface. Unfortunately, when we moved to DAQmx, all of our customers had to change the way they programmed their DAQ devices. We weren't happy about introducing this incompatibility, but there was no reasonable way to keep the API consistent and correct all of the functional inadequacies in the Traditional DAQ driver.
 
I would also like to clear up what seems like a packaging misunderstanding. The CW DAQ controls (CWAI, CWAO, etc.) are included free with the Traditional DAQ driver. You do not need to purchase Measurement Studio to use these controls. 
 
We would like to help you be successful with Measurement Studio in VB6, regardless of which driver you use. Please let us know if you have additional concerns or questions as you get started with your application.
 
0 Kudos
Message 7 of 9
(8,855 Views)
I think part of the confusion is the name for the Measurement Studio ActiveX controls and the Traditional DAQ ActiveX controls.  CWGraph, CWButton, CWSlide, etc. are Measurement Studio ActiveX controls.  The CW stands for Component Works which is the name for the Measurement Studio AND Traditional DAQ ActiveX controls.  However, the Measurement Studio controls require the purchase, whereas the Traditional DAQ ActiveX controls are free and install with the DAQ drivers.

You can program your DAQ card using the newer DAQmx function calls and still use the Measurement Studio ActiveX controls.  The Measurement Studio controls are completley independent of which DAQ driver you are using.

Tyler T.
0 Kudos
Message 8 of 9
(8,836 Views)
Thanks to all of you. I got it now. The UI controls are working fine and I am using the DAQ 8.0 APis for coding
Saroj
0 Kudos
Message 9 of 9
(8,831 Views)