Jump to content

redneckjedi

NI
  • Posts

    1
  • Joined

  • Last visited

About redneckjedi

LabVIEW Information

  • Version
    LabVIEW 8.6
  • Since
    2007

redneckjedi's Achievements

Newbie

Newbie (1/14)

2

Reputation

  1. This is probably occurring because you have two instances of MATLAB open: the one you are editing, and the one LabVIEW is using to communicate with MATLAB and run the .m file. Try this: 1) Start with all applications closed. 2) Open the VI that has the Matlab Script Node and run it. You should notice a MATLAB Command Window in your taskbar as well. 3) Instead of double clicking test.m to open it, or opening MATLAB yourself to edit it, switch to the MATLAB Command Window and type 'open test.m' and hit enter. You should get test.m up in an editor. 4) Edit test.m to say a=a+2 as you mentioned above and save it. 5) Run the VI again. Because you edited the .m file in the same instance that will execute it, MATLAB knows that it needs to recompile it before it runs it. Apparently MATLAB does some caching when it compiles scripts into runnable code, and multiple instances of MATLAB don't talk to each other about which cached versions have been invalidated and should be recompiled. Editing in the same instance that will be doing the execution should fix that for you. I hope that helps.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.