01-06-2009 04:29 PM
01-07-2009 01:51 AM
Hi there
Yes, you can. Attached is the modified example from http://sine.ni.com/devzone/cda/epd/p/id/858#0requirements, compiled with MS Developer Studio 6 and LabVIEW 8.5.1. You need to make slight changes. See the LabVIEW help for details about the LabVIEW ActiveX interface (see LV_Help.JPG in the attached archive).
01-07-2009 04:58 PM
01-07-2009 07:29 PM
01-08-2009 01:38 AM
Hi there
i don't know about the internal structure of waveforms, but i would not expect that any LabVIEW datatype is passed in a comprehensible way by COM/ActiveX. Use a common data structure like arrays instead.
You may want to use the debugger functionality of VC to see the data structure inside the C++ variant data.
Also take a look at the LabVIEW Help sections
Fundamentals->Calling Code written in Text-based Programming Languages
Fundamentals->Windows Connectivity
Fundamentals->How LabVIEW stores Data in Memory
01-08-2009 11:19 AM
It is typically much easier to use a common data structure like chrisger says. The LabVIEW Help sections that chrisger recommended are also good resources. Also, you can use a Get Waveform Components function to break apart a waveform and get the array of amplitude values from it.
If you have Application Builder, you can convert your VI to a DLL, and call it via C++ that way. See the link below for more information calling a LabVIEW DLL.
http://digital.ni.com/public.nsf/allkb/70995EC2CA1B523386256DD4004F3DE6?OpenDocument