General-Purpose Communication9-16 After GPSEND instruction is executed, dual sending to the same port is not possible until the"sending General-purpose communication Sending active flag" (Y8, Y9, YA, YB) turns OFF.The "General-purpose communication Sending active flag" (Y8, Y9, YA, YB) turns OFF ininstruction execution in the next scan or later following completion of data sending.9.5.2 Start Code "STX", End Code "ETX":Receiving process: Reception done flag and GPRECV instruction are related asfollows:A B C STX D H ETXE ETX F G STXED2ONOFFONOFFA AB BCABCAGFGHGH<1> <2> <3> <0> <0> <1> <1>BCD<1>ECD<2>ECD<2>GF<2>F<1>Data receivedfrom externaldeviceSCUreceive bu fferNo. of bytesreceivedWrite pointerReceive bu fferspecified usingGPRECV instructionGPSENDinstructionexecutionNo. of bytes receivedReceptiondone flagX0, X1, X2, X3Upon reception of thestart code, the receptionpointer is initialized.Upon reception of thestart code, the receptionpointer is initialized.Even in a"reception done"status, receiveddata is continuedinto anotherbuffer, becausethere are 4,096 x8 receptionbuffers.StoredWhen the start code is set to "STX", the data are saved in the reception buffer. When thestart code is received, the receive pointer is initialized. If there are two headers, datafollowing the second header overwrites the data in the reception buffer. The COM port has eight reception buffers. The reception process is continued after thereception done flag (X0, X1, X2, X3) turns ON. The reception done flag (X0, X1, X2, X3)does not turn OFF immediately following the execution of GPRECV instruction. It will beturned off at the beginning of the next scan or later. If there are no received data following execution of GPRECV instruction, the reception donecopy flag (X4, X5, X6, X7) turns OFF.KEY POINTS The data without the Code STX at the reception is saved in the receptionbuffer, and the “reception done” flag turns on when the end code is received.Phone: 800.894.0412 - Fax: 888.723.4773 - Web: www.clrwtr.com - Email: info@clrwtr.com