01-29-2016 04:05 AM
Hi Community,
I am using a 3D surface graph to plot data using time stamp on x-axis. This has gone fine on earlier versions of LabVIEW, but in 2015 something weird happens. When I use time stamp values (casted to SGL, of course) the graph is not plotting correctly, or not at all. It seems like values under 1e8 works (time stamps are around 3.5E9.
This error applies to both both of the surface graphs options, xcontrol and the other (is it activex?). I have not tried it on the other types of 3d graphs.
I have attached an example where I have made a simple ramp pattern to reproduce the error with simple data.
I appreciate any help 🙂
LabVIEW 2015
Windows 10
01-29-2016 08:02 AM - edited 01-29-2016 08:07 AM
The problem here is the limited precision of the SGL data type:
http://digital.ni.com/public.nsf/allkb/D93C702AEE4339AD8625695A0076F619
So when you extract 100 from such huge number, SGL cannot deal with it, it gives you the same value back.
edit: I tried to attach a snippet, but the Photos attachment button stopped working. Is it only my PC, or NI website got a problem?
01-29-2016 08:11 AM
Thank you for your reply. That makes sense, I should have checked that.
This means that using time stamps with minutes resolution does not work in 3D surface graph, since the helper casts it to sgl. Maybe I can modify the class to use dbl instead... or find another graph type where I can use logarithmic scales i 3 dimensions.
01-29-2016 08:16 AM
You could use relative time values on your time axis, no? Do you really need to show absolute time values as double types on your x-axis?
01-29-2016 08:22 AM
That is a good idea.
The only problem is that then I dont get the date. The data I am showing is collected over several days, even weeks.
01-29-2016 08:32 AM - edited 01-29-2016 08:39 AM
I would only show the hours or days on the axis, and I would show the reference starting point as a standard date/time string in an additional indicator.
edit: the other question is that, how many data points you wanna use for the X-axis? In the example which you posted, you only create an X-array with 2 values.
01-29-2016 08:53 AM - edited 01-29-2016 08:53 AM
Would a simple 3D surface be good enough to represent your data? I have found the following doc which shows nicely dates and times:
http://digital.ni.com/public.nsf/allkb/9DFCA641FF1A6ED78625738E000B689E
Open the VI at the botom of the page, and play with it (you can play with the surface (rotate with mouse, zoom with wheel, and shift+mouse pan shifts the graph), if you put a while loop in the end, or if you go to run mode using CTRL+m on the FrontPanel).
01-29-2016 08:57 AM
@Blokk wrote:Would a simple 3D surface be good enough to represent your data? I have found the following doc which shows nicely dates and times:
http://digital.ni.com/public.nsf/allkb/9DFCA641FF1A6ED78625738E000B689E
Open the VI at the botom of the page, and play with it (you can play with the surface (rotate with mouse, zoom with wheel, and shift+mouse pan shifts the graph), if you put a while loop in the end, or if you go to run mode using CTRL+m on the FrontPanel).
I actually started playing around with this half an hour ago, it might do the trick 🙂
Btw, do you have any ideas on how to get the Y axis of an intensity graph to be logarithmic? the mapping mode is disabled and setting it with property node doesnt change it.
01-29-2016 10:05 AM
Blueprint wrote
Btw, do you have any ideas on how to get the Y axis of an intensity graph to be logarithmic? the mapping mode is disabled and setting it with property node doesnt change it.
It is not possible to change. But you can remap your data to be logarithmic, and show it on the linear axis. Have a look on this discussion (and the test.vi):
http://forums.ni.com/t5/LabVIEW/Log-scale-in-an-Intensity-graph/m-p/3064032/highlight/true#M873825