Jump to content

Creating datalog files outside of LabVIEW


Recommended Posts

Has anyone created datalog files in another program (such as C) that is readable in labview? I really like the way datalog files are handled with the records and I would like to create these files elsewhere. I've opened some datalog files in a hex editor and I can see some header information and type descriptors, but I can't really determine the structure of the file. Also, I have noticed that LabVIEW 7.1.1 creates a different file structure than LabVIEW 7.0, but they seem to be compatible with eachother.

Any help will be appreciated. Thanks

Link to comment
Has anyone created datalog files in another program (such as C) that is readable in labview? 

5500[/snapback]

:blink:

You could probably hack through the formatting and figure it out, and then spend a few hours writing the C code.

But WHY would you bother?? Just write an LV program, build an exe and hand it to your C-user. It will make everyone's life a lot easier.

The idea behind the datalog files is to make them easy to read and write to using LabVIEW. If you need to interface with other code, you are better off defining a reasonable format and then writing the files as tab-delimited ASCII text (as a first start) or binary (if you have storage space constraints).

Also, I have noticed that LabVIEW 7.1.1 creates a different file structure than LabVIEW 7.0, but they seem to be compatible with eachother.

5500[/snapback]

Yes, you hit the nail on the head. The file format can (and most probably will) change between different versions of labview. Newer versions will be able to read files created with older versions, and if there is a change, there will be NI documentation to support it.

Hope this helps :rolleyes:

Neville.

Link to comment
Thanks for the input, that's a good idea.  I personally have never created a .dll from LabVIEW so there will be some learning there.  I would still like to see an NI document that describes how those files are layed out, for curiosity.

Thanks again

5525[/snapback]

You don't need to create a dll. What I meant was you can make an executable out of your file read code which could then be installed on any other machine. (You don't need the whole LV install to run it). It is fairly straightforward, and can be achieved in a few mouse clicks.

I don't know what LV package you have but you would need the Application Builder (to be able to build an executable).

This is not part of the LV Base or Full Development System, but could be purchased separately. It is part of the Professional Development System

As to the datalog file format, that will never be documented, because then it becomes difficult for NI to make changes. Again, the idea is ease of use. It would be like documenting the C code behind LabVIEW. We don't need to know, and we don't really care either. All we users care about is that the datalog files be readable between LV versions, and if not, then document the workaround to make that happen.

Hope this helps.

Neville.

Link to comment

I do have access to the Application Builder, and I have created executables. However, whenever I have done this, it required the Run-Time engine to be installed. I'll just have to read up on the App Builder and figure out what I need to do. Thanks for the help

<Edit> Looks like DLL's created by the App Builder require the run-time engine as well. I guess I don't really see the point then, but now I'm in the wrong forum.

Link to comment
I do have access to the Application Builder, and I have created executables.  However, whenever I have done this, it required the Run-Time engine to be installed.  I'll just have to read up on the App Builder and figure out what I need to do.  Thanks for the help

<Edit> Looks like DLL's created by the App Builder require the run-time engine as well.  I guess I don't really see the point then, but now I'm in the wrong forum.

5561[/snapback]

FYI, if you go to the Installer settings Tab of the App builder, it allows you to add components of the LV Runtime Engine to your installer. Then once the whole installer has been built (with your selected components of the LV RTE), you install your app on a new machine. This installs the RTE, puts your executable in the folder you specify in the build etc etc. Very professional!

I don't see the confusion.. Obviously LV needs the RTE to display the buttons etc (at the most basic level), and these are all added to your target machine at install time. Easy as Pie!

Neville.

Link to comment

Yeah, I have done this. It works great I like it. It just doesn't fit into what I'm trying to do here, that's all. I was just hoping I could create something (like a DLL) that can be called in another language (like C or VB) that does not require LabVIEW. I think my solution is to create a DLL in C that writes a binary data file (not a datalog file). This way, I can read and write the files easily in most languages.

Thanks for all the input.

Link to comment
  • 3 months later...

Well, its not a datalog format file, but you could do this in XML from LabVIEW, then everyone else can read/write.

Also, the format of datalog files has bounced around regularly with almost every new version of LabVIEW for quite a while. It also happened to flattened string text files around version 4.0 too. Bottom line, if you save in any NI format, it is wise to make provisions for some kind of upgrade translator tool, when you have to switch your applications/customers to a newer version.

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
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.