ni / niveristand-embedded-data-logger-custom-device

VeriStand embedded data logger custom device
MIT License
3 stars 10 forks source link

Add TDMS Waveform Properties to Channels #35

Closed oscarfonloz closed 3 years ago

oscarfonloz commented 3 years ago

TODO: Check the above box with an 'x' indicating you've read and followed CONTRIBUTING.md.

What does this Pull Request accomplish?

Adds the following properties to the TDMS channels:

Why should this Pull Request be merged?

It will allow customers to see the log files with the correct time axis in SystemLink, DIAdem, and the LabVIEW TDMS Viewer.

What testing has been done?

TODO: Detail what testing has been done to ensure this submission meets requirements.

niveristand-diff-bot commented 3 years ago

Bleep bloop!

LabVIEW Diff Robot here with some diffs served up hot for your pull request.

Notice something funny? Help fix me on my GitHub repo.

Embedded Data Logger Engine.lvlib--Open Data Log File.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-embedded-data-logger-custom-device/PR-35/2021-02-05/19%3A47%3A28/Embedded%20Data%20Logger%20Engine.lvlib--Open%20Data%20Log%20File.vi.png)
Embedded Data Logger Engine.lvlib--Set Default Channel Properties.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-embedded-data-logger-custom-device/PR-35/2021-02-05/19%3A47%3A28/Embedded%20Data%20Logger%20Engine.lvlib--Set%20Default%20Channel%20Properties.vi.png)
rtzoeller commented 3 years ago

I've not functionally tested the changes yet, but from a quick code review:

oscarfonloz commented 3 years ago

I've not functionally tested the changes yet, but from a quick code review:

  • [ ] We're reading the start time in multiple places; once in Open Data Log File.vi and once in Set Default Channel Properties.vi (actually n times, as it's in a loop). This is a potential data integrity issue. The existing code attempts to read the start time as late as possible (I believe for accuracy, i.e. to not introduce a delay between the reported start time and the actual start time); we probably should continue doing that. I'd prefer to see us write all properties except wf_start_time first, for all channels, then write just the wf_start_time property for all channels right before returning from Open Data Log File.vi. All channels should use the same time.

I agree, and I'm currently speaking with @debryant about the implications of this start time for situations when we don't start logging immediately after creating a file, as well as when we have pre-trigger samples... I might ping you later to get your thoughts about it. Mainly to understand how these situations are currently handled, so we can add the functionality without spending too much time figuring out where it fits.

  • [x] No need to mention NI or R&D in the comment. It can be more concisely stated as "1 sample indicates the acquisition is continuous and the size is not known in advance."
niveristand-diff-bot commented 3 years ago

Bleep bloop!

LabVIEW Diff Robot here with some diffs served up hot for your pull request.

Notice something funny? Help fix me on my GitHub repo.

Embedded Data Logger Engine.lvlib--Open Data Log File.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-embedded-data-logger-custom-device/PR-35/2021-02-08/10%3A47%3A14/Embedded%20Data%20Logger%20Engine.lvlib--Open%20Data%20Log%20File.vi.png)
Embedded Data Logger Engine.lvlib--Set Default Channel Properties.vi.png ![capture](https://raw.githubusercontent.com/niveristand-diff-bot/diff-images/master/NI/niveristand-embedded-data-logger-custom-device/PR-35/2021-02-08/10%3A47%3A14/Embedded%20Data%20Logger%20Engine.lvlib--Set%20Default%20Channel%20Properties.vi.png)
dbendele commented 3 years ago

this may be a useful reference (or it may need updating depending on PR outcomes): https://nio365.sharepoint.com/sites/tdms-fileformat/SitePages/Application%20specific%20extensions%20to%20the%20TDM%20model.aspx

dbendele commented 3 years ago
dbendele commented 3 years ago

image

image

oscarfonloz commented 3 years ago

For the PR's visibility: I had a meeting with Ryan, Donovan, and Deborah today and we decided on how to move forward with the feature. I will be making the appropriate changes through the week.

oscarfonloz commented 3 years ago

From @rtzoeller: "@Oscar Fonseca can you close the existing PR so we get a blank slate, and open a new one when it's ready?" Hence, closing it. @dbendele thank you so much for the suggestions, I will definitely use them!!