Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

AcquiredData Event not fired

Hi,
 
I want to write a tool for our peoples for easy calibrating our sensors.
Therefore I must use traditional NI-DAQ, because this drivers are installed on all the calibrating PCs (amount 20)
I use Visual Studio 2005 with C#
Versions:
     Measurement and Automation Explorer: 2.2.0.3010 
     AxInterop.CWDAQControlsLib    1.4.0.0
     NI-DAQ-Version   6.9
     Visual Studio 2005 with C#
 
Problem:
The downloaded samples doesn't running on my PC before (using the exe) and after new compiling they doesn't running too.
Please look at the attachment, its the little project.
 
Question: the parameter for the method "AquireData" of CWAI1 object is an object (Object browser), it must be an ref type, but a  
object data1 = new object();
object data2 = new object();
CWAI1.AcquireData(ref data1, data2);
 
erros with a type error, why?
What type should it be?
 
1.) What is wrong, why don't the event firing? (is "firing" the right word?)
2.) Which types must be used in AquireData-method?
 
I hope You can help me
Sorry for my bad english
 
Thanks
Benny Platte
0 Kudos
Message 1 of 2
(6,856 Views)
Hi!

Try using:

object data1 = null;
object data2 = null;

CWAI1.AcquireData(ref data1, ref data2);

So it should work. The object cannot be already used or refernced before, in those cases it could bring a "Type Mismatch" error.

Best regards.
Ken
0 Kudos
Message 2 of 2
(6,816 Views)