Skip to content

如何支持一次写DB块中的多个连续的 bit  #2

@LiuJianX

Description

@LiuJianX

WriteArea 方法中固定每一次只允许写一个bit ,请问该如何更改代码,让其支持一次写多个bit
if (WordLen == S7Consts.S7WLBit) // Only 1 bit can be transferred at time
Amount = 1;
else
{
if ((WordLen != S7Consts.S7WLCounter) && (WordLen != S7Consts.S7WLTimer))
{
Amount = Amount * WordSize;
WordSize = 1;
WordLen = S7Consts.S7WLByte;
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions