📄 aumg369xb.c
字号:
if (enabled)
{
CHECKERR (viPrintf (vi, "AMI;"));
}
else
{
CHECKERR (viPrintf (vi, "MOM;"));
}
CHECKERR (aumg369xb_checkStatus (vi));
Error:
return status;
}
/*=====================================================================================*/
/* Function: Configure FM Measurement Enabled */
/* */
/* Purpose: This function turns on or turns off the FM measurement mode. */
/*=====================================================================================*/
ViStatus _VI_FUNC aumg369xb_configureFMMeasurementEnabled (ViSession vi,
ViBoolean enabled)
{
ViStatus status = VI_SUCCESS;
if (enabled)
{
CHECKERR (viPrintf (vi, "FMD;"));
}
else
{
CHECKERR (viPrintf (vi, "MOM;"));
}
CHECKERR (aumg369xb_checkStatus (vi));
Error:
return status;
}
/*=====================================================================================*/
/* Function: Configure Power Meter Measurement Enabled */
/* */
/* Purpose: This function turns on or turns off the Power Meter measurement mode. */
/*=====================================================================================*/
ViStatus _VI_FUNC aumg369xb_configurePowerMeterMeasurementEnabled (ViSession vi,
ViBoolean enabled)
{
ViStatus status = VI_SUCCESS;
if (enabled)
{
CHECKERR (viPrintf (vi, "PM1;"));
}
else
{
CHECKERR (viPrintf (vi, "PM0;"));
}
CHECKERR (aumg369xb_checkStatus (vi));
Error:
return status;
}
/*- System Configuration --------------------------------------------------------------*/
/*=====================================================================================*/
/* Function: Configure Rear Panel */
/* */
/* Purpose: This function configures the rear panel parameters, including the retrace */
/* and bandswitch blanking outputs polarity, the marker polarity, the */
/* internal penlift relay and the external reference loop bandwidth. */
/*=====================================================================================*/
ViStatus _VI_FUNC aumg369xb_configureRearPanel (ViSession vi,
ViInt32 blankingPolarity, ViInt32 markerPolarity,
ViInt32 penliftRelay, ViInt32 externalReferenceBandwidth)
{
ViStatus status = VI_SUCCESS;
CHECKERR (viPrintf(vi, "%s, %s, %s, EBW%d;", blankingPolarityTable[blankingPolarity],
markerPolarityTable[markerPolarity], penliftRelayTable[penliftRelay],
externalReferenceBandwidth));
CHECKERR (aumg369xb_checkStatus (vi));
Error:
return status;
}
/*=====================================================================================*/
/* Function: Configure Secure Mode Enabled */
/* */
/* Purpose: This function turns on or turns off the secure mode. */
/*=====================================================================================*/
ViStatus _VI_FUNC aumg369xb_configureSecureModeEnabled (ViSession vi,
ViBoolean enabled)
{
ViStatus status = VI_SUCCESS;
CHECKERR (viPrintf (vi, "DS%d;", enabled ? 0 : 1));
CHECKERR (aumg369xb_checkStatus (vi));
Error:
return status;
}
/*=====================================================================================*/
/* Function: Configure Group Execute Trigger */
/* */
/* Purpose: This function configures MG369XB to execute selected command each time a */
/* GET message is received. */
/*=====================================================================================*/
ViStatus _VI_FUNC aumg369xb_configureGroupExecuteTrigger (ViSession vi,
ViInt32 executeCommand)
{
ViStatus status = VI_SUCCESS;
CHECKERR (viPrintf (vi, "%s;", executeCommandTable[executeCommand]));
CHECKERR (aumg369xb_checkStatus (vi));
Error:
return status;
}
/*-------------------------------------------------------------------------------------*/
/*- Action/Status Functions -----------------------------------------------------------*/
/*-------------------------------------------------------------------------------------*/
/*=====================================================================================*/
/* Function: Scan Preset CW Frequency */
/* */
/* Purpose: This function scans to the next preset CW frequency. */
/*=====================================================================================*/
ViStatus _VI_FUNC aumg369xb_scanPresetCWFrequency (ViSession vi,
ViInt32 scanFrequencyType)
{
ViStatus status = VI_SUCCESS;
CHECKERR (viPrintf (vi, "%s;", scancwFrequencyTable[scanFrequencyType]));
CHECKERR (aumg369xb_checkStatus (vi));
Error:
return status;
}
/*=====================================================================================*/
/* Function: Zero Phase Offset Display */
/* */
/* Purpose: This function zeros the phase offset display. */
/*=====================================================================================*/
ViStatus _VI_FUNC aumg369xb_zeroPhaseOffsetDisplay (ViSession vi)
{
ViStatus status = VI_SUCCESS;
CHECKERR (viPrintf (vi, "PSZ;"));
CHECKERR (aumg369xb_checkStatus (vi));
Error:
return status;
}
/*=====================================================================================*/
/* Function: Calculate Sweep List */
/* */
/* Purpose: This function configures the MG369XB to perform calculations to set the */
/* frequency and power levels during the initial list sweep. */
/*=====================================================================================*/
ViStatus _VI_FUNC aumg369xb_calculateSweepList (ViSession vi)
{
ViStatus status = VI_SUCCESS;
CHECKERR (viPrintf (vi, "LEA;"));
CHECKERR (aumg369xb_checkStatus (vi));
Error:
return status;
}
/*=====================================================================================*/
/* Function: Set Internal Triggered Pulse with Delay */
/* */
/* Purpose: This function sets the internal pulse mode to single, the internal pulse */
/* trigger to triggered with delay, turns on the internal pulse modulation */
/* function, and disables the external pulse modulation function, if */
/* previously programmed. */
/*=====================================================================================*/
ViStatus _VI_FUNC aumg369xb_setInternalTriggeredPulseWithDelay (ViSession vi)
{
ViStatus status = VI_SUCCESS;
CHECKERR (viPrintf (vi, "DPT;"));
CHECKERR (aumg369xb_checkStatus (vi));
Error:
return status;
}
/*=====================================================================================*/
/* Function: Set Internal Gated Pulse */
/* */
/* Purpose: This function sets the internal pulse mode to single, the internal pulse */
/* trigger to gated, turns on the internal pulse modulation function, and */
/* disables the external pulse modulation function, if previously programmed.*/
/*=====================================================================================*/
ViStatus _VI_FUNC aumg369xb_setInternalGatedPulse (ViSession vi)
{
ViStatus status = VI_SUCCESS;
CHECKERR (viPrintf (vi, "GP;"));
CHECKERR (aumg369xb_checkStatus (vi));
Error:
return status;
}
/*=====================================================================================*/
/* Function: Set Internal 1kHz Square Wave Pulse */
/* */
/* Purpose: This function sets the internal pulse width to 500ms, PRF to 1 kHz, pulse */
/* mode to single, pulse trigger to free run, turns on the internal pulse */
/* modulation function, and disables the external pulse modulation function, */
/* if previously programmed. */
/*=====================================================================================*/
ViStatus _VI_FUNC aumg369xb_setInternal1kHzSquareWavePulse (ViSession vi)
{
ViStatus status = VI_SUCCESS;
CHECKERR (viPrintf (vi, "SQP;"));
CHECKERR (aumg369xb_checkStatus (vi));
Error:
return status;
}
/*=====================================================================================*/
/* Function: Perform Master Reset */
/* */
/* Purpose: This function performs a master reset of the instrument by setting all of */
/* the instrument parameters to factory default. */
/*=====================================================================================*/
ViStatus _VI_FUNC aumg369xb_performMasterReset (ViSession vi)
{
ViStatus status = VI_SUCCESS;
CHECKERR (viPrintf (vi, "MR;"));
CHECKERR (aumg369xb_checkStatus (vi));
Error:
return status;
}
/*=====================================================================================*/
/* Function: Trigger Single Sweep */
/* */
/* Purpose: This function triggers a single sweep. When single sweep triggering is */
/* selected for frequency, power level, or list sweeps, a single sweep */
/* starts when the TRG command is received. */
/*=====================================================================================*/
ViStatus _VI_FUNC aumg369xb_triggerSingleSweep (ViSession vi)
{
ViStatus status = VI_SUCCESS;
CHECKERR (viPrintf (vi, "TRG;"));
CHECKERR (aumg369xb_checkStatus (vi));
Error:
return status;
}
/*=====================================================================================*/
/* Function: Reset SWeep */
/* */
/* Purpose: This function resets the sweep to its start frequency (or power level), */
/* whenever the command is received while a single sweep is in progress. */
/*=====================================================================================*/
ViStatus _VI_FUNC aumg369xb_resetSweep (ViSession vi)
{
ViStatus status = VI_SUCCESS;
CHECKERR (viPrintf (vi, "RSS;"));
CHECKERR (aumg369xb_checkStatus (vi));
Error:
return status;
}
/*=====================================================================================*/
/* Function: Step To Next Sweep */
/* */
/* Purpose: This function advances sweep to the next step in dual step sweep mode. */
/* The dual step sweep mode provides for generating synchronized, step sweep */
/* outputs for two MG369XBx at a frequency offset. When operating in the */
/* dual step sweep mode, the command, TSS, steps the sweep to the next point.*/
/*=====================================================================================*/
ViStatus _VI_FUNC aumg369xb_stepToNextSweep (ViSession vi)
{
ViStatus status = VI_SUCCESS;
CHECKERR (viPrintf (vi, "TSS;"));
CHECKERR (aumg369xb_checkStatus (vi));
Error:
return status;
}
/*=====================================================================================*/
/* Function: Send GET Bus Message */
/* */
/* Purpose: This function sends a Y to the MG369XB. Sending a Y is equivalent to */
/* sending a GET.
/*=====================================================================================*/
ViStatus _VI_FUNC aumg369xb_sendGETBusMessage (ViSession vi)
{
ViStatus status = VI_SUCCESS;
CHECKERR (viPrintf (vi, "Y;"));
CHECKERR (aumg369xb_checkStatus (vi));
Error:
return status;
}
/*-------------------------------------------------------------------------------------*/
/*- Utility Functions -----------------------------------------------------------------*/
/*-------------------------------------------------------------------------------------*/
/*=====================================================================================*/
/* Function: Reset
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -