03-30-2024 12:58 PM
Bonjour,
Je volais enregistrer les données acquises dans un fichier tableau en binaire, mais j'ai un problème que ces données ne sont pas enregistrées dans le bon ordre dans ce fichier. j'ai un doute sur la position d'écriture pour chaque itération. ci-dessous mon vi d'acquisition et ce que je lis dans le fichier enregistré.
Merci d'avance pour votre aide.
03-31-2024 01:07 AM
We can't really debug images and you are not even showing how you read the file later. Is this another LabVIEW program or something else?
Please attach your VIs for writing and reading. Maybe you want to transpose the 2D array before writing?
(You also don't need to set the file position before every write, it will continue appending anyway).
03-31-2024 06:01 AM
Bonjour
merci votre retour, veuillez trouver ci-joint mes vi.
bonne journée
03-31-2024 10:25 AM
You did not attach the VI where you are writing the data. (your "sans titre 6" has nothing to do with the problem.)
You are reading the file as 1D data without size header but you write it as 2D array chunks with size headers. This does not match at all!
If you know how many channels you have, All you need is read it as 1D array and reshape. None of your convoluted code is needed. Since your x-values are equally spaced, you don't even need an xy graph.
03-31-2024 11:12 AM
See if this can give you some ideas.
Since you are doing little endian, I assume you want to read that with some other program later (not LabVIEW), so I left it as flat binary data. You could or example write the number of channels as I32 at the beginning of the file and then read it later to decide how to reshape.
04-01-2024 07:45 AM
Bonjour ,
merci beaucoup pour votre solution, bravo. ça m'a bien aider pour mon application.
un grand merci