Simple Read Input Register


JohnyQuick

Recommended Posts

I've discovered MODBUS, and the people from Switzerland aren't much help.

I have a few "beginner" questions.

I made a device , and named it OPTIMA.

Following the DF manual I set up some channels, and to my surprise, after choosing Modbus TCP protocal,

I can see some numbers changing in channel view table. Do I need to know the IP of the device? How do I find out the IP of my device?

First, The Device # or Device ID in the channel view, I used 0 or 1, and both worked, but just where, or what does the device # derive from and mean? Is it an IP?

Second, I tested my channels with read modbus register 30001, and register 30002. Channels 1 and 2 in DF.

My Channels read, 256, and 512 respectively. Where Register 30001, and 30002, are supposed to be

"GAs Reading" and "Scale Value", according to their manual.

So, something is not right, because I was running zero air through the "OPTIMA". Do I need to convert the 16 bit or whatever back into decimal? How?

I tested another channel(40036), 36 in DF, which is supposed to be Date-Time Stamp. And The Channel read 9216.

Later, I see these were input registers, needing the 04 Modbus, not 03, which I was using. The "holding " registers, need 03 to read.

Anyway, I' need to find the"holding" register, that has value, that changes the gas calibration, so I can read 100%, and not just 100% LEL. And then I need to change that register's value using DF.

The manual(from Switzerland) doesn't list all the registers, and what they hold/mean. So that is part of my problem.

Is there a way to create a list, or do I just keep making channels, and see how many I can read. And try writing to them all to change the calibration? Writing down the changes, of course, to change them back later.

Confused, all over again. :blink:

Link to comment
Share on other sites

Actually,

I'm waiting for a RS232 to RS 485 converter, before I can get started. Duh.

I want to change a holding register, to change a gas calibration. The instrument manual doesn't say which register holds

the information I need to change, but by process of elimination I should find out.

The instrument holding registers start with a 4, instead of a 3.

So, when I set up channels, should i use .e.g. 40001, 40002, instead of only channel 1 or channel 2? In DF?

Or does it matter?

Another question, my instrument has a default Modbus address of 99. Do I need to specify the Modbus RTU address in DaqFactory, or is that already taken care of, just by setting up a serial device using Modbus RTU Protocol?

Also, Does DF take care of translating binary to aphanumeric for me? So assuming I get to read the instruments holding registers, then I can understand what they hold. If you catch my question.

Thanks in advance of this project.

Link to comment
Share on other sites

Process of elimination is probably not going to work. There are 65535 possible registers for each of the 4 modbus types (coil, input status, holding register, input register).

You should probably use 1, 2 notation instead of 40001, 40002, but remember 40001 corresponds to 0, not 1. It doesn't really matter which you use. Follow whatever is in the manual.

Yes you need to specify the address, otherwise it won't respond to the query. This is the D# of your channel.

Yes, DF takes care of converting into binary and back for you, provided you select the right I/O type.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.