PDA

View Full Version : XML Socket



BenBart
11-21-2008, 11:40 PM
I'm a total beginner at robotics, so I don't really know what's what in terms of I/O boards.

What I want to do is connect to a USB I/O board over the internet through a computer that is connected to a Socket-XML server.

I saw the Arduino Diecimila USB IO Board which would be perfect for this because I can do everything in Flash (my bread and butter)... except I have two questions:

1. It seems like the way Flash connects directly to the board is some sort of virtual Socket-XML, would this mean that I wouldn't be able to connect to my other Socket-XML server online because the connection would be used to communicate with the board?

2. What is the delay from the software to the actual I/O board? Are we talking seconds, miliseconds, or minutes?

Is there a better alternative in your opinion? I programmed in VB6 and C++ years and years ago and could pick it up C or VB.NET, but then I have to buy the software :-) (I'm also downloading Microsoft Robotics Developer Studio Express Edition for free, but I doubt it supports Sockets.)

MikeG
11-24-2008, 02:28 PM
I think you are asking, How do I control an I/O board that is connected to my internal network from a page on the Internet. If so there are a few approaches. An easy method is to setup port forwarding on your local router to the PC that has the I/O board attached. Depending on your ISP you might need to signup for dynamic DNS update client like no-ip.com.

Here a working example all XML services.
http://www.crustcrawler.com/products/smartarm/remote/ccvideo/index.php

BenBart
11-25-2008, 07:23 AM
That's cool. That wasn't exactly what I was asking. But also a good way of going about it.

I've done a lot more research about boards and what's what. I think I'm going to use a Phidgets controller. Instead of a I/O board because there's no delay and no need to reprogram the chip. I can access the servos directly. And I can do it from Flash.

An XML socket server is a web based protocol that is programmed in Java or PHP. I think that Flash can connect to more than one socket server, but I've never tried. Time to try!

Adrenalynn
11-25-2008, 11:31 AM
Just as an aside - there's no reason a socket server has to be limited to Java or PHP - it could be programmed in anything. In fact, if one wanted to invest they time, they could implement one in flash even

BenBart
11-26-2008, 07:19 AM
If the actual Socket Server has to be server-side, wouldn't it have to be in a server-side language?

Or are you talking about P2P using something like Adobe Air? I've never heard of server-side code done in Flash. Flash can simply connect to the Socket Server. (So can VB6, VB.NET. C++, JAVA ext...)

Adrenalynn
11-26-2008, 11:52 AM
Any language that an open a socket can implement a server. Surely you've seen servers written in C++ since we've been doin' it for as long as C++ has existed? And C before that. Rinse, lather, repeat.

I doubt I'd run out and write a server with flash, it's slower than the second coming at the best of times, and a resource hog to boot, but that doesn't mean it couldn't be done.

BenBart
11-27-2008, 10:37 AM
Feel free to go write that server then. :-) I'll stick with a language that was meant to support incoming sockets. :-)

On a more related note:

If I wanted to emulate a remote-control car, would RC servo motors do the trick? My electronics knowledge is very amateur.

Here's the basic setup.
3 lb laptop.
Phidgets USB controller. (Phidgets Advanced Servo 8-Motor?)
Two motors - Tank style motor control.

I may want to add on to this later once I figure out the basics.

Adrenalynn
11-27-2008, 12:19 PM
I'll stick with a language that was meant to support incoming sockets. :-)

Cool - Now at least you know you'll be writing it in C - the language used to write every server service under Unix for all of time. :) Or JCL or Assembler if you're going bigger or smaller...

RC servos are used on RC cars for steering. The drive wheels are DC motors fed from a motor controller (aka speed controller aka ESC). You can use RC servos, but they have to be modified for 360deg rotation and it'll be sloooow. A typical Servo will do, say, 0.20sec for 60deg. A typical RC motor geared will be doing 360deg 8 or 9 times a second (or much more)

BenBart
11-28-2008, 09:01 AM
Sweet thanks.

What other applications are RC motors for? Robotic arms?

jes1510
11-28-2008, 12:55 PM
They are used in a ton of different applications. You can find them in radio control airplanes and robotic arms. They can be used as joints with angle control or you can get some that are modified for continuous rotation that are used as drive motors for small robots.

Simply browse through the gallery here and you will find servos are used in most of the machines in one form or another.