I've been using the Matlab script node and always noticed something funny about how it handles scripts (.m files) that I had saved. I finally figured out yesterday what it was. If you edit the script in matlab and save it, LabVIEW won't see the changes. For example:
Create a file called test.m which just has:
a=a+1;
Next create a vi that has a Matlab Script Node with inputs and and outputs of "a" attached to a control and indicator respectively which only contains a script node with the code:
cd <whatever directory test.m was saved to>;
test
If you run this code with the control set to 0, the indicator will read 1 as expected.
Now, if you go edit the file test.m to a=a+2; (without closing your vi) and then rerun the vi, it will still give you 1, not 2. If you close the vi, then reopen it, it will give you 2 as expected.
Is there a way to generate new execution code for LabVIEW without closing the vi and reopening it.