Shop OBEX P1 Docs P2 Docs Learn Events
rotary encoder — Parallax Forums

rotary encoder

ArchiverArchiver Posts: 46,084
edited 2003-11-26 07:53 in General Discussion
Hi



I like to control 4 gear motors for positioning , each motor with 2 sensors, I
use as

A and B channel.

I would like to count the revolutions of each Motor

and for this I would like to use as less time as possible.

My hardware is not ready jet, I have no chance to test my programme parts,

but like to start programming, to find some basic ways.

On Tracy Allens Website I red about state machine.

My result is this line:



cntM1= (old.BIT0^new.BIT0*2-1)*(new.BIT0^old.BIT0)+cntM1



This line should do: (see a part of the program below)



1) to add one to my counter "cntM1" if the motor runs CW

2) to subtract one of my counter "cntM1" if the motor runs CCW

3) do nothing if there is no change from old state to new state

****************************************************

is this line doing what I think ?

and if yes, is it working in the quickest way ?



****************************************************



the first phrase should add or subtract one

the result is 1 or -1 ??

the second multiple these "one" with zero or with one,

depending if there was a change between old and new state



I don't know if I understand every thing correct ?



thanks for help or comment.



Heinz Germany





'{$STAMP BS2p}



' 4 encoders, signals on P8 thru P15 (by bit pairs)



old VAR Nib ' previous state

new VAR Nib ' current state



cntM1 VAR Word ' for position motor 1

cntM2 VAR Word ' for position motor 2

cntM3 VAR Word ' for position motor 3

cntM4 VAR Word ' for position motor 4



DIRC=0 ' make port C inputs

old=INH ' read initial state of inputs



SERIN 'GET the stop information for each motor from my Keyboard and Display
stamp



' then start the 4 Motors





decode:

new=INH ' read new states from all 4 encoders, eight bits



cntM1= (old.BIT0^new.BIT0*2-1)*(new.BIT0^old.BIT0)+cntM1

'...............................................................................\
.........................

'this lines are for Motor and switch control like

'compare stop-value with cntM1, slow down the motor1, stop the motor1

'check a lot of switches



cntM2= (old.BIT1^new.BIT1*2-1)*(new.BIT1^old.BIT1)+cntM2

cntM3= (old.BIT2^new.BIT2*2-1)*(new.BIT2^old.BIT2)+cntM3

cntM4= (old.BIT3^new.BIT3*2-1)*(new.BIT3^old.BIT3)+cntM4



old=new



GOTO decode





