LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

waveform data type definition in C

Hello all,
I'm trying to build a DLL that emulates an acquision card in labview, returning a WAVEFORM data type. This way, I can substitute easily the "AI read" VI of the real DAQ (a 6052E card, actually) with my custom VI that generates a waveform in the same way the real "AI read" does.
I have searched the forums and most answers point to build the waveform cluster in labview from the array of samples returned by the DLL, but I would like to return directly a waveform data type (an array of waveforms, in fact, for all the AI channels). I haven't been able to find the data definition of waveform in "C", but it should be somewhere because you can define waveform as the data type of the parameters of a DLL, and even the DLL of my rea
l DAQ card (lvdaq.dll called within "AI Buffer Read" VI) use the waveform data type as a parameter.
Any help finding the definition wil be appreciated.
thanks in advance,
Adolfo.
0 Kudos
Message 1 of 2
(3,033 Views)
You may have seen the HWAVEFORM data type that LabVIEW generates in App Builder when you create a function call to a VI with a waveform input or output. HWAVEFORM is typedef'ed in [your LabVIEW directory]\cintools\extlib.h as a pointer to an IWaveform struct. I don't see the definition of this struct anywhere in the LabVIEW documentation.

However, you could easily add a couple of exported VIs to your DLL that convert raw arrays of double-precision floats (with t0 and delta-t) to LabVIEW waveforms and back. Then, you could still call your custom waveform VI from a C program and then just feed that HWAVEFORM to your 'Waveform_to_Array()' function. These conversion VIs would be trivial to write: basically just wrappers around the 'Build Waveform' and 'Get Wavefor
m Components' nodes.
0 Kudos
Message 2 of 2
(3,033 Views)