2 byte string, 12byte data and 2bytes of CLRF. what is CRLF or did you mean CRC?
CRLF Carriage return Line feed,, 0dh,0ah
my main proble now is how to detect the beginning of my data since i know my first two bytes before the data will not be complete?
You detect the END of the string, that is the CRLF
What do you mean by save the received data is a string? is that the same as creating a number of registers to store each byte?
As each byte is received in the PC program, it adds the latest byte to the end of the string, when it gets CRLF its knows thats the end of the string and it will display the righthand 14 bytes of the string.
Or are you asking that i send all the data received straight to the PC and let it sort out the data itself? Implying that the PLC simply keeps storing the data until the line is empty then transfers it raw to the PC to process. if that's the case, i have to break up the entire data into RS232 data size then have a PC program reassemble the data.