LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW and Matlab Running Simultaneously

Highlighted

Hi, I'm currently writing some code in Matlab and Labview and I'm stuck at a certain point. I'm using labview to aquire data from a test and create tdms files with the results inand  at the same time I have Matlab scanning for the created files to read them into a matrix and doing some other processing. The problem is that if matlab tries to read the files when labview is writing them (as  they are fairly large) then it will cause errors, I cant think of a  way around this without somehow sending a variable between the two programs. I dont think I can use the mathscript node as the matlab is doing many other processes at the same time.
Currently to get around this error, when the matlab code detects a new file it waits for a while, I wish to know if there is a way to communicate between the two programs rather than waiting?

Pete
Systems engineer (CLAD LV2013)
0 Kudos
Message 1 of 2
(800 Views)
Highlighted

Another idea would be to create the TDMS files in a temporary location.  I would recommend a defrag after the file is created.  Then move the file to the location that Matlab is looking in.  As long as the move is to and from the same disk, it is just an index change, so the move can be really fast.  I would still suggest having Matlab wait a little bit to make sure that move is complete.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
0 Kudos
Message 2 of 2
(792 Views)