Problem using PWM_motor - Solved

Create new topics, add your comment, remark, bugs...
Post Reply
murali
Posts: 3
Joined: Sat Oct 04, 2008 1:15 pm

Problem using PWM_motor - Solved

Post by murali » Sat Oct 04, 2008 2:48 pm

hi!
I am trying to use one of the PWM channels of dsPIC,but while generating the c-code..it is giving the following error:

PWM.c: In function 'PWM_initialize':
PWM.c:61: error: 'PWM_INT_DIS' undeclared (first use in this function)
PWM.c:61: error: (Each undeclared identifier is reported only once
PWM.c:61: error: for each function it appears in.)
PWM.c:61: error: 'PWM_FLTA_DIS_INT' undeclared (first use in this function)
PWM.c:61: error: 'PWM_INT_PR1' undeclared (first use in this function)
PWM.c:61: error: 'PWM_FLTA_INT_PR0' undeclared (first use in this function)
PWM.c:66: error: 'PWM_EN' undeclared (first use in this function)
PWM.c:66: error: 'PWM_OP_SCALE1' undeclared (first use in this function)
PWM.c:66: error: 'PWM_IPCLK_SCALE4' undeclared (first use in this function)
PWM.c:66: error: 'PWM_MOD_FREE' undeclared (first use in this function)
PWM.c:66: error: 'PWM_PEN1L' undeclared (first use in this function)
PWM.c:66: error: 'PWM_MOD1_IND' undeclared (first use in this function)
PWM.c:66: error: 'PWM_PDIS1H' undeclared (first use in this function)
PWM.c:66: error: 'PWM_PDIS2L' undeclared (first use in this function)
PWM.c:66: error: 'PWM_PDIS2H' undeclared (first use in this function)
PWM.c:66: error: 'PWM_PDIS3L' undeclared (first use in this function)
PWM.c:66: error: 'PWM_PDIS3H' undeclared (first use in this function)
PWM.c:66: error: 'PWM_SEVOPS1' undeclared (first use in this function)
PWM.c:66: error: 'PWM_OSYNC_TCY' undeclared (first use in this function)
PWM.c:66: error: 'PWM_UEN' undeclared (first use in this function)

Image

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

Re: Problem using PWM_motor

Post by LubinKerhuel » Sat Oct 04, 2008 7:52 pm

Thanks for the bug report.

I sucessfully reproduced it on the blockset version 0.98fe.

Workaround : open at least once the PWM dialog blox and close it before compiling. It seems that some parameters are not updated until the block is opened at least once.

Bug will be solved in the next release version.

Lubin

murali
Posts: 3
Joined: Sat Oct 04, 2008 1:15 pm

Re: Problem using PWM_motor

Post by murali » Sat Oct 04, 2008 8:09 pm

hi!
since i need it urgently, can you please send me the corrected blockset.

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

Re: Problem using PWM_motor

Post by LubinKerhuel » Sat Oct 04, 2008 8:35 pm

Hi Murali,

Note that with the current version, you will be able to compile your model. You just need to open the PWM block once before compiling!!

Anyway, I can provide you with the version being developed.
Which matlab version are you using?

Lubin

murali
Posts: 3
Joined: Sat Oct 04, 2008 1:15 pm

Re: Problem using PWM_motor

Post by murali » Sat Oct 04, 2008 8:44 pm

Hi Lubin!
I tried that,infact i have changed the period also before compiling ,but the same errors are appearing ..
I am using r2008a..It would be great if you can provide me the corrected version.
Thank you

gladiac
Posts: 17
Joined: Fri Jun 27, 2008 11:32 am
Location: Liverpool, UK

Re: Problem using PWM_motor - Solved

Post by gladiac » Thu Oct 23, 2008 11:54 am

Hi Lubin

It seems I have a similar problem.Once I add the PWM bolckset to simulink model, the 'master' block couldn't be opened. The pic attached shows the error info. Also same error appears during compiling.

cheers
Attachments
New Picture.jpg
New Picture.jpg (33.64 KiB) Viewed 14528 times

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

Re: Problem using PWM_motor - Solved

Post by LubinKerhuel » Fri Oct 24, 2008 12:11 am

Correction will be available in the next version of the blockset. It will be released within few days (3 to 10 days from now)

gladiac
Posts: 17
Joined: Fri Jun 27, 2008 11:32 am
Location: Liverpool, UK

Re: Problem using PWM_motor - Solved

Post by gladiac » Thu Oct 30, 2008 1:22 pm

Hi Lubin,

I have upgraded to V0.99a for R2007b and R2006a, but the problem still exist, the picture shows the error info for R2007b
Attachments
New Picture.jpg
New Picture.jpg (38.49 KiB) Viewed 14479 times

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

Re: Problem using PWM_motor - Solved

Post by LubinKerhuel » Thu Oct 30, 2008 1:34 pm

Hi Gladiac,

I check the dsPIC you are using 30f6014, it has no PWM motor peripheral ! I will try to update the error message to make it more clear.

You can generate PWM signal using the Output Compare block. 30f6014 has 8 OC channels capable to generate a PWM signal.

Lubin

gladiac
Posts: 17
Joined: Fri Jun 27, 2008 11:32 am
Location: Liverpool, UK

Re: Problem using PWM_motor - Solved

Post by gladiac » Thu Oct 30, 2008 11:42 pm

Hi Lubin,

Thanks! The problem seems to be caused by myself. I just muddled up your 'PWM blockset' with the PWM mode of OC module. So your 'PWM blockset' works for MCPWM module. Thanks again for your help.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 43 guests