Jump to content
  • 0

DASYlab linking to Modbus/TCP via Ethernet Cable



Hi all, 


I am new to using DASYlab and I had a few questions about something I've been tasked with at work. We have a CAI 700 instrument we're trying to connect to DASYlab via ethernet -- specifically through the Modbus function. I have already assigned IP addresses to the instrument and ethernet port on the computer so they can communicate. We are using a router to communicate with the instrument and the computer.  I am able to ping the instrument's IP from the CMD prompt on the computer so they're connected. Now I'm just trying to configure the DASYlab module correctly so I can get data from our analyzer. 

I created a new Modbus input and changed the interface to TCP/IP and put in the IP address of the CAI instrument. The unit is V, I checked the Register starts at 0 box as well as Big Endian. Here's where I'm lost. The CAI instrument manual tells us the 40 series register numbers and their contents however I believe we need to use the 30 series registers since it states 30 = input and 40 = holding. I've assigned the data type as a float since we are wanting to see the full output of the instrument, decimals and all. I chose a random address (18) and changed the register to match. When I hit the test button, I get: 

"Modbus module response:

Address: 18

Raw data: 0 

Scaled data: 0.00000"


I should be getting a different reading since my CAI analyzer is reading ambient room levels of CO, CO2 and O2. 

I'll post a picture as well what my end looks like. I'm using DASYlab version 15.1.0. 



Any suggestions would be greatly appreciated! 


Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

I don't know how helpful I can be. We don't have Modbus devices to test, and the support was added to DASYLab many years ago. Now that I've set the bar low, I briefly review the CAI 700 user manual. Page 197 lists the registers you can read and they do begin with 40. A quick Google search told me that registers starting with 30 are read-only registers, and 40 are read-write. Looking at the image you provided, your device is set to address 18, and you are attempting to read 30018. Unfortunately, there is no 30018 register. I recommend checking to ensure the instrument is at address 18 and experimenting with reading registers listed on page 197, specifying floating point data. 

Link to comment
Share on other sites

  • 0

The CAI tech support did get back with me and told me we should be using the 40 series registers. When we try though, 0-2 registers return 0s in the data results and the rest of the registers time out. Do you know what could be causing the time outs? Additionally, it's strange that we are only seeing zeros for the first 3 registers when we're sampling ambient air. We should be getting real-time data and seeing something for the raw data registers but we get nothing. 


Could it be the lack of a driver we need to install on the PC? I am also wondering if the fact that we're using the PC as the Modbus controller itself is a problem. We have no other external hardware communicating between the PC and the instrument. 


Also, just for clarification, are we supposed to match the address number to the register number (i.e., if I use address 123 I would fill in the register blank on the right of the 40 as 123)?

Edited by kbtyson96
Link to comment
Share on other sites

  • 0

Communication is via Ethernet and driver support for it is built into Windows, so it shouldn't be a driver issue.

The CAI 700 manual says the following about the address register:

The Modbus Slave Address field usually used on a Modbus Serial Line is replaced by a
single-byte Unit Identifier within the MBAP Header. The Unit Identifier is used to
communicate via devices such as bridges, routers and gateways that use a single IP
address to support multiple independent Modbus end units

So, I don't believe it's used.

I downloaded a free Modbus simulator and was able to read data from registers 400000 - 465536 (40/0 - 40/65536).  Your device lists registers that begin at 40001. I'm confused by this, do they mean 4040001 (40/40001)? To read Float data from register 400001, I would set the Modbus module to read 400003 (40/3). Float data takes up two registers and numbers are a N-1. So three reads 1 & 2. 


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...