Reading MODBUS TCP data


I am looking to read some modbus data from some Mayekawa chillers. How do I reference these points in my program?

So my panel IP is:
My first modbus device is

I need to read registers: 40101-40115, and 40131



Looking at the example on the forum:

I think it will work out to something like this in your application:

10 VAR2 = 31MB_REG40101.

Let me know how this works out for you. The staff are all off till Feb 2 for the local break, we will help out more later if this doesnt work.

No luck. No data is pulled in.

Latest version of firmware and software

Solving problems, one building at a time.

Hey Jim, according to the example that Maurice pointed you to, you might need to place the modbus network ID number of your modus device after the last IP digit with a decimal separating them.

For example, if your modus network ID number is 101, then it would look like this.

10 VAR2 = 31.101MB_REG40101

I know that they were talking about a rework of how that gets addressed for bacnet, but for modbus, I thought that it was still addressed that way.


Hi Jim,
you can understand how to do a poll on Modbus by reading the topic:
I hope you find it useful.


I will give it another try. Didn’t seem to work but perhaps I was being hasty.

I did try that too.

Solving problems, one building at a time.

Here are a couple screen caps of what I am seeing. Does anything jump out at anyone?


I have 2 devices I am trying to read. The first is, device id 31 and, device id 32.

Thanks All,

I have found the error of what I was doing:

Should be: var = 31.31.MB_REG101, not 40101

Thanks again,


Nice catch there Jim!

A post was split to a new topic: Pi reading modbus registers