LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Data logging through RS232 stops

Hello everyone, 

 

My hardware: 

 

 

I already built the programm to logg the scale data in [g] through RS232. However, I noticed that the process stops from time to time which makes it difficult to evaluate the data later. 

 

You can clearly see the stops on the attached picture "Data_Logging_Stops.jpg". Even though I was adding water continiounsly to a countainer which rests on the scale.

 

I also attached the programm I used to communicate through RS232. 

 

Could anyone please help? I already checked the VIs examples for serial communication .. 

 

 

best regards

 

Download All
0 Kudos
Message 1 of 23
(1,576 Views)

Hello,

 

You are not losing data as if you filter those stops it makes a good graph.

Is that possible that it is a scaling issue from your device ? Meaning you need a more significant value change to be noticed.

Have you checked if there is any error at the reading output ?

0 Kudos
Message 2 of 23
(1,532 Views)

Since I'm adding continuously water to the container the scale must show an ascending masse value. This is exactely what I see on the scale display. Which means the scale is measuring the masse properly. 

 

And there's no error at the reading output. 

0 Kudos
Message 3 of 23
(1,526 Views)

Have you looked at the raw data coming from your device?

 

The fact that you don't get an error means the scale is sending data so the "flat" places in your graph are real.

 

If you were getting bad or no data then Scan From String would throw an error and/or return the default value of 0 

 

You are reading incoming data as fast as you can. Try a delay between reads or increase the flow rate to fill your container faster.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 4 of 23
(1,480 Views)

Do you have any suggestions about how to filter this data and use it in real time? I want to remove all the parts where the mass is constant. 

 

I tried the following logic: if the derivative of the measured mass [g/s] = 0 (means when the mass [g] is constant), then use the last mass value for the next calculations and not the actual one.

 

It works. However it's not as clean as I wished. All that I calculated from the mass data is quite far from the reality.  

 

0 Kudos
Message 5 of 23
(1,415 Views)

I think you're right. My data is real. the scale is PROBABLY not designed for measuring data continuously and send it.

 

I tried all of your suggestions before posting the problem. Unfortunately it didn't work ..

0 Kudos
Message 6 of 23
(1,414 Views)

Have you tried just looking at the raw data from the scale and if it is the same as the last data sent ignore it?

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 7 of 23
(1,365 Views)

How would I look at the raw only from the scale display? I think it's impossible. On the display you will only see "some" of the raw data .. 

0 Kudos
Message 8 of 23
(1,358 Views)

@Ezzow wrote:

How would I look at the raw only from the scale display? I think it's impossible. On the display you will only see "some" of the raw data .. 


No, i mean the data you are receiving, just ignore consecutive values that are the same.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 9 of 23
(1,345 Views)

do you have a better way to program it than the one I mentioned ? 

 

my problem is: the mass should actually be increasing at that point where it's the same .. 

0 Kudos
Message 10 of 23
(1,320 Views)