I'm trying to Query Event Data set using "QueryDataSet.vi" Example.
C:\Program Files (x86)\National Instruments\LabVIEW 2019\examples\InsightCM\QueryData
But it only could access Un-archived data.
How can I access archived data Events from LabVIEW service?
Any help would be greatly appreciated.
In that example, checkout the subVI called GetDataEventsForEquipment.vi. In there, you will find the code that contains the query parameters for the data events that are populated in the list. Looks like it is hard coded to one day. So you should be able to change the StartTs and EndTs of the query message to query data events from different time periods.
Hello Alan, thanks very much for your comments.
I have already modified the StartTs and EndTs, by specifying query date like attached VI screenshot in previous post.
However, it return only un-archived dataset, not return archived dataset.
It seems data set is automatically archived after 1 month.
I tried to use console application by using "exporttdms" command like below.
it also dose not return archived dataset.
InsightCMConsole exporttdms -dir C:\temp -asset "h_water_cooling_room|rfq_ri_1" -start "2020-04-22 22:00:00.0" -end "2020-04-22 22:10:00.0"
Are there any help documentation or manual for message format or http command to query data? (I have InsightCM SDK as well)
I would like to understand "QueryEventRequest" format.
or HTTP commad if I can directly access to InsightCM web service through HTTP protocol.
I don't know of any documentation for these messages, and I see what you are talking about. It looks like the message being used to query the data events in that example is out of date. Since the sdk is no longer part of the shipping InsightCM product, you may need to work with your account manager to talk about possible solutions.
I can say that there are a handfull of messages in this folder that you may want to take a look at: <LV directory>\vi.lib\addons\InsightCM\MessageBus\MessageLibrary\DataManagement
Unfortunately, there is not a LabVIEW version of the message to QueryArchivedEvents from InsightCM. You can do this in C# with by querying the database directly. Are you integrating this into your own application or do you just need a tool to export data from an asset (archived and non-archived)?
If you are looking for a utility, check out this: http://download.ni.com/pub/energy/InsightCM/DataExportUtility/
There is a brief readme in there. The help you can see by running the exe with no arguments. I have tested this on 3.5 and 3.6, but it should also work in 3.4 as well.
Thanks very much for your comments.
I will try to look at utility tool.
The customer want to use InsightCM event data for machine learning and predictive maintenance purpose, so they want to access from Python.
So I'm trying to look for methodology to access data event and try to build data query and convert application using labview.
Do you have any documentation for C# API for querying the database directly?
Is it possible to use that .NET API within LabVEW using .NET constructor and property & invoke node?
thanks very much for your support.
Did you have a chance to check out that utility? You can run it from a command prompt with arguments so you could programmatically call it through LabVIEW. I'm not sure what data format you need in the end so it would likely take a little more massaging on your end to get the format correct.
The C# SDK is not documented, but there is an example: http://download.ni.com/pub/energy/InsightCM/SDK/CSharp/
You can browse through the library and see the messages which are supported there.
You can call it from LabVIEW (this is what the LabVIEW API already does), but I think you will find that some of the data types are not very LabVIEW friendly.
I'm curious, what kind of data does your customer want to export to Python? Trends, data sets, both? Is this for looking back on historical data? Or is it to feed live data streams into a Python algorithm?
Hello Jack, thanks for your support.
I tried to run utility which you introduce.
That was what I want to to , but Customer want to have raw data set in CSV file format.
So I need to convert generated TDMS to CSV.
I understand there are three ways to access archived data set
- using utility to generate tdms then convert to csv
- directly access binary data set from data file directry "C:\ProgramData\National Instruments\InsightCM 3.0\Files"
- using C# API to directly access through InsightCM server.
I'll try to test these method and find out simple and scalable way to access data set.
What customer want to do is that offline analysis (predictive maintenance) using archived data set (raw vibration data).
just feedback for future update, It would be great if there is direct access LabVIEW API to InsightCM server.
Probably, some of customers want to do the same, reuse insightcm data set for machine learning analysis or predictive maintenance analysis purpose.
thanks very much for your help.