Industry Automation and Control Forum
This forum is addressing industrial automation design & engineering, operations, asset performance, cyber security and digital transformation for Plants & Machines.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-02-22 05:08 AM
Hi I am trying to read multiple registers from a A9MEM2050 to integrate to a M221 PLC. I noticed that the block size (number of registers in a single request) of this sensor seems to be very small. For example, I am not able to read from 45101 to 45107 in a single request. Which forces me to use a lot of READ_VARs, I am only able to read this registers one by one.
I understand that if there is a gap between different registers I need to split into other request (another READ_VAR) but for something sequential I would expect to be done in a single request.
A9MEM2050 manual page 21
Energy values - 32-bits floating point
Total energy
45101 -> Forward active energy
45103 -> Reverse active energy
45105 -> Forward reactive energy
45107 -> Reverse reactive energy
Any ideas? Documentation is very vague in terms of modbus functions, modbus block size limitation. In this case I assume that it should follow standard modbus protocol (127 registers/words), but it does't.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-02-25 01:03 PM . Last Modified: 2024-02-25 01:09 PM
As @Hennie_Smith says, you may need to adjust your read to be 45101-45108, otherwise you are not reading the whole of the last data point, and it may reject it.
I encountered something on an ABB EKIP which may be similar. If you try and read a single register, but the register is defined in the device as a double word, reading only one word will mean the read fails. Other devices just give the one word but the number is meaningless without its 2nd half. The read start and end point had to fall exactly on the devices defined data types and sizes.
I cannot vouch for this particular meter, but you do have to be careful with some devices if you read registers that are not defined in the device. If registers 101-108 are defined, but you are reading 101-118, for example, and any register in the range 101-118 is not defined, then the whole read will fail. This was a particular pain as things like I/O servers optimize reads by doing block reads. If there are undefined registers in the block, then the whole read fails, so it is necessary to tune the read to only read small blocks.
I highly recommend using a tool called Modbus Tester and probe available registers and play with read block sizes. I found a SE link to download it from here:
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-02-22 09:35 PM
Hi,
When using either the Modbus IO scanner (Ethernet or Serial) or using the Read_VAR FB, you can read the full packet (45101 - 45108). If you receive error, try 1 offset on the addressing (45100 - 45107). Try first using a modbus simulator from your PC which will give you the exact modbus exception code.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-02-25 01:03 PM . Last Modified: 2024-02-25 01:09 PM
As @Hennie_Smith says, you may need to adjust your read to be 45101-45108, otherwise you are not reading the whole of the last data point, and it may reject it.
I encountered something on an ABB EKIP which may be similar. If you try and read a single register, but the register is defined in the device as a double word, reading only one word will mean the read fails. Other devices just give the one word but the number is meaningless without its 2nd half. The read start and end point had to fall exactly on the devices defined data types and sizes.
I cannot vouch for this particular meter, but you do have to be careful with some devices if you read registers that are not defined in the device. If registers 101-108 are defined, but you are reading 101-118, for example, and any register in the range 101-118 is not defined, then the whole read will fail. This was a particular pain as things like I/O servers optimize reads by doing block reads. If there are undefined registers in the block, then the whole read fails, so it is necessary to tune the read to only read small blocks.
I highly recommend using a tool called Modbus Tester and probe available registers and play with read block sizes. I found a SE link to download it from here:
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-02-26 11:17 PM
Hi Paolo,
I think the most important infos are give, but did you notice that there are macros for the engerymeter are integrated in ESME Basic?
Link copied. Please paste this link to share this article on your social media post.
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.