Greetings! I have successfully established a connection in TIA Portal with a Carlo Gavazzi EM26-96 energy analyzer using Modbus RTU protocol. My main goal is to retrieve the total kWh data, which is located at modicon address 300063 according to the manual. In the MB_Master client, I have been using address 400064 after several attempts, and it seems to be the correct address. However, I am encountering a discrepancy between the values displayed on the EM screen and in TIA Portal. Despite this, I have created a simple code to calculate hourly kWh using the data fetched from TIA, yielding approximately 40 kWh/hr. On the other hand, the EM screen displays a value of around 103 kWh/hr. I have noticed that when I use certain addresses, such as 400002 for V L1 and 400004 for V L2, everything seems to align properly. However, address 400006 does not provide V L3 as expected but instead shows V L1-L2. This discrepancy leads me to suspect that there may be a misalignment in the V L numbers. Additionally, the values for kWh (+) L3 remain stagnant and have not incremented for the past two weeks, unlike L1 and L2 which continue to increase. Moreover, the kWh total and kWh partial addresses show identical values, which raises some concerns. Could the DMD functionality and phase configurations of the energy analyzer be influencing the data interpretation in TIA Portal? I am seeking assistance in understanding why these discrepancies are occurring and if there are any solutions available from someone who may have encountered similar issues.
In order to access voltage values at addresses 400001, 400003, and 400005, as well as the counter value at address 400063, it is important to consider the format of Cavazzi registers. Make sure to read the Dint length when working with these registers. If you are reading in int format, be aware that the MSB value of the Dint may be missing. To address any byte swap issues, check readings at addresses 400002 and 400004, as there may be a problem with the byte order on the Siemens side. Please note that the byte order for Dint format can vary between manufacturers, potentially leading to incorrect byte ordering.
Are you reading register 400064 instead of 300063 as specified in the manual? Registers starting with 40* are Holding Registers while those starting with 30* are Analog Inputs. Is your Modbus client unable to read Analog Inputs?
For proper Modbus register mapping, either [3]xxxxx (Analog Inputs) or [4]xxxxx (Holding Registers) can be used effectively (refer to page 9, section 2.3). It is important to note that ODD 1-based Modbus addresses must be passed. For example, the 32-bit value representing 10*V L1-N includes the two 16-bit Holding Registers [4]00001 & [4]00002 (or [3]00001 and [3]00002). When reading 32-bits starting at [4]00002, you are essentially reading the upper half (MSWord) of 10*V L1-N, and the lower half (LSWord) of 10*V L2-N. The maximum value for either of these values is 4850 (485 * 10), making the upper 16 bits 0, and the lower word non-zero. It is easy to mistakenly mix up the two halves if not careful. When transferring data into a Siemens PLC like an S7-1200, which follows MSByte- and MSWord-first format, ensure to adjust for the LSWords-first format of devices like EM26-96. It is important to correctly interpret the data to avoid discrepancies in the values obtained. To rectify LSWord-first Registers to MSWord-first, refer to the recommended approaches below. It is worth noting that byte order within register words is not significant, as Siemens and Carlo Gavazzi have properly implemented their Modbus drivers to handle the conversion seamlessly. The provided Modbus Server and TIA Modbus Client code can be used to swap register words and reassemble them into 32-bit DWords. Different approaches may be applied depending on the desired outcome, with some requiring fewer instructions for efficient execution.
Thank you so much for the responses received! I am truly grateful for the assistance provided. I want to clarify that I am utilizing DINT as the data format according to the manual. I have set the data length to 10 in order to display 5 DINT addresses ahead. Therefore, when I read address 400001, the values displayed should be 40000-1/3/5/7/9, correct? The physical screen shows fluctuating values such as V L1-N 236.7, V L2-N 236.2, V L3-N 239.5, V L1-L2 409.1, V L2-L3 408.9, and V L3-L1 409.3. Despite the constant slight fluctuations, the values are relatively close when divided by 10. Should I consider reading it as a Dword and experimenting with byte swapping to analyze the data further, or could there be another factor at play here? Your input is greatly appreciated.
There seems to be some byte swapping happening in that data. It appears that you are interested in extracting the first and fourth bytes, which equate to 273770031. This puts you within 3.9kWh of the meter reading, assuming the final digit represents a decimal point.
Hello there! It does sound like the inconsistencies you're witnessing could be a DMD functionality issue or a phase configuration problem. However, network noise in Modbus RTU communication can sometimes yield incorrect values as well, so you might need to check your wiring. If it's possible, try swapping to a different energy analyzer to rule out faulty equipment. Also, keep in mind that the address conversion from Modicon to Modbus may follow an offset pattern, hence the difference in V L's data. You might want to reconfirm if you've correctly calculated the offset by consulting the Carlo Gavazzi EM26-96's manual or other relevant guide. Lastly, it’s unusual that kWh (+) L3 doesn't increment. This might hint towards an issue with only that particular channel or the communication of this specific data. Again, this is just based on my personal experiences with Modbus and energy analyzers. I hope it gives you a starting point for troubleshooting! Do keep us posted on your progress.
Hi there! Sounds like you're dealing with a tricky situation. From what you're saying, it seems like there might be some offset issues with your register addresses. Modbus addressing can often be a bit confusing due to the difference in zero-based and one-based addressing. The difference between the addresses you see in the Gavazzi manual and the addresses you need to use in TIA Portal might be a result of this. I'm not sure about the DMD functionality but yes, regarding phase configurations of the energy analyzer, it could certainly be causing this discrepancy in the data interpretation in TIA portal for different parameters. You should consider verifying your device settings. Also, do check whether there is any update missing, as this can solve such issues too. Good luck!
It sounds like you're diving deep into the complexities of the EM26-96 integration—nice work on making progress with the Modbus setup! The discrepancies you’re facing could definitely stem from various factors, including how phase configurations are set up on the analyzer itself. Some energy analyzers require specific settings for how they handle multiple phases, especially if they are configured for three-phase vs. single-phase monitoring. Have you double-checked the settings in the EM26-96? Also, it might help to ensure that the Modbus addresses you’re using align perfectly with the documentation, as any slight misalignment can lead to major differences in data interpretation. It could also be worthwhile to check if there's any firmware update available for your device that might address these inconsistencies. Keep experimenting with the arrangements and don’t hesitate to reach out to support for your analyzer!
Hey there! It sounds like you’re dealing with quite a puzzle! The discrepancies you're seeing could indeed be related to how the phases are configured in your energy analyzer. Double-check the wiring and phase assignments to ensure they match your configuration in TIA Portal. It's also worth verifying that the correct register types (e.g., signed/unsigned) are being interpreted in your code. Since some addresses align fine, it might just be a mismatch or an error in the configuration for L3 specifically. Have you tried doing a factory reset on the analyzer or checking if there's a firmware update? Sometimes, those can clear up odd behaviors like stagnant readings. Good luck, and I hope you get it sorted!
Hey there! It sounds like you're diving deep into your setup, and those discrepancies can definitely be frustrating. Have you double-checked the configuration settings on your Carlo Gavazzi EM26-96? Sometimes, the phase configuration can lead to unexpected readings, especially if it's set to a specific type of monitoring or if certain phases are not properly recognized. Also, it's worth looking into the data type and scale being used in TIA Portal for the Modbus addresses. If the EM is set up to report values in a different format (like integer vs. float), that mismatch can easily lead to the kind of discrepancies you're seeing. It might help to consult the manual for the specific registers you’re reading or reach out to Carlo Gavazzi’s support for insights tailored to your setup. Good luck!
It sounds like you're dealing with quite a complex setup! The discrepancies you're encountering might indeed stem from several factors, including how the EM26-96 is configured for its DMD functions and phase configurations. Sometimes, energy analyzers can have settings that group or average readings differently, especially across phases, which could explain why you're seeing stagnant L3 values while L1 and L2 continue to increment. Have you checked the configuration settings in the analyzer itself? It might also be worth revisiting the Modbus address map in the manual; sometimes, there can be confusion between 400 and 300 address spaces, so double-checking that could clear things up. Additionally, it could be beneficial to ensure that your TIA configuration matches the communication parameters of the analyzer, like baud rate and parity, as misconfigurations there can lead to unexpected data readings. Good luck, and I hope you find a resolution soon!
✅ Work Order Management
✅ Asset Tracking
✅ Preventive Maintenance
✅ Inspection Report
We have received your information. We will share Schedule Demo details on your Mail Id.
Answer: Answer: The discrepancies could be due to misalignment in the addressing used in TIA Portal compared to the Modbus addresses mentioned in the manual for the energy analyzer.
Answer: Answer: Double-check the Modbus addresses specified in the manual of the energy analyzer and ensure they align correctly with the addresses being used in TIA Portal for data retrieval.
Answer: Answer: The unexpected data could be a result of misconfigured addressing or potential issues with the interpretation of phase configurations in the energy analyzer, impacting the data fetched in TIA Portal.
Answer: Answer: The stagnant kWh values for L3 could be influenced by the DMD functionality or phase configurations of the energy analyzer, potentially causing discrepancies in data interpretation between TIA Portal and the actual readings on the energy analyzer screen.
Join hundreds of satisfied customers who have transformed their maintenance processes.
Sign up today and start optimizing your workflow.