Hi,
Showing some code always helps us give accurate answers.
Anyway....
If you can read Sizeof(TMyData) in one peace, you could use a record like
type
TMyData = record
bSTX : Byte;
bSep1: byte;
Field1: Array[0..1] of byte;
bSep2 : Byte;
Field2 : Array[0..5] of byte;
bSep3: Byte;
Field3 : Array[0..2] of byte.
Field4 : Array[0..4] of byte;
bsep4 : Byte;
bETX : Byte;
bLRC : byte;
end;
var
MyData : TMyData;
begin
fillchar( MyData, Sizeof(TMyData) , 0 );
move( DataFromCOM[0], MyData[0], Sizeof(TMyData) );
// Use the data
MyData.Field1;
MyData.Field2;
end;
Always check if you are receiving the expected number of bytes.
Check the values of STX, ETX and the separators to see if at least those are Ok.
If this routine will be called "a lot", I suggest creating MyData as a class field, to be use as long as the class is not destroyed.