Servos and multi-tasking
Archiver
Posts: 46,084
I am controlling only the aeleron servo on a simple model airplane
in a windtunnel with a BS2. I need the BS2 to listen to the position
of the pot on the joystick, determines the value it needs to send to
the servo using the pulseOut command (I think)and turn on some
indicator LED's on the board itself for troubleshooting purposes
It is that simple! But the questions is can the BS2 handle this low
level of multi-tasking and keep feeding the servo a clean enough pulse
train? (assuming of course an efficeintly written program)
By the wasy, why is it so hard for Parallax to come up with a stamp
that can handle multi-tasking? The stamp will be extremely
useful! Oopic can do it!!
Al Najjar
in a windtunnel with a BS2. I need the BS2 to listen to the position
of the pot on the joystick, determines the value it needs to send to
the servo using the pulseOut command (I think)and turn on some
indicator LED's on the board itself for troubleshooting purposes
It is that simple! But the questions is can the BS2 handle this low
level of multi-tasking and keep feeding the servo a clean enough pulse
train? (assuming of course an efficeintly written program)
By the wasy, why is it so hard for Parallax to come up with a stamp
that can handle multi-tasking? The stamp will be extremely
useful! Oopic can do it!!
Al Najjar
Comments
you'd only have to make your measurement and send new commands to the
PAK-VIII. You could do the measurements with a PAK-VII but you could
probably just do it with the Stamp anyway.
Multitasking is not always a good thing in the main processor. When you
multitask you add elements of uncertainty that can catch the unwary. After
all, very few computers actually perform multiple tasks simultaneously. They
simulate multiple tasks simultaneously which is all you can do with one CPU.
So if I say on the Stamp:
HIGH 1
PAUSE 100
LOW 1
I can compute with a fair degree of certainly how long that output pulse
will be (over 100mS because of instruction overhead, but that overhead is a
constant).
In a multitasking system writing code like this is not predictable unless
you use cooperative multitasking, shut down the multitasking system
(critical section), or you manipulate a task priority, use a system timer,
etc. I'm not saying you can't do it, I'm saying it adds a level of
complexity. The Stamp is supposed to be simple -- that's it great strength.
Even on systems that simulate multiple tasks, the coprocessor approach is
still very useful since it actually performs multiple tasks at once and
asynchronously.
Regards,
Al Williams
AWC
* Control 8 servos at once
http://www.al-williams.com/awce/pak8.htm
>
Original Message
> From: brownstamp@y... [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=WxAOT4X3uqQIyxHI8Tuc_Wk0gS8Ne3ztOP53vIO7iVBwY_84M7pzQMzzh5O2L8h96Qk2Vfb_amM0LLk]brownstamp@y...[/url
> Sent: Wednesday, September 05, 2001 9:35 AM
> To: basicstamps@yahoogroups.com
> Subject: [noparse][[/noparse]basicstamps] Servos and multi-tasking
>
>
> I am controlling only the aeleron servo on a simple model airplane
> in a windtunnel with a BS2. I need the BS2 to listen to the position
> of the pot on the joystick, determines the value it needs to send to
> the servo using the pulseOut command (I think)and turn on some
> indicator LED's on the board itself for troubleshooting purposes
>
> It is that simple! But the questions is can the BS2 handle this low
> level of multi-tasking and keep feeding the servo a clean enough pulse
> train? (assuming of course an efficeintly written program)
>
> By the wasy, why is it so hard for Parallax to come up with a stamp
> that can handle multi-tasking? The stamp will be extremely
> useful! Oopic can do it!!
>
> Al Najjar
>
>
> 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/
>