02-06-2019 07:40 AM
02-06-2019 08:03 AM
@KK97 wrote:
I just want to generate a waveform file with Python which can be read...
I stopped the quote there for a reason. Let's just look at what the goal is. You need to generate a file of some type in Python and then have LabVIEW read that file and do something with the resulting waveform. I go back to just having your Python script generate a tab delimited text file with the waveform data points. Then you just use the Read Delimited Spreadsheet.vi in LabVIEW to read the file and then you can do whatever it is you need to.
02-06-2019 09:40 AM
@rolfk wrote:
That's all nice and good but likely way over the head of the topic creator. While the 16 bytes datetime is actually sort of parsable (it's a 64 bit signed integer containing the seconds, and a 64 bit unsigned integer containing the fractional seconds), there are other difficulties in this such as the fact that the Variant memory layout never has been fully documented. And also that all these numbers are stored in big endian format in the data stream.
There are better things to do with your time than trying to parse binary files so unless you write such things as your job every day or just really really want to tinker with such difficulties for the fun of it, I would advice to use a different file format to share data between LabVIEW and non-LabVIEW applications.
Mostly, I agree. As a binary file read and write performance is increased which can be quite important, but hasn't been mentioned in this case. The original question was how to write in the waveform format and then this is useful info, for simpler transfer a text file is always simpler, disregarding the slight loss of precision with the standard format (which usually is negligible).
/Y
02-06-2019 10:18 AM
Thanks a lot! I will try it later.