Jump to content

Recommended Posts

Hi

I  have invested a lot of time without succes to comunicate  a  US7-B10-RA28(+ module UAC-CX-01RS4)  with a ultrasonic device( modbus  RS485 ). I want to read holding registers (40001 to 40016).  The manufacturer of device recommend to read the holding register (03) ( 40001 to 40016), I did this with unilogic software but without succes¡

In Global Tags show:

Modbus Slave Status: 3

 

Could help me ? I do not Know What is the error?

 

Port operation.GIF

Hardware config.GIF

Edited by MarioGS
Add Config
Link to post
Share on other sites

Change the address to 0.  Here's why-

Modbus holding register addresses are designated as 4xxxx.  When you enter the address in UniStream as above, the "4" is implied.

In the original Modbus specification, the register count starts at 40001, which is the first holding register.  Unitronics reads the actual memory of the device, which starts at 0.

Different manufacturers use different conventions for Modbus, either 1 or 0 based.  It looks like yours is using 1, so you have to subtract 1 from each address.

As I've said before, this is all confusing to a new user.

Verify your port parameters - 8N2 is rather unusual.  It's usually 8N1.

Did you define your tag "Status Generator" as a 16 element array?

Joe T.

  • Upvote 1
Link to post
Share on other sites

Hi Joe

 

Thanks for your kind answer ¡

I made a test as you recommend but not succesfull.

Please see pics.

a. Recommendations Manufacturer of device to use Modbus to read Holding Register

b. Results of Test: Status of remote slave 

c. I change Status Generator UINT16 by  an Array 16 (UINT16)

 

Thanks again

MGS

Manufacturer Device.GIF

Remote Slave Status.GIF

Status Generator.GIF

Link to post
Share on other sites

Mario, before you go any further I suggest you get something like Modbus Poll and run it on your PC, with the PC connected directly to the device.  This way you can easily throw all sorts of Modbus requests and variations at the device and eventually find the correct numbers and addresses for what you want.  Once you have this info, found in this far easier and quicker way, you then know exactly what you have to incorporate into your program.

As Joe has pointed out, modbus can be terribly confusing, especially in handling a new device that may possibly not match what you expect.  Finding all your relevant parameters before your plc work is very beneficial, and in essence is a must-do.

Edit:  not being rude to anyone, but equipment coming from China often has serious translation errors in information sheets.  I often find totally different things achieve the required result.  Doing it via the PC lets you throw all sorts of things at the device to see what comes back.  This can be a little tedious, but is far easier than trying via the plc.  The saying above for stop being 2 bit I would treat very dubiously, and actually try 1.  It might be true, but might not.  Again, this is very easily changed on the PC during your trials!

cheers, Aus

Link to post
Share on other sites

Your ID address reads as value 0.  That should be something you set on your device, and it usually defaults to 1.  This can be a problem, as 1 is usually reserved for the master and I start numbering slaves at 2.

There is a conflict in the supplied information on your sheet - it says 40001 to 40016 and the address zone is 0x01 to 0x0F.    0x0F hex is actually decimal 15, so this is clearly an error.

Try putting a 2 in the ID Address (which is the Master), reading address 1,  and changing Status Generator back to a single dimension tag.  Let's just try to read one thing to establish communication. 

Also post your program so we can look at the whole picture.  Often there are things deeper in the configuration that beginners miss.  You've only posted a couple of pictures of what you're doing, not everything that could cause a problem.  

Joe T.

Link to post
Share on other sites

Hi 

Thanks for you kind answers ¡

I have tried with Modbus Poll but there is not communication¡ Timeout error.

At the beggining of my application I test with a Tag Status generator  UINT16 and Slave ID "1" but without communication. The manufacturer of device said that ID by default is 1¡ That ID is in a Holding Register, 40009.

The master of application is the unistream, as I said before,  but I think is not necesary to config an ID for it? or  YES? Do I need to config the master with a ID?

I want to stablish a basic communication reading a Only Holding register, 40001, and after the others. 

I show some pics of my config as attach

 

I have appreciated all comments, thanks again.

Xplorer Protocols Master.GIF

Xplorer Protocols Slaves.GIF

Properties Window Slave1.GIF

Remote Slave1.GIF

Sheet 2.GIF

Sheet3.GIF

Sheet4.GIF

Link to post
Share on other sites

Be aware that if you try to access multiple registers in Modbus Poll and the device doesn't use the entire range specified, it will do a timeout.

You need to try different single registers in all the different Function types to try and get some sort of response from the device in the first place.  Once you have achieved that, you can start building on the knowledge by then trying multiple register reads etc.  Eventually you will get the full picture by relating what you are getting back to what is specified in the manual.

In those specs, I see that the comms address 40009 is listed as only 1-15.  So I'd start with trying on slave ID 1.  I have also had chinese based thingamyjigs that I can never talk with in the first place, no matter what I do, as they default to ID 0.  They have a special program that sets the com address, and even this has been a nightmare to navigate at times.  But once you have changed it away from 0, access is easy.  Ensure that this device does not need that.  To me you still need to be using the PC initially as an easy way to get the basics.

cheers, Aus

Link to post
Share on other sites
  • 2 weeks later...

Hi 

Thanks Joe and Ausman for all your comments¡

I made test with your recommendations but there is no communication:

The manufacturer sent to me an HMI,  made by Weinview- WeinTek, configured to read the Holding Register and It works¡ My project is to use Unistream to read Holding Register as I said before.

Then I made a reverse engineering downloading the configuration of that HMI and found  that Addresses of Holding register are 6x, where x are 0 to 15. Check image of this.

I am using modbus poll to try understand the problem.

How can I read addresses like 6x? The Chinese manufacturer of HMI call to this config Modbus RT adjustable.

Unitronics read Holding Registers 4x, modbus poll too.

Comments, suggestions are welcome

Thanks and Regards 

 

HMI config.GIF

Properties Read.GIF

Addresses Read.GIF

Link to post
Share on other sites
  • 1 year later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...