I’m trying to read data from an Eaton 93M UPS and it has a “Date” type that is 6 bytes (3 words) long? Any ideas on how to read that data in? The format is ymdHMS, and the value when I export from the device is like this: 2022-08-31T07:08:00Z.
I’m guessing I’m going to have to read it into 3 HRUS (16 bit holding registers) and then use an expression to combine them into one tag? Not sure how to do that.
I appreciate any help.
Do you know if the bytes are BCD or binary?
I really don’t. I think binary, I tried a HRI_64 and it came the closest to being correct.
Do you have a manual? You already know the general approach that will be needed, but knowing how to combine them in the expression is going to require we know how the date is encoded in the first place.
If you show us the current integer values using the three HRUI formats, we can probably decipher it.
It won’t let me upload a file, but all I have is a CSV file the device let’s me download with all the Modbus registers. I’ll try and paste everything I can.
Parameter Name,Display Name,Base Address (1-based),Discrete,Units,Type,Size (bytes),Is Timestamp,Bit Offset,Swap Bytes,Swap Words,Divider,Multiplier,Date Spec,Alarm On,False,Writable,Modbus Value,Possible Values,Description
sLastBatteryTest1,Datetime Of Last Battery Test 1,17047,No,no-units,DATE,6,No,No,No,ymdHMS,No,2000-01-01T00:00:00Z
Sorry it’s so hard to read, but not much there. Basically it’s 6 bytes long, ymdHMS format, current value is 2000-01-01T00:00:00Z
I tried setting it as a HRUS and binary type but it returns an Array so I need to figure out how to print out the binary value?
Not sure I understand? An integer is 16,32,or 64 bits? I need 48, so I either read too few or too many?
You can’t use 64. You need to read exactly 48 or the extra 16 will corrupt the value. You need to read three 16 bit values separately, as integers. Then we can decipher those and just those.
Configure three tags to read the three consecutive registers starting with the indicated one, as integers. HRUI17047, HRUI17048, and HRUI17049, presumably. Show us the values.
Consider also trying HRBCD17047 through HRBCD17049. That might shortcut some of the math.
Ok, here is what I got back
HRUI17047 - 257
HRUI17048 - 16842752
HRUI17049 - 0
HRBCD17047 - 0
HRBCD17048 - 101
HRBDC17049 - 0
Another question, what is the path to UDT’s? I want to use system.tag.editTag to update a bunch of tags. Is that possible?
Can you re-address those as
HRUS or just
HR instead of
HRUI is 32-bit type.
HRUS17047 - 0
HRUS17048 - 257
HRUS17049 - 0
HR17047 - 0
HR17048 - 257
HR17049 - 0
I don’t know. I’m not really interested in trying to decode or reverse engineer this format, I’d rather see the manual.
If you squint you can maybe see something, though:
00 00 01 01 00 00
Not sure of 2000 is the epoch or where millis would come from…
I found this, not sure if they are correct?
Those are two different manuals. I appreciate the help!
Hi, Is this the correct device/manual?
Modbus MS Card
No it’s a Gateway card for a Eaton Power Xpert Meter 2260, but the card is really just a network card. I found another manual that gives another description.
I guess the short answer is I will have to read it in as 3 seperate registers to get the data in and then decode it. I’m just not very good at slicing and dicing the registers once I get them in.
It doesn’t look like the values you read match that format
00 00 01 01 00 00
which would mean, according to these docs:
It seems… shifted by one byte, assuming the date value you gave us (2000-01-01T00:00:00Z) is correct.
The latest document has a different set of three registers.