ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview Replace array subset does something wrong

Hello there,

 

I am writing a program for my controllers and to test it I added random number generator to give me some kind of "signal value". I have two controlers, one for X and one for Y axis. So I want my results to be saved as a table. I am creating an array outside both loops and passing it to Replace Array Subset function that is inside second loop.When I output somehow(file, screen, etc.) I see that each time I get a value from RNG, it only changes a step-specific element of an array. All others are zeroes. When I get new value, another element changes and what's left is only zeroes. It's like my array has no memory. What's the issue in this case?
Thanks 🙂

0 Kudos
Message 1 of 4
(3,295 Views)

"Shift Register" is the key word you are looking for....

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 2 of 4
(3,287 Views)

2dArrayShift register.png

 

Resembles like this!

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 3 of 4
(3,245 Views)

Please leave out that Build Array stuff... that makes no sense but eventually gets you an out-of-memory error killing your application.

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 4
(3,236 Views)