jsmn Posted September 29, 2014 Report Posted September 29, 2014 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
MVP 2023 Joe Tauser Posted September 29, 2014 MVP 2023 Report Posted September 29, 2014 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
jsmn Posted September 30, 2014 Author Report Posted September 30, 2014 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
MVP 2023 Joe Tauser Posted September 30, 2014 MVP 2023 Report Posted September 30, 2014 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.
ozone Posted October 11, 2014 Report Posted October 11, 2014 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.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now