From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TCP/IP communication between labview and microchip board

Hi

 

I have a microchip board which sends out data over the Ethernet. I have to read this data and use for further mathematical computations on it. So I decided to use some available examples on Labview. I find that all examples come as a pair, client-server. But in my case the board will be the server ( providing data continuously) and Computer with Labview will act as a client (Continuous receiving). Is there any readily available example on Labview for this purpose. If not, can you please suggest which example I need to modify for my purpose? Thanks

 

Arvind

0 Kudos
Message 1 of 5
(2,869 Views)

Hi Arvind,

 

Could you describe a little more about the specific hardware that you're trying to connect to?  While the LabVIEW shipping examples are created with a host and client VI in order to demonstrate the functionality within LabVIEW, I imagine that you could use a similar architecture with the TCP VIs to simply use the client VI on the development computer to read from a specific port.

 

Thanks!

 

- Greg J

0 Kudos
Message 2 of 5
(2,825 Views)

Hi Greg, thanks for the reply. I am connecting to a PICDEM.NET2 board which is sending data through its ethernet port. I know the port number and the IP address of the board. I want labview to listen to this port and store the incoming packets. I am not sure how LABVIEW disintegrates the TCP packets and takes only the data out. Since I am not seeing anything on the LABVIEW client, so I am starting to think that TCP Client on LABVIEW may have some prescribed packet format which is not the format in which I am sending my data in. Please enlighten me if I am wrong. If you need more information, please tell me what you will need, I will provide you immediately.

 

Thanks

 

Arvind

0 Kudos
Message 3 of 5
(2,816 Views)

Hi Arvind,

 

Knowing the IP address and port number, you should be able to use the TCP Open Connection VI to connect and listen on the port that your device is communicating on.  The client side of the example pairs that you found should show how to use the TCP VIs to do exactly that... one of which you can find by going to the NI Example Finder (Help / Find Examples...) and Browsing to Networking / TCP & UDP / Simple Data Client.vi

 

I hope this helps.

 

- Greg J

0 Kudos
Message 4 of 5
(2,774 Views)

 


@arvind3tthiru wrote:

Hi Greg, thanks for the reply. I am connecting to a PICDEM.NET2 board which is sending data through its ethernet port. I know the port number and the IP address of the board. I want labview to listen to this port and store the incoming packets. I am not sure how LABVIEW disintegrates the TCP packets and takes only the data out. Since I am not seeing anything on the LABVIEW client, so I am starting to think that TCP Client on LABVIEW may have some prescribed packet format which is not the format in which I am sending my data in. Please enlighten me if I am wrong. If you need more information, please tell me what you will need, I will provide you immediately.

 

Thanks

 

Arvind


LabVIEW has no "predesribed" packet format, and it doesn't take packets apart. LabVIEW operates at the application level, so the OS is responsible for providing the data that's contained in the packet to LabVIEW. LabVIEW just sees the data in the packets.

 

 

Have you verified that a connection is actually being made? You said that the LabVIEW should listen to this port. Did you create a listener on the LabVIEW side? Does the microchip code indicate a connection? You may want to use Wireshark to capture the packets to see exactly what is going on.

0 Kudos
Message 5 of 5
(2,749 Views)