[noparse][[/noparse]Non-text portions of this message have been removed]

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2003-11-24 06:06
    >Hi
    >I like to control 4 gear motors for positioning , each motor with 2
    >sensors, I use as
    >A and B channel.
    >I would like to count the revolutions of each Motor
    >and for this I would like to use as less time as possible.
    >My hardware is not ready jet, I have no chance to test my programme parts,
    >but like to start programming, to find some basic ways.
    >On Tracy Allens Website I red about state machine.
    >My result is this line:
    >
    > cntM1= (old.BIT0^new.BIT0*2-1)*(new.BIT0^old.BIT0)+cntM1
    >
    >
    >
    >This line should do: (see a part of the program below)
    >1) to add one to my counter "cntM1" if the motor runs CW
    >2) to subtract one of my counter "cntM1" if the motor runs CCW
    >3) do nothing if there is no change from old state to new state
    >
    >****************************************************
    >is this line doing what I think ?
    >and if yes, is it working in the quickest way ?
    >****************************************************


    The direction of rotation is determined by the "cross terms", so it
    should read more like this:

    cntM1= (old.BIT0 ^ new.BIT1 * 2 - 1)*(new ^ old & 3 max 1) + cntM1

    By cross terms, I mean that bit 1 of the new reading is XORed with
    bit 0 of the old reading. That is, each time you read the state of
    the encoder, you pick up a new value of bit 0 from sensor A and bit 1
    from sensor B. That is the first term in the formula, and the result
    is either +1 or -1 for the two directions. That is contingent upon
    there having been any rotation at all, There has to have been a
    change in state between old and new. That is what the second term
    decodes, (new ^ old & 3 max 1), which is 1 if there is a change, zero
    otherwise. The &3 comes in because you are using bits 0 and 1 for
    sensors A and B. Multiplying the two terms together gives either
    0, or +1 or -1 as required, to add to the old value of the count.
    There is a diagram of the state transitions to show how the cross
    terms work, at this URL:

    http://www.emesystems.com/BS2fsm.htm#twobit%20encoder

    Here is another way to code it:
    IF new ^ old & 3 THEN
    SELECT old.BIT0 ^ new.BIT1
    CASE 0
    cntM1=cntM1-1
    CASE 1
    cntM1=cntM1+1
    ENDSELECT
    ENDIF


    cntM1= (old.BIT0 ^ new.BIT1 * 2 - 1) + cntM1

    That also makes the count conditional on there having been a change
    of state, then deciding which direction from the cross terms.

    I'm not sure what would be fastest. The web page above has an
    extension to four encoders where it processes the logic from all 4 in
    parallel. That speeds things up considerably. (I took a look at it
    and corrected a typo in tha program on the web page, and edited the
    explanation a bit). Be that as it may, the Stamp is not fast at
    doing all the steps, so it cannot keep up with encoders putting out
    any more than 100 Hertz, if that much. The same logic programmed in
    assembly in an SX could keep up with just about anything.

    -- Tracy




    >
    >
    >
    >the first phrase should add or subtract one
    >the result is 1 or -1 ??
    >the second multiple these "one" with zero or with one,
    >depending if there was a change between old and new state
    >
    >
    >
    >I don't know if I understand every thing correct ?
    >thanks for help or comment.
    >Heinz Germany
    >
    >
    >
    >
    >
    > '{$STAMP BS2p}
    >
    >
    >
    >' 4 encoders, signals on P8 thru P15 (by bit pairs)
    >
    >
    >
    >old VAR Nib ' previous state
    >
    >new VAR Nib ' current state
    >
    >
    >
    >cntM1 VAR Word ' for position motor 1
    >
    >cntM2 VAR Word ' for position motor 2
    >
    >cntM3 VAR Word ' for position motor 3
    >
    >cntM4 VAR Word ' for position motor 4
    >
    >
    >
    >DIRC=0 ' make port C inputs
    >
    >old=INH ' read initial state of inputs
    >
    >
    >
    > SERIN 'GET the stop information for each motor from my Keyboard
    >and Display stamp
    >
    >
    >
    >' then start the 4 Motors
    >
    >
    >
    >
    >
    >decode:
    >
    > new=INH ' read new states from all 4 encoders, eight bits
    >
    >
    >
    > cntM1= (old.BIT0^new.BIT0*2-1)*(new.BIT0^old.BIT0)+cntM1
    >
    >'....................................................................
    >....................................
    >
    >'this lines are for Motor and switch control like
    >
    >'compare stop-value with cntM1, slow down the motor1, stop the motor1
    >
    >'check a lot of switches
    >
    >
    >
    > cntM2= (old.BIT1^new.BIT1*2-1)*(new.BIT1^old.BIT1)+cntM2
    >
    > cntM3= (old.BIT2^new.BIT2*2-1)*(new.BIT2^old.BIT2)+cntM3
    >
    > cntM4= (old.BIT3^new.BIT3*2-1)*(new.BIT3^old.BIT3)+cntM4
    >
    >
    >
    > old=new
    >
    >
    >
    >GOTO decode
  • ArchiverArchiver Posts: 46,084
    edited 2003-11-25 22:05
    Hi Tracy,

    Hi Randy



    Thanks for Your very helpful mail

    I still have some problems to understand completely Tracy's

    explanation.I have to take time to think it over.

    .........

    for the project with the 4 Motors I need a little bit faster decoding

    about 120 hz

    the Bs2p is properly not fast enough too ?



    on the USDicital page http://www.usdigital.com/products/ls7183-ls7184/



    I see the IC LS183 and LS184



    quadrature encoder to counter (up / down clk).

    quadrature encoder to counter (clk / direction).



    They look useful to add to the Stamp



    Do You have experience, or even sample code with this IC's ?



    Still I don't know if the Bs2p can count the pulses of

    4 of this IC's and compare the counts and stop the 4 Motors and check

    some switches between.



    It is difficult for me to imagine the needed time??



    An other project I started is to change the angel

    of an milling machine by an slow gear motor and an optical encoder

    speed about 50hz.

    I believe this could be to do with the Stamp2p ?

    starting with Tracy's pages

    http://www.emesystems.com/BS2fsm.htm#twobit%20encoder

    is really helpful



    Randy,

    do You like to send me an copy of Your encoder code,

    to collect some ideas for quicker coming up ?



    Heinz



    ................................................................................\
    ..





    In regards to the speed, I have done a quadrature encoder with a basic stamp
    and you would be very hard pressed to get the stamp to read accurately even at
    100Hz. I would say you need to keep the frequency around or below 75Hz.
    This was using a Basic Stamp 2 IC so the recommendation of using an SX with
    assembly would be a good suggestion.

    When I did the Basic Stamp 2, I found it would read from the encoder even a
    little over 100Hz but was missing at least half of the pulses as it could not
    process the incoming data fast enough.

    Another way you might want to try is using one of the encoder interface chips
    from U.S. Digital. Here are some links to their site: Home: <A
    HREF="http://www.usdigital.com/">Optical
    Encoders, Inclinometers & Motion Control Components @ US Digital</A>
    Page with IC's, interface chips: <A
    HREF="http://www.usdigital.com/products/ics.shtml">ICs (LSI Chips) @ US
    Digital</A>

    I hope this helps

    Randy Abernathy
    4626 Old Stilesboro Road
    Acworth, GA 30101
    Ph / Fax: 770-974-5295
    E-mail: cnc002@a...

    I furnish technical support, repair, and other related services for your
    industrial woodworking machinery. My background as Senior Service Engineer for
    the
    SCMI Group for nearly fifteen years with factory training, combines with my
    extensive background in electronics, mechanics, pneumatics, electrical and CNC
    machinery to offer you needed support for your machinery.




    Original Message

    From: Tracy Allen
    To: basicstamps@yahoogroups.com
    Sent: Monday, November 24, 2003 7:06 AM
    Subject: Re: [noparse][[/noparse]basicstamps] rotary encoder "ntM1=
    (old.BIT0^new.BIT0*2-1)*(new.BIT0^old.BIT0)+cntM1"


    >Hi
    >I like to control 4 gear motors for positioning , each motor with 2
    >sensors, I use as
    >A and B channel.
    >I would like to count the revolutions of each Motor
    >and for this I would like to use as less time as possible.
    >My hardware is not ready jet, I have no chance to test my programme parts,
    >but like to start programming, to find some basic ways.
    >On Tracy Allens Website I red about state machine.
    >My result is this line:
    >
    > cntM1= (old.BIT0^new.BIT0*2-1)*(new.BIT0^old.BIT0)+cntM1
    >
    >
    >
    >This line should do: (see a part of the program below)
    >1) to add one to my counter "cntM1" if the motor runs CW
    >2) to subtract one of my counter "cntM1" if the motor runs CCW
    >3) do nothing if there is no change from old state to new state
    >
    >****************************************************
    >is this line doing what I think ?
    >and if yes, is it working in the quickest way ?
    >****************************************************


    The direction of rotation is determined by the "cross terms", so it
    should read more like this:

    cntM1= (old.BIT0 ^ new.BIT1 * 2 - 1)*(new ^ old & 3 max 1) + cntM1

    By cross terms, I mean that bit 1 of the new reading is XORed with
    bit 0 of the old reading. That is, each time you read the state of
    the encoder, you pick up a new value of bit 0 from sensor A and bit 1
    from sensor B. That is the first term in the formula, and the result
    is either +1 or -1 for the two directions. That is contingent upon
    there having been any rotation at all, There has to have been a
    change in state between old and new. That is what the second term
    decodes, (new ^ old & 3 max 1), which is 1 if there is a change, zero
    otherwise. The &3 comes in because you are using bits 0 and 1 for
    sensors A and B. Multiplying the two terms together gives either
    0, or +1 or -1 as required, to add to the old value of the count.
    There is a diagram of the state transitions to show how the cross
    terms work, at this URL:

    http://www.emesystems.com/BS2fsm.htm#twobit%20encoder

    Here is another way to code it:
    IF new ^ old & 3 THEN
    SELECT old.BIT0 ^ new.BIT1
    CASE 0
    cntM1=cntM1-1
    CASE 1
    cntM1=cntM1+1
    ENDSELECT
    ENDIF


    cntM1= (old.BIT0 ^ new.BIT1 * 2 - 1) + cntM1

    That also makes the count conditional on there having been a change
    of state, then deciding which direction from the cross terms.

    I'm not sure what would be fastest. The web page above has an
    extension to four encoders where it processes the logic from all 4 in
    parallel. That speeds things up considerably. (I took a look at it
    and corrected a typo in tha program on the web page, and edited the
    explanation a bit). Be that as it may, the Stamp is not fast at
    doing all the steps, so it cannot keep up with encoders putting out
    any more than 100 Hertz, if that much. The same logic programmed in
    assembly in an SX could keep up with just about anything.

    -- Tracy




    >
    >
    >
    >the first phrase should add or subtract one
    >the result is 1 or -1 ??
    >the second multiple these "one" with zero or with one,
    >depending if there was a change between old and new state
    >
    >
    >
    >I don't know if I understand every thing correct ?
    >thanks for help or comment.
    >Heinz Germany
    >
    >
    >
    >
    >
    > '{$STAMP BS2p}
    >
    >
    >
    >' 4 encoders, signals on P8 thru P15 (by bit pairs)
    >
    >
    >
    >old VAR Nib ' previous state
    >
    >new VAR Nib ' current state
    >
    >
    >
    >cntM1 VAR Word ' for position motor 1
    >
    >cntM2 VAR Word ' for position motor 2
    >
    >cntM3 VAR Word ' for position motor 3
    >
    >cntM4 VAR Word ' for position motor 4
    >
    >
    >
    >DIRC=0 ' make port C inputs
    >
    >old=INH ' read initial state of inputs
    >
    >
    >
    > SERIN 'GET the stop information for each motor from my Keyboard
    >and Display stamp
    >
    >
    >
    >' then start the 4 Motors
    >
    >
    >
    >
    >
    >decode:
    >
    > new=INH ' read new states from all 4 encoders, eight bits
    >
    >
    >
    > cntM1= (old.BIT0^new.BIT0*2-1)*(new.BIT0^old.BIT0)+cntM1
    >
    >'....................................................................
    >....................................
    >
    >'this lines are for Motor and switch control like
    >
    >'compare stop-value with cntM1, slow down the motor1, stop the motor1
    >
    >'check a lot of switches
    >
    >
    >
    > cntM2= (old.BIT1^new.BIT1*2-1)*(new.BIT1^old.BIT1)+cntM2
    >
    > cntM3= (old.BIT2^new.BIT2*2-1)*(new.BIT2^old.BIT2)+cntM3
    >
    > cntM4= (old.BIT3^new.BIT3*2-1)*(new.BIT3^old.BIT3)+cntM4
    >
    >
    >
    > old=new
    >
    >
    >
    >GOTO decode

    To UNSUBSCRIBE, just send mail to:
    basicstamps-unsubscribe@yahoogroups.com
    from the same email address that you subscribed. Text in the Subject and Body
    of the message will be ignored.


    Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/



    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2003-11-26 07:53
    The program code on my web page that scans 4 encoders runs its loop
    on a BS2pe at 8 milliseconds per scan, or, on a BS2p, faster at 3.2
    milliseconds per scan.

    Oh, this is important, I took out the debug statement that shows the
    state of each counter. That serial output of course ate up a huge
    amount of time.

    So a BS2p could conceivably be dedicated to scan a set of encoders
    for a frequency up to about 300 Hertz, so long as it does not have to
    do anything else. Don't push it--it can not be allowed to miss any
    state changes. With a BS2p, it is not out of the question to scan at
    the 125 Hertz rate and still have time to test a couple more switches
    and to test the counts for a target value. Do look into the other
    chips though. All I had to use it for was a tide gage encoder, which
    moves slowly!

    -- Tracy



    http://www.emesystems.com/BS2fsm.htm


    >Hi Tracy,
    >
    >Hi Randy
    >
    >
    >
    >Thanks for Your very helpful mail
    >
    >I still have some problems to understand completely Tracy's
    >
    >explanation.I have to take time to think it over.
    >
    >.........
    >
    >for the project with the 4 Motors I need a little bit faster decoding
    >
    >about 120 hz
    >
    >the Bs2p is properly not fast enough too ?
    >
    >
    >
    >on the USDicital page http://www.usdigital.com/products/ls7183-ls7184/
    >
    >
    >
    >I see the IC LS183 and LS184
    >
    >
    >
    >quadrature encoder to counter (up / down clk).
    >
    >quadrature encoder to counter (clk / direction).
    >
    >
    >
    >They look useful to add to the Stamp
    >
    >
    >
    >Do You have experience, or even sample code with this IC's ?
    >
    >
    >
    >Still I don't know if the Bs2p can count the pulses of
    >
    >4 of this IC's and compare the counts and stop the 4 Motors and check
    >
    >some switches between.
    >
    >
    >
    >It is difficult for me to imagine the needed time??
    >
    >
    >
    >An other project I started is to change the angel
    >
    >of an milling machine by an slow gear motor and an optical encoder
    >
    >speed about 50hz.
    >
    > I believe this could be to do with the Stamp2p ?
    >
    >starting with Tracy's pages
    >
    >http://www.emesystems.com/BS2fsm.htm#twobit%20encoder
    >
    >is really helpful
    >
    >
    >
    >Randy,
    >
    >do You like to send me an copy of Your encoder code,
    >
    >to collect some ideas for quicker coming up ?
    >
    >
    >
    >Heinz
    >
    >
    >
    >.....................................................................
    >.............
    >
    >
    >
    >
    >
    >In regards to the speed, I have done a quadrature encoder with a basic stamp
    >and you would be very hard pressed to get the stamp to read accurately even at
    >100Hz. I would say you need to keep the frequency around or below 75Hz.
    >This was using a Basic Stamp 2 IC so the recommendation of using an SX with
    >assembly would be a good suggestion.
    >
    >When I did the Basic Stamp 2, I found it would read from the encoder even a
    >little over 100Hz but was missing at least half of the pulses as it could not
    >process the incoming data fast enough.
    >
    >Another way you might want to try is using one of the encoder interface chips
    >from U.S. Digital. Here are some links to their site: Home: <A
    >HREF="http://www.usdigital.com/">Optical
    >Encoders, Inclinometers & Motion Control Components @ US Digital</A>
    >Page with IC's, interface chips: <A
    >HREF="http://www.usdigital.com/products/ics.shtml">ICs (LSI Chips) @
    >US Digital</A>
    >
    >I hope this helps
    >
    >Randy Abernathy
    >4626 Old Stilesboro Road
    >Acworth, GA 30101
    >Ph / Fax: 770-974-5295
    >E-mail: cnc002@a...
    >
    >I furnish technical support, repair, and other related services for your
    >industrial woodworking machinery. My background as Senior Service
    >Engineer for the
    >SCMI Group for nearly fifteen years with factory training, combines with my
    >extensive background in electronics, mechanics, pneumatics, electrical and CNC
    >machinery to offer you needed support for your machinery.
    >
    >
    >
    >
    >
    Original Message
    >
    > From: Tracy Allen
    > To: basicstamps@yahoogroups.com
    > Sent: Monday, November 24, 2003 7:06 AM
    > Subject: Re: [noparse][[/noparse]basicstamps] rotary encoder "ntM1=
    >(old.BIT0^new.BIT0*2-1)*(new.BIT0^old.BIT0)+cntM1"
    >
    >
    > >Hi
    > >I like to control 4 gear motors for positioning , each motor with 2
    > >sensors, I use as
    > >A and B channel.
    > >I would like to count the revolutions of each Motor
    > >and for this I would like to use as less time as possible.
    > >My hardware is not ready jet, I have no chance to test my programme parts,
    > >but like to start programming, to find some basic ways.
    > >On Tracy Allens Website I red about state machine.
    > >My result is this line:
    > >
    > > cntM1= (old.BIT0^new.BIT0*2-1)*(new.BIT0^old.BIT0)+cntM1
    > >
    > >
    > >
    > >This line should do: (see a part of the program below)
    > >1) to add one to my counter "cntM1" if the motor runs CW
    > >2) to subtract one of my counter "cntM1" if the motor runs CCW
    > >3) do nothing if there is no change from old state to new state
    > >
    > >****************************************************
    > >is this line doing what I think ?
    > >and if yes, is it working in the quickest way ?
    > >****************************************************
    >
    >
    > The direction of rotation is determined by the "cross terms", so it
    > should read more like this:
    >
    > cntM1= (old.BIT0 ^ new.BIT1 * 2 - 1)*(new ^ old & 3 max 1) + cntM1
    >
    > By cross terms, I mean that bit 1 of the new reading is XORed with
    > bit 0 of the old reading. That is, each time you read the state of
    > the encoder, you pick up a new value of bit 0 from sensor A and bit 1
    > from sensor B. That is the first term in the formula, and the result
    > is either +1 or -1 for the two directions. That is contingent upon
    > there having been any rotation at all, There has to have been a
    > change in state between old and new. That is what the second term
    > decodes, (new ^ old & 3 max 1), which is 1 if there is a change, zero
    > otherwise. The &3 comes in because you are using bits 0 and 1 for
    > sensors A and B. Multiplying the two terms together gives either
    > 0, or +1 or -1 as required, to add to the old value of the count.
    > There is a diagram of the state transitions to show how the cross
    > terms work, at this URL:
    >
    > http://www.emesystems.com/BS2fsm.htm#twobit%20encoder
    >
    > Here is another way to code it:
    > IF new ^ old & 3 THEN
    > SELECT old.BIT0 ^ new.BIT1
    > CASE 0
    > cntM1=cntM1-1
    > CASE 1
    > cntM1=cntM1+1
    > ENDSELECT
    > ENDIF
    >
    >
    > cntM1= (old.BIT0 ^ new.BIT1 * 2 - 1) + cntM1
    >
    > That also makes the count conditional on there having been a change
    > of state, then deciding which direction from the cross terms.
    >
    > I'm not sure what would be fastest. The web page above has an
    > extension to four encoders where it processes the logic from all 4 in
    > parallel. That speeds things up considerably. (I took a look at it
    > and corrected a typo in tha program on the web page, and edited the
    > explanation a bit). Be that as it may, the Stamp is not fast at
    > doing all the steps, so it cannot keep up with encoders putting out
    > any more than 100 Hertz, if that much. The same logic programmed in
    > assembly in an SX could keep up with just about anything.
    >
    > -- Tracy
    >
    >
    >
    >
    > >
    > >
    > >
    > >the first phrase should add or subtract one
    > >the result is 1 or -1 ??
    > >the second multiple these "one" with zero or with one,
    > >depending if there was a change between old and new state
    > >
    > >
    > >
    > >I don't know if I understand every thing correct ?
    > >thanks for help or comment.
    > >Heinz Germany
    > >
    > >
    > >
    > >
    > >
    > > '{$STAMP BS2p}
    > >
    > >
    > >
    > >' 4 encoders, signals on P8 thru P15 (by bit pairs)
    > >
    > >
    > >
    > >old VAR Nib ' previous state
    > >
    > >new VAR Nib ' current state
    > >
    > >
    > >
    > >cntM1 VAR Word ' for position motor 1
    > >
    > >cntM2 VAR Word ' for position motor 2
    > >
    > >cntM3 VAR Word ' for position motor 3
    > >
    > >cntM4 VAR Word ' for position motor 4
    > >
    > >
    > >
    > >DIRC=0 ' make port C inputs
    > >
    > >old=INH ' read initial state of inputs
    > >
    > >
    > >
    > > SERIN 'GET the stop information for each motor from my Keyboard
    > >and Display stamp
    > >
    > >
    > >
    > >' then start the 4 Motors
    > >
    > >
    > >
    > >
    > >
    > >decode:
    > >
    > > new=INH ' read new states from all 4 encoders, eight bits
    > >
    > >
    > >
    > > cntM1= (old.BIT0^new.BIT0*2-1)*(new.BIT0^old.BIT0)+cntM1
    > >
    > >'....................................................................
    > >....................................
    > >
    > >'this lines are for Motor and switch control like
    > >
    > >'compare stop-value with cntM1, slow down the motor1, stop the motor1
    > >
    > >'check a lot of switches
    > >
    > >
    > >
    > > cntM2= (old.BIT1^new.BIT1*2-1)*(new.BIT1^old.BIT1)+cntM2
    > >
    > > cntM3= (old.BIT2^new.BIT2*2-1)*(new.BIT2^old.BIT2)+cntM3
    > >
    > > cntM4= (old.BIT3^new.BIT3*2-1)*(new.BIT3^old.BIT3)+cntM4
    > >
    > >
    > >
    > > old=new
    > >
    > >
    > >
    > >GOTO decode
    >
    > To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    > from the same email address that you subscribed. Text in the
    >Subject and Body of the message will be ignored.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    >
    >
    >[noparse][[/noparse]Non-text portions of this message have been removed]
    >
    >
    >To UNSUBSCRIBE, just send mail to:
    > basicstamps-unsubscribe@yahoogroups.com
    >from the same email address that you subscribed. Text in the
    >Subject and Body of the message will be ignored.
    >
    >
    >Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Sign In or Register to comment.