error while opening Master Block or compiling model

arci
Posts: 7
Joined: Thu Apr 19, 2007 11:44 pm

error while opening Master Block or compiling model

Postby arci » Thu Apr 19, 2007 11:50 pm

I downloaded your dspic library for simulink/matlab, but it generates error msg sometimes,"error:evaluating "OpenFcn" callback of masterblock .......named 'LDPICTYPE' ". My simulink file contains only dspic master block and when double click this block, error occured.


arci

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

Postby LubinKerhuel » Fri Apr 20, 2007 12:39 am

Hi Arci,

You are not using the last version of the toolbox.

I noticed this problem and the new version would give a more comprehensive error message :

Error evaluating 'OpenFcn' callback of Master block (mask) 'Master'. Error using ==> <a href="error:C:\prog\Matlab2\RTWdsPIC\blocks\dsPIC_ConfigRTWOption.m,24,1">dsPIC_ConfigRTWOption at 24</a>
The *System Target File must be defined to dsPIC Real Time workshop (Simulation ==> Configuration Parameters ==> Real Time workshop.


When you get this message ( or the one you obtain with the older toolbox described in the previous post)

You MUST go to the
Simulation menu, then
Configuration Parameters, and go to the
Real Time Workshop menu and Set the
System Target File to dsPIC (It must be in the list)


Please, have a look on the first part of the "Sinus PWM" animation where I build a small diagram for dsPIC from scratch : http://www.kerhuel.eu/RTWdsPIC/examples/SinusPWM.html

Lubin

barryforever
Posts: 11
Joined: Sun Feb 17, 2008 2:58 pm

Re: error while opening Master Block or compiling model

Postby barryforever » Mon Feb 18, 2008 4:35 pm

I receive the same error when i try compiling using mplab c30 using the mplab matlab tool
This is what i get

Code: Select all

Opening Matlab session and model 'C:\Documents and Settings\Barry\My Documents\MATLAB\idid\deport.mdl'
Please wait...

Warning: Error evaluating 'LoadFcn' callback of
Master block (mask) 'Master'. Error using ==>
dsPIC_ConfigRTWOption at 34
The *System Target File must be defined to dsPIC
Real Time workshop (Simulation ==> Configuration
Parameters ==> Real Time workshop.
> In <a href="error:C:\Program Files\Microchip\MPLAB IDE\Tools\Matlab\MplabOpenModel.m,14,1">MplabOpenModel at 14</a>
Warning: In instantiating linked block
'deport/Master' : Invalid setting in Master block
(mask) 'Master' for parameter 'MCLR'.
> In <a href="error:C:\Program Files\Microchip\MPLAB IDE\Tools\Matlab\MplabOpenModel.m,14,1">MplabOpenModel at 14</a>



I use MATLAB R2007b and MPLAB 8 and your toolbox 18.02.08

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

Re: error while opening Master Block or compiling model

Postby LubinKerhuel » Mon Feb 18, 2008 8:15 pm

The blockset is not compatible yet with the MPLAB plugging that open and "import" the C code generated into MPLAB.

I recommend compiling the mdl schematic into a .hex file from simulink. You can import C code using the "custom C function block" (only on the registered version of the blockset).

If you want to import the C code generated into a MPLAB project, use the procedure described here.


Return to “Requirement, Installation & Configuration”

Who is online

Users browsing this forum: No registered users and 1 guest