From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
05-09-2007 04:13 PM
05-09-2007 05:10 PM
05-09-2007 07:18 PM - edited 05-09-2007 07:18 PM
smercurio_fc is of course right.
Do you know how big the arrays get? Growing arrays in loops is very expensive because of contant memory reallocations.
Still, if you really wanted to initialize a shift register/feedback node with the proper datatype in this case, just right-click on it and select "create constant". Voila! (see image)
Message Edited by altenbach on 05-09-2007 05:19 PM
05-10-2007 05:37 AM
to smercurio:
Unfortunately, I can't use your variant (I have already tried it), because I have to read data on high frequency (up to 500kHz) very precisely in time. Furthermore, I need to have 8 input channels, not 2 (2 is only to develop simple example, working properly) (but my DAboard has only 1 DAC...).
But, using enable indexing, we have time delay during loop is sending data outside. And I can't count it. At high frequency with switching DAC (8 input channels) - it is very undesirable. I need to accumulate the whole array of data without delays as much as possible. Ideally, it should be simple dynamic array (as, for example, C++ has), but I don't know to do it with LabVIEW without any loops.
05-10-2007 05:49 AM - edited 05-10-2007 05:49 AM
to altenbach:
Thank you a lot. It is exactly what I need.
About size of array - I expect about 100 per each of 8 channels. I think, it is not big. I have strong requirements about time, not memory. But, if the re-accocation of memory is long in time? It is not quicker to create zero array (150 samples, for example) initially, and after it only replace zero with measured data?
Message Edited by mikhaylova_anna on 05-10-2007 05:55 AM
05-10-2007 10:00 AM