CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

linear incremental scale

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
raman00084@gmail.com



Joined: 28 Jul 2014
Posts: 38

View user's profile Send private message

linear incremental scale
PostPosted: Sat Apr 13, 2019 1:42 am     Reply with quote

I have connected an incremental linear scale in QEI module 1 of DSPIC33EP512MU810 controller. If i move the scale i am getting pulses in increment of 1 but my qei module is 4x.

Also the Repeat-ability of the pulses for a fixed linear distance is not same. It fluctuates by 4 to 7 counts.

If i connect the same scale to DRO of the scale manufacturer i am getting exact pulses of for the fixed linear distance.

I have attached the wave form of the linear scale.
Code:

setup_qei(1,QEI_MODE_X4,QEI_FILTER_DIV_16,QEI_MODE_TIMER_INTERNAL,QEI_POS_LE_INT,QEI_POS_GE_INT);


[img]https://ibb.co/xs34dQ9[/img]
temtronic



Joined: 01 Jul 2010
Posts: 9081
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sat Apr 13, 2019 4:41 am     Reply with quote

You need to post the mfr/make/model of the scale or a link to it's datasheet. The scope view doesn't look like any encoder I've ever used. I've never used a PIC with internal QEI, used US Digital chips though.

edit: just saw/read the post below this one, SAME PIC ! Now I know there's a LOT of errata for this PIC, which leads me to believe it's a 'die' issue ( hardware ) that may not be fixable.

Jay
Jerson



Joined: 31 Jul 2009
Posts: 121
Location: Bombay, India

View user's profile Send private message Visit poster's website

PostPosted: Sat Apr 13, 2019 8:12 am     Reply with quote

With a caveat that I may be wrong, I am thinking your encoder signals are shorted together via some low value resistance like a winding or such.
temtronic



Joined: 01 Jul 2010
Posts: 9081
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sat Apr 13, 2019 3:21 pm     Reply with quote

OK, I looked at the waveforms again and I can't understand the 'stepped' waveform. You should have clean 1' and 0's being 5 volt '1's and 0 '0's. Well if the PICs running at 5 volts which I think dsPics run at. Leads me to again asking for datasheet as maybe the sensor is really a 3 volt device ??
Generic 'mice' always give nice +5, 0V signals......BTW
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group