12-27-2018 04:32 AM
Hi everyone, i'm trying to import data from database and display it in graph. database output will be in variant. I want it to show the data in graph. I think it need some conversion, i'm struggling here in conversion, i attached vi upto till i did and also attached the pic of data i'm getting from database. Please help me to get the data in graph.
Thanks
12-27-2018 05:30 AM
You should be able to just use Variant To Data to convert directly into a floating point. But do you know what the actual data type in the variant is (SGL, DBL, etc)?
12-27-2018 05:45 AM
I earlier used variant to data node but sometimes it displays an error "unsupported data format" that's why i moved to trying another nodes. And another main problem i'm facing that, I written query to read the data in descending order , it accept the query but still it displays ascending order data. Can you share me where i'm making mistake?.
This is the query i'm using to read the data "select * from NImeter order by datecreated desc"
Thanks for your response.
12-27-2018 05:56 AM
@praveenrajk wrote:
I earlier used variant to data node but sometimes it displays an error "unsupported data format" that's why i moved to trying another nodes.
That tells me there was an error in your reading of the database. Either the data stored was a different data type than you expected or there was no entry and you therefore got an empty variant returned.
12-27-2018 06:08 AM
Thank you sir, Now i'm able to see the data in graph but still the descending order query is not working , as well as in graph it shows wrong time, Can you tell me how to synchronize graph time and system time.
12-27-2018 07:26 AM - edited 12-27-2018 07:30 AM
@praveenrajk wrote: Can you tell me how to synchronize graph time and system time.
Have your DAQ/Simulator output a waveform and the T0 will tell the chart what time to put in the x-axis.