Anritsu Site Master S331D Bedienungsanleitung Seite 115

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 132
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 114
/*********************************************************************/
/* unsigned char SetSPAScale(unsigned long ReferenceLevel, */
/* unsigned long dBScale, BYTE *ResponseBytes) */
/* Description: This function implements control byte #101, Set */
/* Spectrum Analyzer Scale. It sets the spectrum */
/* analyzer reference level and scale (dB/div). */
/* Inputs : RefLevel = reference level value */
/* dBScale = scale value */
/* NOTE: This function assumes the values have */
/* already been checked to fall in the valid range */
/* and scaled according to the formulas in the */
/* Programming Manual. */
/* ResponseBytes = pointer to an array of bytes at */
/* least 1 element long (1 byte is expected in */
/* response to the Set Spectrum Analyzer Scale */
/* command). */
/* Returns: SUCCESS if the values are set */
/* FAILURE if the command fails */
/* Response bytes are returned in the variable */
/* ResponseBytes. */
/*********************************************************************/
unsigned char SetSPAScale(unsigned long RefLevel,
unsigned long dBScale, BYTE *ResponseBytes)
{
BYTE *SendScalePointer; // Data to send
BYTE SendBytes[9];
BYTE SerialCommand;
// Serial Command to Set Scale on the SPA.
SerialCommand = 101;
// Data pointer.
SendScalePointer = &SendByte[0];
// First byte to send is the serial command, #101.
SendBytes[0] = SerialCommand;
// Convert the reference level and scale into 8 bytes
// (4 bytes each) for the SPA. Put the bytes in the
// SendBytes variable, starting with byte 1 (leave byte 0
// as the command byte).
Get8Bytes(RefLevel, Scale, &SendBytes[1]);
// Write 9 bytes of data in SendScalePointer to the port.
Site Master PM 109
Seitenansicht 114
1 2 ... 110 111 112 113 114 115 116 117 118 119 120 ... 131 132

Kommentare zu diesen Handbüchern

Keine Kommentare