Sets the Function Generator state, enabled or disabled.
Gx3348FuncGenSetState (nHandle, nState, pnStatus)
Name |
Type |
Description |
nHandle |
SHORT |
Handle for the PXI board. |
nState |
SHORT |
Sets the Function Generator state:0. GX3348_FUNC_GEN_DISABLED: function generator is disabled.1. GX3348_FUNC_GEN_ENABLED: function generator is enabled. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
When the Function Generator mode is set to disable, but the Rail source is set to Function Generator, any channel that is connected will output the offset voltage.
Note: Function Generator functionality is only supported by firmware version 0x0000AC00 and above, use the Gx3348FuncGenIsSupported() API to check if supported.
The following example sets the Pulse base voltage level to 0V, peak voltage to -10V, and returning the settings. Enable the Pulse Generator, and return the Function Generator state
Note: see the Gx3348FuncGenTrigger() API for a complete C example.
SHORT nHandle, nState, nStatus;
DOUBLE dBase, dPeak;
Gx3348FuncGenSetLevels (nHandle, 0.0, -10.0, &nStatus);
Gx3348FuncGenGetLevels (nHandle, &dBase, &dPeak, &nStatus);
Gx3348FuncGenSetState(nHandle, GX3348_FUNC_GEN_ENABLED, &nStatus);
Gx3348FuncGenGetState(nHandle, &nState, &nStatus);
Gx3348FuncGenGetState, Gx3348FuncGenIsSupported, Gx3348FuncGenSetLevels, Gx3348FuncGenSetMode, Gx3348FuncGenPulseSetTiming, Gx3348FuncGenSetState, Gx3348FuncGenTrigger, GxPdoGetErrorString