LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Passing a pointer to an array in a function parameter

Solved!
Go to solution

dear Community,

 

I am currently programming a keysight technology acquisition card for which most of the documentation is done for the C program language.

However, for practical purposes in the laboratory, the card is programmed in LabVIEW. One of the functions requires to configure thresholds which should be defined in an array. The labview function or SubVI has several inputs and one of them is defined as a setupData parameter which is a 2D array. In the program documentation it says that passing a pointer to an array X in the setupData parameter configures the thresholds.

 

My question is: How do I pass a pointer to an array in LabVIEW without having any external C code?

 

Thanks in advance for any feedback.

0 Kudos
Message 1 of 7
(3,405 Views)

Could you share the model of the card?

0 Kudos
Message 2 of 7
(3,375 Views)

the model is keysight acqiris U1084A

0 Kudos
Message 3 of 7
(3,348 Views)

Which function are you trying to call? Which page in the documentation? Please, make it easier to help you. A search for "setupData" in the document you linked produces a few results, and all of them are 1D (not 2D) arrays. Passing a 1D array by pointer in a Call Library Function Node is simple: configure the parameter as an array of the correct data type, passed by array data pointer.

0 Kudos
Message 5 of 7
(3,338 Views)

Sorry for the incovenicence, it is page 24 of 64 and the second paragraph under the heading 3.6.2

0 Kudos
Message 6 of 7
(3,312 Views)
Solution
Accepted by topic author kagelisoju

This looks straightforward. Create a cluster matching the AqThresholdGateParametersU1084A structure, with  a double-precision value for threshold, a 32-bit unsigned int for nextThreshSample, and a 32-bit integer for Reserved. Pass an array of those clusters, passed as an array data pointer.

0 Kudos
Message 7 of 7
(3,302 Views)