Page 1 of 1
ethernet IP connection with machine - help needed
Posted: Thu May 11, 2017 8:28 am
by marc_256
Hello,
I need some help (again),
I need to communicate with a machine I just bought.
the connection is ethernet (LAN).
what I need is to send a string to the machine via ethernet cable.
and the machine i going to answer a string if needed.
the machine have a fixed IP adress xxx.xxx.xxx.xxx
can this be done in PureBasic ?
if so, where can I find a starter program ?
I use:
- PC
- windows 7(x64), 8.1(x64)
- PureBasic 5.60 Final
- ethernet communication (RJ-45 / 8 pins)
thanks in advance,
greetings,
marc,
Re: ethernet IP connection with machine - help needed
Posted: Thu May 11, 2017 8:41 am
by infratec
Hi,
to less informations
Which protocol is used?
Which port is used?
You can do this without any problems in PB if you have the necessary informations.
Bernd
Re: ethernet IP connection with machine - help needed
Posted: Thu May 11, 2017 8:51 am
by marc_256
Hi Bernd,
I must tell, I never programed in ethernet communications,
so WOOPS, I'm more a 3D and math programmer.
infratec wrote:
to less informations
Which protocol is used?
Which port is used?
Which protocol is used? thats like chinees for me ??
Which port is used? also here ... do you mean 192.168.xxx.xxx prived network?
and one cable between PC and Machine ?
sorry,
thanks,
marc,
EDIT:
I found some data in the user manual:
and now I'm gone a speak real chinees for me ...
application protocol ?? RAP - FTP
transmission protocol ?? RAP PPP - FTP TCP/IP
physical connections ?? RS232/RS422 and ETHERNET
marc,
EDIT2:
Just found, RAP = Robot Application Protocol
Re: ethernet IP connection with machine - help needed
Posted: Thu May 11, 2017 9:20 am
by infratec
Hi,
normally you have a network with a router somewhere, then you can connect your machine to any ethernet connector at the router (if your PC is also connected to the router

) and your machine is in the same subnet.
If your PC is 'standalone', you can also connect PC and machine directly via one cable.
Normally the networkcard can handle a 1:1 connection without need for a special cable.
But still, the IP addresses have to be in the same subnet, else they can not communicate.
Port:
A networkport is like a room number in a house, where the house is your ip address.
http uses port 80, https uses port 443 ...
Also you need the protocol of your machine:
Does it sends strings, can you send special commands, does it use http communication with json ...
Many things to know before you can start with
OpenNetworkConnection()
NetworkClientEvent()
...
Which should be in an own thread.
Bernd
Re: ethernet IP connection with machine - help needed
Posted: Thu May 11, 2017 9:33 am
by infratec
I just searched for 'Robot Application Protocol'.
I found ....
nothing which is useful.
This protocol have to be documented and you need this documentation to communicate with it.
With FTP it sounds that you can send a data file to the machine.
Bernd
Re: ethernet IP connection with machine - help needed
Posted: Thu May 11, 2017 9:34 am
by marc_256
Bernd,
thanks,
marc,
Re: ethernet IP connection with machine - help needed
Posted: Thu May 11, 2017 9:39 am
by infratec
Re: ethernet IP connection with machine - help needed
Posted: Thu May 11, 2017 9:53 am
by marc_256
bernd,
Yes it is a ABB robot arm
thanks, but do not lose to much time on this ...
I gone first better read the user manuals.
so I can find more (correct) info.
I'm developing my own 3D software for this robot,
and make my own positioning software.
greetings,
marc,
Re: ethernet IP connection with machine - help needed
Posted: Thu May 11, 2017 12:13 pm
by heartbone
marc_256, this standalone program worked fine..... two years ago.
http://www.purebasic.fr/english/viewtop ... 92#p460892
It contains exactly what you are asking for, and contains an improved function for sending strings over the net (at the time).
Hopefully things haven't changed too much.
Re: ethernet IP connection with machine - help needed
Posted: Thu May 11, 2017 6:39 pm
by mk-soft
heartbone wrote:marc_256, this standalone program worked fine..... two years ago.
http://www.purebasic.fr/english/viewtop ... 92#p460892
It contains exactly what you are asking for, and contains an improved function for sending strings over the net (at the time).
Hopefully things haven't changed too much.
Not helpful,
It's about data control a robot ...
@marc_256
But have made you very much ...
In order to transfer simple control commands to the ABB robot, ABB also provides an OPC server (program)
Re: ethernet IP connection with machine - help needed
Posted: Thu May 11, 2017 10:48 pm
by marc_256
Hi to everyone,
just home from work,
thanks for all the info ...
@heartbone
will test yours, and can start with it, and use parts of it.
@mk-soft
I know about ABB OPC server program
but I liked to integrate the communication in my 3D program,
so I can send direct control to the robot.
thanks,
marc,