LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TCP Addressing Issues

Hi All,

 

I have a mainboard that I am trying to communicate with via TCP. On the main board there are 6 individual displays that I am trying to toggle. From what I understand, the primary address is 192.168.200.200 Port 50000. To address each individual display the IP address should be 192.168.200.201 for channel1 192.168.200.202 for channel2 and so on. Currently with I am able to toggle a display HOWEVER I am not consistently toggling the display I specifically want. For example if address 202, it does not toggle display channel 2 and will instead address channel 3

TCP_Capture.JPG

0 Kudos
Message 1 of 15
(1,818 Views)

None of this makes any sense. Why are you wiring an IP address as string to the "service name" of TCP listen?

How is everything connected and configured? What kind of "main board" is this? Do you have a link to the documentation?

0 Kudos
Message 2 of 15
(1,808 Views)

Also note that we can typical help better if you attach your VI instead of showing a picture.

0 Kudos
Message 3 of 15
(1,806 Views)

I thought I attached it, must not have gone through. Let me redo the VI upload.

0 Kudos
Message 4 of 15
(1,767 Views)

You have not answered any of my questions. Where is the program that sits on the other end of the connection?

0 Kudos
Message 5 of 15
(1,761 Views)

To clarify the main board is a display driver that is used to power on and test displays. The software and its inner workings are a black box to me. All I am given is a TCP protocol command list, IP address, and port #. I want to be able to toggle the displays using the command list via TCP (string concatenate). This is what I do know:

  • It is possible to communicate with main board as someone else has previously built a python code that simply sends these commands via TCP to the address and the units responds accordingly
  • The LabVIEW VI I have created and shared is able to communicate and toggle the displays however not in the way I want to. For example, I am unable to have 192.168.200.201 toggle channel 1, instead it might toggle channel 3.
  • The proprietary software used to control the main board is also working correctly and is able to toggle the displays

After saying all that and the feedback provided so far, what I need help with is how do I send a TCP command to an address at 192.168.200.201 port 50000. It seems to me that the issue is I am not using the TCP listen or TCP open connection blocks correctly. I do not have any background in networking or communication protocols, any help clarifying this would be greatly appreciated. Many thanks.

0 Kudos
Message 6 of 15
(1,694 Views)

@dc_g wrote:

To clarify the main board is a display driver that is used to power on and test displays. The software and its inner workings are a black box to me. All I am given is a TCP protocol command list, IP address, and port #. I want to be able to toggle the displays using the command list via TCP (string concatenate). This is what I do know:

  • It is possible to communicate with main board as someone else has previously built a python code that simply sends these commands via TCP to the address and the units responds accordingly
  • The LabVIEW VI I have created and shared is able to communicate and toggle the displays however not in the way I want to. For example, I am unable to have 192.168.200.201 toggle channel 1, instead it might toggle channel 3.
  • The proprietary software used to control the main board is also working correctly and is able to toggle the displays

After saying all that and the feedback provided so far, what I need help with is how do I send a TCP command to an address at 192.168.200.201 port 50000. It seems to me that the issue is I am not using the TCP listen or TCP open connection blocks correctly. I do not have any background in networking or communication protocols, any help clarifying this would be greatly appreciated. Many thanks.


You mention TCP Open and TCP Listen - have you tried with Open instead of Listen?

If I understood what you're saying correctly, I'd have imagined your device/"main board" is listening for connections, rather than periodically trying to open them. As a result, I'd expect you need to actively Open a connection, rather than waiting for the device to open one to you.

 

That being said, it sounds like you are getting some response? Just on the wrong display compared to what you expect... (stupid question, but are you sure they're labelled correctly and have the appropriate addresses?)


GCentral
0 Kudos
Message 7 of 15
(1,675 Views)

That is a good suggestion and your understanding of the problem is correct 😃. I have tried using TCP open previously and get an Error 63: Serial port receive buffer overflow. I looked around at NI forums for the error code, people point to it being a firewall or access issues. I don't believe access is the issue as my TCP listen connection version is able to send commands no problem as with the proprietary software. Please see photo and attached VI for TCP Open version. I feel like I have the same problem where I am not using the TCP Open or Listen correctly.

 

TCP_open_Capture.JPG

0 Kudos
Message 8 of 15
(1,649 Views)

Error 63 when returned by the TCP Vis means the connection attempt was refused by the server. In this case, the server is your board. Fundamentally there is nothing wrong with your code. So, this could be a firewall issue. The other applications that are working, are they being from from the same PC as your LabVIEW code? Does this device require something else such as SSH? Are you sure your port number is correct? Could you get a Wireshark trace of your code attempting to connect and one of the working applications? Is it possible that something else is already connected to the board and the board only supports a single connection?



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 9 of 15
(1,644 Views)

@dc_g wrote:

After saying all that and the feedback provided so far, what I need help with is how do I send a TCP command to an address at 192.168.200.201 port 50000. It seems to me that the issue is I am not using the TCP listen or TCP open connection blocks correctly. I do not have any background in networking or communication protocols, any help clarifying this would be greatly appreciated. Many thanks.


Again, this board seems to be a commercial product and I would think there is a manual available online that gives detailed instructions. We will understand this much better than whatever you are describing in vague words.. Do you have a link (or e.g. name and model #, etc)?

 

Do you have at least a copy of the python code that we could look at? Are you sure it is TCP? (TCP/IP could be TCP or UDP). Another way to troubleshoot would be to do a packet capture (e.g. using wireshark) while using working software (python or whatever came with the board).

 

The use of TCP listen is definitely wrong, because it instructs your computer to wait for an external connection which never comes. Backwards! You are really dealing with a problematic issue because your LabVIEW AND networking knowledge seems to be minimal. We really could give significantly more specific advice if we had more information.

 

Can you ping all the IP addresses of the board? (192, 1658, 200, 200-202)? What is the local IP of your computer? It is on the same subnet?

0 Kudos
Message 10 of 15
(1,630 Views)