LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Queued message Handler Logging issue

Solved!
Go to solution

HI. I am using a queued message handle template with continuous logging. However, the problem that i encounter is that the logging is recording 1000 samples per 10 seconds which is way too much as i only need about 1 sample per reading. Is there a way where i can only record 1 sample per minute? Any ideas are very welcomed. Thank you.

0 Kudos
Message 1 of 6
(1,068 Views)

HI. I am using a queued message handler template with continuous logging. However, my program is taking 1000 samples per 10 seconds which is way to much for me as it will kill my storage. I only need about 1  reading per min as it is meant for long term monitoring. Does anybody have any idea on how to control the logging timing such that i am able to control the rate of my logging? Thank you.

 

0 Kudos
Message 2 of 6
(990 Views)

Hi MB,

 


@MBSHIRAZIZ wrote:

Is there a way where i can only record 1 sample per minute?


Simple solution 1: don't record each sample received by your message handler. Only record once per minute…

Simple solution 2: don't send all samples to your message handler, send sample(s) only once per minute…

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 6
(1,044 Views)
Solution
Accepted by topic author MBSHIRAZIZ

@MBSHIRAZIZ wrote:

HI. I am using a queued message handle template with continuous logging. However, the problem that i encounter is that the logging is recording 1000 samples per 10 seconds which is way too much as i only need about 1 sample per reading. Is there a way where i can only record 1 sample per minute? Any ideas are very welcomed. Thank you.


You need to learn enough LabVIEW to be able to set the sampling rate on your "queued message handle template with continuous logging" to whatever rate you want, like 1 sample per minute.  Something else you could try if you want to use the existing code.  From your description, I'm guessing you've set it to take 1000 samples at 100 Hz, which takes 10 seconds to do.  Change it to take 6 samples at 0.1 Hz.  Every 60 seconds (1 minute), you'll get 6 samples.  Throw 5 of them away, and save the remaining one.   You could also take 2 samples at 0.01 Hz, so every 100 seconds (roughly 2 minutes), you'd get 2 samples, and you could save them all (no work, no having to figure out how to manipulate data with LabVIEW).

 

Bob Schor

Message 4 of 6
(1,005 Views)

Hi bob and Gerd, i think i understand what you are both saying but i may not have described my problem properly. My sampling rate right now is necessary for my spectral analysis but the value that we want to log is only roughly 1 vibration rms per minute or so. So essentially is there a way that i can log the data only once every 100 samples? If so, do you ahve any reesources where i can learn to do that? Thank you for your responses either way. 

0 Kudos
Message 5 of 6
(984 Views)

Hi MB,

 


@MBSHIRAZIZ wrote:

So essentially is there a way that i can log the data only once every 100 samples?


Yes!

Do as was suggested before by Bob and me…

(Collect 100 samples and evaluate them. Then record your one data element resulting from evaluation…)

 


@MBSHIRAZIZ wrote:

If so, do you ahve any reesources where i can learn to do that?


Did you notice those Learning resources offered at the top of the LabVIEW board?

Did you learned to use the ExampleFinder in LabVIEW? (Help menu…)

Best regards,
GerdW


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