Ethernet How To

We recommend to use UDP instead of TCP if possible. See TCP vs UDP.

Project settings

dynamic configuration
In the Communication options tab of the build specifications set the check mark Enable lwIP TCP/IP support.
Set the IP address to 7.7.7.7
The section Set IP address programmatically below shows how IP address is set with dynamic configuration.
fix configuration
If you set any other IP address or enable DHCP support, the Ethernet component will be started before any VI is executed. This leads to longer boot time and can block the program (when no network is connected) before a watchdog can be set up or a life sign can be given out. The settings (IP adress, gateway, MAC address…) cannot be changed at runtime.

You will get the error Failed to open the lan-device in the VisualDSP++ console output if you use programmatic IP configuration with fix configuration.

Set IP address programmatically

From SDK version 3.2.1 empoli SP1 the IP Address, Subnet Mask, Gateway and MAC address can be set in the program at the start of th Ethernet component.
Start up Ethernet with Labview on Microprocessor
drag and drop this VI snippet into a LabVIEW block diagram.
In version 3.2.1 a workaround is needed to enable a correct setting of the MAC address.

Protocolls

 
ethernet_how_to.txt · Last modified: 2017/11/07 22:26 by 127.0.0.1
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki