KWaris Posted August 14, 2012 Report Share Posted August 14, 2012 I have a requirement of displaying continuously the update of a signal against time. I have achieved this. Then ability to press a boolean pause button to pause the display which I have achieved this as well. Now I have been asked to allow putting the cursors on the chart so the delta between two points could be interrogated. I just vaguely looked at it and I am left wondering if this is achievable? I dont seem to be able to put cursors for a chart. It looks like these are only available for a graph. Is it possible to put cursors on a waveform chart? Many thanks Austin Quote Link to comment
Mellroth Posted August 15, 2012 Report Share Posted August 15, 2012 Is it possible to put cursors on a waveform chart? Not as far as I know. /J Quote Link to comment
Minh Pham Posted August 15, 2012 Report Share Posted August 15, 2012 Dont think it is the end of the world though. I suggest to use a little trick to display your cursors on the chart: 1. Create your chart as normal 2. Create a graph, then create cursors as normal. 3. Use the color tool to make the Graph border and its grids to transparent color. 4. Untick all the visible items for X scale and Y scale, so that you only see the cursors. 5. Move the transparent graph on top of the chart, adjust the cursors to your desired positions. 6. Enjoy watching the chart updating with the fixed cursors. Hope this is what you are after. Pics attached to demonstrate the idea. 1 1 Quote Link to comment
Mellroth Posted August 15, 2012 Report Share Posted August 15, 2012 ... 5. Move the transparent graph on top of the chart, adjust the cursors to your desired positions. ... I would be very careful not to overlay any controls/indicators on a chart, as it might result in strange artifacts, especially when the chart is updated very frequently. If the chart is not updated very frequently, I would use a graph instead if I wanted cursors. /J Quote Link to comment
Minh Pham Posted August 16, 2012 Report Share Posted August 16, 2012 i havent seen any problem for this test, but i havent seen any antifacts just yet. Can you make an example and show us the issue so we can work on to solve the antifacts problem. Thanks Quote Link to comment
Mellroth Posted August 16, 2012 Report Share Posted August 16, 2012 i havent seen any problem for this test, but i havent seen any antifacts just yet. Can you make an example and show us the issue so we can work on to solve the antifacts problem. Thanks Attached is a small VI that generates 4 sinewaves and plots them in two equally configured WfmCharts. ChartUpdateProblem.vi The WfmCharts is configured as Scope update mode All plots have thicker lines to make the problem more visible Plot1 and Plot 2 are anti-aliased In this case the Stop button overlays the plot area in the upper WfmChart. Run the VI and notice the difference in the lines in the upper and lower WfmCharts. The upper chart should have somewhat jagged lines, and if you run the VI for a while you might even get to see this ;-) Pressing the stop button forces LabVIEW to redraw the upper chart. If you move the stop button outside the plot area, the problem dissapears, but the same problem can be seen if you move the plot legend inside the plot area. /J 1 Quote Link to comment
MikeB Posted August 16, 2012 Report Share Posted August 16, 2012 If the data is relatively slow then generate an array to store all of your points (same number as displayed on your chart) and for each new point acquired, rotate the array and replace the last element with the new point and update the waveform graph. Then you can have the cursors you want, just a bit of extra data manipulation. Mike Quote Link to comment
Minh Pham Posted August 21, 2012 Report Share Posted August 21, 2012 Attached is a small VI that generates 4 sinewaves and plots them in two equally configured WfmCharts. ChartUpdateProblem.vi The WfmCharts is configured as Scope update mode All plots have thicker lines to make the problem more visible Plot1 and Plot 2 are anti-aliased In this case the Stop button overlays the plot area in the upper WfmChart. Run the VI and notice the difference in the lines in the upper and lower WfmCharts. The upper chart should have somewhat jagged lines, and if you run the VI for a while you might even get to see this ;-) Pressing the stop button forces LabVIEW to redraw the upper chart. If you move the stop button outside the plot area, the problem dissapears, but the same problem can be seen if you move the plot legend inside the plot area. /J Could you please save the vi as 2010 version, thanks Quote Link to comment
Mellroth Posted August 21, 2012 Report Share Posted August 21, 2012 Could you please save the vi as 2010 version, thanks Here you go ChartUpdateProblem_lv2010.vi /J Quote Link to comment
Minh Pham Posted August 24, 2012 Report Share Posted August 24, 2012 I have tried the code in LV2012, it seems to be abit better. If you dont want the uses of the control on top of the chart, there is another solution is to use the invoke node: forceRedraw inside the loop. 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.