AlexA Posted December 3, 2009 Report Share Posted December 3, 2009 Hey guys I'm not savvy with how to make my code appear in my post but I've attached the vi at the bottom. Please note it was saved from Labview 2009, I'm not sure how to save it as an earlier version so if you guys can't see it please let me know along with a quick explanation how to save it as an earlier version. I'm attempting to iterate through each row of the array which represents my picture (basically checking each line of the picture), and perform an autocorrelation. I'm then summing the results of the autocorrelations and finally averaging the resulting array. It's not behaving as I expect. My questions: 1. When passing an array into a shift register, does it pass it like a "single element", i.e. is the whole array stored in the shift register? 2. When summing two arrays using the plus operator, I expect it to sum each element of the first array with the corresponding element of the second array, is that the case? Or do I have to iterate through the arrays "manually" to sum each element? 3. When performing a divide operation on an array how does Labview behave? Does it divide each element or do something else wacky? Finally, I've performed a search of the forums for words surrounding this topic obviously, but if I've missed anything obvious or if there is a good external link please let me know. Cheers Alex ImgAnlysAutoCorrelateBasic.vi Quote Link to comment
Ton Plomp Posted December 3, 2009 Report Share Posted December 3, 2009 Hey guys I'm not savvy with how to make my code appear in my post but I've attached the vi at the bottom. Install the Code Capture Tool. You can either install the OGP file with VIPM or run the 'Install Code Capture Tool' VI inside the (extracted) zip file. Please note it was saved from Labview 2009, I'm not sure how to save it as an earlier version so if you guys can't see it please let me know along with a quick explanation how to save it as an earlier version. File->Save for previous version. I'm attempting to iterate through each row of the array which represents my picture (basically checking each line of the picture), and perform an autocorrelation. I'm then summing the results of the autocorrelations and finally averaging the resulting array. It's not behaving as I expect. You don't average, and only plot the last result of the autocorrelation: 1. When passing an array into a shift register, does it pass it like a "single element", i.e. is the whole array stored in the shift register? 2. When summing two arrays using the plus operator, I expect it to sum each element of the first array with the corresponding element of the second array, is that the case? Or do I have to iterate through the arrays "manually" to sum each element? 3. When performing a divide operation on an array how does Labview behave? Does it divide each element or do something else wacky? Well the easiest is me to tell you. However the best is when you write some little tests to see what happens. You can make it yourself easy by enabling 'execution hightlighting' (the light-bulb on the block diagram) Good luck, Ton Quote Link to comment
jgcode Posted December 3, 2009 Report Share Posted December 3, 2009 My questions: 1. When passing an array into a shift register, does it pass it like a "single element", i.e. is the whole array stored in the shift register? 2. When summing two arrays using the plus operator, I expect it to sum each element of the first array with the corresponding element of the second array, is that the case? Or do I have to iterate through the arrays "manually" to sum each element? 3. When performing a divide operation on an array how does Labview behave? Does it divide each element or do something else wacky? Hi Alex These are some pretty fundamental things that I suggest, rather than searching in this case, you create the code stubs and just run and test them. That can be an equally fast way to find things out. Here is a start for you: <edit> Ton beat me to the post </edit> Quote Link to comment
AlexA Posted December 3, 2009 Author Report Share Posted December 3, 2009 Hey Ton I think I might have put an old version of my VI in by accident, silly me. Anyway, here's the picture I took of my most recent attempt. (I got the code capture tool, took a snap shot, but I'm still not sure how to insert it directly into my post, my forum-fu sucks). Quote Link to comment
Grampa_of_Oliva_n_Eden Posted December 4, 2009 Report Share Posted December 4, 2009 See this tag on LabVIEW performnace http://forums.ni.com/ni/tagging/view_tag?tag.text=LabVIEW_Performance and when you finish that set, chase down all of these http://forums.ni.com/ni/tagging/tagging_detail?tag.cloud_grouping=tag&tag.cloud_style=related&tag.max_age=all&tag.message_scope=all&tag.user_scope=all&tag.tag_scope=list&tag.id=671&tag.visibility=public When you finish all of those you'll be lecturing us on the topic. Ben Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.