harika Posted November 25, 2008 Report Share Posted November 25, 2008 Hi I am new to labview, I want to plot point by point xy graph, but i am not getting it which I attached. so please help me how to plot frequency vs phase graph. thanks harika.... Quote Link to comment
asbo Posted November 25, 2008 Report Share Posted November 25, 2008 Well, your biggest problem is that you don't have any data retention. Waveform graphs allow you to specify both X and Y coordinates, but you have to give it the entire data set at once, otherwise you're simply graphing an instantaneous point. Create two shift registers on your while loop, one for frequency points and one for phase points. Use the Build Array function to concatenate each new point onto the shift register array, and then bundle the two shift register arrays and pass the resultant cluster to the waveform graph. Be careful, though; the array will get very large so you can't run it for too long without consuming gobs of memory. You can use the iteration block, a case structure, and Delete From Array to solve this problem. Quote Link to comment
Minh Pham Posted November 25, 2008 Report Share Posted November 25, 2008 QUOTE (harika @ Nov 24 2008, 09:28 PM) Hi I am new to labview,I want to plot point by point xy graph, but i am not getting it which I attached. so please help me how to plot frequency vs phase graph. thanks harika.... I did post before regarding to this problem. This is a duplicated issue from you earlier: http://forums.lavag.org/xy-graph-t12439.html XY graph requires array of dat (set of points(xi,yi), not 1 point as mention in the reply above. Check the context help when working with function that you are not familier, check detail help of the function to see example. Quote Link to comment
harika Posted November 26, 2008 Author Report Share Posted November 26, 2008 QUOTE (asbo @ Nov 24 2008, 09:33 PM) Well, your biggest problem is that you don't have any data retention. Waveform graphs allow you to specify both X and Y coordinates, but you have to give it the entire data set at once, otherwise you're simply graphing an instantaneous point. Create two shift registers on your while loop, one for frequency points and one for phase points. Use the Build Array function to concatenate each new point onto the shift register array, and then bundle the two shift register arrays and pass the resultant cluster to the waveform graph.Be careful, though; the array will get very large so you can't run it for too long without consuming gobs of memory. You can use the iteration block, a case structure, and Delete From Array to solve this problem. Hi, I tried as per your instructions the file is attached but i didnt get the output. Please help me out. With Best Regards, Harika, Cyber Motion Tehch. Hyderabad. Quote Link to comment
Minh Pham Posted November 26, 2008 Report Share Posted November 26, 2008 QUOTE (harika @ Nov 25 2008, 04:26 PM) Hi,I tried as per your instructions the file is attached but i didnt get the output. Please help me out. With Best Regards, Harika, Cyber Motion Tehch. Hyderabad. I recommend you to go through some LabVIEW fundamental topics, there are many available in the web that you can go through and learn all the basics in LV especially Data types in LV. Array is one of the most important data type so hope you will master it soon. below is a quick fix of the problem you have. You are still writing only 1 data element to the X and Y array, that's why u have 1 point. Try not to use local variables if you can wire data directly. Check LabVIEW help for example on XY graph, array to have a better understanding before tackle the problem. Quote Link to comment
harika Posted November 26, 2008 Author Report Share Posted November 26, 2008 hi thanks for ur response. HARIKA Quote Link to comment
Minh Pham Posted November 26, 2008 Report Share Posted November 26, 2008 QUOTE (harika @ Nov 25 2008, 09:13 PM) hi thanks for ur response. HARIKA youre welcome 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.