Page 108 PROGRAMMER'S GUIDE
C
YBER
A
MP
380, COPYRIGHT MARCH 2002, AXON INSTRUMENTS, INC.
2) integer SetDeviceNumber (integer DevNum)
This procedure enables the use of device numbers when communicating with the CyberAmp.
This is only required if more than one device is using the same Axon expandable RS232 bus.
Valid device numbers are in the range 0 to 9. To disable the use of device numbers once they
have been enabled, call this procedure with the argument DEVICENULL. Device number usage
is disabled by default.
3) integer SetOutput (integer ComPort, integer Speed)
This procedure is used to set the COM Port number and the baud rate to be used when
communicating with the CyberAmp. This procedure must be called before attempting to send
commands to the CyberAmp. Valid COM port numbers are in the range 1 to 4; the corresponding
COM port must be installed in the machine or the error BADSERIAL is returned. Valid speeds
for communications are SPEED19200, SPEED9600, SPEED4800, SPEED2400, SPEED1200,
SPEED600, SPEED300 and SPEEDDEFAULT. If the communications speed is set externally to
the calling program, then the value SPEEDDEFAULT will prevent the library routines from
changing the externally set speed for the COM port. This would be desirable if multiple devices
are attached to the one expandable RS232 bus, and it was not desirable to set the speed in all the
programs that communicate with these devices, but only once in the AUTOEXEC.BAT file by
using a DOS MODE command.
4) integer SetReceiveTimeout (float TimeVal)
The default receive timeout used by the library's receive routine is 200 milliseconds. This may be
changed by calling this procedure and passing a new value for the timeout. This would only be
necessary for certain commands that are used to invoke test routines in the microcode in the
CyberAmp.
5) integer SetGain (integer Channel, integer Gain) <buffered>
This routine sends the necessary command to set the gain of the specified channel of the
CyberAmp to the value given. Valid values of Gain are 1, 2, 5, 10, 20, 50, 100, 200, 500, 1000,
2000, 5000, 10000 or 20000.
Since this routine does not provide individual control over the pre-filter and output gain stages of
the CyberAmp it assumes that the pre-filter gain should take precedence. See the routine
SetAmpGains if it is necessary to control the gain stages separately.
6) integer SetAmpGains (integer Channel, integer PreGain, integer OutGain) <buffered>
This routines allows the calling program to control the two gain stages separately. Valid values
for PreGain are 1, 10 and 100, and valid values for OutGain are 1, 2, 5, 10, 20, 50, 100 and 200.
To leave the gain unchanged for one of the gain stages, use the value NOCHANGE for that gain.
7) integer SetCoupling (integer Channel, integer PosNeg, float Coupling) <buffered>
This routine sets the positive or negative input coupling for the specified channel. The variable
PosNeg can have the value POSINPUT or NEGINPUT. Valid values for Coupling are 0.1, 1, 10,
30, 100, 300, COUPLINGGND and COUPLINGDC.
8) integer SetOffset (integer Channel, float Offset) <buffered>
This routine is used to set the DC offset of the specified channel to the value given. The offset
must be in the range +3000.0 to -3000.0 millivolts. Note that this DC offset is introduced after
the pre-filter gain stage, and hence the input-referred value of the offset depends on the setting of
the first gain amplifier.
Commenti su questo manuale