LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Too much values in daq recording

Good morning,

 

i improved my small datalogger to event struct. But something is wrong. I´m getting too much values.

I only reading two analog channels but i´m getting many twice values.

Unfortunately i cannot understand the reason.

Download All
0 Kudos
Message 1 of 16
(3,859 Views)

HI Hulk1978,

 

You are keeping the Valued in Shift Register which will hold the previous Value.

----------------------------------------------------------------------------------------------------------------
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 16
(3,829 Views)

Oh.This means labview copy with every iteration this array new to spreadsheet?

But i need an array for the write to spreadsheet. Actually i didn´t found another solution

 

 

0 Kudos
Message 3 of 16
(3,822 Views)

There are two ways to do.

1. Keep the data in an array and Log to File before Exiting the Application.

2.Just use build  array Function to match to your Spreadsheet Function Input node.

----------------------------------------------------------------------------------------------------------------
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 4 of 16
(3,817 Views)

You could just use the Export Waveforms To Spreadsheet File.vi to do your logging.  It will do pretty much everything for you.  Your data rate is slow enough you will probably be fine despite it constantly opening and closing the file.

 

When it comes to DAQ data, my first preference is to use the DAQmx Configure Logging to stream the data to a TDMS file.  My second preference is to use a Producer/Consumer, where you have another loop that does all of the logging.  This helps to make sure you are keeping up with the DAQ.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 16
(3,798 Views)

Good morning,

 

i actually changed style to put array directly to "write to spreadsheet" and it works fine

For my loggings i only need sample rates between 6 and 10Hz. So i was not sure if i need a third loop for production.

To use TDMS i´m afraid to need special viewer. Actually i don´t have budget for additional software. But i know the disadvantage of limitation with excel

0 Kudos
Message 6 of 16
(3,754 Views)

Hi Hulk,

 


@Hulk1978 wrote:

To use TDMS i´m afraid to need special viewer. Actually i don´t have budget for additional software. But i know the disadvantage of limitation with excel


LabVIEW comes with a TDMS plugin for Excel (no additional fee), so Excel will read TDMS files as well…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 16
(3,751 Views)

@Hulk1978 wrote:

To use TDMS i´m afraid to need special viewer. Actually i don´t have budget for additional software. But i know the disadvantage of limitation with excel


If only somebody made a TDMS viewer that was free...Scout by Signal X.  I used that tool in a few previous positions.  It was really well done.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 8 of 16
(3,744 Views)

Hello everyone,

 

i tested the excel addin and scout. Scout looks a little bit better.

Additional i added a third loop for production. It works well.

But i produced one more failure. I hope it´s small.

 

For every pushing start button for recording i want to create a new file. To separate it i mixed filepath with timestamp. Now i wanted to sent the path from event to consumer with a notofier.

But i´m getting most of time error because of non existing path. Sometimes it works (confirmation repeat at failure message). 

0 Kudos
Message 9 of 16
(3,713 Views)

Hi Hulk,

 


@Hulk1978 wrote:

Now i wanted to sent the path from event to consumer with a notofier.

But i´m getting most of time error because of non existing path. Sometimes it works (confirmation repeat at failure message). 


Race condition alarm!

 

You are writing to several notifier/queues in parallel. You are reading several notifier/queues in parallel. Which one is processed first?

You need to make sure all data is valid before you start to open a new TDMS file…

 

Suggestion: instead of using two notifier (for enum command and file path parameter) you should use only one notifier, transporting a cluster of [enum, filepath]. Now you can be sure to receive related items within one cluster. (Leave the filepath empty for other commands than "Start recording")…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 10 of 16
(3,700 Views)