Microsoft LPF-00004 Manuel de l'opérateur Page 131

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 157
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 130
PROGRAMMER'S GUIDE Page 113
C
YBER
A
MP
380, COPYRIGHT MARCH 2002, AXON INSTRUMENTS, INC.
The following example program sets the gain of channel 1 of the CyberAmp to a value of 50.
'The following INCLUDE statement is required to allow access to the
routines that are exported by the C300LIB module.
'$include: 'C300LIBB.INC'
'Initialize the CyberAmp interface module.
if C300.Initialize% then
end if
'Set the CyberAmp device number.
'This step is not required if the device number is set to
'C300.DEVICENULL since this is the default. Therefore this step is
'included only for completeness.
if C300.SetDeviceNumber% (C300.DEVICENULL) then
print "Error setting CyberAmp device number:"; C300.GetLastError%
end
end if
'Set the CyberAmp COM port and baud rate.
if C300.SetOutput% (C300.COM1, C300.SPEED9600) then
print "Error setting CyberAmp port/speed:"; C300.GetLastError%
end
end if
'Set the gain of channel 1 to 50
if C300.SetGain% (1, 50) then
print "Error setting CyberAmp gain:"; C300.GetLastError%
end
end if
'Now flush out the command queue to the CyberAmp.
if C300.FlushCommands% then
print "Error on flush command:"; C300.GetLastError%
end
end if
'Save the updated CyberAmp state into the EEPROM.
'This set is required if you wish to have the CyberAmp power up with the
'same settings the next time the unit is turned on.
if C300.SaveCurrentState% then
print "Error saving CyberAmp state:"; C300.GetLastError%
end
end if
Vue de la page 130
1 2 ... 126 127 128 129 130 131 132 133 134 135 136 ... 156 157

Commentaires sur ces manuels

Pas de commentaire