You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Everyone
I am having a problem with reading string from Siemens S71500 PLC, I am actually not sure how to read that in unity as a string.
What I want to do is read a string name and then I want to display that in unity TextMashPro.
I have written something like this but no luck, I am getting a strange message like this System.Byte[]
My Db number is 647 and starting address is 31090 which is define as string and reading first 40 bytes, and using S7.net library
In a debug result of unity i get System.Byte[]
Can someone please help me out.
//Try to use this
bytes = plc.SieMens.ReadBytes(mType, (int)mAddr.mDBNumber, (int)mAddr.mDBOffset, MaxLenth + 2);
var gbk = Encoding.GetEncoding("GBK");
ret = gbk.GetString(bytes, 2, bytes[1]);
//Try to use this bytes = plc.SieMens.ReadBytes(mType, (int)mAddr.mDBNumber, (int)mAddr.mDBOffset, MaxLenth + 2); var gbk = Encoding.GetEncoding("GBK"); ret = gbk.GetString(bytes, 2, bytes[1]);
Hi Everyone
I am having a problem with reading string from Siemens S71500 PLC, I am actually not sure how to read that in unity as a string.
What I want to do is read a string name and then I want to display that in unity TextMashPro.
I have written something like this but no luck, I am getting a strange message like this System.Byte[]
My Db number is 647 and starting address is 31090 which is define as string and reading first 40 bytes, and using S7.net library
In a debug result of unity i get System.Byte[]
Can someone please help me out.
Kind Regards
The text was updated successfully, but these errors were encountered: