LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to flip scales on Mixed Signal Graph?

Solved!
Go to solution

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:

 Mixed1.PNG

 

 

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:

Mixed2.PNG 

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? 

 

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 1 of 5
(3,621 Views)

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 > 

Message Edited by CoastalMaineBird on 06-24-2009 04:49 PM
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 2 of 5
(3,611 Views)

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

Regards

Paul

CLD running LabVIEW 2012 32 & 64 bit on Windows 7 64 bit OS.
0 Kudos
Message 3 of 5
(3,544 Views)
Solution
Accepted by topic author CoastalMaineBird

 

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. 

 

 

 

Code.PNG

 

 

Graph.PNG 

Message Edited by CoastalMaineBird on 07-14-2009 06:26 AM
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

Message 4 of 5
(3,536 Views)

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

Regards

Paul

CLD running LabVIEW 2012 32 & 64 bit on Windows 7 64 bit OS.
0 Kudos
Message 5 of 5
(3,526 Views)