CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum
Deutsche Version English version russian version 
It is currently Fri May 26, 2017 9:55 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Using TCP Client
PostPosted: Fri May 19, 2017 2:55 pm 
Offline

Joined: Thu May 18, 2017 4:01 pm
Posts: 1
Hi all,

I would like to create a connection to an TCP server. I tryed to use CAA NetBaseSrv 3.5.8.10 (NBS.TCP_Client).

Code:
ServerIP.sAddr := '192.168.5.100';

Client(
   xEnable:=TRUE ,
   xDone=>TCPClient_xDone ,
   xBusy=>TCPClient_xBusy ,
   xError=> ,
   udiTimeOut:=5000 ,
   ipAddr:=ServerIP ,
   uiPort:=2000 ,
   eError=>TCPClient_eError ,
   xActive=>TCPClient_xActive ,
   hConnection=>TCPClient_hConn );


Somehow i get an 'timeout' right away. xActive never gets TRUE. Im sure the TCP server is ready to receive connections.
Am i missing something on the device configuration side? I also tryed to add '3S ethernet adaptor' and set the interface (PCI\E1R1). Doesn't seem to help. Controler = Lenze 3200C

If someone could point me to the right direction that would be nice!

Kind regards,


Top
   
 Post subject: Re: Using TCP Client
PostPosted: Mon May 22, 2017 1:56 pm 
Offline

Joined: Tue May 09, 2017 10:03 am
Posts: 6
Try connecting with putty to the server ip on port 2000 to make sure you can get a connection from your PC.

Also make sure that Lenze 3200C supports NBS.TCP_Client/Server and not just the standard SysSocket functions


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 2 posts ] 

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited