Exemple QEI without Index, DsPic33FJ256MC710

Post Reply
Ender
Posts: 38
Joined: Thu Oct 09, 2008 5:20 pm
Location: Phoenix USA _ Grenoble Fr

Exemple QEI without Index, DsPic33FJ256MC710

Post by Ender » Thu Oct 23, 2008 5:53 pm

.
Inspired from the Malife topic, I did a QIE model on the DsPic33FJ256MC710 .

But the intializing function _QEIInt_ run more than one time, in spite of the C call function step time is "inf" :cry:
Exemple, If you remove the comment to set available the line :
__ // POSCNT = 0x8000; // Set Current Position to 8000 does't work, reset and speed effect ???__*
The counter is set any time at 0x8000

Could you help me Lunbin :?:
Attachments
QEI_Functions.c
C fonction for QEI on DsPic33FJ256MC710, 500 ligth by roll 2x mode without Index
(1.65 KiB) Downloaded 552 times
QEI_MC_Uart115200_8MQ.mdl
Model to send roll from QEI to UART 115200 baud with a 8Mhz quartz
(28.46 KiB) Downloaded 553 times

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

Re: Exemple QEI without Index, DsPic33FJ256MC710

Post by LubinKerhuel » Thu Oct 23, 2008 8:04 pm

Hi Ender.

This version should works.
Only 2 changes in the simulink configuration options :
Simulation ==> Configuration Parameters ==> Optimization ==>
- Check Inline parameters
- Then, check Inline Invariant signals
( This is the exact name with matlab 2008a)

Regards
Lubin
Attachments
QEI_MC_Uart115200_8MQ.mdl
(29.53 KiB) Downloaded 564 times

Ender
Posts: 38
Joined: Thu Oct 09, 2008 5:20 pm
Location: Phoenix USA _ Grenoble Fr

Re: Exemple QEI without Index, DsPic33FJ256MC710

Post by Ender » Fri Oct 24, 2008 6:01 pm

Yes, It works, Thanks a lot.

Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests