05-29-2023 02:34 AM
Hi,
I am a new-entry to this community and this is my first approach to Labview.
The code is aimed to import a file.dat from an existing directory and convert it to a datalog file but I can't make it work. Because I've no experience with Labview, it is difficult for me to find the error.
Attached is the file.vi and a test file.dat.
Thank you to anyone who can help me!
Martina
05-29-2023 06:22 AM
The only hard part is knowing the record type, which you apparently do, so try something as follows to read all 11k+ records.
Note that there seems to be some corruption in the last two records. (LabVIEW also needed to update the file format)
05-29-2023 08:32 AM
Could you please attach you file.vi here?
Thank you
05-29-2023 09:18 AM
Martina,
Could you please open your OpenUT.vi in LabVIEW 2023 (which you seem to be using) and do a "Save for Previous Version" and specify LabVIEW 2021? Many "seasoned" LabVIEW users do not update with each new version (I'm mostly using LabVIEW 2019, but do have 2021 installed, as well).
Do you also have access to the program (LabVIEW, or otherwise) that created the test file, "seq_lam1.dat"? Knowing (instead of "guessing") the format of the data file would go a long way to ensuring we are reading the file correctly. If so, you should also attach it, preferably for LabVIEW 2021 (or 2019).
Bob Schor
05-29-2023 09:36 AM
Both versions are attached!
Concerning the program that creates the test file, I am trying to reconstruct each package because the project is very large and was not done by me!
Thank you,
Martina
05-29-2023 10:27 AM
@Martina_P02 wrote:
Could you please attach you file.vi here?
There are three functions from the datalog palette and a few diagram constants. Once the datalog type is wired, right click the output terminal of the read function and "create indicator". Shouldn't take more than a minute to recreate from scratch. It would take much longer for me to fire up the VM that has LabVIEW 2023.
05-29-2023 11:33 AM - edited 05-29-2023 11:45 AM
Do you know how old that file is? Must be ancient! (LabVIEW 4?)
Newer LabVIEW versions require it to be rewritten because of that. Do you know what generated the datalog file and what kid of data is in it?
Who wrote the crazy code you have attached? Was that upconverted from a very old LabVIEW version (some of it looks like mutation code, but I am not sure)?