Shop OBEX P1 Docs P2 Docs Learn Events
Zero out the counters on the encoder cog — Parallax Forums

Zero out the counters on the encoder cog

tbriggstbriggs Posts: 9
edited 2007-05-15 08:41 in Propeller 1
When using the encoder cog how o yo zero out the counters?· I noticed the array is read only.· I would like to be able to zero the count.

Thanks!
·

Comments

  • crgwbrcrgwbr Posts: 614
    edited 2007-05-14 11:27
    I don't believe you can zero the count. Why do you need to do this? Maybe we can help you more if we know the application.

    Regard,
    Craig

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    I would love to change the world, but they won't give me the source code

    People say that if you play Microsoft CD's backwards, you hear satanic things, but that's nothing, because if you play them forwards, they install Windows.

    I spent a minute looking at my own code by accident. I was thinking "What the heck is this guy doing?"
  • tbriggstbriggs Posts: 9
    edited 2007-05-14 15:23
    I am keeping track of a position and would like to zero the position in another spot. I am connecting the encoders to a table and would like to go to a point and zero so that I can have a new reference point.

    I guess a reset of the propeller would work just as well but that seems sort of radical.

    Thanks!
  • potatoheadpotatohead Posts: 10,260
    edited 2007-05-14 16:05
    So just store that point and work from there. Zero is what you say it is!
  • tbriggstbriggs Posts: 9
    edited 2007-05-14 20:16
    I need to display zero on my monitor when I hit the zero button. My explanation is probably not too good. I start out turning the "box" on and my position displays on the VGA monitor. I then move the table a few inches, hit the "zero" button and I want the display to display "0". I guess I could just subtract the current reading. that would give me zero....I think.

    Thanks for your help!
  • Graham StablerGraham Stabler Posts: 2,507
    edited 2007-05-15 08:41
    The positions are held in hub ram and you pass an address to the positions when you start the cog, that means you can use the address to set the positions to zero.

    Graham
Sign In or Register to comment.