From: Nandish on
Hello,

I am trying to plot real-time chart in MATLAB, but i could not. I want to show real-time chart which show temperature vs. time plot (plot that shows temperature value of last one hour only then it override). Temperature value is constant updating in workspace (have created a variable). I want direction how can i do it. I tried but i could not.

Or i heard we can do it by accessing LabView from MATLAB.

need help as early as possible.

Thank you
From: Mark Shore on
"Nandish " <nandishpatel.24(a)gmail.com> wrote in message <hqhnph$dh0$1(a)fred.mathworks.com>...
> Hello,
>
> I am trying to plot real-time chart in MATLAB, but i could not. I want to show real-time chart which show temperature vs. time plot (plot that shows temperature value of last one hour only then it override). Temperature value is constant updating in workspace (have created a variable). I want direction how can i do it. I tried but i could not.
>
> Or i heard we can do it by accessing LabView from MATLAB.
>
> need help as early as possible.
>
> Thank you

Of all the many things you might want to do interfacing MATLAB and LabVIEW, real-time data charting is the least necessary one I could imagine. LabVIEW is extremely rich in tools and code examples that do this natively better than MATLAB. I suggest you look at http://forums.ni.com/ni/ instead.
From: ade77 on
"Nandish " <nandishpatel.24(a)gmail.com> wrote in message <hqhnph$dh0$1(a)fred.mathworks.com>...
> Hello,
>
> I am trying to plot real-time chart in MATLAB, but i could not. I want to show real-time chart which show temperature vs. time plot (plot that shows temperature value of last one hour only then it override). Temperature value is constant updating in workspace (have created a variable). I want direction how can i do it. I tried but i could not.
>
> Or i heard we can do it by accessing LabView from MATLAB.
>
> need help as early as possible.
>
> Thank you

Clarify your problem.
Are you acquiring data through LabVIEW NIDAQ, but you want to process the data in MATLAB realtime?
if you can be more specific it will help.
From: Nandish on
"ade77 " <ade100a(a)gmail.com> wrote in message <hqndss$ekn$1(a)fred.mathworks.com>...
> "Nandish " <nandishpatel.24(a)gmail.com> wrote in message <hqncng$lhv$1(a)fred.mathworks.com>...
> > "ade77 " <ade100a(a)gmail.com> wrote in message <hqna4d$ok$1(a)fred.mathworks.com>...
> > > "Nandish " <nandishpatel.24(a)gmail.com> wrote in message <hqn8r4$35k$1(a)fred.mathworks.com>...
> > > > "ade77 " <ade100a(a)gmail.com> wrote in message <hqi48b$sg$1(a)fred.mathworks.com>...
> > > > > "Nandish " <nandishpatel.24(a)gmail.com> wrote in message <hqhnph$dh0$1(a)fred.mathworks.com>...
> > > >
> > > > > Clarify your problem.
> > > > > Are you acquiring data through LabVIEW NIDAQ, but you want to process the data in MATLAB realtime?
> > > > > if you can be more specific it will help.
> > > >
> > > > Hello ade,
> > > >
> > > > No, i am acquiring data through matlab and doing processing on matlab too. Now i want to plot real-time chart of processed data. I am measuring the temperature and want to show chart of it in real-time. I tried to do it with matlab but i could not do it. So i thought is it possible to export data to labview and show real-time chart using labview?
> > > >
> > > > Or else let me guide how can i do it using matlab.
> > > >
> > > > Thank you
> > >
> > >
> > > Okay, I now understand what you mean. I assume you are using MATLAB data acquisition toolkit, which I am not familiar with.
> > > In any case, as long as you can acquire the data in real time,there is nothing stopping you from plotting the data in real time.
> > >
> > > There is a function called 'linkdata', check it out, it will likely solve your problem.
> > > Under most plot figure, there is an icon to link your plot to the data in the workspace, so once the data is updated, the plot gets updated too. there is also a video on it from the figure window.
> > >
> > > I normally use LabVIEW for data acquisition, and yes LabVIEW will do what you want with ease, as long as there is a driver for the device.
> >
> > Hey ade,
> > I did as u suggest.
> > I checked out for 'linkdata' function, but it is not there in help. I also could not found any icon which link plot to workspace. If you talked about' show plot tools and dock fig', it doesnt work.
> > Also in real-time chart i want to show x-axis as time axis and want to plot temperature values on y-axis.
>
> Nandish,
> I do not have access to MATLAB right now, but check out this website.
> http://www.mathworks.com/access/helpdesk/help/techdoc/ref/linkdata.html
>
> Your version of MATLAB might also not include that function. I have 2008b, and 2010a, and the function is in both version. So if you are using a much older version, it might not be in that version.

Hello Ade,
Yes,I am using 2007a and it do not include 'linkdata' function. I go through the link you gave. But one problem is still there, that in real-time plot i want to show current time on x-axis.

Thank you.
From: ade77 on
"Nandish " <nandishpatel.24(a)gmail.com> wrote in message <hqn8r4$35k$1(a)fred.mathworks.com>...
> "ade77 " <ade100a(a)gmail.com> wrote in message <hqi48b$sg$1(a)fred.mathworks.com>...
> > "Nandish " <nandishpatel.24(a)gmail.com> wrote in message <hqhnph$dh0$1(a)fred.mathworks.com>...
>
> > Clarify your problem.
> > Are you acquiring data through LabVIEW NIDAQ, but you want to process the data in MATLAB realtime?
> > if you can be more specific it will help.
>
> Hello ade,
>
> No, i am acquiring data through matlab and doing processing on matlab too. Now i want to plot real-time chart of processed data. I am measuring the temperature and want to show chart of it in real-time. I tried to do it with matlab but i could not do it. So i thought is it possible to export data to labview and show real-time chart using labview?
>
> Or else let me guide how can i do it using matlab.
>
> Thank you


Okay, I now understand what you mean. I assume you are using MATLAB data acquisition toolkit, which I am not familiar with.
In any case, as long as you can acquire the data in real time,there is nothing stopping you from plotting the data in real time.

There is a function called 'linkdata', check it out, it will likely solve your problem.
Under most plot figure, there is an icon to link your plot to the data in the workspace, so once the data is updated, the plot gets updated too. there is also a video on it from the figure window.

I normally use LabVIEW for data acquisition, and yes LabVIEW will do what you want with ease, as long as there is a driver for the device.