Requesting Sample Coding for the PSC
gr8_big_geek
Posts: 34
Greetings,
I recently purchased the Parallax Servo Controller (PSC) and have gone through the downloadable PDF file about it and used the sample code it has there. The only problem is that it never shows how to programically use multiple servos at one time (which was the reason for the purchase in the first place). It only shows how to operate one servo at one time.
One thing I·believe that is totally awesome is that your motor does hold in·its place REALLY well. You say go to 9 O' clock and it goes there AND STAYS! The total bumber is when you try·and have motor two go to say, 3 O' clock and stay, nothing happens, the motor never·engages.
Either·way, any help you could provide would be most useful. I have attached my sample program to this as well.
Thank you in advance!
Your geek~
I recently purchased the Parallax Servo Controller (PSC) and have gone through the downloadable PDF file about it and used the sample code it has there. The only problem is that it never shows how to programically use multiple servos at one time (which was the reason for the purchase in the first place). It only shows how to operate one servo at one time.
One thing I·believe that is totally awesome is that your motor does hold in·its place REALLY well. You say go to 9 O' clock and it goes there AND STAYS! The total bumber is when you try·and have motor two go to say, 3 O' clock and stay, nothing happens, the motor never·engages.
Either·way, any help you could provide would be most useful. I have attached my sample program to this as well.
Thank you in advance!
Your geek~
' {$STAMP BS2} ' {$PBASIC 2.5} counter VAR Word ch VAR Byte pw VAR Word ra VAR Byte Sdat CON 0 baud CON 396 '----------------------(Elbow Motor Control)---------------------------------- ra = 7 ch = 0 pw = 900 SEROUT Sdat, Baud+$8000,[noparse][[/noparse]"!SC", ch, ra, pw.LOWBYTE, pw.HIGHBYTE, CR] PAUSE 1000 pw = 250 SEROUT Sdat, Baud+$8000,[noparse][[/noparse]"!SC", ch, ra, pw.LOWBYTE, pw.HIGHBYTE, CR] PAUSE 1000 'I need this motor to stay right here and then the next command to begin... '-----------------------(Wrist Motor Control)--------------------------------- ra = 7 ch = 2 pw = 1000 SEROUT Sdat, Baud+$8000,[noparse][[/noparse]"!SC", ch, ra, pw.LOWBYTE, pw.HIGHBYTE, CR] PAUSE 1000 pw = 200 SEROUT Sdat, Baud+$8000,[noparse][[/noparse]"!SC", ch, ra, pw.LOWBYTE, pw.HIGHBYTE, CR] PAUSE 1000 'only nothing is happening. I have checked and rechecked all of my connections. 'each motor works independantly, just not together on the same program.
Comments
Jeff T.
Either way, I'm grateful for your time and you have been a wonderful help in my process toward robotic automation! [noparse]:)[/noparse]
gr8_big_geek