LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a datalog file

Hi all!
I am trying to create a new datalog file with a specific structure ( cluster structure). But when I run the following vi, I get an error message - LabVIEW: (Hex 0x4) End of file encountered.

0 Kudos
Message 1 of 5
(897 Views)

Once I give it new file name, I don't get any errors.

 

  • Not sure why your dialog is set to "file or folder", because selecting a folder would probably not make much sense.
  • Since you also allow selection of existing files, could it be you are selecting a file that already has datalog entries with a different structure?
0 Kudos
Message 2 of 5
(857 Views)

Thank you so much for your suggestions! Now I am creating a new file whenever I create a new Datalog file rather than using an existing one. Also, I would like to ask, is there anyway labview attaches the extension by it's own? rather than me having to add it whenever I create a new file..

0 Kudos
Message 3 of 5
(831 Views)

Hi ms6,

 


@ms6 wrote:

I would like to ask, is there anyway labview attaches the extension by it's own? rather than me having to add it whenever I create a new file..


Why should the programming language be responsible to create filenames by it's own based on your requirement?

 

You create the program, you define the filename: you can create the code needed to build your filename!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 5
(823 Views)

@ms6 wrote:

Now I am creating a new file whenever I create a new Datalog file rather than using an existing one.


I doubt you have to create a new file every time as long as you don't change the datalog type.

 


@ms6 wrote:

Also, I would like to ask, is there anyway labview attaches the extension by it's own? rather than me having to add it whenever I create a new file..


The filename and file extension is just a string and there is a palette full of string function that allows you to manipulate all parts. (such as adding/changing an extension). Once you settled on a suitable extension, you can set the pattern for the file dialog so you only see these files.

 

 

0 Kudos
Message 5 of 5
(776 Views)