fillalph Posted November 25, 2007 Author Report Share Posted November 25, 2007 Hello Everyone, I have uploaded my VI along with a picture of what the output is at the end. I am able to acquire data correctly, no problem with that. The problem I am having is that "Array_Editted" is empty (the 2nd sequence in my code isn't working properly). I tried to step through the code to see where the problem was, but that didn't help. When looking at the probe of array_editted, the values are greyed out. Any suggestions would be greatly appreciated. I have a feeling I am going to feel like an idiot when I figure it out :S Thanks fillalph Quote Link to comment
fillalph Posted November 25, 2007 Report Share Posted November 25, 2007 Hello Everyone, I have uploaded my VI along with a picture of what the output is at the end. I am able to acquire data correctly, no problem with that. The problem I am having is that "Array_Editted" is empty (the 2nd sequence in my code isn't working properly). I tried to step through the code to see where the problem was, but that didn't help. When looking at the probe of array_editted, the values are greyed out. Any suggestions would be greatly appreciated. I have a feeling I am going to feel like an idiot when I figure it out :S Thanks fillalph Quote Link to comment
Gabi1 Posted November 25, 2007 Report Share Posted November 25, 2007 QUOTE(fillalph @ Nov 25 2007, 01:07 AM) Hello Everyone,I have uploaded my VI along with a picture of what the output is at the end. I am able to acquire data correctly, no problem with that. The problem I am having is that "Array_Editted" is empty (the 2nd sequence in my code isn't working properly). I tried to step through the code to see where the problem was, but that didn't help. When looking at the probe of array_editted, the values are greyed out. Any suggestions would be greatly appreciated. I have a feeling I am going to feel like an idiot when I figure it out :S Thanks fillalph Hi fillalph your array edited is never initialised. so instead of replacing elements at first, you have to insert them. in your case i would rather initialise an array with -1 values. then the loop would replace some of them with i. Quote Link to comment
Gabi1 Posted November 25, 2007 Report Share Posted November 25, 2007 QUOTE(fillalph @ Nov 25 2007, 01:07 AM) Hello Everyone,I have uploaded my VI along with a picture of what the output is at the end. I am able to acquire data correctly, no problem with that. The problem I am having is that "Array_Editted" is empty (the 2nd sequence in my code isn't working properly). I tried to step through the code to see where the problem was, but that didn't help. When looking at the probe of array_editted, the values are greyed out. Any suggestions would be greatly appreciated. I have a feeling I am going to feel like an idiot when I figure it out :S Thanks fillalph Hi fillalph your array edited is never initialised. so instead of replacing elements at first, you have to insert them. in your case i would rather initialise an array with -1 values. then the loop would replace some of them with i. Quote Link to comment
fillalph Posted December 1, 2007 Author Report Share Posted December 1, 2007 Hi Gabi, I wasn't able to implement what you were saying, but I did manage to get the code to work. I was curious if someone could help "optimize" the code. Having so many local variables seems like a waste. I don't really need to optimize the code for my application, I am more or less looking to learn. Thanks, fillalph Quote Link to comment
PJM_labview Posted December 1, 2007 Report Share Posted December 1, 2007 How about like this. PJM 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.