Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Definition of HWAVEFORM?

I can't seem to find a definition for HWAVEFORM anywhere. I see other people have asked this question but have not recieved a straight answer. From extcode.h it tells you that HWAVEFORM is of type iWaveform but then only get a forward definition of iWaveform i.e.

/* forward definitions of HWAVEFORM and HWAVES for DLLs and CINs */
typedef struct IWaveform IWaveform;
typedef struct IWaves IWaves;

typedef IWaveform* HWAVEFORM;
typedef IWaves* HWAVES;

Can anyone please explain where i can find this info or some examples of using waveform types in C/C++? Thanx
0 Kudos
Message 1 of 3
(5,667 Views)
Accessing the data of waveforms in a DLL is unsupported; therefore to read data from or to create a waveform in a DLL you actually need to build simply VIs into the DLL. The VIs should split the Waveforms into the dt, to, and the data array or to build the waveform up from those parts.

For more information select Help>>Search the LabVIEW Bookshelf. Take a look at the Using External Code in LabVIEW, which has a lot of information about passing data to and from DLLs. It was in this manual (p26) that I finally found this answer.

In addition there is a great example at "C:\Program Files\National Instruments\LabVIEW 7.0\examples\dll\data passing\Call Native Code.llb" This has examples of the VIs, the DLLs, and the source needed to pass all types of data between
LabVIEW and a DLL.

Evan
National Instruments
Message 2 of 3
(5,667 Views)

Hi Ewan,

has anything changed here?

I´m stripping wavedata out of the wavefrom array and give the pointer to this data as paramater to my C++ code.

I´ll do the same with the time stamp. It would be really nice if i could just give the whole wavefrom as parameter and strip it in C++.

 

Best regards jojp

0 Kudos
Message 3 of 3
(4,977 Views)