SCP for full circle rotation, 359 or 360 degrees?

JZerb

Member
Join Date
Oct 2016
Location
Here
Posts
421
just curious writing some code here how do people handle scaling an encoders value when its attached to a shaft that has 360 degrees of rotation. i have always seen it done SCP Scaled Min 0 Scaled Max 360, but that doesnt make sense to me because thats technically 361 numbers no? since the 0 is counted? or am i missing something.
 
If using integers only, i'd say it should go to 359 because 0 and 360 should be the exact same location. In practice, it shouldn't make a difference.
 
It may be 361 numbers, but it is 360 intervals.

Just as a full-scale reading may go from 0 to 100 percent, a circle goes from 0 to 360 degrees, where just before 360=0, is 359.9999...
 
its an absolute encoder. push-pull output, binary. during the process the encoder would only go in one direction, but there is the possibility of it going either way.

integers only i would like it should be 0-359, if i have an encoder with the resolution that i could get down to tenths of a degree, 359.9, then i would assume the scaling should be 0-359.9, not 0-360.0
 
0 to 359, or 1 to 360.

Depends upon whether you prefer to call the zero point "0" or "360".

id prefer to call the ZERO point 0.

whats interesting is im looking through code written by other programmers previously within my company and im seeing 0-360 on these SCP's and its just not making sense to me how that was deemed correct :unsure:
 
for a 1024 PPR encoder, your scaling should be
0 = 0, 1023 = 359.6484375, 1024 = 360

Note that although you will never normally see 1024, you can use it for your scaling factor.
 

Similar Topics

Hello, I am replacing a pH probe that was determined to be bad in a waste water treatment system. I am replacing it with a 2-wire Aqua Metrix...
Replies
8
Views
1,446
Hi I have a PLC 5/40E which passes speeds to a number of machines via rio. Currently there is no scaling and the machines use look up tables...
Replies
2
Views
1,713
Rs logix 500 is version 12.00.00 and my SCP instruction is grayed outed. Can anyone help?
Replies
1
Views
1,294
Hello everyone, I am using SLC 5/03 (1747-L531) CPU. My CPU gives an error. BATT led is active and it is always in solid red . Firstly I...
Replies
11
Views
4,047
Anyone know where I can get a replacement key for this? I know that it said "01115E" or "0I115E" on the side of the key. It was brass. Not much...
Replies
0
Views
989
Back
Top Bottom