06-24-2009 02:35 PM
LV 8.6.1f1
OK, so I'm looking at the relatively-new MIXED SIGNAL graph to fix the things that don't work about the ordinary graph (specifically, the weird cursor behavior).
It looks like I can have one cursor that spans four plots and reads out one X and 4 Y values, that's what I want.
But I need scales on both sides.
I tried creating the 2nd scale, and SWAPped SIDES with it, and got this:
There's no scale on the right?
Or is there?
Those little tick marks are a clue.
So I stretch out the right side of the graph, and guess what?
There is the scale:
In other words, the new graph scale stays where it wants to on the screen, even if I horizontally re-size the graph.
I can move the graph, the scale moves with it. I can re-size the left side, and the left-side scale shows the same effect.
It seems to me like the graph scales should be attached to the plot area.
This graph is on a TAB control, perhaps the problem is related to this LabVIEW error .
Or am I missing something?
Blog for (mostly LabVIEW) programmers: Tips And Tricks
Solved! Go to Solution.
06-24-2009 04:49 PM - edited 06-24-2009 04:49 PM
Looks like the scales DO respond to YSCALE : POSITION : LEFT property nodes.
So it looks like I have to get the PLOT AREA bounds, and do arithmetic to set the scales in the right place.
Then we'll see what else is wrong with the graph...
< crosses fingers >
Blog for (mostly LabVIEW) programmers: Tips And Tricks
07-14-2009 01:55 AM
Hi,
I', having the same issue with mixed signal graphs. I want to display a number of plots with a common cursor but I'm having issues witht he scales which keep moving relative to the plot area and the actual vertical slots they fall in seems to get more random every time I add a new scale.
I'm still experimenting to try and work the logic out, but I'm a bit baffled just at the moment - the help seems rather unhelpful in this case.
Regards
Paul Bloore
07-14-2009 06:17 AM - edited 07-14-2009 06:26 AM
Here's the code I ended up with to fix work around this problem.
The Mixed-Signal graph has ANOTHER problem where it completely forgets your assignments about which plots go on which scales, but that's another story.
In my case, I've already placed the scales on the left / right sides as needed. It's just that the bottpm right scale, really, really wants to be off to the right.
What I do here is fetch the PLOT BOUNDS for plot area #0 (the top one).
I'm only interested in the left-right axis, I don't have a problem vertically.
I also fetch the SCALE AREA WIDTH from scale 0.
I then adjust the YSCALE.LEFT property of all four scales, to place them where I want them.
The two LEFT scales are at the PLOT BOUNDS.LEFT - (SCALE WIDTH + 1)
The two RIGHT scales are at PLOT BOUNDS.RIGHT + 1
The "+1" means there is one pixel between the tick mark of the scale and the border of the graph itself; I think it looks better.
Just run the VI once to execute this code, then disable the code section, and save the VI. (You don't need to run it again unless something changes; it seems to remember where it's supposed to be).
Of course, if you re-size the graph, you'll have to execute the patch again.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
07-14-2009 06:25 AM
Hi Steve,
Thanks very much for that snippet. I'd started digging through the property nodes in an attempt to program a fix but got rather lost in the maze. I'm still fairly new to LabVIEW and this is my first encounter with the mixed signals graph. Your snippet will dramatically shortcut the process for me 🙂
Regards
Paul