LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

The way should I read bytes from serial port

Dear Johnsold

 

this what i started to do for signal acquisition through the serial port . I hope that you can guide me till the end please . now it is time for the conversion part so that we can filter the signal out ( signal analysis) . would you please give me comments and notes ?

 

Thank you . 

Bill David
0 Kudos
Message 11 of 17
(678 Views)

Dear Bill David,

 

I would just like to kindly ask, if you moved your serial port question from your other forum thread to here, and if you abandoned your previous VIs, which you were troubleshooting in that thread.

 

Thank you,

Best regards,
Jano
0 Kudos
Message 12 of 17
(666 Views)

yes sir . but it is something different here . 

 

Thank you ,

Bill David
0 Kudos
Message 13 of 17
(663 Views)

Bill David,

 

What Jano (Ardent) was suggesting is that it can be difficult for anyone who may be trying to help you or to anyone who is interested in learning from the questions you are asking when there are multiple threads on related topics.  If you feel like one thread has been completed and you have a new question, mark a solution post in the first thread. In the new thread (and perhaps the old one also), include a link to the other threads so that people can tell that a new thread has started and can see the background to the overall project.

 

I have added a circular buffer to your consumer loop.  It will store the 10000 most recent samples received and then begin overwriting the oldest samples.  To change the size of the buffer just change the value of the constant connected to the dimension size input of the Initialize Array.

 

Lynn

Message 14 of 17
(654 Views)

Johnsold 

Thank you so much . mmmmm okay ..dont you think that making the buffer size bigger than 10000 ( let us say 1050 ) would cause the data to overflow ? 

Anyway i am gonna complete what i started and let you know the results . Thank you so much !!!

Bill David
0 Kudos
Message 15 of 17
(636 Views)

Bill David,

 

I am not sure what you mean by "cause the data to overflow" and 1050 is not larger than 10000?

 

I picked an arbitrary number of the buffer size.  I do not know what your sampling rate is, how much data you want to keep on hand, how much data you want to display, and how much data you want to save.  All of those can affect the choice of the buffer size.

 

You can make the buffer size as large as the available memory will allow.  With a circular buffer you can retain up to the length of the buffer.  After the buffer is full any new data will replace the oldest data in the buffer and that oldest data is lost.

 

Lynn

0 Kudos
Message 16 of 17
(634 Views)

Johnsold

 

😄 Sorry but i have been awake for 2 days surfing the internet trying to fing a solution hahahhahahah sorry i meant to write 10050 . Now looking at your answer i realize that i can have a bigger buffer size than this . ( depending on the memory of the PC ) .

 

 

Thank you so much !!!

Bill David
0 Kudos
Message 17 of 17
(631 Views)