Jump to content

automatic VI data logging!


Recommended Posts

I just right clicked on a VI and noticed this option "Enable Database Access".

After some investigation I found out a whole new set of data logging options I never knew existed before! (I wonder how long have I been writing data logging software uneccessarily!?)

This seems very useful, but thought I'd check if anyone has had any experience using this builtin capability, and wether or not there are things to 'watch out for' when using it.

Would this be any more efficient or inefficient when compared to writing your own datalogging software? (memory/performance etc.)

Thanks!

John Howard

Link to comment

John

The biggest disadvantage is that if in the future you decide to add a parameter (a control to your front panel) to the log file, then the old log file is no longer readable (compatible).

Also, the log file is monolithic. If anything happen to it, you loose everything.

All together I tried it but I eventually switched back to an "home grown" ini based data logging.

btw, I think that function has been there for quite a while now.

PJM

Link to comment

The datalogging capabilities that you talk about are rudimentary but may be useful for something. I just don't know what. :question: I honestly don't know why NI has not dropped this feature since I have never come across anyone who uses it (of course now I will be proven wrong). The type of files created are the same format as your standard datalog files. Datalog files can easily be created by writing a cluster into the file IO functions. How is this different?

Go to a brand new VI and create a bunch of controls (booleans, text input etc.). To enable datalogging you have to go to this VI that you want to log data from and go to the Operate>>Data Logging>>Change log file Binding. I bet you didn't notice that before eh? ;) You will be prompted for a file. Enter a filename with any extension. Now go back and edit the values then click the run button. Now go to the Operate>>Data Logging>>Log.. menu. The values of all the front panel controls will be saved as a single record to the file.

To retrieve the data you have to place this same VI on the diagram then right-click on it and select "enable database access". A weird file cabinet icon will wrap around the vi and now you can create indicators to retrieve the data from the datalog file. So in essence the entire front panel of your VI becomes the cluster you would otherwise use in your normal datalog file IO VI's.

See image:

post-2-1090553850.png?width=400

Link to comment
I honestly don't know why NI has not dropped this feature since I have never come across anyone who uses it (of course now I will be proven wrong).

My pleasure... :D

I seldom use VI datalogging for debugging purpose, when a VI goes wrong one run in a hundred. I datalog the VI and that allow to examine inputs and outputs of each run. It is fast and easy to turn on/off and less invasive than breakpoints.

However, I've never used them for actual datalogging.

Jean-Pierre

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.