Encoder Index is non-sensical

Supporting Labview 2012 and up
riprock99
Fresh meat
Posts: 2
Joined: Sat Mar 14, 2015 6:17 pm
Contact:

Encoder Index is non-sensical

Postby riprock99 » Sat Mar 14, 2015 6:35 pm

Hello everyone,

I am reading a 1057 PhidgetEncoder HighSpeed and 3532 Hollow Shaft Optical Encoder IHC3808 with Labview on Mac OS X. I made minor modifications to the example code (getting rid of the calls that are not supported on the 1057), and it works great reading the encoder position. This encoder has 360 counts per rotation, and can actually determine which of 4 positions within a count it is in, so the net resolution is 1440 positions per 360 degree rotation. Cool!

However, the encoder also has an index that should be readable. However, the function returns the same crazy value every time: 2147483647. The index (I believe) should be between 0 and 1440. This is returned from EncoderGetIndexPosition, even if I rotate multiple full rotations. No errors are thrown. Does anyone understand why this would be? Newbie alert - How do I attach the code, or an image?

The code does this:
1) EncoderOpen
2) EncoderEventCreatePosition
3) EncoderEventExePosition
4) EncoderGetPosition
5) EncoderGetIndexPosition
6) Go to 3 until stopped
7) Kill event handler, close port, error handler

Thanks,

Scott

User avatar
burley
Human-Cyborg Relations
Posts: 441
Joined: Tue Sep 27, 2011 2:37 pm
Location: Calgary
Contact:

Re: Encoder Index is non-sensical

Postby burley » Mon Mar 16, 2015 7:51 am

That value is equal to a constant in our library for when a value is unknown. Generally this would imply that the device has not received an index from the encoder yet and so does not have valid data in that memory space.

Do you have an oscilloscope or similar available to test with? Do you actually see the index pulse coming from the encoder?
Brian Burley
403-282-7335 ext. 6003
support@phidgets.com

riprock99
Fresh meat
Posts: 2
Joined: Sat Mar 14, 2015 6:17 pm
Contact:

Re: Encoder Index is non-sensical

Postby riprock99 » Mon Mar 16, 2015 7:59 am

Thanks for the thought - which wire is the index pulse anticipated on? I will go measure it!

Thanks again!

S-

User avatar
Patrick
Lead Developer
Posts: 3099
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Encoder Index is non-sensical

Postby Patrick » Mon Mar 16, 2015 9:50 am

1057 doesn't support the index channel - only 1047 supports this.

Pin 4 is a no connect: http://www.phidgets.com/docs/1057_User_ ... ut_Diagram

-Patrick


Return to “Labview”

Who is online

Users browsing this forum: No registered users and 1 guest