LAVA Forums Buy cool LAVA gear Forums RSS Feed

Welcome Guest ( Log In | Register )

> Related links

Check out the related Code Repository Files or visit the LabVIEW Wiki Internet Portal


Tags
(This content has not been tagged yet)
 
Reply to this topic Start new topic
> TCP Communication between VB and LV, TCP with Visual Basic and LabVIEW
Rating 3 V
Giseli Ramos
post Sep 1 2008, 08:13 PM
Post #1


More Active
**

Member
Posts: 25
Joined: 16-October 07
From: São Paulo
Member No.: 9617
Using LabVIEW Since:2006
LV:8.5 ,8.2.1 ,8.0
Brazil Nothing Selected Nothing Selected


Hi,

I have a compiled program (not mine) in VB which acts as a server that receives commands from my LabVIEW application via TCP port. So, these programs run in differents computers in a local network. They works fine when the two computers are Windows.
If my LabVIEW program runs on Linux, it is not able to establish a communication with the VB program. The cause of the problem maybe that the VB program uses Winsock?

I already tested my connection between a Linux and a Win computer using the examples TCP communicator, so the connection is fine.

Thanks!


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Ad
post Sep 1 2008, 08:13 PM
Post #















Tags
(This content has not been tagged yet)
Go to the top of the page
Quote Post
Eugen Graf
post Sep 1 2008, 08:25 PM
Post #2


Extremely Active
****

Member
Posts: 361
Joined: 6-February 07
From: Homburg/Germany
Member No.: 7689
Using LabVIEW Since:2004
LV:8.5 ,8.0.1 ,.
Germany Kazakhstan Russia My Gallery


May be you can try to use Data Socket VIs insted of TCP/IP ?

--------------------


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Phillip Brooks
post Sep 1 2008, 11:48 PM
Post #3


Extremely Active
****

Premium Member
Posts: 693
Joined: 3-November 04
From: Boston, MA
Member No.: 949
Using LabVIEW Since:1999
LV:7.0 ,8.20 ,8.0
us_massachusetts France Thailand My Gallery


QUOTE (Giseli Ramos @ Sep 1 2008, 04:13 PM) *
I already tested my connection between a Linux and a Win computer using the examples TCP communicator, so the connection is fine.


This may be and endian problem, see here...

--------------------



Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Ton
post Sep 2 2008, 04:20 AM
Post #4


CCT It
*****

Premium Member
Posts: 1337
Joined: 13-June 05
From: Woerden, Netherlands
Member No.: 2399
Using LabVIEW Since:2001
LV:8.5.1 ,6.1 ,8.2.1
Netherlands hol_utrecht Nothing Selected My Blog My Gallery


The problem is that you can't establish a connection. Strange, what error code is generated on the LabVIEW side?

Ton

--------------------
Certified LabVIEW Developer
Shouldn't you be programming a Code Repository solution?


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Giseli Ramos
post Sep 2 2008, 10:28 AM
Post #5


More Active
**

Member
Posts: 25
Joined: 16-October 07
From: São Paulo
Member No.: 9617
Using LabVIEW Since:2006
LV:8.5 ,8.2.1 ,8.0
Brazil Nothing Selected Nothing Selected


QUOTE (Ton @ Sep 2 2008, 01:20 AM) *
The problem is that you can't establish a connection. Strange, what error code is generated on the LabVIEW side?

Ton


When I try to connect to the VB server using LV, it simply don't connect, I get timeout.

Eugen, I tried something with DataSocket, but I'm not satisfied and really want to use TCP things. Don't have any way really?

Philip, thanks for the tip. I will see here if is this problem and will post here the results.


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Ton
post Sep 2 2008, 10:53 AM
Post #6


CCT It
*****

Premium Member
Posts: 1337
Joined: 13-June 05
From: Woerden, Netherlands
Member No.: 2399
Using LabVIEW Since:2001
LV:8.5.1 ,6.1 ,8.2.1
Netherlands hol_utrecht Nothing Selected My Blog My Gallery


QUOTE (Giseli Ramos @ Sep 2 2008, 12:28 PM) *
When I try to connect to the VB server using LV, it simply don't connect, I get timeout.

Do you have the right port and number? It looks like there is no-listening at that port.
Could you post a screenshot?

Ton

--------------------
Certified LabVIEW Developer
Shouldn't you be programming a Code Repository solution?


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Giseli Ramos
post Sep 2 2008, 11:26 AM
Post #7


More Active
**

Member
Posts: 25
Joined: 16-October 07
From: São Paulo
Member No.: 9617
Using LabVIEW Since:2006
LV:8.5 ,8.2.1 ,8.0
Brazil Nothing Selected Nothing Selected


QUOTE (Ton @ Sep 2 2008, 07:53 AM) *
Do you have the right port and number? It looks like there is no-listening at that port.
Could you post a screenshot?

Ton


Well, I think that have listening, because my VB program succeeded to establish a communication when I use the example TCP Communicator in the same platform (win X win). The screenshot of the example is here. It doesn't work when is Win X Linux... Strange!
Attached thumbnail(s)
Attached Image
 


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Scott Carlson
post Sep 2 2008, 11:58 AM
Post #8


Active
*

Member
Posts: 23
Joined: 28-July 08
From: CT
Member No.: 12118
Using LabVIEW Since:2005
LV:8.5.1 ,. ,.
United States Nothing Selected Nothing Selected


QUOTE (Giseli Ramos @ Sep 2 2008, 07:26 AM) *
Well, I think that have listening, because my VB program succeeded to establish a communication when I use the example TCP Communicator in the same platform (win X win). The screenshot of the example is here. It doesn't work when is Win X Linux... Strange!


I definitely don't think you should leave the TCP behind. This sounds more like an OS issue than a Labview issue.

#1 What Flavor of Linux are you using. (I can be more helpful smile.gif)
#2 My first suspicion is that you have a firewall blocking ports... Have you looked into this?

-Scott


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post
Giseli Ramos
post Sep 2 2008, 12:16 PM
Post #9


More Active
**

Member
Posts: 25
Joined: 16-October 07
From: São Paulo
Member No.: 9617
Using LabVIEW Since:2006
LV:8.5 ,8.2.1 ,8.0
Brazil Nothing Selected Nothing Selected


QUOTE (Scott Carlson @ Sep 2 2008, 08:58 AM) *
I definitely don't think you should leave the TCP behind. This sounds more like an OS issue than a Labview issue.

#1 What Flavor of Linux are you using. (I can be more helpful smile.gif )
#2 My first suspicion is that you have a firewall blocking ports... Have you looked into this?

-Scott


Hi Scott, I'm using Fedora 7... and I'm glad that you remembered me of the firewall issue!
On Linux, it is OK, but in Win, the firewall rules was not correctly applied... oops.gif Now it is working fine. tongue.gif

Many thanks to all and I learned some useful things in this topic such as the endian problem...


Tags
(This content has not been tagged yet)
Go to the top of the page
+Quote Post

Reply to this topicStart new topic

 




Time is now: 1st December 2008 - 08:01 PM