dsPIC Master error
-
- Posts: 7
- Joined: Thu Sep 08, 2011 5:09 pm
dsPIC Master error
Hi,
I'm using Matlab 2007b with Windows7 64. The Installation seemed to be ok. But when I want to choose the Master I always get the Matlab error message:
Error evaluating 'OpenFcn' callback of Master block (mask) 'Master'. Index exceeds matrix dimensions.
I would be glad if someone could tell me what's going wrong.
I'm using Matlab 2007b with Windows7 64. The Installation seemed to be ok. But when I want to choose the Master I always get the Matlab error message:
Error evaluating 'OpenFcn' callback of Master block (mask) 'Master'. Index exceeds matrix dimensions.
I would be glad if someone could tell me what's going wrong.
-
- Site Admin - Expert
- Posts: 616
- Joined: Wed Mar 07, 2007 11:23 pm
- Location: Bayonne- France
- Contact:
Re: dsPIC Master error
Which blockset version are you working with ?
Can you compile the files in example directory ? (there is a m script to compile them all at once !)
Lubin
Can you compile the files in example directory ? (there is a m script to compile them all at once !)
Lubin
-
- Posts: 7
- Joined: Thu Sep 08, 2011 5:09 pm
Re: dsPIC Master error
I installed it with: install_dsPIC_R2007b.
The example all result in the same error after some warnings. I post it for the first example at the end.
In the examples I can open the "Master Block" and change it. If I copy the "Master Block" into my model, it seems to work. But no compilation.
Peter
K>>
Warning: 'slprj' is a directory. Use rmdir to delete directories.
> In CompileAllModels at 4
Warning: File 'Data_Login_Matlab.hex' not found.
> In CompileAllModels at 27
***** Solver Mode change from Auto to SingleTasking (this mode allows single rate and multirate). See help to get the difference with the MultiTasking mode which is now supported by the blockset *****
Old gmake exist, but newly GMAKE set at : C:\PROGRA~2\MATLAB\R2007b\bin\win32\gmake
PNumber of I/O PINs used : 2
TModel configured...
sources files not found. MPLAB project file not created.
K>>
and the important error:
Error building Real-Time Workshop target for block diagram 'Data_Login_Matlab'. MATLAB error message:
Error using ==> make_rtw
Too many output arguments.
The example all result in the same error after some warnings. I post it for the first example at the end.
In the examples I can open the "Master Block" and change it. If I copy the "Master Block" into my model, it seems to work. But no compilation.
Peter
K>>
Warning: 'slprj' is a directory. Use rmdir to delete directories.
> In CompileAllModels at 4
Warning: File 'Data_Login_Matlab.hex' not found.
> In CompileAllModels at 27
***** Solver Mode change from Auto to SingleTasking (this mode allows single rate and multirate). See help to get the difference with the MultiTasking mode which is now supported by the blockset *****
Old gmake exist, but newly GMAKE set at : C:\PROGRA~2\MATLAB\R2007b\bin\win32\gmake
PNumber of I/O PINs used : 2
TModel configured...
sources files not found. MPLAB project file not created.
K>>
and the important error:
Error building Real-Time Workshop target for block diagram 'Data_Login_Matlab'. MATLAB error message:
Error using ==> make_rtw
Too many output arguments.
-
- Posts: 7
- Joined: Thu Sep 08, 2011 5:09 pm
Re: dsPIC Master error
Additionally:
For all the dsPIC33 I tried, I get: No CAN peripheral on ...
For dsPIC30 it works.
For all the dsPIC33 I tried, I get: No CAN peripheral on ...
For dsPIC30 it works.
-
- Site Admin - Expert
- Posts: 616
- Joined: Wed Mar 07, 2007 11:23 pm
- Location: Bayonne- France
- Contact:
Re: dsPIC Master error
You need to set the Code Generation target : simulink configuration, pannel Code Generation, set it to dsPIC or pic32...whatthehack wrote:In the examples I can open the "Master Block" and change it. If I copy the "Master Block" into my model, it seems to work. But no compilation.
a yellow block is capable of configuring the siumlink model automatically if you add it to your model.
Code: Select all
K>>
Warning: 'slprj' is a directory. Use rmdir to delete directories.
> In CompileAllModels at 4
Warning: File 'Data_Login_Matlab.hex' not found.
> In CompileAllModels at 27
***** Solver Mode change from Auto to SingleTasking (this mode allows single rate and multirate). See help to get the difference with the MultiTasking mode which is now supported by the blockset *****
Old gmake exist, but newly GMAKE set at : C:\PROGRA~2\MATLAB\R2007b\bin\win32\gmake
PNumber of I/O PINs used : 2
TModel configured...
sources files not found. MPLAB project file not created.
K>>
It's difficult to make out what's happening there.
Lubin
-
- Posts: 7
- Joined: Thu Sep 08, 2011 5:09 pm
Re: dsPIC Master error
In all cases there was set dspic.tlc.You need to set the Code Generation target : simulink configuration, pannel Code Generation, set it to dsPIC or pic32...
a yellow block is capable of configuring the siumlink model automatically if you add it to your model.
I tried the same with Matlab2007b(32bit) and Matlab2010b (64bit), both on windows7 (64bit). During opening of the model I get a lot of warnings, see: In both cases during incremental build for the example Data_Login_Matlab a new info-window opens with an error message:
2007b:
Error building Real-Time Workshop target for block diagram 'Data_Login_Matlab'. MATLAB error message:
Error using ==> make_rtw
Too many output arguments.
2010b:
Real-Time Workshop Embedded Coder is not licensed or not installed. The current target is: C:\Program Files\MATLAB\toolbox\dspic\dspic\dspic.tlc
And in both cases for dspic33fj128gp802 (or other pic33) I get no CAN
-
- Site Admin - Expert
- Posts: 616
- Joined: Wed Mar 07, 2007 11:23 pm
- Location: Bayonne- France
- Contact:
Re: dsPIC Master error
don't pay attention to warning message at model opening.
I do not understand the message you obtain on matlab 2007b.
Maybe, you do not have also Embedded Coder on matlab 2007b ?
Lubin
I do not understand the message you obtain on matlab 2007b.
You need to have Embedded Coder installed on matlab to have the dsPIC blockset work. dsPIC blockset works on top of RTW Embedded Coder.whatthehack wrote:Real-Time Workshop Embedded Coder is not licensed or not installed. The current target is: C:\Program Files\MATLAB\toolbox\dspic\dspic\dspic.tlc
Maybe, you do not have also Embedded Coder on matlab 2007b ?
Lubin
-
- Posts: 7
- Joined: Thu Sep 08, 2011 5:09 pm
Re: dsPIC Master error
is the error message with 2010b.Real-Time Workshop Embedded Coder is not licensed or not installed. The current target is: C:\Program Files\MATLAB\toolbox\dspic\dspic\dspic.tlc
I have the RTW coder for both versions
Real-Time Workshop Version 7.0 (R2007b)
My dSpace-System works fine with both versionsReal-Time Workshop Version 7.6 (R2010b)
-
- Site Admin - Expert
- Posts: 616
- Joined: Wed Mar 07, 2007 11:23 pm
- Location: Bayonne- France
- Contact:
Re: dsPIC Master error
There is
Real Time Workshop and
Real Time Workshop Embedded Coder (renamed Embedded Coder on last matlab version)
RTW EC works on top of RTW. In other word, you need them both.
Do you have RTW Embedded Coder ?
Lubin
Real Time Workshop and
Real Time Workshop Embedded Coder (renamed Embedded Coder on last matlab version)
RTW EC works on top of RTW. In other word, you need them both.
Do you have RTW Embedded Coder ?
Lubin
-
- Posts: 7
- Joined: Thu Sep 08, 2011 5:09 pm
Re: dsPIC Master error
Dear Lubin,
I have to apologize. I didn't check this
. For what reason ever the embedded coder was not installed. Now it is!
Now principally everything works fine but in the examples Data_Login_Matlab, Servo_ADC, Servo_Sinus I get the following error:
Servo_ADC_main.c:34: error: syntax error before numeric constant
Servo_ADC_main.c: In function '_FICD':
Servo_ADC_main.c:36: error: syntax error before '{' token
gmake: *** [Servo_ADC_main.o] Error 255
And very important for me too: How do I get the CAN-Interface with an 33fj128gp802?
Thanks a lot
Peter
I have to apologize. I didn't check this
![Sad :(](./images/smilies/icon_sad.gif)
Now principally everything works fine but in the examples Data_Login_Matlab, Servo_ADC, Servo_Sinus I get the following error:
Servo_ADC_main.c:34: error: syntax error before numeric constant
Servo_ADC_main.c: In function '_FICD':
Servo_ADC_main.c:36: error: syntax error before '{' token
gmake: *** [Servo_ADC_main.o] Error 255
And very important for me too: How do I get the CAN-Interface with an 33fj128gp802?
Thanks a lot
Peter
-
- Posts: 7
- Joined: Thu Sep 08, 2011 5:09 pm
Re: dsPIC Master error
Well, I think I found the reason for the compiler error. It seems that from mplabc30 v3.25 to v3.30 the name of FICD changed to ICD (but only for dsp30f3xxx up to 6xxx
).
Remains 1 problem for me at the moment: no CAN for my dsp33.
![Question :?:](./images/smilies/icon_question.gif)
Remains 1 problem for me at the moment: no CAN for my dsp33.
-
- Site Admin - Expert
- Posts: 616
- Joined: Wed Mar 07, 2007 11:23 pm
- Location: Bayonne- France
- Contact:
Re: dsPIC Master error
This is correct.
ICD will turn back to FICD in next Microchip compiler (v3.31) comming soon.
Thus I do not correct this problem for now.
Lubin
ICD will turn back to FICD in next Microchip compiler (v3.31) comming soon.
Thus I do not correct this problem for now.
Lubin
-
- Site Admin - Expert
- Posts: 616
- Joined: Wed Mar 07, 2007 11:23 pm
- Location: Bayonne- France
- Contact:
Re: dsPIC Master error
Compiler C30 v3.31 is released.
Blockset were updated accordingly. Download latest blockset version (3.7c) with the C30 compiler v3.31.
Everything should be Ok now.
Lubin
Blockset were updated accordingly. Download latest blockset version (3.7c) with the C30 compiler v3.31.
Everything should be Ok now.
Lubin
Who is online
Users browsing this forum: No registered users and 191 guests