Elmomc Multi-Axis Motion Controller-Maestro Manuel d'utilisateur Page 130

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 313
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 129
Parsing of Maestro’s sample response:
CString Input; // Maestro response string
//1 - new line removing
int n = Input.Find( "\r\n" );
while( n != -1 )
{
if( n == 0 )
{
Input = Input.Right( Input.GetLength() - 2 );
}
else
{
CString left = Input.Left( n );
CString right = Input.Right( Input.GetLength() - n - 2 );
Input = left + right;
}
n = Input.Find( "\r\n" );
}
//2 - prompt ‘>’ removing
Input = Input.Left( Input.GetLength() - 1 );
if(bCheckEcho)
{
//3 - new line removing
CString output = Output;
output.TrimRight('\r');
int n = Input.Find( output );
if( n != 0 ) return FALSE; // ECHO is invalid
//4 - echo removing
Input = Input.Right( Input.GetLength() - output.GetLength() );
}
return TRUE;
Maestro Software Manual RS-232 Protocol Specification
MAN-MASSW (Ver. Q)
7-2
Vue de la page 129
1 2 ... 125 126 127 128 129 130 131 132 133 134 135 ... 312 313

Commentaires sur ces manuels

Pas de commentaire