Jump to content

Miykoll

Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by Miykoll

  1. Hi there,

    I've issues by reading a pointer in a pointer in Labview DLL. I tried several suggestions found in other topics on this forum, but didn't succeed, so here we go.

    # Problem
    The DLL FTMProLib has a function called GetSpectrumData. This function requires an int of spectrumtype and a pointer to pSpectrum). (see attachment Page_FTMProLib_GetSpectrumData.jpg)
    This pSpectrum is of the type Spectrum, which is a struct. (see attachment Page_FTMProLib_Spectrum.jpg)

    In the Spectrum struct there is a double called pdSpectrum which contains my spectrum data. However, different from the other elements, this is a pointer.

    I know how to call a pointer to an double array through the DLL in LabVIEW. However, this pointer is nested inside the pointer to the Spectrum struct.

     

    When generating the DLL, LabVIEW created the control shown as "pSpectrum oud"  in 2022-10-05_Labview_library_control.png.
    As one can see, the pdSpectrum is not an array, but a single number field.
    I tried to change this to an array, as shown in "sRawData". However, when I use this new control format, LabVIEW crashes (see 2022-10-05_Labview_library_error.png).

    The Labview program is working when using the pSpectrum oud control, which to me suggests that I need to add a pointer to the double array in this single number field.
    But I've no idea how to do this, since labview is not working with pointers.


    So far I've no luck into getting this working and I'm out of ideas how to approach / fix it.

     

    Any help appreciated.



     

    Page_FTMProLib_GetSpectrumData.jpeg

    Page_FTMProLib_Spectrum.jpeg

    2022-10-05_Labview_library.PNG

    2022-10-05_Labview_library_control.PNG

    2022-10-05_Labview_library_error.PNG

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.