05-21-2021 04:24 AM - edited 05-21-2021 04:44 AM
Hello
I have a VI that aquires the position of a fee falling object with a laser distance senor, which is connected to a HBM DAQ device in Labview. HBM provides VI's for data aquision in labview.
The Problem is, that the x-axsis of the waveform chart starts at 1.1.2000 and I want it to start at 0, so the time data is usable at the end. Yet I had no succes with the approach used here (Start at Zero Using Waveform Charts - National Instruments (ni.com)
Additonaly I found out, that a part of the timestamp is created in this HBM sub-VI marked red.
VI attached.
Thanks!
Michael
Edit: VI Attached now
Solved! Go to Solution.
05-21-2021 04:42 AM - edited 05-21-2021 04:47 AM
Hi Michael (or Titus?),
@Michael_Jr wrote:
HBM provides VI's for data aquision in labview.
The Problem is, that the x-axsis of the waveform chart starts at 1.1.2000 and I want it to start at 0,
Additonaly I found out, that a part of the timestamp is created in this HBM sub-VI marked red.
In this image/subVI the timestamp is created:
The property node reads arrays of samples ("Values") and the corresponding timestamps. The first timestamp is indexed, adjusted by MeasurementStartUTCTime, then the difference between 01.01.2000 and 01.01.1904 is added to create the current timestamp used for the waveform.
Apparently HBM uses timestamps starting at 01.01.2000 internally in their driver software…
(Btw. what value has "Numerisch" for a given timestamp like "21.05.2021 12:00"?)
When you want to start your measurement data at "0" you just need to subtract the start time of your measurement from the timestamps delivered by HBM.
@Michael_Jr wrote:VI attached.
No, there is no VI attached…
05-21-2021 06:39 AM
Thank you for your quick response Gerd.
@GerdW wrote:
Hi Michael (or Titus?),
Sorry to disappoint you. I don't know him. 🙂
(Btw. what value has "Numerisch" for a given timestamp like "21.05.2021 12:00"?)
It is 3.70444E+9, if I directly wire a timestamp with "21.05.2021 12:00" to "Numerisch", if that was what you meant.
If I run it normal (without changing anything), it looks like this:
No, there is no VI attached…
Pardon me! It is now.
When you want to start your measurement data at "0" you just need to subtract the start time of your measurement from the timestamps delivered by HBM.
Like this? I have the feeling I didn't get that right..
05-21-2021 07:07 AM
Hi Michael,
@Michael_Jr wrote:
If I run it normal (without changing anything), it looks like this:
Apparently the "Numerisch" contains the number of seconds since midnight 01.01.2000. The whole timestamp calculation doesn't make a lot of sense (to me)…
You really need to read the HBM manual (or ask the HBM support) why they create such timestamps!
@Michael_Jr wrote:
Like this? I have the feeling I didn't get that right..
No, not like this.
Get the first "Numerisch" value on the very first sample and store it in a shift register. Then calculate the difference between later "Numerisch" values and that stored first value to get the duration of the measurement in seconds…
Btw. you really should cleanup that VI!
05-22-2021 07:56 AM
The community can be a lot more helpful when you attach VIs! Personally, I don't want the top-level VI with dependencies on a driver for a device I don't have. However, if you could provide a nice, clean subVI (such as 'Convert HBM Timestamp to LabVIEW Timestamp') along with some HBM timestamps and expected LabVIEW timestamps, I am confident we can help. In creating those (subVI and test cases), you may even solve your own question.
06-17-2021 02:10 AM - edited 06-17-2021 02:11 AM
Please excuse my late answer and my messy VI (it's cleaned up now).
Get the first "Numerisch" value on the very first sample and store it in a shift register. Then calculate the difference between later "Numerisch" values and that stored first value to get the duration of the measurement in seconds…
I tried that, but with no sucess (maybe because of the lack of my Labview skills 😄).
Anyway, as suggested, I contacted HBM, which came up with a good solution. I will attach it below.
Thank you both for your help. I really appreciate it!
In order to get the Time Channel and get the Relative Time from the modules you need to modify the Vis.
We made an example here :
Now you should able to got the time Channel with t=0 as desired :