Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

西门子S7-300批量采集BOOL数据值解析有误 #21

Open
Uchiha-Peng opened this issue Nov 19, 2021 · 1 comment
Open

西门子S7-300批量采集BOOL数据值解析有误 #21

Uchiha-Peng opened this issue Nov 19, 2021 · 1 comment

Comments

@Uchiha-Peng
Copy link

image

逐条采集代码

Console.WriteLine((await siemensTcpNet.ReadBoolAsync("I2.3")).Content);
                Console.WriteLine((await siemensTcpNet.ReadBoolAsync("I2.4")).Content);

批量采集代码

   var result = await siemensTcpNet.ReadAsync(addressArray, lenArray);
            var byteArray = result.Content;

    case "BOOL":
                    result = siemensS7Net.ByteTransform.TransBool(byteArray, startIndex);
                    break;

用两种方式采集的数据,核对发现一次性采集BOOL类型的值解析有误。

@Uchiha-Peng
Copy link
Author

付费用户,请协助解决。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant