TCP/IP server communication commands

Tips and tricks for Adept ACE

TCP/IP server communication commands

Postby rotekopler » Sun May 03, 2015 12:23 am

I am struggling to understand how to perform a TCP/IP connection, after I made a TCP/IP connection between two computers using the ACE, I can't find out what are the commands to communicate between them.

Who can i read and write from one to each other even to create a simple chat, and where i need to write the commands? does it need to be in the TCP/IP program in an endless loop?or in a different subprogram?

thanks for the help,
rotekopler
 
Posts: 27
Joined: Sun Mar 01, 2015 11:56 pm

Re: TCP/IP server communication commands

Postby andreasw » Mon May 04, 2015 5:30 am

Are you talking about a TCP IP connection between ACE and a SmartController or between two PCs?
What exactly have you done so far?
andreasw
 
Posts: 30
Joined: Thu Oct 16, 2008 12:39 am

Re: TCP/IP server communication commands

Postby rotekopler » Mon May 04, 2015 11:17 pm

hey andreasw,

I'm talking about both,but the connection between ACE and a SmartController is more impotent.

What I don’t know is how to make a communication between the server and the client, such as sending some strings or sending some info about different IO.

Do you know where can I find a list of commands to do so? , and do I need to put those commands lines in the TCP IP communication program that i have or in a subprogram?
rotekopler
 
Posts: 27
Joined: Sun Mar 01, 2015 11:56 pm

Re: TCP/IP server communication commands

Postby andreasw » Wed May 06, 2015 5:14 am

Please take a look at the AdeptNet User's Guide:
http://www1.adept.com/main/KE/Data/Controller/AdeptNet_User/AdeptNet_TOC.html
It will help you building a V+ TCP Server / Client program.
andreasw
 
Posts: 30
Joined: Thu Oct 16, 2008 12:39 am

Re: TCP/IP server communication commands

Postby rotekopler » Sat May 09, 2015 10:43 pm

Hi andreasw,

I already have a basic V+ TCP Server / Client program.
What i don't know and try to figure out is the variety of the commands word on ACE such as READ and WRITE to use in that program.
rotekopler
 
Posts: 27
Joined: Sun Mar 01, 2015 11:56 pm

Re: TCP/IP server communication commands

Postby Guenter Grass » Fri May 15, 2015 1:13 am

Hi rotekopler,

I've been reading the thread multiple times now and still don't understand what you are trying to accomplish.

Let's look at the different communication options

1. Communicate between the controller and PC using ACE
- ACE is already using TCP to communicate with the controller. Neither additional controller (V+) nor PC software is needed for this. If you change the value of a V+ variable onthe controller it is automatically updated in ACE on the PC. In addition to this you can write your own C# program in ACE.
- If you want to write/read data from files on the PC from your V+ program you can use the Remote Library. It offers programs that allow this.
Adept ACE Reference Guide - Remote Library.GIF
Adept ACE Reference Guide - Remote Library.GIF
Adept ACE Reference Guide - Remote Library.GIF (9.38 KiB) Viewed 13245 times


2. Communicate between controller and PC using C#/VB/Java/C++/etc. (just to name the most common)
- To do this you need either the V+ client or V+ server and software on the pc that is communicating through TCP. This software can be a terminal program (e.g. teraterm) or your own software written in C#/VB/Java/C++/etc.

To assist further it is essential that we know what you want to accomplish.

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

Re: TCP/IP server communication commands

Postby rotekopler » Thu May 21, 2015 12:42 am

Hi Guenter Grass,

I'm referring to num2 in your replay, communicate between controller and PC using C#/VB/Java/C++/etc.

I'm using the PC as a server with VB simple chat box program and a client with ACE V+ program , i made a connection between the two using the same port number and the correct IP address but i don't know which command i need to write and who to write them on the ACE V+ client program in order to read and write data from the server side ( e.g. making a simple chat communication send strings and receive strings with the server chat box and the client ace monitor screen).
rotekopler
 
Posts: 27
Joined: Sun Mar 01, 2015 11:56 pm

Re: TCP/IP server communication commands

Postby Guenter Grass » Thu May 21, 2015 8:22 am

Hi rotekopler,

attached both V+ client and server programs (ACE workspaces) that use the commands READ to read multiple strings and WRITE to write a string using TCP.
In addition I attached 2 Visual Studio Projects (client and server) written in C#.

If you run e.g. the TCPclient on the PC and the TCP_server on the controller (tcp_server.awp) they should be able to exchange strings. Please make sure to set the IP addresses correctly and you might need to disable the firewall on your PC.

Regards
Günter

TCP PC - V+.zip
(127.79 KiB) Downloaded 623 times
Guenter Grass
 
Posts: 189
Joined: Thu Oct 16, 2008 4:34 am

Re: TCP/IP server communication commands

Postby Rajat Rohit » Tue Jun 27, 2017 5:38 am

Hi Guenter,

I downloaded the zip file you had uploaded containing the server and the client workspace files. When i open it or load using Adept ACE it doesn't open. ACE opens and closes suddenly. I tried opening the source files in Visual Studio. The Visual studio crashes when i do this. How can i solve this problem?
Rajat Rohit
 
Posts: 8
Joined: Wed Jun 14, 2017 11:24 pm

Re: TCP/IP server communication commands

Postby Rajat Rohit » Tue Jun 27, 2017 11:03 pm

Hi,

Is it possible to send/receive commands to/from another PC from/to the PC running the Adept ACE using micro V+??

I am trying to set up a server or a client on the PC running Adept. Based on the digital output signals i want to send a string to another PC. How can i achieve this?

Thanks
Rajat Rohit
 
Posts: 8
Joined: Wed Jun 14, 2017 11:24 pm


Return to Adept ACE

Who is online

Users browsing this forum: No registered users and 2 guests

cron