FP2 Serial Data UnitCommunication with External Devices4 − 204.5 Data Sent and Received with the Serial Data Unit4.5 Data Sent and Received with the Serial Data UnitThe three precautions should be observed when accessing the shared memory of theserial data unit.• Sent and received data stored in the shared memory is ASCII codedata. However, the codes set as the start and end codes cannot beused for any purpose other than as start and end codes.• If “Yes” is selected for “start code” in the transmission formatsettings, the STX (H02) must always be added at the beginning ofthe data being sent.• The end code specified in the transmission format must always beadded at the end of the data being sent.When sending data:The data written to the sent buffer of the shared memory is sent just as it is. Also, datais written to the shared memory in 1−byte units, starting from the lowest byte of the worddata.Example:When the data “12345” is sent as an ASCII code to an RS232Cdevice1) The end code specified in the transmission format should beadded at the end of the data. Here, “C R ” (carriage return) isspecified.2) Data sent using the F95 (ASC) instruction should be convertedto ASCII code data.“ ”1 2 3 4 5 C R31(1)32(2)33(3)34(4)35(5)0D(CR )HConversion of ASCII codeConversion of ASCII code(Data to be sent)(Coded data)next page