LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

What to do when you have data coming in at different rates over the same COM port?

What do the other tabs look like in your picture? also why is number of 0x333 points just run straight through? where is the 20 averaging taking place in your example? 

0 Kudos
Message 11 of 17
(1,510 Views)

@superomario wrote:

What do the other tabs look like in your picture? also why is number of 0x333 points just run straight through? where is the 20 averaging taking place in your example? 


The number of 0x0333 points is incremented each time the 0x0333 is recieved.  The averaging is done in the 0x0555 case, which at that point is just a simple divide (sum/num points).


GCentral
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 12 of 17
(1,505 Views)

But that doesn't average the last data collected between 0x555 cases, it just averages all of the data ever received by the 0x333 channel. I am not sure I am getting how to wire up this case structure too well either, where do the other tunnels go as far as shift registers? 

 

Slightly updated VI attached. 

0 Kudos
Message 13 of 17
(1,498 Views)

I think I figured it out, I moved the graph into the case for the 0x555, and it now updates only once per second, with the average value from the 0x333 sensor. Does this look at all correct? 

0 Kudos
Message 14 of 17
(1,480 Views)

So the VI I posted DOES update teh graph at once per second, but it still writes to the queue out to the file whenever there is data. How do I ONLY send data out during the 0x555 case in the structure? 

0 Kudos
Message 15 of 17
(1,472 Views)

@superomario wrote:

So the VI I posted DOES update teh graph at once per second, but it still writes to the queue out to the file whenever there is data. How do I ONLY send data out during the 0x555 case in the structure? 


Move the code that writes to the queue to inside of the case structure, just like you did for writing to the graph.


GCentral
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 16 of 17
(1,470 Views)

@crossrulz wrote:

@superomario wrote:

So the VI I posted DOES update teh graph at once per second, but it still writes to the queue out to the file whenever there is data. How do I ONLY send data out during the 0x555 case in the structure? 


Move the code that writes to the queue to inside of the case structure, just like you did for writing to the graph.


Does the mean pt by pt do what I am intending it to do or am I not getting the last 20 0x333 data points averaged whenever I get a 0x555 case appear? Where is the data for the 0x333 getting stored to do an average if I have no arrays building anywhere? 

 

 

 

0 Kudos
Message 17 of 17
(1,463 Views)