AForge.NET

  :: AForge.NET Framework :: Articles :: Forums ::

Assessing multiple servo controller boards in one program

The forum is to discuss topics related to robotics, like building robot, controlling it, its software and hardware, etc.

Assessing multiple servo controller boards in one program

Postby Praveen Aggarwal » Thu Apr 22, 2010 9:41 pm

Hi,
I have 8 servos attached to the PhidgetAdvancedServo 8-Motor controller card. There is a requirement for me to add two more servos to the project. Is it possible for me to add another PhidgetAdvancedServo 8-Motor controller card to the project and have the two cards working together on one computer?

If so, then could you please point me to some sample code in C# where the reference can be made to the additional servos?

Thanks in advance

Praveen Aggarwal
Praveen Aggarwal
 
Posts: 6
Joined: Sat Apr 25, 2009 9:48 pm

Re: Assessing multiple servo controller boards in one program

Postby andrew.kirillov » Fri Apr 23, 2010 1:05 pm

Hello,

Yes, you can use multiple Phidgets boards on single PC. They will have unique IDs, so you will be able to distinguish them.

For code you need to go to Phidgets web site. They provide lots of code on different programming languages.
With best regards,
Andrew


Interested in supporting AForge.NET Framework?
User avatar
andrew.kirillov
Site Admin, AForge.NET Developer
 
Posts: 3436
Joined: Fri Jan 23, 2009 9:12 am
Location: UK

Re: Assessing multiple servo controller boards in one program

Postby Praveen Aggarwal » Fri Apr 23, 2010 3:54 pm

Thanks for you prompt reply. I checked with support team at Phidgets and they also confirmed what you said. I am producing below the feedback received from Phidgets team, for providing informaiton to any one following this thread.

Here's a quick example using two motor controllers we use on a small remote control tank, but two advanced servos would be pretty much the same. Notice that the program actually connects to the controllers on a remote machine, hence I'm passing the open parameter both a serial number, and a host name. The host name is not required in your case.

private static MotorControl tankDrive;
private static MotorControl turret;


tankDrive = new MotorControl();
tankDrive.Attach += new AttachEventHandler(tank_Attach);
tankDrive.Detach += new DetachEventHandler(tank_Detach);
tankDrive.Error += new ErrorEventHandler(tank_Error);
tankDrive.open(99999, "phidgetsbc-tank");

turret = new MotorControl();
turret.Attach += new AttachEventHandler(turret_Attach);
turret.Detach += new DetachEventHandler(turret_Detach);
turret.Error += new ErrorEventHandler(turret_Error);
turret.InputChange += new InputChangeEventHandler(turret_InputChange);
turret.open(27972, "phidgetsbc-tank");
Praveen Aggarwal
 
Posts: 6
Joined: Sat Apr 25, 2009 9:48 pm




Return to Robotics