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: 

Increment Array Save

Hi,

I make random number generator (0-10) with counting repeat number, but i don't know many functions in labview. My idea is:

I generated random number and i save this number in array 1. Generated random number also sent to index of Replace Array Subset for increment element of the array. As in the attached file. But I don't know how save array with increment element. For example first generate number is 5 then array

0 0 0 0 0 0 1 0 0 0 0, next number is 5 then

0 0 0 0 0 0 2 0 0 0 0

etc.

Now i have: for example first generate number is 5 then array 

0 0 0 0 0 0 1 0 0 0 0, next number is 4 then

0 0 0 0 0 1 0 0 0 0 0,

etc.

How to fix it?

0 Kudos
Message 1 of 2
(2,463 Views)

Hi Gtr,

 

keep the incremented array in a shift register:

check.png

(Insert a RoundDown function after the multiplication!)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 2
(2,449 Views)