Page 112 PROGRAMMER'S GUIDE
C
YBER
A
MP
380, COPYRIGHT MARCH 2002, AXON INSTRUMENTS, INC.
The second example program displays the uninterpreted status text returned by the CyberAmp for the
main unit and all channels.
'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
'Fetch the status from the CyberAmp and display it.
if C300.GetStatus% (Txt$) then
print "Error getting CyberAmp status:"; C300.GetLastError%
end
end if
print Txt$
'For all possible channels try to get the channel status and display it.
for I% = C300.MINCHANNEL to C300.MAXCHANNEL
if C300.GetChannelStatus% (I%, Txt$) then
exit for
end if
print Txt$;
next I%
Commentaires sur ces manuels