openenergysolutions / openfmb.adapters

OpenFMB Adapters
Apache License 2.0
3 stars 1 forks source link

Customizable Status Fields that use multiple registers and bit masking #131

Open spark706 opened 3 years ago

spark706 commented 3 years ago

This may be a case of the end user's lack of knowledge, but in a particular ESS unit we are testing out, there are 2 status fields in the Modbus mapping that utilize 32bit unsigned integers and a mask that is used to extract the fault or warning issue from the combination of the two registers. I have attached an image for one of the status to show what I am looking at.

image

I thought I was on the right track to set a status field to multiple registers and then utilize the bit masking to target each point I wanted. Unfortunately, when I tried to add bits 17-31, the mask field would reset to 16. This seems to be a problem given that for this particular case the device needs bit 20 for E-Stop status for example but the manufacturer has defined this via a combination of the two registers.

I also tried to spread out the ones that mapped to the OpenFMB adapter. For instance putting the e-stop in that particular field but again the bit 20 causes a problem. Not to mention there are many status fields from the manufacturers mapping that is not included in the OpenFMB adapter.

Realizing this is a specific case and the adapter is still young, what options are there currently to add in this particular fault status given the need for 2 registers and masking as well as a lack of many of the individual status bit points in the entire openFMB protocol?