PDA

View Full Version : hb25 control of speed, direction,and time



Let's Go!
11-25-2009, 06:13 PM
the direction and time of the hb25 is controlled with the for index...next command and the pulsout hb25, 750 (+ or -) index. but how does one control the run·time·w/o affecting the speed?

i.e. how would you command the hb25 to operate the motor slowly, but for a predictable long period of time?

the examples given include ramping up and down for smoother control.

e.g., the for index = 1 to 250 will bring the motor a fast speed and long run time, whereas 1 to 50 will operate the motor slowly, but only for a short time.

thanks for your thoughts

































































































































▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The smarter I get, the more I understand I don't know!

stamptrol
11-25-2009, 09:50 PM
Generally, you would adjust the speed and watch the time in two separate subroutines.

Attach the code you've tried and you'll get more concrete suggestions.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tom Sisk

http://www.siskconsult.com
·

Let's Go!
11-26-2009, 06:17 PM
tom, here is a snippet of the hb25 code. thanks




PAUSE 20
FOR index = 0 TO 50····· 'ramp up,do this routine until pin 3 goes high, 2" per move
PULSOUT turntable, 750 - index······· 'R to Left, reverse index, short moves
PAUSE 20
NEXT
PAUSE 20
FOR index = 50 TO 0········ 'ramp down, then make pin 3 decision below
PULSOUT turntable, 750 - index
PAUSE 20
NEXT
DEBUG ? IN3····· 'will indicate 0 or 1 on pin 3, must run to get debug screen
IF (IN3 = 1) THEN GOSUB reset·· 'after above routine, if pin 3 = 1 then goto reset:
DEBUG ? IN3
PAUSE 30
·GOTO main············· 'otherwise goto main and move tt another 2" to position tt


▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The smarter I get, the more I understand I don't know!

stamptrol
11-26-2009, 07:56 PM
So, turn to the left; turn to the right; if p3 is active then reset. Otherwise, go back to the beginning.

Judging from the PAUSE length this will repeat every couple of seconds.

Don't quite see where:
"e.g., the for index = 1 to 250 will bring the motor a fast speed and long run time, whereas 1 to 50 will operate the motor slowly, but only for a short time."

What's p3?, what does reset do? is this code "main"? How are you measuring the 2"?

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tom Sisk

http://www.siskconsult.com
·

Let's Go!
11-26-2009, 08:20 PM
tom, i found the answer to my question on page 139 of the robotics with the boe bot manual. the answer is to maintain a certain speed the code is as follows:

'continue forward for 200 pulses at same speed

for pulscount = 1 to 200··· 'sends 200 pulses

pulsout 13, 770·· '200 pulses at "slow" speed, vs 850 which is near·"fastest" speed

pause 20

next



thanks for your time

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
The smarter I get, the more I understand I don't know!