ctrlsys - 2020-03-08

Hello
I have a question about serial communication. I'm trying to get data from a document scanner that returns values on several lines. How to save data to variable (s). I am using the SerialComWithVisu example.

comRead(xExecute:= TRUE, hCom:= hCom, pBuffer:= ADR(bReadBuffer), szBuffer:= SIZEOF(bReadBuffer));
IF comRead.xDone THEN
szRead:= comRead.szSize;
//check if the Port has send something
IF szRead > 0 THEN
//the text from the read buffer is saved in the sReadText variable
MEM.MemMove(ADR(bReadBuffer), ADR(sReadText), ANY_TO_UINT(szRead));
MEM.MemFill(ADR(sReadText) + ANY_TO_UINT(szRead), 1, 0);
xReadSuccess:= TRUE;