LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Database newbie

I am trying to embrace DSC with its Database modules so that I can save my data to Citadel. There appears to be a paucity of information about the database storage permutations and combinations. After doing the "Getting Started" I modified the Logging example.vi but ran into overwhelming problems eventhough the waveforms were correct. First I tried to eliminate two Column headers because they were empty but apparently some configuration file says that those columns were allocated therefore have to be used. Inserting dummy string data does not work either "Exception occured in Microsoft JET Database Engine, Syntax error in INSERT INTO statement.." It would be nice to know where this definition problem can be rectified. Thank you.
0 Kudos
Message 1 of 9
(4,383 Views)

Hello RL,

From the attached diagram it looks like you are using the Database Connectivity Toolkit for LabVIEW. And not DSC -- the DataLogging and Supervisory Control module for LabVIEW. These two are very different products. The former stores data to, apparently, some Microsoft Jet Database. While DSC stores data to NI's own Citadel database.

Having said that, you should still be able to log data by modifying the example. I would try the modifications in small increments. Like, for instance, instead of writing the actual acquired data, I would try to write dummy data of Waveform datatype (or whatever datatype you expect) first. And then make small incremental changes to get the final desired behavior.

I am afraid I am not very familiar wi
th the Database Connectivity Toolkit... sorry.

Regards,

Khalid

0 Kudos
Message 2 of 9
(4,383 Views)
Khalid, you are right. RL is confused with the difference of the DSC Module and the Database Connectivity Toolkit.

However, I could imagine that the Database Connectivity Toolkit could be used to READ Citadel data out of the LabVIEW DSC Database (Citadel). Through the ODBC driver you can QUERY data with SQL statements.

RL, I assume in your case you want to WRITE to the Citadel database through the ODBC interface with the Database Connectivity Toolkit. But, this is not possible. Citadel data is exposed as read-only through the ODBC/ADO interface. You are NOT able to INSERT data to Citadel through ODBC/ADO.

Hope this clarifies the Citadel part.

RL, you might ask your question as well to the LabVIEW General forum and explain especially the part wh
ere you select the database (from your .jpg image we cannot see to which database/UDL you want to write). Do you write to MS Access, SQL Server, Oracle...?

Hope this helps
Roland
0 Kudos
Message 3 of 9
(4,383 Views)
Thank you Khalid,

Such is my ignorance. I started with an example not understanding why everything was different than the "Getting Started...DSC".

I will start over taking into consideration your and Roland's advice.

Regards,
0 Kudos
Message 4 of 9
(4,383 Views)
Thank you Roland,

I need to store more data than I can in spreadsheets. I realize that there is a binary format but I am not very comfortable with that. I was hoping to save a Run #, Date/Time stamp, a string that describes the experiment and the data channels. The reader will be able to edit the descriptive string in case something was wrong and I will add the analysis functions as required. Essentially I have a VI that does everything except save to Database. I have the Control Edition Suite which means I have way more software than knowledge but there is a serious and determnined effort to rectify that. Citadel appears to have the capacity required therefore it appeared to be a good data recipient. The question was why learn two databases
when Citadel should be able to handle it? Plus it is integrated into Diadem. I did ask the question in the Labview forum about which is the best way to do this. Do you have an opinion on the matter?

Regards,
0 Kudos
Message 5 of 9
(4,383 Views)

Sure.. no problem. We all learn from each other.

Feel free to share any questions/observations you may have about Citadel, DSC, etc.

Khalid

0 Kudos
Message 6 of 9
(4,383 Views)
(As of now?) Just the DSC Engine can log data to Citadel. If I combine those two things there will be some limitations:
  1. The DSC Engine is logging just variances of single values (boolean, numeric, string). There is no "time-triggered" logging. There is no waveform as tag type.

  2. The DSC Engine has a speed limit of beeing able to log served data. If the server delivers fast changing values the DSC Engine process might be at its limit. Source: Developing Monitoring Applications with the LabVIEW DSC Module for Control Systems

  3. The DSC Module is probably a good additional package for "slower", continious process monitoring applications. As of now it is not easy to use (in other words "hacky" to use) for "high-speed logging" applications.
I think National Instruments is aware of this limitaitons, and I do not know exactly what would be the best other solution for you to store data to some data repository/database.


Depending on the speed of the incomming data you could maybe use Data Sets Server in DSC. More info on Data Set Logger Tutorial for LabVIEW DSC Module. In your case you could write the incoming DAQ data to a Memory Tag.

If you have a DAQ E-Series card, you might look into the capabilities of NI VI Logger - you might get it still for free?. It allows you to write a high-speed logger application in some minutes and integrates as well nicely to DIAdem.

Or, you store your DAQ data to a database (e.g. SQL Server) with the Database Connectivity toolkit. This is probably not as easy and requires some knowledge of database/SQL and is probably as well critical for "high-speed" data aquisition.

Since I've not too much experience and I don't know your application requirements I cannot recommend which would be the best way to try first.

I've seen your post on LabVIEW General forum. I hope you will get there a more satifying answer.

Good luck
Roland
0 Kudos
Message 7 of 9
(4,383 Views)
Thank you for the information. You have certainly saved me, and possibly others, a lot of anguish. Though I have a DAQ E-Series card I generally prefer to use a 4452 because of the 4 channel simultaneous acquisition at 100 to 200K/sec. It appears that both DSC and Database Connectivity are geared to hard core database users rather than to Labview users who need to save and analyze a lot of data.

Regards,
0 Kudos
Message 8 of 9
(4,383 Views)
I use CITADEL to store arrays of data with as much as 1000 datapoints in each array. I actually take a cluster of data that includes the data array, max value, average value, a string name, the current timestamp value, and three booleans test results. I flatten the cluster to a binary string and write this value to many different memory tags. You can use tag groups to split the data into several different sections. If you need to view the data in different ways, you can write the same data to several different tags if required. The CITADEL database automatically grows into more files if it needs to add space.
0 Kudos
Message 9 of 9
(4,383 Views)