PROGRAMMER'S GUIDE Page 111
C
YBER
A
MP
380, COPYRIGHT MARCH 2002, AXON INSTRUMENTS, INC.
Example Programs
The following BASIC example programs illustrate the use of the CyberAmp support library to control
the CyberAmp.
The first program causes the CyberAmp to reload the factory defaults for the channel setup.
'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
'Load the factory defaults.
if C300.LoadFactoryDefaults% then
print "Error loading CyberAmp defaults:"; 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
Komentáře k této Příručce