Page 1 of 1

restorePath, and slbuild errors, matlab working directory ch

Posted: Tue Aug 09, 2011 8:36 pm
by resodad
Lubin and all,
Here is an interesting problem:
I attempt to build the attached model and Simulink produces "Undefined function or variable restorePath" and changes the working directory, e.g. I build in C:\Users\ij8977\Documents\MatlabWork\ArmFireX2 and then Matlab switches to C:\Users\ij8977\Documents.

I have also seen " recursive call to slbuild."

Is this a problem with the Blockset or Matlab or Microsoft Vista?

Re: restorePath, and slbuild errors, matlab working director

Posted: Sat Aug 13, 2011 12:34 am
by LubinKerhuel
Hi John,

Thanks for bug reports.
resodad wrote:I have also seen " recursive call to slbuild."
When the previous compilation hand-up in an unexpected way, you get this message the next time your try to compile the model. Usually, next time you try to compile should be Ok (or hang-up again...)
Hang-up is typically caused by a bug. The blockset might be the cause. Please report the problem if you get this message.
resodad wrote:Undefined function or variable restorePath
I installed recently the dsPIC blockset on a vista windows and I get this error.
This is mysterious bug for me as the blockset has no variable or script called restorePath.
However, I noticed that when installing the blockset, the matlab path is updated until matlab is restarted.
Thus, it seems that vista does not allow matlab to save the updated path. It might be a user right problem. I could not tell much about user right with vista.
Anyway, the problem might be solved by adding the two blockset directory (respectively "dspic" and "blocks") to the matlab path.

Two ways :
1) Menue file ==> Set PAth ==> select the two folder and save the path
2) with matlab browser, goes to the blockset folder ==> mouse right on dspic ==> "add to path". same for blocks directory.

You might also write a script called startup.m and place it within the matlab search path. It will execute at matlab startup.
use the addpath('c:/.../dspic','c;/.../blocks') command.

Please let me know if you find another workaround.

Lubin

Re: restorePath, and slbuild errors, matlab working director

Posted: Sun Aug 14, 2011 6:03 pm
by bmairs
For the path configuration settings on Windows Vista and 7 you need to run Matlab as an administrator (right-click on the link and select Run as administrator) in order to permanently edit the path. This is a permissions issue with Windows that Mathworks hasn't fixed as of 2010a at least.

Re: restorePath, and slbuild errors, matlab working director

Posted: Tue Oct 04, 2011 5:52 pm
by resodad
Lubin, this problem persists.it is a BIG problem since I cannot use the blockset.
I run Matlab R2011a as administrator.
The path includes ...\blocks and...\dspic.

neither of these help.

Why does the current folder jump up two levels?
Please let me know if you find a work around.
John

Re: restorePath, and slbuild errors, matlab working director

Posted: Tue Oct 04, 2011 6:02 pm
by resodad
Here is a pair of files that may help track the error. The difference is the addition of a pulse block and a multiply block.
Please see if you get the same error as I do.
John

Re: restorePath, and slbuild errors, matlab working director

Posted: Tue Oct 04, 2011 6:48 pm
by resodad
Also,
if you remove the "if" block from ArmFireX2.mdl, it builds OK.
John

Re: restorePath, and slbuild errors, matlab working director

Posted: Sat Oct 08, 2011 12:33 am
by LubinKerhuel
Hi John

The good news is that I can reproduce the error with windows x64, matlab x64.

I think I get it :
Multiply block (X) does not support boolean type at its output.
Digital Output Write block after Multiply block is a boolean.

For some reason, the error message is silly and my guess is that the blockset does alterate mathworks error message. (There might be a bug here, will look for it!)
Anyway, replacing X block with a logical solve the problem. yo might also use a datatype conversion block to get a uint8 after the X block (not tested however).

Lubin

Re: restorePath, and slbuild errors, matlab working director

Posted: Sat Oct 08, 2011 4:31 pm
by LubinKerhuel
I confirm that the blockset was corrupting mathworks error message making model's error very difficult to handle.
Fixed in blockset release 3.7.

Thanks for reporting that bug, it really worth it !

Lubin

Re: restorePath, and slbuild errors, matlab working director

Posted: Tue Oct 11, 2011 3:11 pm
by resodad
Thanks Lubin.
The new version is working so far.
John