From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

finding registers in modbus

I am trying to create a scada for a lighting energy controller for my senior design project and I have no modbus information on the device. Can I use the modbus master and slave examples to looking into registers to find out where and what kind of information is stored in the register tables?
0 Kudos
Message 1 of 9
(4,775 Views)

The modbus master query examples will be good ones to use.  But you are absolutely going to need some kind of information from the manufacturer of the device describing the address number and meaning of all of their modbus registers.  If they don't have it in some sort of general user's guide, then you need to see if they have some advanced manual or communications manual as a supplement.  If not, you will need to contact them.

0 Kudos
Message 2 of 9
(4,774 Views)
Raven's Fan is correct in that you will have to find some documentation to know what most of the registers are assigned to.  I did have luck reverse engineering a PLC I had no documentation on using Modbus Poll as a debugging tool, however.  They have a limited time free trial that should be enough to play around and learn a few things about your device.
Message Edited by Robbob on 04-06-2009 12:15 PM
Rob K
Measurements Mechanical Engineer (C-Series, USB X-Series)
National Instruments
CompactRIO Developers Guide
CompactRIO Out of the Box Video
0 Kudos
Message 3 of 9
(4,740 Views)
Robbob, thanks for the reply. I will download the software and take a look at it. Is there anything in particular that I should take note of when using the software? also what exactly were your results upon using the software.. thanks
0 Kudos
Message 4 of 9
(4,718 Views)

Well, the program allows you to look at many registers at once (Setup->Read/Write Definition) and then allow you to see what is changing when you take actions.

 

I had a PLC with many inputs and outputs, and no reference to what coils and registers they used.  So I used this software to view many channels at once, and just started writing values and seeing what changed on the PLC and then just wired some inputs and saw what registers changed.  Not sure how much is in your device or if this is possible, but it was trial and error that took quite a while.  It is always ideal to just track down the manual for the device you are using, and I suggest you try your best to acquire that.

Rob K
Measurements Mechanical Engineer (C-Series, USB X-Series)
National Instruments
CompactRIO Developers Guide
CompactRIO Out of the Box Video
0 Kudos
Message 5 of 9
(4,702 Views)

Robbob,

 

I downloaded the Modbus Poll and tried to connect to my device. I am getting a timeout error. This is the same error I get in labview when i connect to my device. Do you by chance know what the problem is? thanks

0 Kudos
Message 6 of 9
(4,634 Views)
also could the fact that my serial cable is 200ft long contribute to this problem? thanks
0 Kudos
Message 7 of 9
(4,613 Views)

tballer wrote:
also could the fact that my serial cable is 200ft long contribute to this problem? thanks

 

Are  you using RS-232 or RS-485?

 

If you are using RS-232, then yes, you definitely have a problem as it is only supposed to be good for about 50 feet.  This could be a bit more or less depending upon your baud rate.  If you are using RS-485, you should be okay as that should be good for about 4000 feet (also depending on baud rate)

0 Kudos
Message 8 of 9
(4,610 Views)

When I have a MODBUS communication Issue the first thing I check is that the device and the modbus communication vis on the PC side are set to the same rate.  By default the vi are probably 9800 and I have found that modbus devices many times have been set to 19200 Baud.  This has cost me many hours so I always check this early in the debug process.  I even have written an open vi that will test a querry at several popular communication speeds to autoset the rate (ie the rate with a correct querry is the BAUD I want).

 

 

 

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 9 of 9
(4,598 Views)