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.
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.
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[32] so I need to figure out how to print out the binary value?
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.
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.