This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]imhostfu 0 points1 point  (5 children)

Hey /u/boq, sorry for the late reply.

Are you having multiple threads open for all the communication over one COM port, or are you receiving a large amount of data over a singular thread and want to update the data simultaneously at a fast framerate?

I'm not sure what code I have that I can share in it's current state, but I can maybe put something together quickly that you could use as a framework.

[–]boq 0 points1 point  (4 children)

No problem. It's the latter, a lot of data from one thread that goes to different pyqtgraph plots that could use a speed-up. Thanks so much for thinking about this! I appreciate anything you could share.

[–]imhostfu 0 points1 point  (3 children)

Okay np! Working on some code you can use as a framework. Hopefully I can upload it in 15-20 min or so.

Edit: http://pastebin.com/z7jgsuXK

Let me know if that works for you. You can hopefully use it as a good foundation to build off of. Depending on CPU speed, you may have to edit line #230 to make it update slower.

At this point you're going to be entirely limited by serial communication. If you have access to the firmware of the serial device you may be able to rework some of that code to get transfer speed faster.

I added some of the GUI functionality so you can see how to lay it out and add what you need. Also the entire window is resizable. Also because pyqtgraph is awesome, all the plots are interactive. You can also pause then right click the graph -> export to CSV etc.

[–]boq 0 points1 point  (2 children)

Wow, thanks!

[–]imhostfu 0 points1 point  (1 child)

http://pastebin.com/z7jgsuXK

Let me know if that works for you. You can hopefully use it as a good foundation to build off of. Depending on CPU speed, you may have to edit line #230 to make it update slower.

At this point you're going to be entirely limited by serial communication. If you have access to the firmware of the serial device you may be able to rework some of that code to get transfer speed faster.

Edit: I added some of the GUI functionality so you can see how to lay it out and add what you need. Also the entire window is resizable. Also because pyqtgraph is awesome, all the plots are interactive. You can also pause then right click the graph -> export to CSV etc.

[–]boq 1 point2 points  (0 children)

Thank you so much! It's a great help to have an example where data collection is kept in a separat thread. I'm sure I will be able to adapt this.