Expand|Select|Wrap|Line Numbers
- string StartBytes = "" + (char)STX + (char)0x00 + (char)0x00 + (char)0x00 + (char)TotalByteCount + (char)Command;
- string EndBytes = "" + (char)0x00 + (char)0x00 + (char)0x00 + (char)TotalByteCount + (char)ETX;
- string SendMsg = StartBytes.Trim() + ObjectList.Trim() + EndBytes.Trim();
In documentation, they show this as ...
I am building this all as a string and using the following to convert to bytes..
BC (Byte Count): Packet total size including Start Code and End Code
Transmit in DWORD (4byte) type
Ex) Packet size = 0x00001234
0x00
0x00
0x12
0x34
Expand|Select|Wrap|Line Numbers
- byte[] bytesSendMsg = new byte[SendMsg.Length];
- bytesSendMsg = ASCIIEncoding.ASCII.GetBytes(SendMsg);
Appreciate any help any one can provide.