From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

C definition of LabView6i "waveform" type

I am trying to pass a waveform to a C Library routine to be able to pass
the data to another program. In Labview, the C Library Routine
definition includes a type of waveform, placing a parameter in the call
with the format:

void MyLibRoutine(waveform myWaveform)

The problem I am having is in the library end. Can anyone tell me what
the definition of a type waveform is, or where I can find the
appropriate #include file.

TIA
Rich Hilt
0 Kudos
Message 1 of 4
(2,424 Views)
Rich,

I would recommend parsing the waveform out into its elements (or just the element(s) you need) or change it to a standard cluster, which equates to a structure type in C/C++

Hope this helps
0 Kudos
Message 2 of 4
(2,424 Views)
Unforutnately, I'm fairly new to Labview. I have been trying to figure how to do that for the last 2 days. Could you please elaborate on how to do this?

TIA
Rich
0 Kudos
Message 3 of 4
(2,424 Views)
Rich,

Okay, I did a bit of work. I am not a C/C++ programmer (yet) so I can't guarantee the accuracy of the .c file, but it gives you an idea. Also, keep note of the fact that the CIN is of the wrong data type, but it is a structure.

The .c file contains the structure definition for the "Image" data type, and I also included (in comments) the definition for the waveform type, as accurately as I know of.

The VI contains the conversion of the waveform type into a cluster, as well as the input of the "Image" cluster into the CIN.

I hope this helps
Download All
0 Kudos
Message 4 of 4
(2,424 Views)