LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Waveform Time to Zero (with HBM)?

Solved!
Go to solution

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.

HBM TimeStamp.PNG

HBM TimeStamp2.PNG

 

VI attached.

 

Thanks!

Michael

 

 

Edit: VI Attached now

0 Kudos
Message 1 of 6
(1,398 Views)

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…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 6
(1,383 Views)

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:

HBM TimeStamp3.PNG

 

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..

HBM TimeStamp4.PNG

0 Kudos
Message 3 of 6
(1,339 Views)

Hi Michael,

 


@Michael_Jr wrote:
If I run it normal (without changing anything), it looks like this:

HBM TimeStamp3.PNG


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!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 6
(1,330 Views)

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.

Doug
NI Sound and Vibration
Message 5 of 6
(1,297 Views)
Solution
Accepted by topic author Michael_Jr

 

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 :

Michael_Jr_0-1623913498951.png

 

 

  1. Modify the GetMeasurementValues -> and using the timeStamps as following :

Michael_Jr_1-1623913498956.png

 

 

  1. Change the diagram to Relative Time :

Michael_Jr_2-1623913498957.png

 

 

Now you should able to got the time Channel with t=0 as desired :

Michael_Jr_3-1623913498966.png

 

 

 

Download All
0 Kudos
Message 6 of 6
(1,194 Views)