ni.com checkout is currently experiencing issues.

Support teams are actively working on the resolution.

LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos
Joju

improve the management of arrays

Status: Declined
Programming Issue. Proper dataflow programming would correct issue.

 

when you do a lot of operations whit arrays, you spent a lot of time and space in the block diagram, to put the input and output array in de the array functions.
the idea is not put the output array, if that is the same as input, see the figure.
and also applying the concep of pointer, C typical, to write some value in a array, when you put a value in to a array, the array is read, modified and finally written completly, that generate two problems,
-one, this operation spends a lot of coputacional time,
-the second one, is the overwriting  all values, if your program using multiple threads, you can write diferents values of the same array, in different places, now you need to synchronize this operations to avoid the overwrite, if the operation only modify the value pointed, this function solves both problems.
Sin título.png

 

4 Comments
RavensFan
Knight of NI

What you've posted goes against all aspects of LabVIEW as a dataflow language.  LabVIEW doesn't use pointers like you are thinking of in C.  The use of local variables like you are showing is strongly discouraged.

AristosQueue (NI)
NI Employee (retired)

It's a bit hard to follow what you've written, but I believe I got the gist. And I would call these problems "user error." Stop using the local variables and start programming with just using dataflow. Local and global variables are strongly discouraged in most of our documentation. All the issues that you are objecting to are already handled automatically by LabVIEW's compiler as long as you stick with FPTerminals and uninitialized shift registers. You might consider taking a LabVIEW customer education course to understand the language better, so you can avoid these kinds of problems.

herbrand
Member

I agree with Ravens Fan. The dataflow view is essential in LabVIEW.

G-Money
NI Employee (retired)
Status changed to: Declined
Programming Issue. Proper dataflow programming would correct issue.