All,
I've been lurking for quite a long while, and ran into something I could use some help with.
We have an application that previously had an 842E-CM CIP motion absolute encoder on it. The encoder failed and it was replaced with an 842E-M, which is not a motion device. We're able to read values from it, "home" it via message instructions, all is good.
However, the functionality is surprising and making it work in a similar way to the old one without rewriting a lot of the code or at least values isn't obvious to me. The -CM encoder would count up from zero in one direction of rotation, and count in the negative direction for the other direction of rotation. The code would look for the encoder to be in a certain range to verify end of travel.
The -M encoder does not work the same way. It will count up from 0 in one direction, but when it crosses zero going the other way it will jump to the highest count value (resolutions x configured number of revolutions).
The biggest issue I have with this is that it doesn't give a unique value, even incorporating direction of travel. For example, if it was configured for one rotation and 10 counts per revolution, and the encoder is sitting at 5, even knowing which way it is turning (example, in the direction of decrementing) I don't know if a value of 5 means 5 away from 0 as the middle of travel or 5 away from one extreme end of travel. I was definitely expecting this to be signed or at least count up in both directions so that the direction plus whether it was incrementing or decrementing told you where you were.
Has any one worked with these before? I know from a KB article that it is behaving as it is supposed to, and the only thing you can really change is which direction (CW or CCW) counts up vs down. I'm not coming up with an easy solution that doesn't require rewriting a ton of logic. One idea is to set 0 as one end of travel and "home" to the middle of the range (say, 5) and then check a window around 0 and 10 for end of travel.
Next best idea is to set an internal value at the beginning of cycle that says which half of travel it's in and write to that whenever you cross zero (the encoder has a parameter than increments when it changes direction). However under closer check I don't think that will work, as the window for end of travel and home appear the same.
Any help is appreciated.
I've been lurking for quite a long while, and ran into something I could use some help with.
We have an application that previously had an 842E-CM CIP motion absolute encoder on it. The encoder failed and it was replaced with an 842E-M, which is not a motion device. We're able to read values from it, "home" it via message instructions, all is good.
However, the functionality is surprising and making it work in a similar way to the old one without rewriting a lot of the code or at least values isn't obvious to me. The -CM encoder would count up from zero in one direction of rotation, and count in the negative direction for the other direction of rotation. The code would look for the encoder to be in a certain range to verify end of travel.
The -M encoder does not work the same way. It will count up from 0 in one direction, but when it crosses zero going the other way it will jump to the highest count value (resolutions x configured number of revolutions).
The biggest issue I have with this is that it doesn't give a unique value, even incorporating direction of travel. For example, if it was configured for one rotation and 10 counts per revolution, and the encoder is sitting at 5, even knowing which way it is turning (example, in the direction of decrementing) I don't know if a value of 5 means 5 away from 0 as the middle of travel or 5 away from one extreme end of travel. I was definitely expecting this to be signed or at least count up in both directions so that the direction plus whether it was incrementing or decrementing told you where you were.
Has any one worked with these before? I know from a KB article that it is behaving as it is supposed to, and the only thing you can really change is which direction (CW or CCW) counts up vs down. I'm not coming up with an easy solution that doesn't require rewriting a ton of logic. One idea is to set 0 as one end of travel and "home" to the middle of the range (say, 5) and then check a window around 0 and 10 for end of travel.
Next best idea is to set an internal value at the beginning of cycle that says which half of travel it's in and write to that whenever you cross zero (the encoder has a parameter than increments when it changes direction). However under closer check I don't think that will work, as the window for end of travel and home appear the same.
Any help is appreciated.