02-17-2013 11:23 AM
Hello.
Stupid question, but i can't do it myself.
I receive scalar byte data from com port in main while loop and want to make 1D array with adjustable size for further filtering and so on. Simple "for loop" with indexed output makes me array with all the same elements.
Can anyone tells me how can i make this?
Thank you.
02-17-2013 11:55 AM
Build array with a shift register. This would be in your main acquisition loop. It does sound like you could make use of the pt-by-pt functions, though.
02-17-2013 12:01 PM
Can i tell more about you solution? Shift registers in main loop or in for loop? Or can you show me example, please
02-17-2013 12:11 PM - edited 02-17-2013 12:12 PM
In the main loop where you are doing the scalar acquisition. You need to post your VI if you need help.
02-17-2013 02:00 PM
Ok, thank you very much. I'll try this and post if there will be questions. Thank you.
02-18-2013 12:33 AM
Why can't you use string to byte array function.
02-18-2013 04:04 AM
First, sorry for my english.
I receive bytes every 10ms and want to use filters and other processing. So, thats why i want to create 1D array with adjustable size. In other words, "stacking" 8 (or 4 or 100) bytes to 1D array. I know, that this is simple, but have a "wall" in my head )
02-18-2013 04:20 AM
Try this & let me know.
02-18-2013 04:41 AM
Ok, i was try your example. I'm replace random generatro with input from visa and see that all elements of array are identical...
Here is my VI. First part of it is simply for formatt input from COM port - take two bytes from array and make word.
02-18-2013 04:43 AM
2011 compatible VI please