06-17-2014 12:47 AM
I have 70 shift registers to accumulate date from 70 channels to plot it every channel individually , will these shift registers affect the performance of the project or it depends on my PC ??
06-17-2014 12:59 AM
HI!
It depends on the amount of data you are going to store in your registers.
In any case It will be hard to fit the 70 registers on the block diagram...
Maybe you can find something else (a 2D matrix shift register, with a column per channels or named queues...)
Regards,
Marco
06-17-2014 01:07 AM
06-17-2014 01:08 AM
What is the data type of the shift register? 1D or 2D array or just a double. If the acquisition rate is same for all, then consider grouping them into one.
06-17-2014 02:49 AM
Try to substitute shift registers with autoindexing where possible (use conditional if needed).. it is more efficient and decrease memory usage.
Marco
06-17-2014 02:56 AM
@Marco_Ge wrote:
Try to substitute shift registers with autoindexing where possible (use conditional if needed).. it is more efficient and decrease memory usage.
Marco
I am not sure how an Auto indexing terminal would decrease the memory usage. Do you mean using with a for loop? For data acquisition I don't its a right way.
06-17-2014 03:06 AM
Hi,
I have experienced that using shift registers in loops leads to a memory allocation increase , expecially if those arrays are not initialized.
Moreover, I noticed that memory were not disallocated after that vi was closed.
Then I tried to substiture it with autoindexing and results were very good: memory was deallocated after vi. closing.
Read this post:
Hope that was useful.
Bye
Marco
06-17-2014 03:26 AM
Why I have mentioned its not a right way is that a data acquisition mostly used inside a while loop and an auto indexing in that case may go uncontrolled. In the same link you have provided it is said that Auto indexing with FOR loop is efficient because its already known how many iterations that its going to execute. But in the case of a while loop its unknown. I agree with you on the usage of USR, I mostly use it only with FGV. In this scenario the OP can initialize the shift register with some size and try replacing the elements (Mean while the data has to be taken out somewhere) and maintain the size.
06-17-2014 03:31 AM
Yes i was referring to FOR loops.
For data acquisition, maybe you can use queues and manage colelcted data in another parallel whil loop, using FOR loops to dequeue...Without code i can only imagine.
bye
M.
06-17-2014 03:39 AM
@Osama90 wrote:
I have 70 shift registers to accumulate date from 70 channels to plot it every channel individually , will these shift registers affect the performance of the project or it depends on my PC ??
It will certainly affect your performance and ability to handle/change your code. Change it to an array of plots, either as a 2D array (if using the same sampling rate), or an array of clusters with the channels (1D array?) as data. From a machine perspective 70 SRs should work, but not from a person perspective.
/Y