« Close

Datasheets and User Guides

App Notes

Software & Driver

 

Modbus Client Applications

LabJacks with Modbus support follow the standard, so any Modbus TCP Client should be able to talk to our devices.  See the Protocol Details page for everything you need to know about Modbus TCP on a LabJack, but here are a few highlights:

  • The LabJack is a Modbus TCP Server.  A Modbus TCP Client can send a command to the LabJack and get back a response.  Sometimes a Server is called the Slave and a Client is called the Master.
  • We use a single register map with addresses from 0 to 65535.  Each address points to a 16-bit value that might be readable, writable, or both.
  • The meaning of the registers are defined in our Modbus Map.
  • Use function 3, 4, 6, or 16.  Choose "Holding" if needed.


Common quirks to watch for with Modbus Clients:

  1. The client subtracts 1 from all addresses.  You tell the client you want to read address 2000, but the client puts 1999 in the actual packet.  That means if you want to read address 2000, you have to tell the client 2001.  This seems to be an attempt to give the user addresses that go from 1-65536 rather than 0-65535.  We use 0-65535 addressing.  If you want to read address 2000, then 2000 should be in the packet.
  2. The software flips the order of the words within a 32-bit value.  For example, a read of TEST should return 0x00112233, but the client returns 0x22330011.
  3. The software says it is adding 40000 to the addresses, but if you look at the actual packet it is not.  For example, if you ask the software to read from 2000, it will say it is reading from 42000, but in the actual Modbus packet it specifies address 2000.  Does not seem to cause problems, but can be confusing.

General Modbus Information

More getting started information and general Modbus resources can be found on the Modbus API Documentation page.

 

AzeoTech QuickMod (free download)

We got this to work easily.  Do the following to start reading FIO0-FIO3:

Start => Programs => DAQFactory => Samples => QuickMod Modbus Scanner:

  • Select Modbus TCP over Ethernet.
  • Click Configure, set IP Address to the correct value, and set Port = 502.
  • Change Tag # = 2000.

 

Chipkin CAS Modbus Scanner (free download)

We got this to work easily, but noticed all 3 quirks above.

Steps to read FIO0-FIO3:

  • Add a TCP connection with proper IP and port 502.
  • Add a device with ID 1.
  • Add a request with Function #3, Offset=2001, and Length=4.
  • Go back to the main screen, select that task/request, and click "Poll".


Rockwell / Allen-Bradley PLC

A customer reported success with an EN2T module specifically, and others have reported success with Allen-Bradley PLCs in general.  Reference technote 470365 (from Rockwell Automation or Allen-Bradley).

 

Maple Systems 5070TH, Weintek MT8070iH, EasyBuilder Pro

A customer told us that the 5070TH and MT8070iH are the same HMI.  EasyBuilder Pro software is a free download, and has a simulator that can be used for testing.  While helping the customer we did get EasyBuilder Pro to work ourselves, and made the following obscure notes for someone who knows nothing about the software:

  • To change settings for the LabJack, go to Edit => System Parameters.
  • To change settings for the Numeric Display Object, click on it, then right-click and go to Attributes.
  • To make it go, click on On-Line Simulation.

We noticed that this client had quirks #1 and #2 from the list at the top of this page.  To handle #2, EasyBuilder provides a function called SWAPW that the customer used successfully.

 

Wonderware

A customer reported success with Wonderware.  They reported that it had all 3 quirks from the list at the top of this page, and in fact they had to request address 40001 to get it to read address 0.

 

Modbus Client Applications Table

Modbus Client Applications (T-Series)

T7 T4

T7, T4


Clients... Windows Mac Linux

More information about Modbus as well as some getting started information can be found on the Modbus API Documentation page.