You are on page 1of 5

EASY-ROB™

3D Robot Simulation Tool

EASY-ROB™
Remote Control

The EASY-ROB™ remote control feature with TCP sockets allows it to interchange data with other
programs, such as Robot or NC machine controller. An Application Program Interface (API) is provided with
the Dynamic link library (Dll) “er_remote.dll”.

EASY-ROB™ as Server Session and EASY-ROB™ as Client Sessions

Socket TCP EASY-ROB™


Session in
L [Port#] Server/Slave mode
A
N Socket TCP EASY-ROB™
Session in
[Server Host, Port#] Client/Master mode

After the connection is established, the EASY-ROB™ client session sends continously data, such as robot
joint values, to the EASY-ROB™ server session. The EASY-ROB™ Server Session visualizes excatly the
same done in the client session. During the connection, each user can rotate, pan and zoom the 3D scene,
to get a best view. The connection can be suspended and resumed on each side. The choice to establish a
synchron or asynchron connection allows the client session to run as fast as possible.

Usage:

- Start EASY-ROB™ two times


- Load in each session the same workcell or robot
- Open in each session the Remote Control Dialog from the
Robotics menu:
Robot Application -> Remote
- Click the Button in the Server/Slave Group (left side) ”Start
Connection”
- This Session will start listening for the client and will hang!!
- Choose the 2nd EASY-ROB™ session and click the Button
in the Client/Master Group (right side) ”Start Connection”.
- The Status Box in both Remote Control Dialogs should have
the message
”Connection to Client/Server established”
- Move the robot in the Client Session, the robot in the Server
Session should follow after a short delay.
- To close the socket, just click on the button “Close
Connection”

The right is reserved to make technical changes and improvements

EASY-ROB™ Stefan Anton Bruchfeldstr.4 60528 Frankfurt/Main Germany Tel. +49 69 677 24-287 Fax. +49 69 677 24-320 info@easy-rob.com www.easy-rob.com
EASY-ROB™
3D Robot Simulation Tool

EASY-ROB™
Remote Control

EASY-ROB™ as Server Session and other Client Sessions

The EASY-ROB™ remote control feature with TCP sockets allows it to interchange data with other
programs, such as Robot or NC machine controller. An Application Program Interface (API) is provided with
the Dynamic link library (Dll) “er_remote.dll”.

Socket TCP EASY-ROB™


Session
[Port#] Server/Slave mode

L
A EASY-ROB™
Real
N “er_remote“ Plug-In
NC-Machine NC-Machine
Controller
[Host, Port#]
Socket TCP

API-Client

er_remote.dll
er_remote.lib

Real Robot
Robot
Controller

W
“User Client” for
A Robot or NC
N Machine Controller
- 3D CAM/CAM
I &
n 3D OLP Systems
t
e Telephon
connection
r
n Robot/
e Robot/
NC-Machine
t NC-Machine
Controller

The socket connection works in a local network (LAN). To interchange data between a Robot/ NC Controller
and EASY-ROB™ via Internet or a telephon connection, a special program “User Client” must receive the
data and forward them using the EASY-ROB™ “er_remote” Plug-In to the EASY-ROB™ Server/Slave
Session.

The right is reserved to make technical changes and improvements

EASY-ROB™ Stefan Anton Bruchfeldstr.4 60528 Frankfurt/Main Germany Tel. +49 69 677 24-287 Fax. +49 69 677 24-320 info@easy-rob.com www.easy-rob.com
EASY-ROB™
3D Robot Simulation Tool

EASY-ROB™
Remote Control

Beispiel zur Benutzung des EASY-ROB™ Remote API

Dll: er_remote.dll
Header: er_remote.h
Library: er_remote.lib

Client Beispiel: client.exe


Sever Program: easyrob-server.exe

Beispiel Sourcen: client.cpp


mit VC++ V6.0 Project Datei client.dsw
//
// Wichtig: Linker und Compiler Einstellungen
//
Es wurden folgende Bibliotheken hinzugelinkt.
er_remote.lib user32.lib winspool.lib kernel32.lib gdi32.lib comctl32.lib
shell32.lib msvcrt.lib wsock32.lib netapi32.lib

Compiler Einstellungen:
/nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D
"WINDOWS_NT" /Fp"Release/client.pch" /YX /Fo"Release/" /Fd"Release/" /FD /c

!!! Die Option MD steht für multithreating !!!!!

Was ist zu tun:

- Öffnen Sie ein DOS-Box für den Server


- Starten Sie das Server Program mit Portnummer für den Socket
Server Beispiel: easyrob-server 2074

Es erscheint folgende Ausgabe im Server Window:


Remote Status: Listening for Client on hostname 'hostname'

- Öffnen Sie ein DOS-Box für den Client (NC-Steuerung)


- Starten Sie das Client Program mit Hostname und Portnummer
Client Beispiel: client <hostname> 2074

// Es erscheint folgende Ausgabe im Client Window:


EASY-ROB Remote Version 1.0, MAI 2001
write_client_startup_msg() Send StartUp [1,1] 2010 ws01
write_client_startup_msg() Send StartUp [2,2] 2020 2
write_client_startup_msg() Send StartUp [3,3] 2060 1
write_client_startup_msg() Send StartUp [4,4] 2000

The right is reserved to make technical changes and improvements

EASY-ROB™ Stefan Anton Bruchfeldstr.4 60528 Frankfurt/Main Germany Tel. +49 69 677 24-287 Fax. +49 69 677 24-320 info@easy-rob.com www.easy-rob.com
EASY-ROB™
3D Robot Simulation Tool

EASY-ROB™
Remote Control

write_client_startup_msg() Send StartUp [5,5] 2002


read_server_startup_msg() Read: 1030 3
read_server_startup_msg() Read: 1000 ok
read_server_startup_msg() Read: 1002 end start up
Start Client() StartUp: 3 receives, 5 send
Press enter to start client remote cycle (synchron flag: 1)

//"Gleichzeitig" erscheint folgende Ausgabe im Server Window:


Remote Status: Listening for Client on hostname ’ws01’
Start Server() Read: 2010 ws01
Start Server() Read: 2020 2
Start Server() Read: 2060 1
Start Server() Read: 2000 ok
Start Server() Read: 2002 end startup
Start Server() Send StartUp [1,1] 1030 3
Start Server() Send StartUp [2,2] 1000
Start Server() Send StartUp [3,3] 1002
Start Server() StartUp: 5 receives, 3 send

//------------------------
// Was ist passiert:
//------------------------

- Der Client schickt an den Server seine "StartUp" Messages


(write_client_startup_msg() ...)
Mit CLIENT_END_STARTUP=2002 meldet der Client: "Keine weiteren
StartUp Msg"
Er wartet nun auf die "StartUp" Messages vom Server

- Der Server empfaengt die "StartUp" Messages vom Client


(Start Server() Read:...).
Nach dem empfang von CLIENT_END_STARTUP=2002 beginnt er seine
"StartUp" Messages an den Client zu senden. (Start Server() Send StartUp .....)
Mit SERVER_END_STARTUP=1002 meldet der Server: "Keine weiteren
StartUp Msg"
- Der Server wartet nun auf Messages vom Client

"Press enter to start client remote cycle (synchron flag: 1)"

Druecken Sie return um den Sendeprozess zu starten.


Wichtig: Es handelt sich um eine synchronisierte Verbindung (synchron flag: 1),
so dass stets auf eine Bestaetigung vom Server gewartet wird bis die nächste msg
gesendet wird.

The right is reserved to make technical changes and improvements

EASY-ROB™ Stefan Anton Bruchfeldstr.4 60528 Frankfurt/Main Germany Tel. +49 69 677 24-287 Fax. +49 69 677 24-320 info@easy-rob.com www.easy-rob.com
EASY-ROB™
3D Robot Simulation Tool

EASY-ROB™
Remote Control

// Es erscheint folgende Ausgabe im Client Window:


50 100 150 200 250 300 350 400 450 500 550 600 650 700 750 800 850 900
950 1000
close_client_connection() OK n_msg_received=1000 n_msg_send=1001

//"Gleichzeitig" erscheint folgende Ausgabe im Server Window:


remote_receive() 3.0000 6.0000 9.0000
remote_receive() 2.8000 5.6000 8.4000
remote_receive() 2.6000 5.2000 7.8000
remote_receive() 2.4000 4.8000 7.2000
.....
remote_receive() 0.4000 0.8000 1.2000
remote_receive() 0.2000 0.4000 0.6000
remote_receive() 0.0000 0.0000 0.0000
remote_receive() Read: CLIENT_CLOSE() -> Close_connection()
Close server connection n_msg_received=1001 n_msg_send=1001

//------------------------
// Was ist passiert:
//------------------------

- Der Client sendet an den Server Achswinkel, insgesamt 1000 mal


Es wird folgender String gesendet:
10 3 0.0523 0.1047 0.157
10 ist der OpCode für op_JNT
3 ist die Anzahl der Achswerte die gesendet wurden
. es folgen die Achswerte in radiant
- Der Server empfaengt die Achswerte, Ausgabe erfolgt in Degree
remote_receive() 3.0000 6.0000 9.0000
- Der Client sendet CLIENT_CLOSE=2001 um die Verbindung zu trennen
und wartet NICHT auf eine Bestätigung.
Der Client hat insgesamt: 1001 msg gesendet und 1000 empfangen
- Der Server erkennt CLIENT_CLOSE=2001 und beendet die Verbindung.
Der Server hat insgesamt: 1001 msg gesendet und 1001 empfangen.

The right is reserved to make technical changes and improvements

EASY-ROB™ Stefan Anton Bruchfeldstr.4 60528 Frankfurt/Main Germany Tel. +49 69 677 24-287 Fax. +49 69 677 24-320 info@easy-rob.com www.easy-rob.com

You might also like