restorePath, and slbuild errors, matlab working directory ch

resodad
Posts: 71
Joined: Tue Jul 07, 2009 1:06 pm
Location: West Point, New York

restorePath, and slbuild errors, matlab working directory ch

Postby resodad » Tue Aug 09, 2011 8:36 pm

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?
Attachments
MatlabBuidErrorScript.txt
Matlab output
(10.12 KiB) Downloaded 173 times
ArmFireX2.mdl
simulink model
(33.05 KiB) Downloaded 183 times

LubinKerhuel
Site Admin - Expert
Posts: 616
Joined: Wed Mar 07, 2007 11:23 pm
Location: Marseille - France
Contact:

Re: restorePath, and slbuild errors, matlab working director

Postby LubinKerhuel » Sat Aug 13, 2011 12:34 am

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

bmairs
Posts: 69
Joined: Mon Jul 27, 2009 7:51 pm

Re: restorePath, and slbuild errors, matlab working director

Postby bmairs » Sun Aug 14, 2011 6:03 pm

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.

resodad
Posts: 71
Joined: Tue Jul 07, 2009 1:06 pm
Location: West Point, New York

Re: restorePath, and slbuild errors, matlab working director

Postby resodad » Tue Oct 04, 2011 5:52 pm

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

resodad
Posts: 71
Joined: Tue Jul 07, 2009 1:06 pm
Location: West Point, New York

Re: restorePath, and slbuild errors, matlab working director

Postby resodad » Tue Oct 04, 2011 6:02 pm

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
Attachments
PinCode2.mdl
Causes error
(33.42 KiB) Downloaded 177 times
PinCode.mdl
Runs OK
(31.78 KiB) Downloaded 152 times

resodad
Posts: 71
Joined: Tue Jul 07, 2009 1:06 pm
Location: West Point, New York

Re: restorePath, and slbuild errors, matlab working director

Postby resodad » Tue Oct 04, 2011 6:48 pm

Also,
if you remove the "if" block from ArmFireX2.mdl, it builds OK.
John

LubinKerhuel
Site Admin - Expert
Posts: 616
Joined: Wed Mar 07, 2007 11:23 pm
Location: Marseille - France
Contact:

Re: restorePath, and slbuild errors, matlab working director

Postby LubinKerhuel » Sat Oct 08, 2011 12:33 am

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

LubinKerhuel
Site Admin - Expert
Posts: 616
Joined: Wed Mar 07, 2007 11:23 pm
Location: Marseille - France
Contact:

Re: restorePath, and slbuild errors, matlab working director

Postby LubinKerhuel » Sat Oct 08, 2011 4:31 pm

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

resodad
Posts: 71
Joined: Tue Jul 07, 2009 1:06 pm
Location: West Point, New York

Re: restorePath, and slbuild errors, matlab working director

Postby resodad » Tue Oct 11, 2011 3:11 pm

Thanks Lubin.
The new version is working so far.
John


Return to “bug reports”

Who is online

Users browsing this forum: No registered users and 1 guest