bs2p and pulsout
Hi,
I am making a robot and have just changed the BS2 for a BS2P. Most
things seem OK except for the servos, which used to move backwards or
forwards, but now just move backwards. I've read that the BS2 has
different pulsout requirements, but I'm struggling to understand the
documentation. My servo subroutine is
p_out3:
pulsout 2, (left * 5)
pulsout 3, (right * 5)
pause 20
return
Could someone please explain how to update this routine for the BS2P?
thanks
James
I am making a robot and have just changed the BS2 for a BS2P. Most
things seem OK except for the servos, which used to move backwards or
forwards, but now just move backwards. I've read that the BS2 has
different pulsout requirements, but I'm struggling to understand the
documentation. My servo subroutine is
p_out3:
pulsout 2, (left * 5)
pulsout 3, (right * 5)
pause 20
return
Could someone please explain how to update this routine for the BS2P?
thanks
James
Comments
>
>Hi,
>
>I am making a robot and have just changed the BS2 for a BS2P. Most
>things seem OK except for the servos, which used to move backwards or
>forwards, but now just move backwards. I've read that the BS2 has
>different pulsout requirements, but I'm struggling to understand the
>documentation. My servo subroutine is
>
>p_out3:
>pulsout 2, (left * 5)
>pulsout 3, (right * 5)
>pause 20
>return
>
>Could someone please explain how to update this routine for the BS2P?
>
>thanks
>
>James
>
The BS2 pulsout time is measured in increments of 2us, the BS2P
pulsout is measured in increments of 0.75us. Therefore to convert the
old BS2 pulsout times to the BS2P you must multiply all the original
pulsout times by 2.66
So you would change the above program to look like this:
p_out3:
pulsout 2, (left * 5) * 2.66
pulsout 3, (right * 5) * 2.66
pause 20
return
__________________________________________________________________
Get your free Australian email account at http://www.start.com.au
integers with the stamp? I tried your modifications, but now get an
error.
James
--- In basicstamps@y..., J 1 <plugger2@s...> wrote:
> Original message from: "jes_coupe" <jes_coupe@y...>
> >
> >Hi,
> >
> >I am making a robot and have just changed the BS2 for a BS2P. Most
> >things seem OK except for the servos, which used to move backwards
or
> >forwards, but now just move backwards. I've read that the BS2 has
> >different pulsout requirements, but I'm struggling to understand
the
> >documentation. My servo subroutine is
> >
> >p_out3:
> >pulsout 2, (left * 5)
> >pulsout 3, (right * 5)
> >pause 20
> >return
> >
> >Could someone please explain how to update this routine for the
BS2P?
> >
> >thanks
> >
> >James
> >
>
>
> The BS2 pulsout time is measured in increments of 2us, the BS2P
> pulsout is measured in increments of 0.75us. Therefore to convert
the
> old BS2 pulsout times to the BS2P you must multiply all the original
> pulsout times by 2.66
>
> So you would change the above program to look like this:
>
> p_out3:
> pulsout 2, (left * 5) * 2.66
> pulsout 3, (right * 5) * 2.66
> pause 20
> return
>
>
>
>
>
>
>
>
>
>
>
> __________________________________________________________________
> Get your free Australian email account at http://www.start.com.au
>
>Thanks -- that's clear, but I thought you could only use whole
>integers with the stamp? I tried your modifications, but now get an
>error.
>
>James
>
I realized my mistake just after I sent the email. I haven't explored
the specifics of maths on the basic stamp, but I think you are right
about the integer limitation. The easiest way I can think of to
convert the program is to do the calculations outside of the stamp
with a calculator, then round off the results to the nearest whole
number, and then just stick those values into the program manually.
So this:
p_out3:
pulsout 2, (left * 5)
pulsout 3, (right * 5)
pause 20
return
Will become this (if the 5 is of no special importance):
p_out3:
pulsout 2, (left * 13)
pulsout 3, (right * 13)
pause 20
return
I believe their is another way, which would be useful if the
calculations must be done "on th fly" during runtime. You could move
the decimal place, so 2.66 becomes 266, you multiply everything by 266
then divide the result by 100. Which is just a round about way of
multiplying by 2.66
I hope that helps.
Paul Lugger
>
>--- In basicstamps@y..., J 1 <plugger2@s...> wrote:
>> Original message from: "jes_coupe" <jes_coupe@y...>
>> >
>> >Hi,
>> >
>> >I am making a robot and have just changed the BS2 for a BS2P. Most
>> >things seem OK except for the servos, which used to move backwards
>or
>> >forwards, but now just move backwards. I've read that the BS2 has
>> >different pulsout requirements, but I'm struggling to understand
>the
>> >documentation. My servo subroutine is
>> >
>> >p_out3:
>> >pulsout 2, (left * 5)
>> >pulsout 3, (right * 5)
>> >pause 20
>> >return
>> >
>> >Could someone please explain how to update this routine for the
>BS2P?
>> >
>> >thanks
>> >
>> >James
>> >
>>
>>
>> The BS2 pulsout time is measured in increments of 2us, the BS2P
>> pulsout is measured in increments of 0.75us. Therefore to convert
>the
>> old BS2 pulsout times to the BS2P you must multiply all the
original
>> pulsout times by 2.66
>>
>> So you would change the above program to look like this:
>>
>> p_out3:
>> pulsout 2, (left * 5) * 2.66
>> pulsout 3, (right * 5) * 2.66
>> pause 20
>> return
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> __________________________________________________________________
>> Get your free Australian email account at http://www.start.com.au
>
>
>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/
>
>
>.
>
__________________________________________________________________
Get your free Australian email account at http://www.start.com.au
reading the wrong thing? This would yield a conversion factor of 1.69.
[noparse][[/noparse]Non-text portions of this message have been removed]
>
>My manual quotes the time period for the BS2P as 1.18us, not .75us.
Am I
>reading the wrong thing? This would yield a conversion factor of
1.69.
>
>
>[noparse][[/noparse]Non-text portions of this message have been removed]
>
>
Which manual is that? I'm looking at the manual that comes with Stamp
Editor v1.31. If you type "pulsout" in the main editor window,
highlight it, and then press F1 it gives you are short description of
the command which states 0.75us for the BS2P.
Paul Lugger
__________________________________________________________________
Get your free Australian email account at http://www.start.com.au
Basic Stamp Manual ver 2.0c, the timing for the BS2p for PULSIN is 0.75 us,
where the timing for the PULSOUT is 1.18 us. I'm not sure why there is a
difference. I just noticed it.
Perhaps Jon Williams could shed some light on this.
Don
Original Message
From: "J 1" <plugger2@s...>
To: <basicstamps@yahoogroups.com>
Sent: Friday, May 17, 2002 5:55 PM
Subject: Re: [noparse][[/noparse]basicstamps] bs2p and pulsout
> Original message from: j71950@a...
> >
> >My manual quotes the time period for the BS2P as 1.18us, not .75us.
> Am I
> >reading the wrong thing? This would yield a conversion factor of
> 1.69.
> >
> >
> >[noparse][[/noparse]Non-text portions of this message have been removed]
> >
> >
>
> Which manual is that? I'm looking at the manual that comes with Stamp
> Editor v1.31. If you type "pulsout" in the main editor window,
> highlight it, and then press F1 it gives you are short description of
> the command which states 0.75us for the BS2P.
>
>
> Paul Lugger
>
>
> __________________________________________________________________
> Get your free Australian email account at http://www.start.com.au
>
>
> 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/
>
>
>
BS2 is 2 microseconds and 1.18 microseconds for a BS2P. Try multiplying your
current values by about 1.7 and see what happens.
Original Message
> I am making a robot and have just changed the BS2 for a BS2P. Most
> things seem OK except for the servos, which used to move backwards or
> forwards, but now just move backwards. I've read that the BS2 has
> different pulsout requirements, but I'm struggling to understand the
> documentation. My servo subroutine is
>
> p_out3:
> pulsout 2, (left * 5)
> pulsout 3, (right * 5)
> pause 20
> return
>
> Could someone please explain how to update this routine for the BS2P?
Yes, my online documentation is the same as yours. I originally looked in my
hardcopy manual, Version 2.0c, and it states 1.18us for the BS2P?????? Don't
know which is right, but it is substantial difference, almost 60%.
Jim
[noparse][[/noparse]Non-text portions of this message have been removed]
next print run. We're sorry for the confusion.
-- Jon Williams
-- Parallax
In a message dated 5/18/02 3:33:35 PM Central Daylight Time, j71950@a...
writes:
> Yes, my online documentation is the same as yours. I originally looked in
> my
> hardcopy manual, Version 2.0c, and it states 1.18us for the BS2P??????
> Don't
>
[noparse][[/noparse]Non-text portions of this message have been removed]
0.75 us, NOT 1.18 us, correct? I want to pencil it in my manual.
Don
Original Message
From: <jonwms@a...>
To: <basicstamps@yahoogroups.com>
Sent: Saturday, May 18, 2002 1:36 PM
Subject: Re: [noparse][[/noparse]basicstamps] bs2p and pulsout
> The online documentation is correct. The manual will be corrected on the
> next print run. We're sorry for the confusion.
>
> -- Jon Williams
> -- Parallax
>
> In a message dated 5/18/02 3:33:35 PM Central Daylight Time,
j71950@a...
> writes:
>
>
> > Yes, my online documentation is the same as yours. I originally looked
in
> > my
> > hardcopy manual, Version 2.0c, and it states 1.18us for the BS2P??????
> > Don't
> >
>
>
>
>
> [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/
>
>
>
In a message dated 5/18/02 4:02:17 PM Central Daylight Time,
renegade.engineer@v... writes:
> Just so I know for sure, the correct timing for PULSOUT for the BS2p is
> 0.75 us, NOT 1.18 us, correct?
[noparse][[/noparse]Non-text portions of this message have been removed]