LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Clear 3D Surface

Solved!
Go to solution

I've been playing with this 3D graph, and was hoping someone might have some insight into this issue.

Note:  I've tried both the old and new 3D graph methods, and picked through the forums/google for similar issues - have yet to find a fix;

 

Link to the Graph: (also in attachments)

http://i.imgur.com/93H6Inx.png

Link to the Code: (also in attachments)

http://i.imgur.com/xDJESK0.png

 

So, the issue is I'll run the VI once, and it works as intended.  The second time I run it, the graph still has the 3D surface from the previous run, and just draws on top of it.

The arrays containing the time/freq/power values are cleared when the VI starts, and I'm running the graph through a Clear Data node.  Even manually clicking the graph and reinitializing it to default value doesn't clear the surface.

 

It does clear if I close and re-open the VI.

It also clears if I make any changes to the block diagram.

 

 

Any thoughts?

Download All
0 Kudos
Message 1 of 3
(2,389 Views)

Hi 8Bit,

 

I see how that could be frustrating and I don't yet see what would be causing the issue.

 

However, have you considered using an ActiveX 3D Surface Graph, instead of just the 3D Surface Graph? The example attached to this KnowledgeBase article uses this method, and I think it should be compatible with your application. From what I can see, this appears to be the preferred method for using and clearing 3D surface graphs, as the attachment in this KnowledgeBase article uses the same ActiveX 3D Surface Graph. 

 

Hopefully this helps. If for some reason you cannot implement the ActiveX 3D Surface Graph, please post your actual VI so I can help you troubleshoot it. 

 

Best Regards,

Thomas B.
National Instruments
Applications Engineer
Message 2 of 3
(2,354 Views)
Solution
Accepted by 8Bit

Thomas,

 

I've been sidelined with other projects for a while - finally got time to get back to this.

I tried rewriting it with both the 3D surface graph and the ActiveX 3D Surface graph, and was still having issues - though I did manage to get some semblance of functionality out of it. 

I decided there must be something fundamentally wrong somewhere else, and noticed something stupidly simple that I'd overlooked - Which I should have exected in retrospect, since 99% of coding issues are like that.

I wasn't correctly initializing the shift arrays that I use to build the graph, so even when clearing the data correctly, the shift arrays still were full of old junk data.  Stupid mistake.

 

http://i.imgur.com/fAkofnQ.jpg

 

^ That small change fixed it, works like a charm now. 

 

Thanks for the help though - your suggestion at least got me to rule out every possibility.  I've really got to start looking for the little mistakes first.   ;D

0 Kudos
Message 3 of 3
(2,319 Views)