Chapter 6. Serial I/O, SNP & RTU Protocols208 PACSystems* RX7i, RX3i and RSTi-EP CPU Reference Manual GFK-2222AD6.2 Serial I/O ProtocolSerial I/O protocol is a communication protocol that is driven entirely by the application program. SerialI/O protocol is active only when the CPU is in RUN Mode, since it is driven completely by COMMREQfunctions in the application program. Those COMMREQ functions are described in detail within thissection.When the CPU is stopped, a port configured for Serial I/O protocol will revert to a STOP Mode protocolas specified in the port settings of the CPU configuration. If a STOP Mode protocol was not specified, RTUslave protocol is used by default.Serial I/O is the only protocol supported by CPE400, and requires firmware version 9.40 or later.6.2.1 Calling Serial I/O COMMREQs from the CPU SweepImplementing a serial protocol using Serial I/O COMMREQs may be restricted by the sweep time. Forexample, if the protocol requires that a reply to a certain message from the remote device be initiatedwithin 5ms of receiving the message, this method may not be successful if the sweep time is 5ms orlonger, since timely response is not guaranteed.6.2.2 CompatibilityThe COMMREQ function blocks supported by Serial I/O are not supported by other currently existingprotocols (such as SNP slave and RTU slave). Errors are returned if they are attempted for a portconfigured for one of those protocols.6.2.3 Status Word for Serial I/O COMMREQsA value of 1 is returned in the COMMREQ status word upon successful completion of the COMMREQ. Anyother value returned is an error code where the low byte is a major error code and the high byte is aminor error code.Major Error Code Description01 (01h) Successful Completion(this is the expected completion value in the COMMREQ status word).12 (0Ch) Local error —Error processing a local command.The minor error code identifies the specific error.02 (02h) COMMREQ command is not supported.06 (06h) Invalid CPU memory type specified.07 (07h) Invalid CPU memory offset specified.08 (08h) Unable to access CPU memory.12 (0Ch) COMMREQ data block length too small.14 (0Eh) COMMREQ data is invalid.15 (0Fh) Could not allocate system resources to complete COMMREQ.