McProtocol icon indicating copy to clipboard operation
McProtocol copied to clipboard

How can I read ASCII data?

Open locodust6 opened this issue 1 year ago • 6 comments

I tried with below code.

PLCData<char> devices = new(PlcDeviceType.W, 0x100, 256);
devices.ReadData();

StringBuilder sb = new();
for (int i = 0; i < 160; i++)
{
    sb.Append(devices[i]);
}
sb.ToString();

However, I get "McProtocol.PLCData`1[System.Char]".
How can I get the string?

locodust6 avatar Aug 02 '22 16:08 locodust6