Automatic operation

I tried to use RIOS to do one thing repetitively but it’s not a very clear or intuitive program if one hasn’t used it before.

This is what I want to command the robot arm to do:

  1. move only one motor to a fixed, static position over 5 seconds
  2. move the same motor to another fixed, static position over 5 seconds
  3. go to step (1)

That’s all!

I can control the robot via Hyperterminal and issue the commands:

#1 P1100 T5000 to move it up where I require

then

#1 P750 T5000 to move it back to the required down position.

In this application the arm needs to move only to two positions, position 1100 and position 750, that is all.

But I need this to happen without operator input, to run completely automatically upon computer startup, so it has to be in the form of a file or something that Windows can grab from the “startup” folder.

I’m using only this one motor for this one function, everything else has been disconnected and the robot stripped and mechanically locked (because for what I’m using it for there is too much play in the servos to leave it un-locked).

Please suggest a path to solve this…

Programming through RIOS (how to do it???)?

Or please suggest how to automate a script within Hyperterminal or some other solution?

Shareware perhaps?

Thanks!

Is this for an arm? If your only moving one servo… Maybe you only need a Bot Board to tell the SSC-32 what to do. This wouldn’t require RIOS or even a PC once the Bot Board is programmed. In fact you wouldn’t even need the SSC-32 unless you need the ease of control using the timed move command…

That’s true, as long as the controller sees the data it requires, it shouldn’t matter whether it’s a toaster or a toad talking to it.

Heck, if it were possible at my end, I wouldn’t mind seeing the controller be dedicated to just lifting and dropping the arm (yup just one motor).

But instead of throwing money at the problem (by buying a Bot board), I have to use what I have on-hand (an old P3, a couple of old 486’s).

Is there anyway to script ASCII text out of the serial port, to include a time delay in the script? Maybe some kind of BASIC compiler or something even?

The P3 I’ve got has XP on it and I can put DOS on the 486’s.

It sounds to me that you need a higher programming language, if you want to control your arm from the PC.

VBE, C#, Java, J#, etc… all make serial communication very simple.

I’d write you a program to do what you want, but you’d have to have the .NET framework installed on your computer for it to work, since I use VBE (Visual Basic Express).

There’s free command line copies of most languages online.

In VBE, serial communication is very easy:
(1) Drag a “Serial Port” control into the application’s form.
(2) Click on the “Properties” box and set the serial port up for the usual settings (115200 baud, 8 bits, no parity, 1 stop bit, no flow control).
(3) Type this into your form’s code:

SerialPort.Open() Do SerialPort.Write("#1 P1100 T5000" & VbCrLf) System.Thread.Threading.Sleep(5000) SerialPort.Write("#1 P750 T5000" & VbCrLf) System.Thread.Threading.Sleep(5000) Until SerialPort.Close()

The “Do” and “Until” create a loop that repeats itself (resends your directions infinitely).
The “System.Thread.Threading.Sleep(5000)” garbage just tells your computer to wait for five seconds in between sending the instructions.
This isn’t exactly necessary, but, since the SSC-32 will only be free every 5 seconds, this will avoid a build-up of instructions in the SSC-32’s queue.
The “VbCrLf” is the VBE equivalent of pressing enter, or the LynxTerm equivalent of “”.

Yes this is precisely what I had in mind yesterday, we have to write a program of some kind - even just BASIC - to make this thing do what we need.

It’s been years since I’ve programmed anything but I think I still remember some BASIC.

Is there actually a “BASIC” language?
Perhaps you mean QBASIC (an MS-DOS language developped by Microsoft about a decade ago).
Or PBASIC (the language that Basic Stamp microcontrollers are coded with)?

There’s a lot of derivatives of the “BASIC” ideology, but I don’t think that any of them claim that name (then again… I’ve only been programming for about half a year :unamused:).

If you’re thinking about using QBASIC for this, I might be able to help.
Lemme go check and see if QBASIC has any way to talk to a serial port.

Hmmm… it seems that it does.

One of the nice things (some would say the only nice thing, hehe) about QBASIC is that it’s free.
So, you can download it anywhere (google will serve you well).

The only problem is… Microsoft has discontinued much support for QB in their Windows XP.
So, if you’ve got a later version of Windows (95 or earlier), you’re all set.
If not, ask the guys on the QB forums how to make it work with XP (www.qbasic.com/ then click on “new forums”).

