07-20-2018 01:10 PM
Glad to hear you got it working. Taking a random guess here, is your new error something along the lines of "538182 occured at <APPEND> Function 3"?
07-20-2018 01:11 PM - edited 07-20-2018 01:15 PM
@sbusbyepri wrote:
Glad to hear you got it working. Taking a random guess here, is your new error something along the lines of "538182 occured at <APPEND> Function 3"?
How did you guess? I was just writing a post about that except it's Function 4
Error 538181 occurred at <APPEND>Function 4
Possible reason(s):
Modbus Error: Illegal Function. This function is not implemented on the server.
Function 4
Using the Modbus Master Example.vi
07-20-2018 01:19 PM
It's the error I got as soon as I got communications working. That's an error with the actual communication, rather than a timeout because of a failed connection. With mine, it was because of an invalid address. I was trying to query address 0 which isn't a legal address on Acuvims. Changing it to 3000 (make sure it's in hexadecimal) worked. The last digit of your error code tells you the MODBUS exception code. This document has the exception codes on page 47. It looks like yours is an invalid function. What function are you trying to use?
07-20-2018 01:26 PM - edited 07-20-2018 01:27 PM
Well it would seem that none of the functions are implemented on the Accuvim?
Every function I try in the Modbus Master Example returns an error that the specific function is not implemented.
?
07-20-2018 01:30 PM
That's strange. Try using the "Read holding registers" SubVI, and see if that changes anything. Looking at the manual, the Acuvim should recognize function codes 1, 2, 3, 5, and 16.
07-20-2018 02:13 PM
@sbusbyepri wrote:
That's strange. Try using the "Read holding registers" SubVI, and see if that changes anything. Looking at the manual, the Acuvim should recognize function codes 1, 2, 3, 5, and 16.
Read Holding Registers returns the error "An unknown message was sent in the code"
07-20-2018 02:18 PM
That's very strange. I've not seen that error before. Make sure your numeric constants for the read holding registers VI are correct. The address input should be formatted for hexadecimal. If that turns up nothing, try looking at the Acuvim while you try querying it. A small computer icon should pop up in the bottom left corner of the display when it receives data.
07-20-2018 02:33 PM - edited 07-20-2018 02:52 PM
@sbusbyepri wrote:
That's very strange. I've not seen that error before. M
That is the default case message in the Modbus Master Example.
I figured it out embarrassing myself with a misspelled case.
It seems to be working now
07-24-2018 03:28 PM
How can I read a register as a float?
---Email from Accu Energy---
In order to read the primary registers correctly you will need to poll them as a float data type. If you are unable to poll as a float you will need to convert the integer values into float values to correctly read from the Primary registers.
The secondary registers are polled as integer which is why you were able to see the value of 120.3V for phase A voltage. The main difference between the Primary and secondary registers is that you do get more accurate readings from the Primary registers because of the additional decimal places as opposed to just 1 decimal place for the secondary registers.
---end email---
07-24-2018 03:45 PM
Read adjacent registers, combine to 32 wide, then run through a type cast to SGL.
Assuming your meter handles these as IEEE 754 floats.