01-24-2024 03:09 AM
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.
01-24-2024 11:51 AM
Once I give it new file name, I don't get any errors.
01-25-2024 09:24 PM
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..
01-26-2024 12:19 AM
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!
01-27-2024 10:49 AM
@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.