LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

rotating fill slide

Solved!
Go to solution

I somehow can't use the 3D Plot in my own VI. Even though it works just fine in the example you provided. It's not that important anyway, as I pointed out earlier.

 

I can't even understand how your VI works (it works, that's for sure). You Wire the 3D Curve to the input. But how does the 3D Curve receive Data from the VIs? To me this doesn't go together with data flow very well...



Remember Cunningham's Law
0 Kudos
Message 11 of 12
(551 Views)

Its pretty straightforward, but I agree that dataflow isn't quite as obvious as with a normal graph/chart. I should have wired up the error clusters in the 3D curve.vi to enforce some data flow, but was being careless.

A quick explanation (I know its not really relevant to your problem, but others might be interested)...

 

The code sits in an event structure so that when one of the sliders is moved the graph gets updated.

The 3D graph is acted on by reference. When you drop this type of 3D graph onto the front panel you get an ActiveX container which displays the graph. The block diagram is given a reference to the ActiveX object and a vi which handles the data for you. (Very different to a normal 2D graph or chart). The green 3D curve control is actually a reference to the graph object, not the graph itself.

The vi can be used several times to act upon a single graph - the reference just tells the vi which graph/activex object to act upon. By right clicking the object on the front panel and selecting CWGraph3D you can access its properties and add/remove plots, change colours etc.

If I were to have two separate 3D graphs, I would have to make sure that I was using the correct reference... otherwise changes would be applied to the wrong graph.

 

When the event loop is triggered by a value change, the new values are written to the graph. The Plot Number input tells the code which plot to update.

 

The use of references is probably the bit worth getting your head around. They pop up pretty frequently and are used for example, when closing files, using property/invoke nodes etc.

 

I'm sure others can craft a more elegant/clear/accurate explanation than this, but hopefully that goes some way to explaining.

 

Edit: As I said earlier, it is possible that newer versions have different/upgraded 3D graphs in which case some of the above may not apply. I'd have to trawl through update notes to check

 

Ian

Message 12 of 12
(548 Views)