restorePath, and slbuild errors, matlab working directory ch
restorePath, and slbuild errors, matlab working directory ch
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?
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 1555 times
-
- ArmFireX2.mdl
- simulink model
- (33.05 KiB) Downloaded 1480 times
-
- Site Admin - Expert
- Posts: 616
- Joined: Wed Mar 07, 2007 11:23 pm
- Location: Bayonne- France
- Contact:
Re: restorePath, and slbuild errors, matlab working director
Hi John,
Thanks for bug reports.
Hang-up is typically caused by a bug. The blockset might be the cause. Please report the problem if you get this message.
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
Thanks for bug reports.
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...)resodad wrote:I have also seen " recursive call to slbuild."
Hang-up is typically caused by a bug. The blockset might be the cause. Please report the problem if you get this message.
I installed recently the dsPIC blockset on a vista windows and I get this error.resodad wrote:Undefined function or variable restorePath
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
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
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
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
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
Please see if you get the same error as I do.
John
- Attachments
-
- PinCode2.mdl
- Causes error
- (33.42 KiB) Downloaded 1490 times
-
- PinCode.mdl
- Runs OK
- (31.78 KiB) Downloaded 1484 times
Re: restorePath, and slbuild errors, matlab working director
Also,
if you remove the "if" block from ArmFireX2.mdl, it builds OK.
John
if you remove the "if" block from ArmFireX2.mdl, it builds OK.
John
-
- Site Admin - Expert
- Posts: 616
- Joined: Wed Mar 07, 2007 11:23 pm
- Location: Bayonne- France
- Contact:
Re: restorePath, and slbuild errors, matlab working director
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
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
-
- Site Admin - Expert
- Posts: 616
- Joined: Wed Mar 07, 2007 11:23 pm
- Location: Bayonne- France
- Contact:
Re: restorePath, and slbuild errors, matlab working director
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
Fixed in blockset release 3.7.
Thanks for reporting that bug, it really worth it !
Lubin
Re: restorePath, and slbuild errors, matlab working director
Thanks Lubin.
The new version is working so far.
John
The new version is working so far.
John
Who is online
Users browsing this forum: No registered users and 36 guests