LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

simulate real time with labview

Hi,
I am trying to implement the following setup in Labview with Matlab.
I have some data stored on a disk (it is a *.au file, though I can
also store it as a matlab binary). I want to read this data in Labview
and send it to matlab for further analysis. I want to do this in a
semi-real time manner i.e. my data is acquired at 1KHz and I want to
send it to matlab at that frequency. I then want matlab to analyse
the data as it receives it and to send back the results to Labview.
Has anyone done this ? I am completely new to Labview (have never
used it before). Any help (tutorials, actual code, anything at all)
would be appreciated.
Thanks,
Hemant
p.s: please reply to hemant@its.caltech.edu

In Linux I know that I can use comedi to acquire th
e data and to flush
it to a fifo from which matlab can read it. Is there something
equivalent within a windows environment ?
0 Kudos
Message 1 of 4
(2,985 Views)
I can't say that I have done this before but I suspect you will run into problems trying to implement something at this rate. LabVIEW has built in functionality to communicate with Matlab via the Matlab script node. This node utilizes activex to talk to Matlab's script server. Trying to send information across this interface at 1000 times per second will probably be pushing things. Some things you might consider:

1. Could you get by sending data at smaller intervals - basically send across chunks of data?

2. Have you checked out the math and analysis functions in LabVIEW? If you keep all the code there, you will eliminate the communication overhead.
0 Kudos
Message 2 of 4
(2,985 Views)
Hi, and thanks. I guess I could send it at a slower rate, a much slower
rate. I could also do some preliminary analysis in Labview, but not much,
since I am using some spectral estimation techniques from matlab. However,
I have recently had another question -- can one read/play data from a
cd in Labview ? Also, are there any tutorials about using matlab in labview ?
I have searched on the web and haven't found anything useful for me.

"Matt K." wrote in message news:<506500000005000000B6A20000-1031838699000@exchange.ni.com>...
> I can't say that I have done this before but I suspect you will run
> into problems trying to implement something at this rate. LabVIEW has
> built in functionality to communicate with Matlab via the Matlab
> script nod
e. This node utilizes activex to talk to Matlab's script
> server. Trying to send information across this interface at 1000
> times per second will probably be pushing things. Some things you
> might consider:
>
> 1. Could you get by sending data at smaller intervals - basically
> send across chunks of data?
>
> 2. Have you checked out the math and analysis functions in LabVIEW?
> If you keep all the code there, you will eliminate the communication
> overhead.
0 Kudos
Message 3 of 4
(2,985 Views)
You should certainly be able to read data from a cd in LabVIEW. You should be able to treat it like any other drive and read the files. Just check out the File I/O subpalette on your functions palette.
A good starting place for sending scripts to Matlab would be the Matlab Differential Equation and Matlab Fractal examples that ship with LabVIEW. You can access the examples by going to Help->Examples. There is also a little bit of info in Chapter 20 of the LabVIEW user manual.
0 Kudos
Message 4 of 4
(2,985 Views)