NI LabVIEW,CVI,数据采集等产品讨论区

cancel
Showing results for 
Search instead for 
Did you mean: 

LABVIEW指针数据获取是否有实现

Solved!
Go to solution

在LV中,通过动态创建指针(DSNewPClr)后,给其它DLL调用,DLL调用后,指针的数据怎么获取?我现在是采用的muvebolock方法,将指针的数据复制一份出来,这样做的话会消耗一些时间,在labview中可以直接读取指针内的数据吗?就像内存同址那样的操作?

无标题.png

0 Kudos
Message 1 of 2
(328 Views)
Highlighted
Solution
Accepted by topic author imleo

Provided that the input array dimensional sizes are the same as the output ones, which in your code has to be the case in order to not crash it, what you try to do can be done a lot more simple by just doing this:

Call Library Node.png

Configuring the Call Library Node Parameter as follows:

 

Type: Array

Data Type: Signed 32-bit Integer (or whatever your array contains).

Dimensions: 2

Array Format: Array Data Pointer

 

The allocated memory area passed into the function will be row * columns element large so make sure to never ever try to write beyond that. For that reason it is usual to also pass in the array sizes to the function over extra parameters so that the code inside the function can check to not write beyond the end of the passed in buffer.

 

 

 

Rolf Kalbermatter
Averna BV
LabVIEW ArchitectLabVIEW ChampionLabVIEW Instructor
0 Kudos
Message 2 of 2
(297 Views)