This is a group of threads that pertain to what you’re trying to do:
qbasic.com/wbb/search.php?search … fede701a34

This one should be especially helpful:
qbasic.com/wbb/thread.php?thread … fede701a34

Feel free to ask if you run into a jam.
I don’t remember much about QB, since I took the class last spring, but I should be able to point you in the right direction.

Yes Veronica, there is (was) a real BASIC. :stuck_out_tongue:
Nick, if you are about the age I believe you to be then it predates your time significantly. Heh. I do not remember its origins exactly but it predates the apple computers, and actually even what were initially considered the mini-computer in general. The earliest recollection I have of it is writing/playing sub-hunt on a DEC PDP-9 via teletype and keypunch, that was around 1981 or so, and those were not really new machines. Anyway, it was enough of a progamming staple that the original IBM PC had most of its core stored in ROM. When others started making PC Clones they came up with GW-BASIC which was a stand alone version. I don’t remember quick basic per-se until MS-DOS 4 or so came along, and I think the original versions of that still required line numbers. :wink:

Here, I found this fys.ruu.nl/~bergmann/history.html

No, Qbasic did not require line numbers.

I saw a TV show on the history of computers, and way back in the early years, one of the first computers was a box with no keyboard, no mouse, no nothing. All it had was several switches on the out side. The invention of the operating system was to make programming these boxes a lot easier. The earliest operating systems were designed to interface humans with the hardware basically, making switch toggling obsolete. From there came many other advances including the ever popular GUI user interface, all designed to make hardware access easier.

In a nut shell, that’s what I remember from the show. :laughing:

It looks like the IBM 5100 portable compter was among the earliest computer just before the video monitor for these machines.

Cost: $19,000 - $20,000

Uhm, he may be right.

In the version of QB that I used to use (7, I think) having line numbers was a selectable option (defaults to not having line numbers).
While that’s no definite proof, it seems to indicate that at one point, it was mandatory.

in the late 1970s, I had an Ohio Scientific Challenger 1-P computer, which could be programmed in your choice of machine code or BASIC, which supported all of 18 different commands (or maybe it was 21), and the entire computer was probably less powerful than a Basic Stamp 2. Line numbers were required, and they were usually used in increments of at least 10, because the only way to insert code between existing lines was to use a line number in between the existing ones, or to rewrite whole blocks of code (they hadn’t figured out the ‘renum’ command yet). You could enter commands directly, without line numbers, but they would be executed immediately upon hitting the key.

When we got the Texas Instruments TI-99/4a, we used TI-BASIC (didn’t have the expansion box that allowed extended BASIC), and when I got a PC in 1986, I had a choice of XBASIC or BASICA. I never really figured out the difference between those two, but I never saw any difference between program execution across them, so it apparently didn’t apply to anything I was using it for.

Since every computer had its own quirks and capabilities to distinguish it from the other computers of the day, everyone had their own brand or variant of BASIC that was tailored to that company’s machine. The fundamental operation and useage remained the same, but anything more than the simplest programs required extensive rewriting in order to port them from one machine to another. It was not uncommon for the various home computer magazines of the mid-80s to have a half-dozen or more different versions of the same program, in an effort to cover as much of the home computer market as possible.

Mike, my high school chemistry/physics teacher had one of those Altair 8800’s pictured on your magazine cover. We had a CRT/Keyboard hooked up and played star trek (the 10x10 grid w/ trigonometry thing) after school. Thatr was a big upgrade from the DEC PDP-9 (-8, maybe, I don’t remember) which we had to manually enter the first 80 or so instructions using switches so it could bootstrap the OS from punched tape. The Altair had a 8" hard sector formatted “floppy” disk, if you could call it that. I remember getting a few apple 2 computers my junior year and they were so tight compared to the other stuff it was awesome.

By the way, BASICA relied on code stored in the system ROM. I think there was some patent or copyright or something that prevented other software writers from using those routines. This is part of why the Zenith 158s used GW-BASIC rather than BASICA, and other manufacturers had their own take on the same concept. (We had IBM PCs and Z158s in college, with 8087 math coprocessors and autoCAD 1.7… woot those systems screamed in the day.)

:slight_smile:

cough thread hijackers cough
:laughing:

Any luck with the QB, geo?

If youve got dos on one of the 486 you could even use dos batch file scripting and the ECHO command to output text lines to the com port. You could even use TYPE command to output a text script to the port. just use the >COM1 redirector at the end of your commands (change number as appropriate)