Skip to content

The 1-bit state reading feature (Coil, Input Coil) is still incomplete in the "Device" node of the library #7

@NguyenGiangTRD

Description

@NguyenGiangTRD

Hi, after some time of experimenting, I found that the feature with 1-bit status is not suitable. The problem here is that the current bpRegisters definition of this library focuses on reading the registers and not on reading 1-bit data points.
Image
Suppose when I select FC1 or FC2 in the code field, the fields such as: Multiplier, Size, Format, Unit name and Unit scale must be suitable for 1 bit format. Specifically as follows:
Image
1: When selecting FC1 or FC2, the fields Multiplier, Unit name and Unit scale must be omitted or empty (because FC1 and FC2 return bool data).
2: When selecting FC1 or FC2, the bool data type must be added in the "Format" field. Suppose I want to read addresses 1, 7, 12, 25 with the current formats, I see that the output is not suitable. YOU SHOULD CONSIDER THIS SUGGESTION OF MYS.
Image
3: When selecting FC1 or FC2, the size field must be removed. Because it is in bit format, not byte format. You cannot only read 1 or 2 data points and declare the whole size = 1 equivalent to register, that is quite redundant. Not to mention there are cases where the user needs to read non-consecutive bits.

Finally, the scenario I want to talk about is that instead of reading registers FC3 and FC4, I now read non-contiguous addresses in FC1 or FC2, then the output result must also return the result as a bool array with the corresponding bits after reading the non-contiguous addresses at the input

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions