JPG Posted November 14, 2022 Report Share Posted November 14, 2022 How can the counter be reset on a URD-0200E? I would like to use a V700 with a URB-TCP and a URD-0200E to read a shaft encoder. I assumed I could write to the registers that contain the count and set the value to 0. Is this correct? If not, how do I reset the counter when the encoder type is 4x? If it's not possible to reset the counter, how could the encoder value be equated to zero in ladder logic? Link to comment Share on other sites More sharing options...
JPG Posted November 18, 2022 Author Report Share Posted November 18, 2022 I'm posting what I've found here in case it is of future use to others After much time and effort, I've found a couple solutions. Take them with a grain of salt, I'm somewhat of a novice. First, it doesn't appear to be possible to write to the register that contains the encoder value so it can't be reset that way. Second, this may be obvious to experienced folks, but it took me a bit to figure it out. This can be used to get a value that follows the encoder but can be reset to zero; The current encoder value should be stored as a signed 32bit value. Probably an XL or an ML. Create an offset value by writing one time the current encoder value to another singed operand. Create a replacement encoder value in another singed operand. Always subtract the offset from the current encoder value to get the replacement encoder value. This will give you a value that always follows the encoder value but at a calculated offset. Anytime the offset is recalculated the result will be zero in the replacement encoder value. Hence a value that follows the encoder but can be reset to zero in logic. No it's not perfect, but it works pretty well. Third, another way that the encoder value can be reset is by changing it's config. Yes this is probably far from ideal, but could be useful by quickly changing config and changing back. I didn't fully explore which configs will result in a reset value, but it was repeatable. Good luck. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now