03-13-2009 12:11 PM
I think this is simple and I'm just glossing over it, but How can I control the grid lines in a waveform chart?
Basically I want a constant 10x10 matrix on the chart... LabVIEW seems to turn them on and off at will.
The functionality I am programming is essentially an oscilloscope interface where the user will set a units/division control.
I'm using LV 8.6
Thanks,
Charlie
03-13-2009 12:22 PM
There should not be any problem with this. What is the update mode? (Of course in strip chart mode, the grid lines will travel to the left).
Can you attach a simplified example that shows the problem?
In any case, it might be better to use a graph instead of a chart .... 🙂
03-13-2009 12:32 PM
Actually I stated the issue incorrectly. The x-axis grid, moving with time, does not matter. The y-axis grid is what I would like to keep constant. I am using the property node to set Y-scale max, min, and set a Marker Array. If you still need it, I will put together a simple example.
Switching to a graph is not an option I don't think, since I need stacked plots (3).
Thanks,
Charlie
03-13-2009 01:01 PM - edited 03-13-2009 01:02 PM
does...
Shut off autom scale on Y axis
Set max/min range
Set marker values
help?
Ben
03-13-2009 01:45 PM
If you really want a custom grid and you can't do it any other way (yes, I had to do this for one client who insisted that his instrument and the plot should look the same, including the grid lines):
Add two new plots to the graph -- one for the x-axis gridlines and one for the y-axis gridlines. Essentially, they would be square waves.
(And after the client got what he wanted, he noticed that nobody looked at the instrument anymore).
03-13-2009 01:49 PM
MattBradley wrote:...
(And after the client got what he wanted, he noticed that nobody looked at the instrument anymore).
When you see that you know you have delivered what the customer wanted. At project acceptance meeting and the boss is present, I'll do the "wink-wink-nudge-nudge" when the customer turns their back on the old equipment.
Ben
03-13-2009 02:12 PM
That is very similar to what I am doing now. I just need 10 equi-distant horizontal grid lines.
see below.
03-13-2009 02:38 PM - edited 03-13-2009 02:44 PM
... and this
does not work?
Is Auto-scale shut off for the Y-axis?
If so post a simplified example so we can look and experience your pain ourselves.
Yikes!
Just spotted taht your range is a function of you data point. That will certainly make the sclae jump around.
Ben
PS I used to use red comment as well, unitl I took the CLD exam and got dinged. Now only black, and don't even think about using arrows.
03-13-2009 03:21 PM
Autoscale is off for the Y-axis. I just threw this together as a quick example. In this static example it works. However, when the real program is running and data is varying, sometimes the horizontal lines reduce down to 5 lines and in some cases 3 line (middle where data point is, max, and min). I would like to maintain 10 lines.
The example shows everything based on the data point becuase that is a function that the user can call to center the plot on the screen. This code is called when the "Centering" button pressed. It puts the plot in the center of the Y axis and maintains the units/division set in the control.
Why are red comments bad? I've been doing this for years because you can easily see what is a coment. I guess I got dinged on this during the CLD as well. 🙂
03-13-2009 03:22 PM