This article describes how to set up the system. The 2D system is simple and intuitive to use via the EYE+ Studio web interface.
1. Introduction
The combination of an Asycube and the EYE+ Smart Control System makes it possible to increase efficiency when feeding, separating and aligning parts delivered in bulk. The Asycube is compatible with all HORSTs and with any PLC thanks to its TCP/IP and Modbus TCP compatible communication. No previous knowledge of image processing is required to set up and use EYE+. It is simple and intuitive to use. Simply follow the steps in the EYE+ Studio web interface.
2. Setting up the system
The setup of the system is very well described in the asyril documents. Asyril's web wizard guides you very intuitively through the various steps to teach-in components and create the required recipes. Further information can also be found in the following documentation https://doc.eyeplus.asyril.com/en/2.1/index.html
3. Communication
The participants must be in the same area of the network. How to set the IP address of the robot is described in the following article: Change IP address
Communication via TCP IP is described below. Further information can be found under Sockets
On the EYE+ web interface, the End of line character must be set to Carriage Return and Line Feed under the tab configuration ? robot ? TCP/IP Configuration.
3.1. Establishing the connection
// TCP/IP Socket Communication
var IP = "192.168.0.50"; // IP asyril EYE+
var Port = 7171; // Port IP asyril EYE+
var Terminator = "\r\n"; // Zeilenumbruch Carriage Return + Linefeed. Muss in asyril EYE+ Web HMI unter "configuration" konfiguriert werden
//********************************************* Programm *********************************************
// Aufbau der Verbindung zu asyril EYE+
try
{
var socket = new java.net.Socket();
socket.connect(new java.net.InetSocketAddress(IP, Port), 10000); //10s timeout
// 10 sek Timeout beim Einlesen der Nachricht ueber einen Socket
socket.setSoTimeout(10000);
}
catch (e)
{
show_info("A connection with the Asyril EYE+ could not be established!");
}
3.2. Writing a message
// Nachricht ueber Socket schreiben
function writeMessage(socket, message)
{
var printWriter =
new java.io.PrintWriter(
new java.io.OutputStreamWriter(
socket.getOutputStream()));
printWriter.print(message += Terminator);
printWriter.flush();
}
3.3. Reading a message
// Nachricht ueber Socket lesen
function readMessage(socket)
{
var bufferedReader =
new java.io.BufferedReader(
new java.io.InputStreamReader(
socket.getInputStream()));
var charArrayType = Java.type("char[]");
var buffer = new charArrayType(1000);
try {
var amountCharacters = bufferedReader.read(buffer, 0, 1000);
var message = new java.lang.String(buffer);
} catch (e) {
var message = "Timeout: Keine Nachricht erhalten";
}
return message;
}
4. Asyril EYE+ Commands
Below are examples of how you can use Asyril EYE+ commands in horstFX. These are the main commands for program execution. If additional commands are needed, they can be implemented in a similar manner. You can find the available commands at https://doc.eyeplus.asyril.com/en/2.1/integration/tcp_programming_guide/commands.html
// Determine the Asyril EYE+ Status
function getState()
{
var Message = "get_parameter state";
writeMessage(socket, Message);
var cam_result = readMessage(socket);
show_info(cam_result);
}
// Find the recipe identifier in Asyril EYE+
function getReceptIndicator()
{
var Message = "get_recipe_list";
writeMessage(socket, Message);
var cam_result = readMessage(socket);
show_info(cam_result);
}
// Start an Asyril EYE+ recipe.
function startRecept()
{
var Message = "start production 1813";
writeMessage(socket, Message);
var cam_result = readMessage(socket);
show_info(cam_result);
}
// Obtaining Part Positions with Asyril EYE+
function getPartPositions()
{
var Message = "get_part";
writeMessage(socket, Message);
var Cam_result = readMessage(socket);
show_info(Cam_result);
//Splitting the message into different parts
var Splitted = Cam_result.split(" ");
var State = Splitted[0];
var CamCoordX = parseFloat(Splitted[1].replace("x=", ""));
var CamCoordY = parseFloat(Splitted[2].replace("y=", ""));
var CamCoordRZ = parseFloat(Splitted[3].replace("rz=", ""));
show_info("X = " + CamCoordX + " Y = " + CamCoordY + " RZ = " + CamCoordRZ);
}
// Prepare and identify new parts with the Asyril EYE+ system.
function prepareNewPart()
{
var Message = "prepare_part";
writeMessage(socket, Message);
var cam_result = readMessage(socket);
show_info(cam_result);
}
// Stop the production process on the Asyril EYE+ system.
function stopProduction()
{
var Message = "stop production";
writeMessage(socket, Message);
var cam_result = readMessage(socket);
show_info(cam_result);
}
The functions can be called as described below:
// Determine the status of the Asyril EYE+ system
getState();
// Identifying the recipe indicator in Asyril EYE+
getReceptIndicator();
// Start the Asyril EYE+ recipe.
startRecept();
// Retrieve part positions from the Asyril EYE+ system
getPartPositions();
// Prepare and identify new parts with Asyril EYE+
prepareNewPart();
// Stop the production process on the Asyril EYE+ system.
stopProduction();
5. Example Programs
5.1. Example program that includes communication and EYE+ commands
5.2. Example program capturing an object and dropping it into a container.