Argantix KDC 80-62 Manuel d'utilisateur Page 12

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 120
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 11
Programming Manual
IF esr% <> 0 THEN
PRINT #1, "*CLS" + CHR$(10);
END IF
END IF
LOOP UNTIL cmd$ = "QUIT" OR cmd$ = "quit"
'Close COM port on exit
CLOSE #1
END
'================================================================
FUNCTION retstring$
'This function returns a response string from the KDC Series
'power supply. The QBasic statement LINE INPUT cannot be used
'as the KDC Series does not return a CR <13> after a response
'message. The LINE INPUT function waits for a CR before
'returning a string. The P Series returns a LF <10> instead
'so we need to poll each returned character for a LF to
'assemble the response string. The COM port needs to be
'opened AS random with a record length of 1 for it to support
'this function. Also, the device number is assumed to be #1
'Optionally, this value could be passed as a parameter to
'make this program more generic.
DIM char AS STRING * 1
DIM resp AS STRING
char = ""
resp = ""
DO
char = INPUT$(1, #1)
resp = resp + char
LOOP UNTIL char = CHR$(10)
'Return result
retstring = LEFT$(resp, LEN(resp) - 1)
END FUNCTION
KDC Series DC Power Supplies 11
Vue de la page 11
1 2 ... 7 8 9 10 11 12 13 14 15 16 17 ... 119 120

Commentaires sur ces manuels

Pas de commentaire