12-24-2014 11:25 PM
Hello guys,
Can Someone help me please to simplfy this program... I recieved error and takes so much time to perform such program. i use highlight execution but i cant find any error..
Solved! Go to Solution.
12-24-2014 11:31 PM
No one will be able to help because you didn't attach your VI and the imaage you attached is too small to see.
12-24-2014 11:42 PM
12-25-2014 02:03 AM
Ohhh.. this is ok Now, I figure Out the Error..
Thank you guys...
Happy holidays everyone
12-25-2014 10:16 AM - edited 12-25-2014 10:29 AM
Well, you are building several arrays in autoindexing output tunnels of a while loop that never stops. You are guaranteed to run out of memory eventually. 😄
While the fix might be easy, I think your entire code is overly complicated and could be simplified dramatically. Can you tell us what it is supposed to do and what output you are expecting?
For example your entire inner FOR loop could be replaced by a simple typecast operation of the array. Same difference. (You could even use "byte array to string").
Instead of the constant resizing of the array in the outer shift register, you could just leave it alone and use arrray subsets instead. etc. In-place operations are typically more efficient.
I also assume that the initial byte array is more interesting in the real case. Currently, your code does not depend on any external input and the results could be folded into a constant at compile time, eliminating all code entirely.