LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Writing TDMS files with sampling rate

Solved!
Go to solution

Hello,

 

I`m trying to write TDMS file that contains position of BLDC motor and time sequence.

 

However, only motor controller is connected on my PC and there is no other data acquisition device.

 

If I want to write TDMS file with sampling rate, should I use any DAQ device?

 

Of course motor controller VI set has sampling rate input(control), but it is fixed as T = 12ms.

 

I don`t know why but if I change sampling rate, an error is occurred.

0 Kudos
Message 1 of 2
(1,898 Views)
Solution
Accepted by topic author sdrcat

If you share the code you're using, we could give better comments, but if you believe the timing is 12ms always (or at least, you're happy to record that as your time series) then you can go ahead without other acquisition devices.

 

TDMS will allow you to log a waveform datatype, if you'd like - in this case,

  • set t0 to your start time (you can use the Get Date/Time in Seconds node perhaps)
  • set dt to your period (0.012 seconds)
  • set the Y array to your acquired data (position?)

Update the values and log as required.

Example_VI.png

 

For help with the error, you'll need to give the error number, ideally the text, and hopefully some information (ideally the VI or a snippet) about how and where it was generated.


GCentral
Message 2 of 2
(1,822 Views)