i have some question from this link
in this link there are some sample of programming for SSC-32 that i can’t under stand what is the command that the writer use in it exactly. for example:
1-what is the serout command?
2-what is the 15 & 6 in first row? and what are they showing?
3-what is the 13 in first row ?
4-how can write the programme with infinite loop, ( I mean , I want to write the programme that change the position of one servo for example from 1000 to 1500 infinintly)?
Since you mention this specific link, I am assuming you have a basic stamp 2 microcontroller connected to a SSC-32 servo controller with an apprioprate wire on IO pin 15 of the microcontroller.
Ther serout command is a basic command that says to do serial output on IO pin 15, using baud mode 6, which I would have to look up the calculation in the BS2 owners guide, but I think it is 38.4K. The end of the serout has a 13 which is a carrage return, which is needed to end each command going to an ssc-32
You could do something like:
base var word
start:
for base = 1000 to 1500 step 50
serout 15,6 #10 P",dec base, 13]
pause 100
next
goto start
Please note, I simply typed this in, so there may be problems with it, also I have not done very much BS2 programming… But hopefully this will help some.
If you look at the BS2 manual, you will find that baud mode is defined something like:
BaudMode = (1,000,000/BaudRate) - 20
Which if you do the math comes out to the 384k. However if you have one of the newer high speed Basic stamps, than the calculation is:
BaudMode = (2,500,000/BaudRate) - 20
I am so tankful for your information.
It was so useful.
I am studing mechanical Eng. and I jast start in robotic for couple of days. so I have a very basic knowledge in this field.
I start a project in this field and I design and make a robot with 6 axis and I use the standard servo and SSC-32 controller to make It. I can control the robot by computer(Lynx SSC-32 Terminal).my goal is to write a world for example “A” with my robot.
I need to programme my robot to go to different position and back.
my problem is that when I write a programme like below:
the robot just do the last line of my programe and skip the first line.
another thing that i want to say is, I cant write the programe whit a loop.
because during my project i need to make a loop for my position , for example:
1 P 1500 # 2 p 1500 # 3 P 1500 T 1000
for i= 1 : 5
1P 750 s 1000
1P 2000 s 1000
3P 1000 S 2000
i= i+1
end
but i don’t know exactly how can i write it for SSC-32 controller.
The ssc-32 does not have any built in delays between sequential commands. If you need a pause between servo movements, you have to include the pause in the program that is sending commands to the ssc-32.
edit: below is a simple batch file that demonstrates how you need to put a pause between commands to a servo so that the movements are distinct. You would need to adjust for your servo number, baud rate and com port number.
Hi
I used from your programme that you sent me.
can you tell me more about it.
for example
How do you write it?(which programme you use )
can you intorduce for me in detail what is each part for example:
"@echo off " prevents displaying the sent commands in the console window
“mode com8:9600,N,8,1 >nul” Sets the serial port communication values for comport 8. The “>nul” prevents the display of the returned info in the console window.
“echo #0P2200 >com8” sends #0P2200 to comport 8.
“ping -n 2 127.0.0.1 >nul” is a simple way to delay the execution of the batch file using the “ping” network function. The “-n 2” in the line will cause a 1 second delay. Replacing the “2” with “13” will cause a 12 second delay (desired delay in seconds + 1). Note that you have to use “.” in the programming as “,” is a different character and will not work.