LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to add time-stamp to an axis in 3D surface (A.U., not relative)

Solved!
Go to solution

Hi All.

 

I'm attempting to use the "new" 3D surface graph in LabVIEW 2010. The problem I run into is that the interface/API is using SGL data-type, and in my case, I need to be able to plot absolute time on the y-axis. I can't do relative time, or at least it would be much less useful.

 

The application will scan data folder for log files and allow the user to 3D Surface graph data from time x to time y. The absolute time stamp on the y-axis will allow the user to correctly identify when certain events happened.

 

I've attached an example VI that shows the problem.

 

I've also looked a little for an "offset" property so that I could use relative time in the data array, but have the control add on an offset on its own, but no such property seem to exist.

 

It may come down to needing some creative fixing to work around this issue. My first thought would be to create a copy of the library and go through and change all the data-types to DBL, but apart from possibly being a lot of work, I'm worried I would run into a locked VI/class or a DLL call at the lower level and then I would be getting nowhere.

 

Maybe if I could place cursors on the graph, then I could get the time-axis position and do the "translation" on an indicator separate from the graph display and thus I could get away with using relative time on the surface plot, but there is something about that that rubs me the wrong way. The user shouldn't have to fuzz with cursors to "translate" the units on the axis, its making it more user intensive than it should have to be.. This however may be the only solution??

 

So, any other suggestions?

---------------------------------------------------

Project Engineer
LabVIEW 2009
Run LabVIEW on WinXP and Vista system.
Used LabVIEW since May 2005

Certifications: CLD and CPI certified
Currently employed.
Message 1 of 4
(2,700 Views)
Solution
Accepted by topic author Kjell-E

It seems that the most promising way is to create a copy of the library and change all the data-types to DBL. There would not be any locked class or VI for data-types change, but it is really a huge work. The 3D Graphs use SGL since the low level 3D rendering engine only takes SGL. SGL would save half of the memory against DBL.

 

I do not understand how cursers could help in this case. But if the scale is not updated often, you can use value pair instead of range scale. The value pair can overwrite the range scale if their value are same. Here are the steps you can try.

1. In 3D Plot Properites -> Axis page, set both Major and Minor tick count to 1 for Y Axis.

2. In 3D Plot Properites -> Value Pare page, add new pair with Name of the input SGL and Value of the correct time. Make sure the the pair display its name instead of value on the Display Style group.

Message 2 of 4
(2,693 Views)

Great, I will try that.

The idea with the cursors would be to use "relative time" and pass it in as singles, then just add in the "offset". So first point on y-axis would be 0 seconds since my t0, then subsequent traces would be x seconds from my t0. Using cursors and the user moving them to the point of interest, I'm thinking I can just read the y-axis position of the cursor and add on the offset seconds value and convert back to absolute time stamp and display that next to the surface plot. Your solution if it works would be much better.

 

The y-axis would only change infrequently (this is post-analysis) when the user orders a new time-date range to inspect, so this could work.

---------------------------------------------------

Project Engineer
LabVIEW 2009
Run LabVIEW on WinXP and Vista system.
Used LabVIEW since May 2005

Certifications: CLD and CPI certified
Currently employed.
0 Kudos
Message 3 of 4
(2,685 Views)

That worked like a dream.

---------------------------------------------------

Project Engineer
LabVIEW 2009
Run LabVIEW on WinXP and Vista system.
Used LabVIEW since May 2005

Certifications: CLD and CPI certified
Currently employed.
0 Kudos
Message 4 of 4
(2,658 Views)