简体   繁体   English

DAQmxConfigurLogging C API

[英]DAQmxConfigurLogging C API

I use the NI-PCI 6225 card.我使用 NI-PCI 6225 卡。

I want to read the 1000 samples with the time of each sample.我想用每个样本的时间读取 1000 个样本。 I used我用了

DAQmxConfigurLogging C API, but in the TDMS file that was generated, there was no time for each sample. DAQmxConfigurLogging C API,但是在生成的TDMS文件中,每个样本都没有时间。

What should I do to achieve this?我应该怎么做才能实现这一目标?

It sounds like you're using a continuous or finite acquisition.听起来您正在使用连续或有限采集。 If that's the case, the TDMS file will store a waveform, which has three properties:如果是这种情况,TDMS 文件将存储一个波形,它具有三个属性:

  • The start time ( t0 ) -- this is the wall-time of the first sample开始时间 ( t0 ) -- 这是第一个样本的挂墙时间
  • The sample period ( delta_t ) -- this is the time between each sample采样周期( delta_t )——这是每个采样之间的时间
  • The array of samples -- these are measured values samples数组——这些是测量值

To get a time for each sample, use this formula:要获取每个样本的时间,请使用以下公式:

time_at_sample_n = t0 + (n * delta_t)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM