« Close

Datasheets and User Guides

App Notes

Software & Driver

 

6.0 Ethernet

Communication Protocol:  Modbus TCP

Connector Type: RJ-45 Socket, Cat 5

Compatible: 10/100Base-T

PoE (Power over Ethernet): Not built-in.  See PoE App Note.

Max Cable Length: 100 meters typical

Max Packet Size: 1040 bytes/packet (TCP), 64 bytes/packet (UDP)

 

Overview

The T7 has a 10/100Base-T Ethernet connection. This connection only provides communication, so power must be provided through the USB connector. Refer to this WiFi and Ethernet tutorial to get started.

Ports

The T7 will respond to connections or packets on following ports:

  • 502 (TCP) - The T7 will respond to Modbus TCP packets received over this port.
  • 702 (TCP) - The T7 sends spontaneous data such as stream to devices connected to this port.
  • 52362 (UDP) - The T7 will respond to Modbus UDP packets received over this port. Usually used to search for T7s on a network. 

Note: If you need a wireless connection instead of Ethernet, you can buy a wireless bridge, and connect the T7 to the bridge, and the bridge will connect to the wireless network. Find more information in the Convert Ethernet to WiFi App Note.

Config (_DEFAULT) Registers versus Status Registers

The first list below is the config registers.  These are generally written to configure default Ethernet settings, but can also be read.  Configure the Ethernet parameters in Kipling software.

Any register with _DEFAULT at the end is non-volatile.  Whatever value you write to a _DEFAULT register will be retained through a reboot or power-cycle.

The second list below consists of read-only registers to read the status of Ethernet.

For example, if you write ETHERNET_IP_DEFAULT="192.168.1.207" (you actually write/read the 32-bit numeric equivalent not an IP string), then that value will be retained through reboots and is the default IP address.  If DHCP is disabled, this will be the static IP of the device and what you get if you read ETHERNET_IP.  If DHCP is enabled, then a read of ETHERNET_IP will return the IP set by the DHCP server.

 Register Listing

Ethernet Config Registers
Name Start Address Type Access
ETHERNET_IP_DEFAULT 49150 UINT32 R/W
ETHERNET_SUBNET_DEFAULT 49152 UINT32 R/W
ETHERNET_GATEWAY_DEFAULT 49154 UINT32 R/W
ETHERNET_DNS_DEFAULT 49156 UINT32 R/W
ETHERNET_ALTDNS_DEFAULT 49158 UINT32 R/W
ETHERNET_DHCP_ENABLE_DEFAULT 49160 UINT16 R/W
ETHERNET_IP_DEFAULT
- Address: 49150
The IP address of wired Ethernet after a power-cycle to the device.
  • Data type: UINT32  (type index = 1)
  • Readable and writable
ETHERNET_SUBNET_DEFAULT
- Address: 49152
The subnet of wired Ethernet after a power-cycle to the device.
  • Data type: UINT32  (type index = 1)
  • Readable and writable
ETHERNET_GATEWAY_DEFAULT
- Address: 49154
The gateway of wired Ethernet after a power-cycle to the device.
  • Data type: UINT32  (type index = 1)
  • Readable and writable
ETHERNET_DNS_DEFAULT
- Address: 49156
The DNS of wired Ethernet after a power-cycle to the device.
  • Data type: UINT32  (type index = 1)
  • Readable and writable
ETHERNET_ALTDNS_DEFAULT
- Address: 49158
The Alt DNS of wired Ethernet after a power-cycle to the device.
  • Data type: UINT32  (type index = 1)
  • Readable and writable
ETHERNET_DHCP_ENABLE_DEFAULT
- Address: 49160
The Enabled/Disabled state of Ethernet DHCP after a power-cycle to the device.
  • Data type: UINT16  (type index = 0)
  • Readable and writable

 

Ethernet Status Registers
Name Start Address Type Access
ETHERNET_IP 49100 UINT32 R
ETHERNET_SUBNET 49102 UINT32 R
ETHERNET_GATEWAY 49104 UINT32 R
ETHERNET_DNS 49106 UINT32 R
ETHERNET_ALTDNS 49108 UINT32 R
ETHERNET_DHCP_ENABLE 49110 UINT16 R
ETHERNET_IP
- Address: 49100
Read the current IP address of wired Ethernet.
  • Data type: UINT32  (type index = 1)
  • Read-only
ETHERNET_SUBNET
- Address: 49102
Read the current subnet of wired Ethernet.
  • Data type: UINT32  (type index = 1)
  • Read-only
ETHERNET_GATEWAY
- Address: 49104
Read the current gateway of wired Ethernet.
  • Data type: UINT32  (type index = 1)
  • Read-only
ETHERNET_DNS
- Address: 49106
Read the current DNS of wired Ethernet.
  • Data type: UINT32  (type index = 1)
  • Read-only
