Carriejo Posted January 3, 2007 Report Share Posted January 3, 2007 when the subvi run by itself seperately, it can give me the right answer. But when I use it as a subvi in the main vi, it can not give the same answer. My program is check the number of the peak of a graph. The vi runs well. But if I made it as a subvi, it can not give the same performance. Anyone can give me a hint to trace it? I have worked for it more than two days. Thanks. Quote Link to comment
Michael Aivaliotis Posted January 3, 2007 Report Share Posted January 3, 2007 ...when I use it as a subvi in the main vi, it can not give the same answer....if I made it as a subvi, it can not give the same performance. Which one is it? Bad performance or wrong answer? Are the values (on the inputs) going into the VI the same as when the VI is run by itself? Quote Link to comment
Carriejo Posted January 3, 2007 Author Report Share Posted January 3, 2007 Which one is it? Bad performance or wrong answer?Are the values (on the inputs) going into the VI the same as when the VI is run by itself? No input. this subvi gets data from DCA (a broadband oscilloscope), analysis the graph, give the peak number as output. So for the same graph, the output should be the same either I run tha main vi to get the peak number from this subvi's output, or I run the subvi as a independent vi program. Also at the beginning of this subvi, I cleared the buffer of the DCA. So it should not be a problem. I will try to paste the program later. but the pc with labview have no access to Internet. I will print the screen and copy it here later. Thank you so much for your quick response. Quote Link to comment
Omar Mussa Posted January 3, 2007 Report Share Posted January 3, 2007 when the subvi run by itself seperately, it can give me the right answer.But when I use it as a subvi in the main vi, it can not give the same answer. My program is check the number of the peak of a graph. The vi runs well. But if I made it as a subvi, it can not give the same performance. Anyone can give me a hint to trace it? I have worked for it more than two days. Thanks. Are you sure the problem is with the subVI or is something else in your application hogging resources that the subVI uses (like hogging the cpu, etc)?? Quote Link to comment
LAVA 1.0 Content Posted January 3, 2007 Report Share Posted January 3, 2007 I will try to paste the program later. but the pc with labview have no access to Internet. I will print the screen and copy it here later. Would you rather try to send the VIs themselves. Copy it to memory stick, CD, disk or what ever and upload it here. It's much easier to troubleshoot real program that just an image of it. Quote Link to comment
Carriejo Posted January 4, 2007 Author Report Share Posted January 4, 2007 Would you rather try to send the VIs themselves. Copy it to memory stick, CD, disk or what ever and upload it here. It's much easier to troubleshoot real program that just an image of it. histogram is the subvi. when using as a subvi in getstoppoint, the peak number never reach to 2, always 1. histogram is the subvi.when using as a subvi in getstoppoint, the peak number never reach to 2, always 1. Quote Link to comment
Carriejo Posted January 4, 2007 Author Report Share Posted January 4, 2007 histogram is the subvi.when using as a subvi in getstoppoint, the peak number never reach to 2, always 1. I have found out the problem. I have not reset the histogram function. So when the subvi is called, it remember the history value and gives the wrong histogram distribution. After I have set the True as default value for the reset item of histogram input, it is solved. thanks everyone. Quote Link to comment
Ton Plomp Posted January 4, 2007 Report Share Posted January 4, 2007 I have found out the problem.I have not reset the histogram function. So when the subvi is called, it remember the history value and gives the wrong histogram distribution. After I have set the True as default value for the reset item of histogram input, it is solved. thanks everyone. Good you solved it, I had a look at your program, if you reset the histogram function, why do you run the measurement twice? If you need that for some reason, but only use the histogram function at the last run, put it outside the for-loop. Ton Quote Link to comment
Carriejo Posted January 4, 2007 Author Report Share Posted January 4, 2007 I have found out the problem.I have not reset the histogram function. So when the subvi is called, it remember the history value and gives the wrong histogram distribution. After I have set the True as default value for the reset item of histogram input, it is solved. thanks everyone. Lesson: Pay attention to the data stored in the buffer. Do clear buffer for device you acquired data from. Patience, patience and hard work. Good you solved it,I had a look at your program, if you reset the histogram function, why do you run the measurement twice? If you need that for some reason, but only use the histogram function at the last run, put it outside the for-loop. Ton Yes. I will take your suggestion. Set the reset is true outside the loop. Inside the loop, reset is fault. Thank you so much, Ton. 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.