×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Multiple real time plots in matlab

Multiple real time plots in matlab

Multiple real time plots in matlab

(OP)
Hello all, greetings. I´m a beginner in Matlab. I want to plot real time graphs on matlab for 4 motors, the data being read from the serial port. The data from the serial port will contain certain parameters that I should extract and compute and plot graphs in real time. My front screen will have buttons for 4 motors. When i click on m1, it should display live graphs (read from the the serial port) and when i click on m2, the corresponding data for m2 needs to be plotted, simultaneous to m1 graphs on another figure. Is this possible? If yes, please give me an basic algorithm to follow. I can catch up from there.
I appreciate any kind of help. Thanks a lot!

RE: Multiple real time plots in matlab

(OP)
Hello Mr.Locock, I have just started with the GUI layout of various figures and random plots. So when i click on the buttons/drop down menu, I get redirected to the different figures with random plots on it.

Im stuck now and do not know how to proceed as I do not have the serial data coming in. I am trying to display some sample data(not real time) instead of random plots.

Thanks and Regards
MJ

RE: Multiple real time plots in matlab

Yeah, get the data in first, then consider the display. The key to real time plotting is the notion of object oriented programming. You don't want to or need to create the whole set of plot figures each time. You only need to update the YData values if you plan your project correclty. No need to change titles, labels, axes or XData values. Just alter the minimum plot objects. Then its a cinch.

RE: Multiple real time plots in matlab

(OP)
Thank you both. I guess I have started it wrong then. Since I had no hardware then , I started off with playing with GUI on Matlab. Guess I must re-design the approach. Will do that and get back in touch when in need. Thank you!

RE: Multiple real time plots in matlab

(OP)
Hi all, so the word is that I have to use UDP object to stream in the data and display multiple plots as and when the data comes in. I have created a udp object in matlab in one pc and I have a 'packet sender' UDP test utility installed on another computer. I am able to send data from matlab to the udp test tool in the other pc, but not vice versa! Reason being : I have no infinite loop waiting for data to come in, in the matlab code. Please help me with this! If i set up an infinite loop to keep the udp interface open all the time to read data , how will i plot it? how do i do all simultaneously : read udp data, display multiple figures with multiple plots? Kindly help. Thanks a ton.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members! Already a Member? Login


Resources

Low-Volume Rapid Injection Molding With 3D Printed Molds
Learn methods and guidelines for using stereolithography (SLA) 3D printed molds in the injection molding process to lower costs and lead time. Discover how this hybrid manufacturing process enables on-demand mold fabrication to quickly produce small batches of thermoplastic parts. Download Now
Design for Additive Manufacturing (DfAM)
Examine how the principles of DfAM upend many of the long-standing rules around manufacturability - allowing engineers and designers to place a part’s function at the center of their design considerations. Download Now
Taking Control of Engineering Documents
This ebook covers tips for creating and managing workflows, security best practices and protection of intellectual property, Cloud vs. on-premise software solutions, CAD file management, compliance, and more. Download Now

Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close