ETHERNET_ALTDNS
- Address: 49108
Read the current Alt DNS of wired Ethernet.
  • Data type: UINT32  (type index = 1)
  • Read-only
ETHERNET_DHCP_ENABLE
- Address: 49110
Read the current Enabled/Disabled state of Ethernet DHCP.
  • Data type: UINT16  (type index = 0)
  • Read-only

 

Some Examples

Read IP Example: To read the wired IP Address of a device, perform a modbus read of address 49100.  The value will be returned as an unsigned 32-bit number, such as 3232235691.  Change this number to an IP address by converting each binary group to an octet, and adding decimal points as necessary.  The result in this case would be "192.168.0.171".

Change IP Example: To change the Ethernet IP Address of a device, perform a modbus write to address 49150.  The value must be passed as an unsigned 32-bit number, such as 3232235691.  Change this IP address "192.168.0.171" by converting each octet to a binary group, and sticking them together.

More Details

Once default Ethernet configuration register(s) are changed, the current settings will be updated on the next power cycle.  Alternatively, toggle power to the Ethernet module by writing a 0, then a 1 to the POWER_ETHERNET address.

Ethernet Power Settings
Name Start Address Type Access
POWER_ETHERNET 48003 UINT16 R/W
POWER_ETHERNET_DEFAULT 48053 UINT16 R/W
POWER_ETHERNET
- Address: 48003
The current ON/OFF state of the Ethernet module. Provided to optionally reduce power consumption.
  • Data type: UINT16  (type index = 0)
  • Readable and writable
  • Minimum firmware version: 0.8600
POWER_ETHERNET_DEFAULT
- Address: 48053
The ON/OFF state of the Ethernet module after a power-cycle to the device.
  • Data type: UINT16  (type index = 0)
  • Readable and writable
  • Minimum firmware version: 0.8600

Isolation

The Ethernet connection on the T7 has 1500 volts of galvanic isolation.  All power supplies shipped by LabJack Corporation with the T7 have at least 500 volts of isolation.

Note that if you power the T7 from a USB host/hub, ground from the host/hub is typically connected to upstream USB ground which often finds its way back to AC mains ground and thus there would be no isolation.

LEDs on the Ethernet jack

Both the green and orange LEDs on the Ethernet jack will illuminate on connection to an active Ethernet cable. The orange LED turns on when an active link is detected and blinks when packets are received/processed. The green LED illuminates when the connection is 100Mbps.

 

The orange LED is closest to the USB connector.

 

 

8 comments

Hello,

will you soon provide a low-level functions reference for the T7? Is it even possible to communicate with the T7 by these low-level functions or do i have to stick with the modbus protocol?

Like this for the UE9 here: http://labjack.com/support/ue9/users-guide/5

Thank you and best regards

On the T7 Modbus is the low level protocol. I recommend looking at the LJM driver, it makes using modbus quite painless. Especially since it now accepts strings for many parameters.

 

What attracts you to the low-level protocol of the UE9?

Hello and thanks for your reply.

At first i want to stick with my favorite programming language perl. I suppose i need to build a wrapper for the LJM driver, that i could use them with perl. I didn't do this before so i'am kind a like scared of using this approach. And i want to be independent of a driver from the manufacturer.

There are two modbus modules on CPAN ( Comprehensive Perl Archive Network ) with which i think it should be easily possible to communicate with the T7. But i don't know this for sure. These two modules would be my first attempts to communicate with the T7.

The low-level protocol would be the "fall back solution" for me if the communication through these modbus modules will fail. It is really painless to interface something over TCP within perl and i'am sure, this would work under all circumstances. It would just take some work to implement all the commands but then i would be independent of a driver!

 

For the Modbus map/register list for the T7, you can check out http://labjack.com/support/modbus. From there, you can communicate with the T7 via plain Modbus over TCP.

We do recommend using the LabJackM (LJM) driver/library (http://labjack.com/support/ljm), as it takes care of many of the more complicated tasks, especially streaming (http://labjack.com/support/datasheets/t7/communication).

Eventually, we plan to write a Perl wrapper ourselves, although we currently do not have one in the works.

Does that help?

Yes thank you, that helped. I just wanted to make sure, that there is a possibility to communicate with the T7 via TCP without being dependent on the driver. For the case that everything else won't work.

First i'll try these modbus modules from CPAN. If they don't work i would go on with the drivers supplied by you and try to build a wrapper for the functions i want to use.

Do you have any suggestions or hints for building a wrapper in perl around your drivers?

For the UE9 it is documented that the ethernet connection has a 1500 volt galvanic isolation, and the labjack suplies have 500v standard.

Is this also the case for the t7 ?

Yes, same for the T7.  "Isolation" section just added above.

Thank you for the quick reply. T7 pro thus seems exactly right for our new project. Paul