Download PLC Connection Manual
Transcript
App6-24 Appendix 6 Universal Serial Communications Data Items for Protocols • Transmission control code The transmission control codes are shown in the table below. Signal Name Code (Hexadecimal) STX 02H Contents Start of transmission block ETX 03H End of transmission block ENQ 05H Interrupt ACK 06H Positive acknowledge CR 0DH Carriage return DLE 10H Change contents within a block NAK 15H Negative acknowledge LF 0AH Line feed • Port number Port numbers are used so that the host computer can identify each V series for access. The data range is from 00H to 1FH (0 to 31) and is converted into two-digit ASCII code (HEX) before use. The port number of the V series should be set on the V-SFT editor. • Sum check code (SUM) Data is added up (SUM), and the lower one byte (8 bits) of the sum is converted into the 2-digit ASCII code (hexadecimal). A sum check code is shown below. Example: STX Sum check will be as is shown below when data is transmitted as: command [WM] (data writing), address [05AD] (1453), and memory data [OF2A] (3882) in transmission mode [w/o CR/LF, w/ sum check]. Command DLE "W" "M" 02H 57H 4DH 10H Address Count Memory data "0" "5" "A" "D" "0" "0" "0" "1" "0" "F" "2" "A" 30H 35H 41H 44H 30H 30H 30H 31H 30H 46H 32H 41H ETX SUM "4" "D" 03H 34H 44H 02H + 57H + 4DH + 10H + 30H + 35H + 41H + 44H + 30H + 30H + 30H + 31H + 30H + 46H + 32H + 41H + 03H = 4DH However, in the case of an interrupt, data from ENQ to ETX is subject to a sum check. • Error code An error code is sent along with an NAK response. An error code is transmitted as a two-digit ASCII code (HEX). For more information, refer to page App6-37.