Page 1 of 1

Installation problem :(

Posted: Thu May 15, 2008 8:44 am
by Kova
Hi all,
I have a problem with the installation.
I have Matlab R2007A and C30 compiler installed in the C:\Programmi\Microchip\MPLAB C30 directory

Before the installation I have used the command: "rtw_alt_pathname('C:\Programmi\Microchip\MPLAB C30\support\gld')"
After, I have installed the RTWdsPIC (in C:\programmi\DsPIC) without any problem or error.

When I open an example and I build it I have always this error:

Code: Select all

Error building Real-Time Workshop target for block diagram 'Data_Login_Matlab'. MATLAB error message:
Error using ==> rtwgen
--> Error evaluating 'InitFcn' callback of Master block (mask) 'Data_Login_Matlab/Master'. File "C:\Programmi\Dspic\blocks\[b]dsPIC_MASTER_callback.p" not recognizable as a P-file[/b].
--> Error evaluating 'InitFcn' callback of send structured data frame to Matlab / Labview block (mask) 'Data_Login_Matlab/TX Output Multiplexed for Matlab // Labview'. File "C:\Programmi\Dspic\blocks\dsPIC_UART_TX_Labview_Matlab_callback.p" not recognizable as a P-file.
--> Error evaluating 'InitFcn' callback of Configure UART block (mask) 'Data_Login_Matlab/UART Configuration'. File "C:\Programmi\Dspic\blocks\dsPIC_UART_config_callback.p" not recognizable as a P-file.
Also I have tried to change the dir in the simulation-->configuration-->dspic option..... but it doesn't work :(
Please help me!
Thanks a lot.
Bye ;)

Re: Installation problem :(

Posted: Thu May 15, 2008 11:21 pm
by LubinKerhuel
Hi Kova,

It seems that you are using a version of the blockset for dsPIC that is not adapted to your matlab version. (so .p files are not recognized)
You must use a version of the dsPIC blockset that is supported by your matlab version...
==> use the version of the dsPIC blockset that support Matlab 2007a. This version have the same capabilities than the version that support later matlab version.

Is this solving the problem ?

Re: Installation problem :(

Posted: Fri May 16, 2008 6:47 am
by Guest
LubinKerhuel wrote:Is this solving the problem ?
Hi LubinKerhuel,
thanks for the answer ;)

I have update my Matlab to R2008A version!
Now the Data_Login_Matlab and dsPIC_33f_Explorer16 works perfectly :D
But the Servo_ADC example give me this error:

Code: Select all

Error building Real-Time Workshop target for block diagram 'Servo_ADC'. MATLAB error message:
Error using ==> genMakefileAndBuild at 1138
Error(s) encountered while building model "Servo_ADC".
and Servo_Sinus gives me a nag error screen:
"The left hand side is initialized and has an empty range of indices. However, the right and side returned one or more results."

And also this error:

Code: Select all

Error building Real-Time Workshop target for block diagram 'Servo_Sinus'. MATLAB error message:
Error using ==> genMakefileAndBuild at 1138
Error(s) encountered while building model "Servo_Sinus".
Another question:
I want to do a notch filter with a dsPIC for an university project.
The scheme is:
Matlab ECG signal --> dsPIC filter ---> Matlab Graph
Is it possible to do this?
I don't want to create and flash effectly the dsPIC with the hex..but I want only simulate the dsPIC and visualize on Matlab the result post filter.

Thanks a lot for your time.
Sorry for my english.
Bye ;)

Re: Installation problem :(

Posted: Fri May 16, 2008 7:59 pm
by LubinKerhuel
Hi kova,

Could you provide the complete compilation message (including the error) ?

Note that he last version of the C30 compiler (V 3.10 and 3.10b) is not supported yet. It seems that microchip has changed the repertory where some difinition files are stored. This change make the matlab script unable to compile a smulink model.

Lubin

Re: Installation problem :(

Posted: Sat May 17, 2008 6:53 am
by Kova
LubinKerhuel wrote:Could you provide the complete compilation message (including the error) ?
Hi Lubin,
thanks for the answer ;)
I have solved my problem and now works all perfectly....thanks a lot :P

For my second question, some indication? :P

Thanks
Bye ;)

Re: Installation problem :(

Posted: Sat May 17, 2008 11:01 am
by LubinKerhuel
Hi Kovak,

It would be interesting to get your solution to the problem !

For the second question
Guest wrote:I want to do a notch filter with a dsPIC for an university project.
The scheme is:
Matlab ECG signal --> dsPIC filter ---> Matlab Graph
Is it possible to do this?
I don't want to create and flash the dsPIC with the hex..But I want only simulate the dsPIC and visualize on Matlab the result post filter.
I do not understand the problem:
If you do not want to "flash the dsPIC with the .hex" file, why do you want to generate this .hex file ? Do you want to use a dsPIC Simulator to load the .hex file, simulate the behavior and get the result in matlab ?

When you use Simulink to program a dsPIC, the .hex file obtained will behave like the Simulink model (.mdl file). Simulating the behavior of the .hex file is similar to run a simulation with simulink. That is why programming dsPIC with Simulink and Real Time Workshop is very powerful.

Have a look on the IMU I am working on. On this example, I get raw data from the electronics (I get my data vector in matlab, like your ECG signal). Then, I design the IMU calculation using Simulink with my data. Last, I make few changes on the simulation model (replace model's simulation input by dsPIC input) and generate the .hex file that will have the same behavior as the model (If real time constraints are respected).

Hope that I respond to the question!

Re: Installation problem :(

Posted: Sat May 17, 2008 11:04 am
by Guest
LubinKerhuel wrote:Hope that I respond to the question!
Perfectly!
Thank you very much for the help!! :P :P