10-20-2016 03:42 AM
Hello,
I am using a Matlab node in Labview (not the math script because I was confused between them). I managed to make the code work. It is calling a function from m file and do some calculation in the Matlab script. Yesterday I had to interrupt te calculation to restart the computer, so I killed Labview calculation. Now, each time I run my code in Labview I hear the usual error sound of Matlab and the code finishes without result. The weird thing is that to make it work, I have to execute another code in Matlab using the Matlab code like the Lorenz attractor existing in the examples.
As I am using the Matlab node in a loop, sometimes Labview freezes and crashes.
I am not sure but I feel that some files from matlab-Labview communication were corrupted when I killed Labview. That time, Labview tried to reset but did not manage.
Do you have an explanation of this and how I can solve it?
Cheers,Zied
Zied
10-19-2016 11:35 AM
Hello,
I am using a Matlab node in Labview (not the math script because I was confused between them). I managed to make the code work. It is calling a function from m file and do some calculation in the Matlab script. Yesterday I had to interrupt te calculation to restart the computer, so I killed Labview calculation. Now, each time I run my code in Labview I hear the usual error sound of Matlab and the code finishes without result. The weird thing is that to make it work, I have to execute another code in Matlab using the Matlab code like the Lorenz attractor existing in the examples.
As I am using the Matlab node in a loop, sometimes Labview freezes and crashes.
I am not sure but I feel that some files from matlab-Labview communication were corrupted when I killed Labview. That time, Labview tried to reset but did not manage.
Do you have an explanation of this and how I can solve it?
Cheers,Zied
Zied
10-20-2016 03:44 AM
Hello,
I moved my post to mathscript section as I didn't get an answer here. I hope the moderate can delete my post here to avoid duplication.
10-21-2016 06:58 AM
Hello again,
Please is anyone here can help me to fix the communication problem between Labview and Matlab.
Cheers,
Zied
10-22-2016 12:22 PM
Hello,
Is there a way to manage and control the communication between Labview and Matlab to avoid memory conflict and files corrupted.
Thanks,
Zied
10-24-2016 06:56 AM
Hi Zied,
It may be useful to post a snippet of your code. Also, has your function not worked as intended since LabVIEW originally crashed?
10-24-2016 01:29 PM
Hello,
The code calling Matlab itself is working fine and I tried to put it a while loop and run it overnight for hundreds of cycles and it was fine but in the moment I included as a subvi in my main vi, it crashes after few iterations. The weird thing is that this subvi refuses to work from the first run and stop without error or result and I have to run the example from Labview to run after.
I put the faulty VI called jieren_lya with the m files needed and also theLorenzz attractor that I have run beforehand to make my code run thereafter.
Cheers,
Zied
10-25-2016 02:08 PM
Hi Zied,
I'm a bit confused as to what exactly is happening. To make sure I understand this correctly. The VI titled "jieren_lyap.vi" runs fine by itself, but if you make it a subVI and call it from the main VI, the program freezes. Is this correct? The main VI that you're calling the program from, is it constantly changing the input values for the subVI? I don't see any while loops on the "jieren_lyap.vi" as you had mentioned in the previous post. I tried duplicating your problem, but I don't have Mathworks matlab on my computer, so I can't actually run the matlab code.
10-26-2016 02:16 PM
Hello,
The VI titled "jieren_lyap.vi" runs fine only if I run the example in Labview library titled Lorenz attractor. If I run jieren_lyap first, it stops without error but also without result, making an error noise common in Matlab.
I think this is the key to understand the instability when I run it as a subvi (indeed, the subvi is running in a loop that changes the input each time.
You need mathscrip toolkit to be able to run it.
Thanks,
Zied
10-28-2016 09:35 AM
Hi Zied,
I'm still not sure that I fully understand what is happening. What do you mean that it runs fine, only if you run the example in the LabVIEW library titled Lorenz attractor? I see the Lorenz attractor VI that you're referring to, but I don't understand what you mean by it runs fine only if you run that example. Do you run the example first, then run jieren_lylap, and it runs correctly? If you are concerned about a potential software corruption, have you tried reinstalling the mathscript toolkit?