Controlling Viper s1300 with Adept ACE

Controlling Viper s1300 with Adept ACE

Postby cos.cirstea » Wed Oct 22, 2014 1:23 am

Hi,

I am trying to control a Viper s1300 robot using the Adept Ace C# libraries from a Windows based PC. I wanted to ask if it is possible to make a V+ program in the SmartController and then simply send a command from the C# program to the Smart Controller to execute the V+ task? If if this is possible, could you please provide some more information or guidance to some documents/links that may help me achieve this?

Thank you kindly,
Cosmin
cos.cirstea
 
Posts: 6
Joined: Tue Oct 21, 2014 10:23 am

Re: Controlling Viper s1300 with Adept ACE

Postby Guenter Grass » Thu Oct 23, 2014 4:49 am

Hi Cosmin,

here a snipet that executes the program "gg" in task 0 on the controller. It was created from within ACE using the ACE C# editor.

private void button1_Click(System.Object sender, System.EventArgs e) {
IAdeptController adeptController1 = (IAdeptController) ace["/SmartController 1/SmartController 1"];
adeptController1.Link.Execute("gg",0,1000);
Trace.WriteLine("button1.Click Event Handler");
}

Here is another example from the Adept ACE Reference Guide (API Reference Guide ► Ace.Adept.Server.Controls ► IAdeptController) on how to connect to a controller and read its serial number, etc.
_________________________________________________________________________
// Create the controller and associate it with an IP address
IAdeptController controller = ace.Root["/Controller"] as IAdeptController;

// Connect to the controller
controller.Enabled = true;

// Add all robots for the controller into the server root collection
AdeptControllerUtil.AddAllRobots(ace, controller, ace.Root);

// Enable and Disable the dry run flag
if (!controller.IsEVPlus) {
controller.DryRun = true;
controller.DryRun = false;
}

// Print out controller information
Trace.WriteLine("Controller Time: " + controller.ControllerTime);
Trace.WriteLine("Controller Type: " + controller.ControllerType);
Trace.WriteLine("Software Revision: " + controller.SoftwareRevision);
Trace.WriteLine("Serial Number: " + controller.SerialNumber);
Trace.WriteLine("Controller Model: " + controller.ModelType);
Trace.WriteLine("Security ID: " + controller.SecurityId);
Trace.WriteLine("FPGA Version: " + controller.FpgaVersion);
_________________________________________________________________________

In the ACE installation folder there is a ZIP file called AceDemo.zip. It contains 6 C# examples. Please have a look at them.They show some of the things that can be done using C# from Microsoft visual studio.

Regards
Günter
Guenter Grass
 
Posts: 189
Joined: Thu Oct 16, 2008 4:34 am

Re: Controlling Viper s1300 with Adept ACE

Postby cos.cirstea » Mon Jan 12, 2015 8:13 am

Thank you kindly for your answer Guenter.
I have no knowledge of v+ programs, I am targeting C# to communicate to the Viper. Could you by chance posses and would like to share a v+ program that simply moves a viper 1300 with some gripper action. I want to test if my C# program commands the viper to move based on this program.

Thank you very much,
Cosmin
cos.cirstea
 
Posts: 6
Joined: Tue Oct 21, 2014 10:23 am

Re: Controlling Viper s1300 with Adept ACE

Postby Guenter Grass » Tue Jan 13, 2015 5:52 am

Hi Cosmin,

here is an examle V+ Program to move the robot. It moves the robot in a joint interpolated motion from its current location 10mm in the robots WORLD coordinate X-direction (if your standing behind the robot this is forward). After the movement (BREAK waits for the movement to complete) set the output 1 (you will have to connect this one to your gripper).
__________________________________
PROGRAM move.forward()
MOVE SHIFT(HERE BY 10)
BREAK
SIGNAL 1
.END
__________________________________

Here a C# program that runs this V+ program from ACE.
___________________________________
using Ace.Adept.Server.Controls;
using Ace.Core.Server;
using System;
using System.Collections.Generic;
using System.Diagnostics;

namespace Ace.Custom {

public class Program {

public AceServer ace;

public void Main () {

IAdeptController adeptController = (IAdeptController) ace["/SmartController 4/SmartController 4"];
adeptController.ExecuteVPlusInstruction("EXECUTE 0 move.forward");

}
}
}
___________________________________

I would recommend to download the new ACE version 3.5.3.0. There you can run all programs in an emulation mode simulating all robots for free. You can write C# program and test them as well.

Regards
Günter
Guenter Grass
 
Posts: 189
Joined: Thu Oct 16, 2008 4:34 am


Return to Viper s650/s850

Who is online

Users browsing this forum: No registered users and 2 guests