LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

trying to get a timestamp to this data

I am trying to get a timestamp in milliseconds attached to this data from a rotary encoder. We need to collect data at a rate of 250Hz/s. I've hit quite a wall trying to get the data assigned to a timestamp and in an excel sheet. I would appreciate any help!! You guys were amazing last time. One attachment is the previous labview version, and the other is the most up to date.

0 Kudos
Message 1 of 4
(710 Views)

Tick Counter  cannot convert to a real world timer.

PalanivelThiruvenkadam_0-1692290217988.png

 

You can use Get Time Stamp in Seconds functions and use as a time stamp

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 2 of 4
(704 Views)

The millisecond timer value is a relative counter that increments every ms and wraps to zero when 2^32 is reached. It's absolute value has no meaning.

 

To get relative time, you need to subtract the current value from the start value.

 

altenbach_0-1692290599655.png

 

The rest of your code seems very convoluted and broken. Can you explain how the time should be merged with the rest of the data?

 

(... and please (PLEASE!!!) don't attach two different files with the same name. you can edit the name to e.g. include the LV version, e.g. "Counter...LV2015.vi)

0 Kudos
Message 3 of 4
(701 Views)

Hi veterinarian,

 


@confusedveterinarian wrote:

I am trying to get a timestamp in milliseconds attached to this data from a rotary encoder. We need to collect data at a rate of 250Hz/s. I've hit quite a wall trying to get the data assigned to a timestamp and in an excel sheet. I would appreciate any help!! You guys were amazing last time. One attachment is the previous labview version, and the other is the most up to date.


My recommendations:

  • Don't use RGT functions in the very same loop as your DAQmx stuff.
  • When you need timing information you should use the inbuilt feature of DAQmx to provide timing information! Read waveforms from DAQmxRead!
  • When you need simple logging you should use the DAQmx inbuilt feature of TDMS logging: just provide a filepath and you get your data files for free! (Including timing information as DAQmx writes waveforms…)

There's a similar thread started some days ago…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 4
(649 Views)