Jump to content
Sign in to follow this  
jsmn

modbus device

Recommended Posts

Hello Unitronics.

I have earlier got great help with HSC and ALARMS,Thank you very much.

Now i am trying to understand how to get some information from a Modbus Device.

Attach file i send my Modbus Device information.

On page 8 there is some adresses i will have in my PLC display.

Ex.adress 300001,300003,300005.

My hardware is V570 + V200-18-E6B

If i only could get som initiale help,i will be very happy.

Thank you/jsmn

Share this post


Link to post
Share on other sites

Your device information file did not get attached.

 

Modbus registers that start with a 3 are known as "input registers".

 

The attached program reads a block of 10 of them starting at 300001 into MI 101..110.  Your device will be attached to PLC Port 2.  It's up to you to get the cable and COM parameters right.

 

Let us know what else you need.

 

Joe T.

Read Input Regs JT.vlp

Share this post


Link to post
Share on other sites

Hallo Joe Tauser. Thank you for your support.

I have some basic questions.

1.Do i define the start adress (300001)in "Slave start of vector".

2.Do i define the start MI:s (M101)in "Master start of vector".

3.Do i define the number of adresses (#10)in "Read vectors lengdh"

4.If i want to read more then #10 adresses ?

5.Is it a diffrent program if i have more then one slave devise.

My device information file did not get attached. I try again.

Man_CG_EM24_Modbus.pdf

Share this post


Link to post
Share on other sites

Ah, my friends at Carlo.  We are a distributor for them.

 

1.  The "3" is implied in "Read Input Register".  If you want to start at 300001 then use "1".

2.  MI 101 is an arbitrary location I chose to put the data.  You can put it anywhere you like, but since these are 32 bit words you may want to experiment with putting them in MLs.  If that doesn't work you'll need to combine two MI's in your code into an ML.

3.  The number of addresses is the number of 16 bit addresses, hence the skip in the device's 32 bit Modbus address table.  You'll have to double the number of  words you want to read in vector length.

4.  Modbus can supposedly read 125 addresses at once.  I've never tried to read that many with Unitronics, so I don't know for sure how many it will read.

5.  If you have more than one slave you can configure identical blocks with different slave addresses.  Only trigger one at a time and wait for it to finish.

 

If you have the device I would strongly recommend connecting it and start experimenting until you understand what the parameters need to be.

 

Joe T.

Share this post


Link to post
Share on other sites

Ah, my friends at Carlo.  We are a distributor for them.

 

1.  The "3" is implied in "Read Input Register".  If you want to start at 300001 then use "1".

2.  MI 101 is an arbitrary location I chose to put the data.  You can put it anywhere you like, but since these are 32 bit words you may want to experiment with putting them in MLs.  If that doesn't work you'll need to combine two MI's in your code into an ML.

3.  The number of addresses is the number of 16 bit addresses, hence the skip in the device's 32 bit Modbus address table.  You'll have to double the number of  words you want to read in vector length.

4.  Modbus can supposedly read 125 addresses at once.  I've never tried to read that many with Unitronics, so I don't know for sure how many it will read.

5.  If you have more than one slave you can configure identical blocks with different slave addresses.  Only trigger one at a time and wait for it to finish.

 

If you have the device I would strongly recommend connecting it and start experimenting until you understand what the parameters need to be.

 

Joe T.

This does not work on mine.

 

I have V1040 connected to a device through Modbus.

 

While reading input register 30001, If put "1" for  "slave start of vector", it reads from register 30002. So I have to put "0" to be able to read from 30001. Looks like the register start address is offset by 1.  Also I tried other Modbus block. all are the same, it took me some time to find out this.  

Share this post


Link to post
Share on other sites

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.

Sign in to follow this  

×
×
  • Create New...