hB25 and bs2sx
Hello All,
I'm using the code provided in the manual of the HB25 however the code is written for a bs2, I'm trying to use it with a bs2sx does anybody know what i need to change in the code. I tried changing the constant of 750 to 1875 since the bs2sx is 2.5 times faster than the bs2. Is thos correct or is there something else i need to change.
I'm using the code provided in the manual of the HB25 however the code is written for a bs2, I'm trying to use it with a bs2sx does anybody know what i need to change in the code. I tried changing the constant of 750 to 1875 since the bs2sx is 2.5 times faster than the bs2. Is thos correct or is there something else i need to change.
Comments
That, or look in the manual. Personally, I call these basic units a "tick size".
For instance, in PULSOUT, the BS2 'plain' "tick size" is 2 uSec. You're specifying the output pulse width in 2 uSec 'units', or 'ticks'.
So, 'tick size' varies for the following commands:
SERIN/SEROUT, PULSIN/PULSOUT, RCTIME. I'm not sure if COUNT depends on the 'tick size' or not.
Idealy 1875 should stop the motor but adjustments may be needed.
1875<x<2500 should cause the motor to run in the forward direction
1250<x<1875 should cause the motor to run in the reverse direction
When using the bs2sx, Pulsout generates a pulse with a duration of 0.8 us = unit of duration.
The spec for the HB25 state that
1.0 ms = full speed reverse
1.5 ms = stop
2.0 ms = full speed forward
To find the required number of units of durations use the following conversion
(desired time in ms) * 1000/(unit of duration) = required unit duration
Example for the case of bs2sx with pulsout unit of duration = 0.8
1.7*1000/0.8 = 1.7*1250 = 2125
2125 is the value that youwould use in the pulsout command
or 750 * 25 / 10
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Problems are the "roads" of life,
solutions are only "onramps" to the next problem
············································· "Brad Smith"
Post Edited (Warrlok) : 3/3/2007 7:29:45 PM GMT