Page 1 of 1

dsPIC_PWM_motor.tlc problem

Posted: Wed Jun 06, 2012 5:36 am
by Ebap
Hi Lubin,

I am trying to do a simple program with the dsPIC_PWM_motor block but when I try to generate the code from matlab, it give me this error ''The + operator only works on numeric arguments'' (In the dsPIC_PWM_motor.tlc) I attach the error file, the installation file and the .mdl.

Matlab 2011a
C30 compiler V3.3
Blockset V3.7c

Re: dsPIC_PWM_motor.tlc problem

Posted: Sun Jun 10, 2012 5:54 pm
by LubinKerhuel
Thanks for bug report,

Will be fixed in next release.
Lubin

Re: dsPIC_PWM_motor.tlc problem

Posted: Thu Aug 16, 2012 9:43 pm
by welf
I am also affected by this problem. Any progress on a fix or suggestions for a workaround?

Thanks

EDIT: the error does not seem to appear when compiling for certain chips (e.g. 33FJ218MC or 33FJ256MC series), but does for the chip that I am using (33FJ32MC204)

Re: dsPIC_PWM_motor.tlc problem

Posted: Mon Aug 20, 2012 1:41 pm
by welf
Actually I am able to compile the resulting code in MPLAB and run it even though the build (in Matlab) aborts with an error!

The MPLAB project is not created - but I can use a previous project file created without the PWM block in the system.
The file "dsPIC_OutputCompare_Interrupt.c" is not found but it is replaced with an object file.

Re: dsPIC_PWM_motor.tlc problem

Posted: Mon Sep 17, 2012 5:28 pm
by welf
Fixed in new version! :)

Re: dsPIC_PWM_motor.tlc problem

Posted: Tue Sep 18, 2012 5:05 pm
by LubinKerhuel
Ok, Thanks for your feedback,

(As I am not very responsive at that time !)
We're preparing a new blockset suporting newer chips at Microhcip...
Lubin

PWM DC Motor

Posted: Tue Jan 01, 2013 9:47 am
by nasrullah
Hi Lubin,

I am trying to do a simple program to active DC motor. But when I try to generate the code from matlab, it give me this error ''Error building Real-Time Workshop target for block diagram 'motor1'. MATLAB error message: Error(s) encountered while building model "motor1".I attach the motor1.mdl below. The motor driver frequency is 40Khz. Thanks.

Matlab 2009a
MPLAB IDE v8.88 compiler 32 V2.01
Blockset V3.7e