|
Ver 2.02Date : Jun.21.2006 4 page of 46Copyright 20011.3 Command format and answer formatThis unit shall be based on commands each of which consists of a data row ( some commandsare without a PC ) composed of command codes ( CC ) and parameter codes ( PC ) . Thetrans-mitting station shall be designed to send block check characters ( BCC ) following ETX,with the data row enclosed in STX ( text start : 02h ) and ETX ( text termination : 03h ) .The receiving station shall regard receipt of BCC as the completion of command reception when ithas received STX.Here are the formats.Commands : <---------> STX (Start of TeXt) : 02hCC (Command Code) : Command codePC (Parameter Code) : Defined for each command( contents and number of parameters )ETX (End of TeXt) : 03hBCC (Block Check Character) :CC + PC0 + PC1 + PC2 + --------------- + PCn + ETX = XYh(Each of X and Y is 4 bit long ) X , Y=0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,FBCCH ( high-level byte ) = X as converted to an ASCII codeBCCL ( low-level byte ) = Y as converted to an ASCII codeAnswers : <--------> STX (Start of TeXt) : 02hRC (Reply Code) : Reply code (=Command code)AC (Answer Code) : Answer codePC (Parameter Code) : Defined for each command( contents and number of parameters )ETX (End of TeXt) : 03hBCC (Block Check Character) :RC +AC + PC0 + PC1 + PC2 + ------------- + PCn + ETX = XYh(Each of X and Y is 4 bit long) X , Y=0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,FBCCH ( high-level byte ) = X as converted to an ASCII codeBCCL ( low-level byte ) = Y as converted to an ASCII code1.4 Protocol for data transmission and receptionThis unit is based on half-duplex communication. The unit shall therefore transmit commandsand receive answers according to the following procedure.1.4.1 Basic procedure1) The host shall select commands for this unit and transmit them to this unit. Commandinterval time is MIN 40μsec.2) Having issued a command, the host shall receive an answer from this unit, then issue thenext command.3) The host shall analyze the RC, AC, and PC as answers given and decide whether thecommand has been normally executed.4) The host shall give an answer to a command that gives operational instructions, thenissue a status request command, and decide whether this unit has finished operating with PreviousNext |