Download Consolidated Specification
Transcript
5.1.2 Logical communication protocol The logical protocol used is known as “controllata STX / ETX”. With this method of data exchange, the Peripheral Unit (PU, receiving) notifies the Central Unit (CU, sending) of any line or buffer overflow errors. This is applicable in two-way serial connections and involves the CU sending the data to the PU in strings enclosed between control characters at the start and end of the string (STX / ETX). For each data string, the PU must respond to the CU to inform it whether the string has been received correctly or not by sending the CU an appropriate control character (ACK/NAK) upon recognition of the ETX code. In our case, to speed up communication and considering the fact that communication always involves a question and answer, transmission of an ACK control character is replaced by transmission of the required response. Notification that the string has not been received correctly (NAK) involves deletion of these strings from the line buffer and retransmission by the CU (up to a maximum number of attempts). The CU must not sent the nth string before receiving the response for string n-1. If the response to n-1 is not received within the preset time (e.g. 1 second), the CU considers the time-out to be a NAK response and therefore retransmits string n-1. After a set number of attempts (e.g. 3) the communication error should be considered irretrievable and the operator must therefore be notified of this event. “Devices type-approved in RS Senza Esito mode must be able to manage and follow the flow diagram. ” In particular, the device will respond to commands received with the required responses if the command received is consistent with the flow diagram, otherwise it will respond with NAK. It is possible to repeat the last command sent. The general device will send a Negative AcKnowledge (NAK) only if it receives an MCTCNet string in the correct format, consistent with the checksum values but containing: a command not supported by the device (e.g. “PQ” for an analyser); or a command not consistent with the flow chart defined for instrument management; or invalid data (e.g. “NAFTA” fuel). In all cases, the errors must be managed by the time-outs and a NAK must not be transmitted. The ‘control’ characters are as follows: STX = “Start of Text”, sent at the beginning of each data string (02 Hex code) ETB = “End of Block”, determines the beginning of data field n (17 Hex) ETX = “End of Text”, sent at the end of each data string (03 Hex code) NAK = “Negative Acknowledge”, sent by PU to CU in response to a string for which an error has been found (15 Hex code) CRC-H = First part of Checksum character, (High byte) CRC-L = Second part of Checksum character, (Low byte) Edition I MCTCNet2 163 di 304