LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Measure Voltage Using NI 6001 and Calibrate Using LabVIEW

Solved!
Go to solution

Hello GerdW,

 

My Brain has stopped working. I've even tried to make it in time loop but it didn't work.

for test reading I was taking values for 5 seconds but the values were feeding for every milliseconds.

please help I've attached the code.

0 Kudos
Message 21 of 29
(695 Views)

Hi Tanmai,

 


@TanmayBoii wrote:

I've even tried to make it in time loop but it didn't work.

for test reading I was taking values for 5 seconds but the values were feeding for every milliseconds.


  • You don't set any timing in your DAQmx task: which samplerate do you want to apply?
  • You don't set any number of "samples to read" at DAQmxRead: how many samples do you want to read per iteration? (number of samples and samplerate refer to loop timing!)
  • Did you examine any of the DAQmx example VIs in the LabVIEW example finder?

 

You still don't understand to THINK DATAFLOW!

What's the point of placiung the WriteMeasurementFile function in it's own TimedWhileLoop when it executes AFTER the measurement loop on never-changing data???

 

Please do one step after the other!

  1. Implement proper DAQmx tasks, based on example VIs!
  2. Implement saving of samples in each x-th iteration of your loop…
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 22 of 29
(688 Views)

Hello GerdW,

 

I tried but failed. please help me with some changes in the LabVIEW code. Also, please help me with iterations I'm not sure about it using iterations

0 Kudos
Message 23 of 29
(672 Views)

My some Points are :-

 

1. I'll have to make a per sample reading with sample rate

2. make a iteration of 9000 ?

3. so will the write to tome measurement will be in the loop or outside the loop with different while loop ?

4. i tried with DAQmx Timing it failed idk why added sample rate still it was continuous

5. Please Help XD

0 Kudos
Message 24 of 29
(670 Views)

Hi Tanmai,

 


@TanmayBoii wrote:

please help me with some changes in the LabVIEW code.


Please attach a downconverted version your VI for LV2019…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 25 of 29
(665 Views)

Hello GerdW,

 

I've attached the 2018 version vi

0 Kudos
Message 26 of 29
(662 Views)

Hi Tanmai,

 

you really should learn from the example VIs provided by the example finder!


@TanmayBoii wrote:

1. I'll have to make a per sample reading with sample rate

2. make a iteration of 9000 ?

3. so will the write to tome measurement will be in the loop or outside the loop with different while loop ?

4. i tried with DAQmx Timing it failed idk why added sample rate still it was continuous


See this:

The WriteMeasurement is executed just once every 9000 iterations…

 

Btw.:

  • I doesn't make sense to read just one sample for a continuous task with 1kS/s…
  • It doesn't make sense to read a waveform when you read just one sample per DAQmxRead call!
  • It doesn't make sense to calculate a mean from a waveform containing just one sample!
  • It still doesn't make sense to place the WriteMeasurement function in a loop called AFTER the measurement loop! THINK DATAFLOW!

In my snippet DAQmx is determining the loop iteration time (as long as the WriteMeasurement function runs fast enough)…

Best regards,
GerdW


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

Hey GerdW,

 

I made some changes in my LabVIEW code and could you rectify some mistakes.

hopefully it'll help me.

Thankyou,

0 Kudos
Message 28 of 29
(620 Views)

Hi Tanmai,

 


@TanmayBoii wrote:

hopefully it'll help me.


  • The DAQmxRead is still set to read just one sample! So still it's senseless to calc the mean of a waveform containing just one sample…
  • You still set the "number of samples" at the DAQmxConfigureTiming function, even though I showed you not to do that! Please read the complete help for this function!
  • Why do you compare the result of the Q&R functions even though I showed you how to let the case structure do the very same?
  • There are still a lot of coercion dots…
  • You still don't cleanup your code…
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 29 of 29
(612 Views)