niFgen_ConfigureClockMode
- Updated2023-02-21
- 2 minute(s) read
ViStatus niFgen_ConfigureClockMode (ViSession vi, ViInt32 clockMode);
Purpose
Selects the clock mode for the signal generator.
Some signal generators allow you to switch the Sample Clock to High-Resolution or Automatic Sampling mode with this function.
When you select NIFGEN_VAL_DIVIDE_DOWN, NI-FGEN rounds the sample rate to a frequency that can be achieved by dividing down the board clock (Sample Clock timebase). However, if you select NIFGEN_VAL_HIGH_RESOLUTION, you can set the sample rate to any value. If you select NIFGEN_VAL_AUTOMATIC, NI-FGEN selects the clock mode based on the sample rate, using divide-down sampling when possible.
![]() |
Notes The signal generator must not be in the Generating state when you call this function. |
| You must call the niFgen_ConfigureOutputMode function to set the outputMode parameter to NIFGEN_VAL_OUTPUT_SEQ, NIFGEN_VAL_OUTPUT_ARB, or NIFGEN_VAL_OUTPUT_SCRIPT before calling this function. |
Parameters
| Input | ||||||||
| Name | Type | Description | ||||||
| vi | ViSession | Identifies your instrument session. vi is obtained from the niFgen_init, niFgen_InitWithOptions, or niFgen_InitializeWithChannels functions and identifies a particular instrument session. | ||||||
| clockMode | ViInt32 | Sets the clock mode of the signal generator.
Defined Values
Default Value: NIFGEN_VAL_HIGH_RESOLUTION (NI 5450, NI 5451), NIFGEN_VAL_DIVIDE_DOWN (all other devices) |
||||||
Return Value
| Name | Type | Description | ||||||||
| status | ViStatus | Returns the status code of this operation. The status code either indicates success or describes an error or warning condition. You can examine the status code from each call to an NI-FGEN function to determine if an error occurred.
To obtain a text description of the status code, call the niFgen_error_message function. To obtain additional information about the error condition, call the niFgen_GetError function. To clear the error information from NI-FGEN, call the niFgen_ClearError function. The general meaning of the status code is as follows:
|
