WaveForms SDK Reference Manual
WaveForms SDK Reference Manual
Pullman, WA 99163
509.334.6306
www.digilentinc.com
Table of Contents
Table of Contents .................................................................................................................. 1
Overview............................................................................................................................... 2
1 The System .................................................................................................................... 2
1.1 The API.............................................................................................................................. 4
1.2 Calling API Functions ........................................................................................................ 6
2 System ........................................................................................................................... 7
3 Device Enumeration ....................................................................................................... 8
4 Device Control ............................................................................................................. 10
5 Analog In (Oscilloscope) ............................................................................................... 14
5.1 Control ............................................................................................................................ 14
5.2 Configuration.................................................................................................................. 18
5.3 Channels ......................................................................................................................... 21
5.4 Trigger ............................................................................................................................ 24
5.5 Trigger Detector ............................................................................................................. 27
6 Analog Out (Arbitrary Waveform Generator) ................................................................ 34
6.1 Control ............................................................................................................................ 36
6.2 Configuration.................................................................................................................. 37
6.3 States .............................................................................................................................. 47
7 Analog I/O ................................................................................................................... 51
8 Digital I/O .................................................................................................................... 55
9 Digital In (Logic Analyzer) ............................................................................................. 58
9.1 Control ............................................................................................................................ 59
9.2 Configuration.................................................................................................................. 61
9.3 Trigger ............................................................................................................................ 65
9.4 Trigger Detector ............................................................................................................. 67
10 Digital Out (Pattern Generator) .................................................................................... 68
10.1
Control ........................................................................................................................ 70
10.2
Configuration .............................................................................................................. 71
11 Deprecated functions ................................................................................................... 80
DOC#: 506-028
Page 1 of 85
Overview
TM
WaveForms provides an interface that allows users to interact with Digilent Analog Design hardware, such as the
TM
TM
Analog Discovery and Electronics Explorer . While the WaveForms application offers a refined graphical
interface, the WaveForms SDK provides access to a public application programming interface (API) that gives users
the ability to create custom PC applications.
This WaveForms SDK manual describes the main components and architecture of the WaveForms system and
details each function contained in the WaveForms API. The SDK package also offers examples demonstrating how
to identify, connect to, and control analog hardware devices.
WaveForms System
WaveForms Application (GUI)
Custom
Applications
USB 2.0
Electronics
Explorer
Analog
Discovery
The System
The WaveForms system is comprised of multiple components. The most visible component is the WaveForms
Application; a suite of graphical instrument panels that give full access to the analog and digital instruments in the
connected hardware. The WaveForms application uses the WaveForms Runtime to control all signal generation
and acquisition. The WaveForms Runtime is comprised of the DWF Dynamic Library and several configuration files.
This library is located in:
Page 2 of 85
Working code examples are provided with the SDK to demonstrate basic use of each API function set. You can find
samples in the installation directory, which are located here:
The DWF Library uses the Adept Runtime, which provides basic communication with the targeted hardware
instruments (i.e., Analog Discovery and Electronics Explorer). Although the Adept Runtime is an integral part of the
WaveForms System, knowledge of its structure is not required to write custom applications.
The requirements for the Linux version are the libusb-1.0-0, Digilent Adept Runtime, and the included FTDI drivers:
$ sudo apt-get install linusb-1.0-0
digilent.adept.runtime_#/ftdi.drivers_# $ sudo bash install.sh
digilent.adept.runtime_# $ sudo bash install.sh
Contents\MacOS\*.*
Contents\Resources\*.*
Contents\Resources\digilent\waveforms\doc\*
Contents\PlugIns\*
Contents\Frameworks\Qt*
Contents\Frameworks\libdwf.dylib
Contents\Resources\digilent\waveforms\firmware\*
Contents\Frameworks\lib*
Contents\Resources\digilent\data\*
Page 3 of 85
1.1
The API
Everything needed to write custom applications is included in the WaveForms SDK, which provides the
header/library files and documentation to access the API for the DWF Library. A custom application must properly
link to these files to make the appropriate API function calls. Every function in the WaveForms public API is
declared in the dwf.h header file.
Basic usage of the WaveForms API can be broken down into the following steps:
1. Call enumeration functions to discover connected hardware devices.
2. Call FDwfDeviceOpen function to establish a connection to specific hardware device.
3. Call function to enable instrument within hardware device.
4. Call functions to configure instrument and acquire/generate signals.
5. Call function to disable instrument.
6. Call FDwfDeviceClose function to disconnect from device.
There are nine main groups of API functions, each named with different prefixes:
Main Groups of API Functions
Instrument Function
Prefix
Device Enumeration
DwfEnum
Device Control
DwfDevice
AnalogIn (Oscilloscope)
DfwAnalogIn
DfwAnalogOut
AnalogIO
DfwAnalogIO
DfwDigitalIn
DfwDigitalOut
DigitalIO
DfwDigitalIO
System
DfwGet
Page 4 of 85
Instrument Function
Example
FDwfAnalogInReset
Reset function
FDwfAnalogOutReset
FDwfDigitalIOReset
FDwfAnalogInConfigure
Configure function
FDwfAnalogOutConfigure
FDwfDigitalIOConfigure
FDwfAnalogInStatus
Status function
FDwfAnalogOutStatus
FDwfDigitalIOStatus
Note: Although there are multiple Status functions for each instrument, these functions are the only ones that actually read
data from the device.
There are a number of type definitions and corresponding constants in the dwf.h include file. The majority of them
are used as parameters. When a hardware device is opened, a handle is returned (HDWF), which is used to access
and finally close in all instrument API functions.
The following examples are provided in python and c++ language.
File
Device_Enumeration
AnalogIO_AnalogDiscovery_SystemMonitor
AnalogIO_AnalogDiscovery_Power
AnalogOut_Sine
AnalogOut_Sweep
AnalogOut_Custom
AnalogOut_Sync
AnalogOutIn
AnalogIn_Sample
AnalogIn_Acquisition
AnalogIn_Trigger
AnalogIn_Record
DigitalIO
DigitalOut_Pins
DigitalOut_BinrayCounter
DigitalIn_Acquisition
DigitalIn_Record
Description
List the supported and connected devices. Opens them case are not
opened by other process and gets some information about them.
Reading the system minitor informations
Enable power supplies.
Generate sine waveform on analog out channel.
Generate frequency sweep.
Arbitrary waveform generation.
How to synchronize the analog output channels
Generate analog output sugnal and perfrom analog in acquisition.
Ope the first device, configure analog in and read sample sample.
Perform acquisition and plot data for first channel.
Perform triggered acquisition.
Performs recording of large number of samples.
Drive and read digital io pins
Generate pulse, random and custom signal on digital out pins.
Generate binary counter
Generate signals on digital out and perform acquisition on digital in.
Perform recording of of large number of digital in samples.
Page 5 of 85
1.2
The API functions are C style and return a Boolean value: TRUE if the call is successful, FALSE if unsuccessful. This
Boolean value is an integer type definition, not the standard c-type bool. In general, the API functions contain
variations of the following parameters:
Parameters
Parameter Function
*Info
Returns detailed information about the parameter support for the instrument (i.e.,
minimum/maximum values, supported modes, etc.)
*Set
Sets an instrument parameter. When the AutoConfigure is enabled (by default), the instrument is
reconfigured and stopped.
*Get
Gets the actual instrument parameter. Use this function to get the actual set value. For instance,
an arbitrary voltage offset is set and Get returns the real DAC output value.
*Status
The API functions wont fail when a parameter pointer is NULL or when a setting (*Set) parameter value is out of
limits. To verify the actual setting value, use the *Get API return the actual value.
The indices used in function parameters are zero based.
The supported discrete parameters are retrieved in bit field value. To decode the capabilities of the device use the
IsBitSet macro.
int fsfilter;
FDwfAnalogInChannelFilterInfo(h, &fsfilter)
if(IsBitSet(fsfilter, filterAverage)){
FDwfAnalogInChannelFilterSet(hdwf, 0, filterAverage)
}
Page 6 of 85
System
FDwfGetLastError(DWFERC *pdwferc)
Parameters:
pdwferc - Variable to receive error code.
The function above is used to retrieve the last error code in the calling process. The error code is cleared when
other API functions are called and is only set when an API function fails during execution. Error codes are declared
in dwf.h:
dwfercNoErc
No error occurred.
dwfercUnknownError
dwfercApiLockTimeout
dwfercAlreadyOpened
dwfercNotSupported
dwfercInvalidParameter0
dwfercInvalidParameter1
dwfercInvalidParameter2
dwfercInvalidParameter3
FDwfGetLastErrorMsg(char szError[512])
Parameters:
szError - Pointer to buffer to receive error string.
The function above is used to retrieve the last error message. This may consist of a chain of messages, separated
by a new line character, that describe the events leading to the failure.
FDwfGetVersion(char szVersion[32])
Parameters:
szVersion - Pointer to buffer to receive version string.
The function above is used to retrieve the version string. The version string is composed of major, minor, and build
numbers (i.e., 2.0.19).
Page 7 of 85
Device Enumeration
The FDwfEnum functions are used to discover all connected, compatible devices.
See Device_Enumeration.py example.
Page 8 of 85
Parameters:
-
The function above is used to retrieve the device name of the enumerated device.
DECIAnalogInChannelCount
DECIAnalogOutChannelCount
DECIAnalogIOChannelCount
DECIDigitalInChannelCount
DECIDigitalOutChannelCount
DECIDigitalIOChannelCount
DECIAnalogInBufferSize
DECIAnalogOutBufferSize
DECIDigitalInBufferSize
DECIDigitalOutBufferSize
Page 9 of 85
Device Control
FDwfDeviceClose(HDWF hdwf)
Parameters:
hdwf Interface handle to be closed.
The function above is used to close an interface handle when access to the device is no longer needed. Once the
function above has returned, the specified interface handle can no longer be used to access the device.
FDwfDeviceCloseAll()
Parameters: None.
The function above is used to close all opened devices by the calling process. It does not close all devices across all
processes.
Page 10 of 85
DwfDeviceReset(HDWF hdwf)
Parameters:
hdwf Interface handle.
The function above resets and configures (by default, having auto configure enabled) all device and instrument
parameters to default values.
Page 11 of 85
trigsrcNone
trigsrcPC
trigsrcDetectorAnalogIn
trigsrcDetectorDigitalIn
trigsrcAnalogIn
trigsrcDigitalIn
trigsrcDigitalOut
trigsrcAnalogOut1
trigsrcAnalogOut2
trigsrcAnalogOut3
trigsrcAnalogOut4
trigsrcExternal1
trigsrcExternal2
trigsrcExternal3
trigsrcExternal4
Page 12 of 85
Analyzer
Control
Trigger Detector
WaveGen 1
Control
ADC
Control
DI/O
Trigger Detector
Patterns
Control
FDwfDeviceTriggerPC(HDWF hdwf)
Parameters:
hdwf Interface handle.
The function above generates one pulse on the PC trigger line.
Page 13 of 85
Analog In (Oscilloscope)
Ready
Reconfigure?
Start?
Configure
Armed
Start?
Prefill
Done
Trigger?
Running
Ready: Initial state. After FDwfAnalogInConfigure or any FDwfAnalogIn*Set function call goes to this state.
With FDwfAnalogInConfigure, reconfigure goes to Configure state.
Configure: The needed configurations are performed and auto trigger is reset.
Prefill: Prefills the buffer with samples needed before trigger.
Armed: Waits for the trigger.
Running:
o Single acquisition mode: remains in this state to acquire samples after trigger according trigger
position parameter.
o Scan screen and shift modes: remains in this state until configure or any set function of this
instrument.
o Record mode: the time period according record length parameter.
Done: Final state.
5.1
Control
FDwfAnalogInReset(HDWF hdwf)
Parameters:
hdwf Interface handle.
The function above resets and configures (by default, having auto configure enabled) all AnalogIn instrument
parameters to default values.
Page 14 of 85
Page 15 of 85
FDwfAnalogInStatusData(
HDWF hdwf, int idxChannel, double *rgdVoltData, int cdData)
Parameters:
hdwf Interface handle.
idxChannel Channel index.
rgdVoltData Pointer to allocated buffer to copy the acquisition data.
cdData Number of samples to copy.
The function above is used to retrieve the acquired data samples from the specified idxChannel on the AnalogIn
instrument. It copies the data samples to the provided buffer.
FDwfAnalogInStatusNoise(
HDWF hdwf, int idxChannel, double *rgdMin, double *rgdMax, int cdData)
Parameters:
hdwf Interface handle.
idxChannel Channel index.
rgdMin Pointer to allocated buffer to copy the minimum noise data.
rgdMax Pointer to allocated buffer to copy the maximum noise data.
cdData Number of min/max samples to copy.
The function above is used to retrieve the acquired noise samples from the specified idxChannel on the AnalogIn
instrument. It copies the data samples to the provided buffer.
Parameters:
hdwf Interface handle.
idxChannel Channel index.
pdVoltSample Variable to receive the sample value.
The function above gets the last ADC conversion sample from the specified idxChannel on the AnalogIn
instrument.
Page 16 of 85
FDwfAnalogInStatusRecord(
HDWF hdwf, int *pcdDataAvailable, int *pcdDataLost, int *pcdDataCorrupt)
Parameters:
hdwf Interface handle.
pcdDataAvailable Pointer to variable to receive the available number of samples.
pcdDataLost Pointer to variable to receive the lost samples after the last check.
pcdDataCorrupt Pointer to variable to receive the number of samples that could be corrupt.
The function above is used to retrieve information about the recording process. The data loss occurs when the
device acquisition is faster than the read process to PC. In this case, the device recording buffer is filled and data
samples are overwritten. Corrupt samples indicate that the samples have been overwritten by the acquisition
process during the previous read. In this case, try optimizing the loop process for faster execution or reduce the
acquisition frequency or record length to be less than or equal to the device buffer size (record length <= buffer
size/frequency).
Page 17 of 85
5.2
Configuration
Parameters:
-
The function above returns the minimum and maximum allowable buffer sizes for the instrument.
Page 18 of 85
Parameters:
-
The function above returns the maximum buffer size for the instrument.
Parameters:
-
The function above returns the supported AnalogIn acquisition modes. They are returned (by reference) as a bit
field. This bit field can be parsed using the IsBitSet Macro. Individual bits are defined using the ACQMODE
constants in dwf.h. The acquisition mode selects one of the following modes, ACQMODE:
Page 19 of 85
acqmodeSingle
acqmodeScanShift
acqmodeScanScreen
acqmodeRecord
Page 20 of 85
5.3
Channels
Parameters:
-
The function above returns the supported acquisition filters. They are returned (by reference) as a bit field. This bit
field can be parsed using the IsBitSet Macro. Individual bits are defined using the FILTER constants in dwf.h. When
the acquisition frequency (FDwfAnalogInFrequencySet) is less than the ADC frequency (maximum
acquisition frequency), the samples can be stored in one of the following ways using FILTER:
filterDecimate: Store every Nth ADC conversion, where N = ADC frequency /acquisition frequency.
filterAverage: Store the average of N ADC conversions.
filterMinMax: Store interleaved, the minimum and maximum values, of 2xN conversions.
Page 21 of 85
FDwfAnalogInChannelRangeInfo(
HDWF hdwf, double *pvoltsMin, double *pvoltsMax, double *pnSteps)
Parameters:
hdwf Interface handle.
pvoltsMin Variable to receive the minimum voltage range.
pvoltsMax Variable to receive the maximum voltage range.
pnSteps Variable to receive number of steps.
The function above returns the minimum and maximum range, peak to peak values, and the number of adjustable
steps.
FDwfAnalogInChannelRangeSteps(
HDWF hdwf, double rgVoltsStep[32], int *pnSteps)
Parameters:
hdwf Interface handle.
rgVoltsStep Pointer to buffer to receive the range steps.
pnSteps Variable to receive number range steps.
The function above is used to read the range of steps supported by the device. For instance: 1, 2, 5, 10, etc.
Page 22 of 85
FDwfAnalogInChannelOffsetInfo(
HDWF hdwf, double *pvoltsMin, double *pvoltsMax, double *pnSteps)
Parameters:
hdwf Interface handle.
pvoltsMin Variable to receive the minimum offset voltage.
pvoltsMax Variable to receive the maximum offset voltage.
pnSteps Variable to receive the number offset steps.
The function above returns the minimum and maximum offset levels supported, and the number of adjustable
steps.
Page 23 of 85
FDwfAnalogInChannelAttenuationSet(
HDWF hdwf, int idxChannel, double xAttenuation)
Parameters:
hdwf Interface handle.
idxChannel Channel index.
voltsRange Channel offset voltage to set.
The function above is used to configure the attenuation for each channel. When channel index is specified as -1,
each enabled AnalogIn channel attenuation will be configured to the same level. The attenuation does not change
the attenuation on the device, just informs the library about the externally applied attenuation.
FDwfAnalogInChannelAttenuationGet(
HDWF hdwf, int idxChannel, double *pxAttenuation)
Parameters:
hdwf Interface handle.
idxChannel Channel index.
pxAttenuation Variable to receive the attenuation value.
The function above returns for each AnalogIn channel the configured attenuation.
5.4
Trigger
The trigger is used for Single and Record acquisitions. For ScanScreen and ScanShift, the trigger is ignored.
To achieve the classical trigger types:
None: Set FDwfAnalogInTriggerSourceSet to trigsrcNone.
Auto: Set FDwfAnalogInTriggerSourceSet to something other than trigsrcNone, such as
trigsrcDetectorAnalogIn and FDwfAnalogInTriggerAutoTimeoutSet to other than zero.
Normal: Set FDwfAnalogInTriggerSourceSet to something other than trigsrcNone, such as
trigsrcDetectorAnalogIn or FDwfAnalogInTriggerAutoTimeoutSet to zero.
Page 24 of 85
Parameters:
hdwf Interface handle.
psecMin Variable to receive the minimum trigger position.
psecMax Variable to receive the maximum trigger position.
The function above returns the minimum and maximum values of the trigger position in seconds. The horizontal
trigger position is used for Single acquisition mode and it is relative to the buffer middle point.
Page 25 of 85
FDwfAnalogInTriggerAutoTimeoutInfo(
HDWF hdwf, double *psecMin, double *psecMax, int *pnSteps)
Parameters:
hdwf Interface handle.
psecMin Variable to receive the minimum timeout.
psecMax Variable to receive the maximum timeout.
pnSteps Variable to return the number of steps.
The function above returns the minimum and maximum auto trigger timeout values, and the number of adjustable
steps. The acquisition is auto triggered when the specified time elapses. With zero value the timeout is disabled,
performing Normal acquisitions.
Parameters:
-
The function above is used to configure the auto trigger timeout value in seconds.
Parameters:
-
The function above returns the configured auto trigger timeout value in seconds.
Page 26 of 85
FDwfAnalogInTriggerHoldOffInfo(
HDWF hdwf, double *psecMin, double *psecMax, double *pnStep)
Parameters:
hdwf Interface handle.
psecMin Variable to receive the minimum hold off value.
psecMax Variable to receive the maximum hold off value.
The function above returns the supported range of the trigger Hold-Off time in Seconds. The trigger hold-off is an
adjustable period of time during which the acquisition will not trigger. This feature is used when you are triggering
on burst waveform shapes, so the oscilloscope triggers only on the first eligible trigger point.
Parameters:
-
The function above is used to get the current trigger hold-off for the AnalongIn instrument in Seconds.
5.5
Trigger Detector
The following functions configure the trigger detector on analog in channels. To use this, set trigger source with
FDwfAnalogInTriggerSourceSet to trigsrcDetectorAnalogIn.
See the AnalogIn_Trigger.py example.
Page 27 of 85
Parameters:
-
The function above is used to get the current trigger type for the instrument.
Parameters:
-
The function above returns the range of channels that can be triggered on.
Page 28 of 85
filterDecimate: Looks for trigger in each ADC conversion, can detect glitches.
filterAverage: Looks for trigger only in average of N samples, given by FDwfAnalogInFrequencySet.
Parameters:
-
Page 29 of 85
Parameters:
hdwf Interface handle.
ptrigcond Variable to receive the current trigger condition.
The function above is used to set the trigger condition for the instrument.
FDwfAnalogInTriggerLevelInfo(
HDWF hdwf, double *pvoltsMin, double *pvoltsMax, int *pnSteps)
Parameters:
hdwf Interface handle.
pvoltsMin Variable to receive the minimum voltage level.
pvoltsMax Variable to receive the maximum voltage level.
pnSteps Variable to receive the number of voltage level steps.
The function above is used to retrieve the range of valid trigger voltage levels for the AnalogIn instrument in Volts.
Page 30 of 85
FDwfAnalogInTriggerHysteresisInfo(
HDWF hdwf, double *pvoltsMin, double *pvoltsMax, int *pnSteps)
Parameters:
hdwf Interface handle.
pvoltsMin Variable to receive the minimum hysteresis level.
pvoltsMax Variable to receive the maximum hysteresis level.
pnSteps Variable to receive the number of hysteresis level steps.
The function above is used to retrieve the range of valid trigger hysteresis voltage levels for the AnalogIn
instrument in Volts. The trigger detector uses two levels: low level (TriggerLevel - Hysteresis) and high level
(TriggerLevel + Hysteresis). Trigger hysteresis can be used to filter noise for Edge or Pulse trigger. The low and high
levels are used in transition time triggering.
Page 31 of 85
FDwfAnalogInTriggerLengthInfo(
HDWF hdwf, double *psecMin, double *psecMax, double *pnStep)
Parameters:
hdwf Interface handle.
psecMin Variable to receive the minimum trigger length.
psecMax Variable to receive the maximum trigger length.
The function above returns the supported range of trigger length for the instrument in Seconds. The trigger length
specifies the minimal or maximal pulse length or transition time.
Page 32 of 85
Page 33 of 85
Ready
Start?
Armed
Trigger?
Repeat
Done
Wait
Running
Generator
Master
...
Master
States
Generator
Analog Out 2
States
...
...
Copyright Digilent, Inc. All rights reserved.
Other product and company names mentioned may be trademarks of their respective owners.
Page 34 of 85
Page 35 of 85
6.1
Control
The function above is used to retrieve information about the play process. The data lost occurs when the device
generator is faster than the sample send process from the PC. In this case, the device buffer gets emptied and
generated samples are repeated. Corrupt samples are a warning that the buffer might have been emptied while
samples were sent to the device. In this case, try optimizing the loop for faster execution; or reduce the frequency
or run time to be less or equal to the device buffer size (run time <= buffer size/frequency).
Copyright Digilent, Inc. All rights reserved.
Other product and company names mentioned may be trademarks of their respective owners.
Page 36 of 85
FDwfAnalogOutNodePlayData(
HDWF hdwf, int idxChannel, AnalogOutNode node, double *rgdData, int cdData)
Parameters:
hdwf Open interface handle on a device.
idxChannel Channel index.
node Node index.
rgdData Pointer to samples array to be sent to the device.
cdData Number of samples to send.
The function above is used to sending new data samples for play mode. Before starting the Analog Out
instrument, prefill the device buffer with the first set of samples using the AnalogOutNodeDataSet function. In the
loop of sending the following samples, first call AnalogOutStatus to read the information from the device, then
AnalogOutPlayStatus to find out how many new samples can be sent, then send the samples with
AnalogOutPlayData.
6.2
Configuration
Parameters:
-
The function above returns the supported AnalogOut nodes of the AnalogOut channel. They are returned (by
reference) as a bit field. This bit field can be parsed using the IsBitSet Macro. Individual bits are defined using the
AnalogOutNode constants in dwf.h. These node types are:
AnalogOutNodeCarrier
AnalogOutNodeFM
AnalogOutNodeAM
Page 37 of 85
FDwfAnalogOutNodeEnableSet(
HDWF hdwf, int idxChannel, AnalogOutNode node, BOOL fEnable)
Parameters:
hdwf Open interface handle on a device.
idxChannel Channel index.
node Node index.
fEnable TRUE to enable, FALSE to disable.
The function above enables or disables the channel node specified by idxChannel and node. The Carrier node
enables or disables the channel and AM/FM the modulation. With channel index -1, each Analog Out channel
enable will be configured to use the same, new option.
FDwfAnalogOutNodeEnableGet(
HDWF hdwf, int idxChannel, AnalogOutNode node, BOOL *pfEnable)
Parameters:
hdwf Open interface handle on a device.
idxChannel Channel index.
node Node index.
pfEnable Pointer to variable to receive enabled state.
The function above is used to verify if a specific channel and node is enabled or disabled.
Page 38 of 85
FDwfAnalogOutNodeFunctionInfo(
HDWF hdwf, int idxChannel, AnalogOutNode node, int *pfsfunc)
Parameters:
-
The function above returns the supported generator function options. They are returned (by reference) as a bit
field. This bit field can be parsed using the IsBitSet Macro. Individual bits are defined using the FUNC constants in
dwf.h. These are:
FUNC Constants
funcDC
FuncSine
funcSquare
funcTriangle
funcRampUp
funcRampDown
funcNoise
funcCustom
funcPlay
FDwfAnalogOutNodeFunctionSet(
HDWF hdwf, int idxChannel, AnalogOutNode node, FUNC func)
Parameters:
hdwf Open interface handle on a device.
idxChannel Channel index.
node Node index.
func Generator function option to set.
The function above is used to set the generator output function for the specified instrument channel. With channel
index -1, each enabled Analog Out channel function will be configured to use the same, new option.
Page 39 of 85
FDwfAnalogOutNodeFunctionGet(
HDWF hdwf, int idxChannel, AnalogOutNode node, FUNC *pfunc)
Parameters:
hdwf Open interface handle on a device.
idxChannel Channel index.
node Node index.
ptrigsrc Pointer to variable to receive the generator function option.
The function above is used to retrieve the current generator function option for the specified instrument channel.
FDwfAnalogOutNodeFrequencySet(
HDWF hdwf, int idxChannel, AnalogOutNode node, double hzFrequency)
Parameters:
hdwf Open interface handle on a device.
idxChannel Channel index.
node Node index.
hzFrequency Frequency value to set expressed in Hz.
The function above is used to set the frequency. With channel index -1, each enabled Analog Out channel
frequency will be configured to use the same, new option.
FDwfAnalogOutNodeFrequencyGet(
HDWF hdwf, int idxChannel, AnalogOutNode node, double *phzFrequency)
Parameters:
hdwf Open interface handle on a device.
idxChannel Channel index.
node Node index.
hzFrequency Pointer to variable to receive frequency value in Hz.
The function above is used to get the currently set frequency for the specified channel-node on the instrument.
Page 40 of 85
FDwfAnalogOutNodeAmplitudeInfo(
HDWF hdwf, int idxChannel, AnalogOutNode node, double *pvMin, double *pvMax)
Parameters:
hdwf Open interface handle on a device.
idxChannel Channel index.
node Node index.
pvMin Minimum amplitude level or modulation index.
pvMax Maximal amplitude level or modulation index.
The function above is used to retrieve the amplitude range for the specified channel-node on the instrument. The
amplitude is expressed in Volt units for carrier and in percentage units (modulation index) for AM/FM.
FDwfAnalogOutNodeAmplitudeSet(
HDWF hdwf, int idxChannel, AnalogOutNode node, double vAmplitude)
Parameters:
hdwf Open interface handle on a device.
idxChannel Channel index.
node Node index.
vAmplitude Amplitude of channel in Volts or modulation index in percentage.
The function above is used to set the amplitude or modulation index for the specified channel-node on the
instrument. With channel index -1, each enabled Analog Out channel amplitude (or modulation index) will be
configured to use the same, new option.
FDwfAnalogOutNodeAmplitudeGet(
HDWF hdwf, int idxChannel, AnalogOutNode node, double *pvAmplitude)
Parameters:
hdwf Open interface handle on a device.
idxChannel Channel index.
node Node index.
pvAmplitude Pointer to variable to receive amplitude value in Volts or modulation index in percentage.
The function above is used to get the currently set amplitude or modulation index for the specified channel-node
on the instrument.
Page 41 of 85
FDwfAnalogOutNodeOffsetInfo(
HDWF hdwf, int idxChannel, AnalogOutNode node, double *pvMin, double *pvMax)
Parameters:
hdwf Open interface handle on a device.
idxChannel Channel index.
node Node index.
pvMin Minimum offset voltage or modulation offset percentage.
pvMax Maximum offset voltage or modulation offset percentage.
The function above is used to retrieve available the offset range. For carrier node in units of volts, and in
percentage units for AM/FM nodes.
FDwfAnalogOutNodeOffsetSet(
HDWF hdwf, int idxChannel, AnalogOutNode node, double vOffset)
Parameters:
hdwf Open interface handle on a device.
idxChannel Channel index.
node Node index.
vOffset Value to set voltage offset in Volts or modulation offset percentage.
The function above is used to set the offset value for the specified channel-node on the instrument. With channel
index -1, each enabled Analog Out channel offset will be configured to use the same, new option.
Page 42 of 85
FDwfAnalogOutNodeSymmetryGet(
HDWF hdwf, int idxChannel, AnalogOutNode node, double *ppercentageSymmetry)
Parameters:
hdwf Open interface handle on a device.
idxChannel Channel index.
node Node index.
ppercentageSymmetry Pointer to variable to receive value of Symmetry (duty cycle).
The function above is used to get the currently set symmetry (or duty cycle) for the specified channel-node of the
instrument.
FDwfAnalogOutNodePhaseSet(
HDWF hdwf, int idxChannel, AnalogOutNode node, double degreePhase)
Parameters:
hdwf Open interface handle on a device.
idxChannel Channel index.
node Node index.
degreePhase Value of Phase in degrees.
The function above is used to set the phase for the specified channel-node on the instrument. With channel index 1, each enabled Analog Out channel phase will be configured to use the same, new option.
Page 43 of 85
FDwfAnalogOutNodeDataSet(
HDWF hdwf, int idxChannel, AnalogOutNode node, double *rgdData, int cdData)
Parameters:
hdwf Open interface handle on a device.
idxChannel Channel index.
node Node index.
rgbData Buffer of samples to set.
cData Number of samples to set in rgbData.
The function above is used to set the custom data or to prefill the buffer with play samples. The samples are
double precision floating point values (rgdData) normalized to 1.
With the custom function option, the data samples (cdData) will be interpolated to the device buffer size. The
output value will be Offset + Sample*Amplitude, for instance:
-
Page 44 of 85
FDwfAnalogOutLimitationInfo(
HDWF hdwf, int idxChannel, double *pvMin, double *pvMax)
Parameters:
hdwf Open interface handle on a device.
idxChannel Channel index.
pvMin Minimum limitation value.
pvMax Maximum offset voltage or modulation offset percentage.
The function above is used to retrieve available the limitation range. This option is supported on Electronics
Explorer Analog Out Channel 3 and 4, Positive and Negative Power supplies, to set current or voltage limitation.
Page 45 of 85
The function above returns the supported generator idle output options. They are returned (by reference) as a bit
field. This bit field can be parsed using the IsBitSet Macro. Individual bits are defined using the DwfAnalogOutIdle
constants in dwf.h. These are:
Idle Constants
DwfAnalogOutIdleDisable
DwfAnalogOutIdleOffset
DwfAnalogOutIdleInitial
The idle output voltage level has the initial waveform value of the
current configuration. This depends on the selected signal type,
Offset, Amplitude and Amplitude Modulator configuration.
Page 46 of 85
6.3
States
Page 47 of 85
Page 48 of 85
Page 49 of 85
FDwfAnalogOutRepeatTriggerGet(
HDWF hdwf, int idxChannel, BOOL *pfRepeatTrigger)
Parameters:
hdwf Open interface handle on a device.
idxChannel Channel index.
pfRepeatTrigger Pointer to variable to receive the repeat trigger option.
The function above is used to verify if the trigger has been included in wait-run repeat cycles.
Page 50 of 85
Analog I/O
The AnalogIO functions are used to control the power supplies, reference voltage supplies, voltmeters, ammeters,
thermometers, and any other sensors on the device. These are organized into channels which contain a number of
nodes. For instance, a power supply channel might have three nodes: an enable setting, a voltage level
setting/reading, and current limitation setting/reading.
See the AnalogIO.py example.
FDwfAnalogIOReset(HDWF hdwf)
Parameters:
hdwf Open interface handle on a device.
The function above resets and configures (by default, having auto configure enabled) all AnalogIO instrument
parameters to default values.
FDwfAnalogIOConfigure(HDWF hdwf)
Parameters:
hdwf Open interface handle on a device.
The function above is used to configure the instrument.
FDwfAnalogIOStatus(HDWF hdwf)
Parameters:
hdwf Open interface handle on a device.
The function above reads the status of the device and stores it internally. The following status functions will return
the information that was read from the device when the function above was called.
Page 51 of 85
FDwfAnalogIOChannelName(
HDWF hdwf, int idxChannel, char szName[32], char szLabel[16])
Parameters:
hdwf Open interface handle on a device.
idxChannel Channel index.
szName Pointer to character array to return the user name.
szLabel Pointer to character array to return the label.
The function above returns the name (long text) and label (short text, printed on the device) for a channel.
Page 52 of 85
FDwfAnalogIOChannelNodeName(
HDWF hdwf, int idxChannel, char szNodeName[32], char szUnits[16])
Parameters:
hdwf Open interface handle on a device.
idxChannel Channel index.
szNodeName Pointer to character array to return the node name.
szUnits Pointer to character array to return the value units.
The function above returns the node name (Voltage, Current) and units (V, A) for an Analog I/O node.
FDwfAnalogIOChannelNodeInfo(
HDWF hdwf, int idxChannel, int idxNode, ANALOGIO *panalogio)
Parameters:
hdwf Open interface handle on a device.
idxChannel Channel index.
idxNode Node index.
panalogio Pointer to variable to return the node type.
The function above returns the supported channel nodes. They are returned (by reference) as a bit field. This bit
field can be parsed using the IsBitSet Macro. Individual bits are defined using the ANALOGIO constants in dwf.h.
The acquisition mode selects one of the following modes, ANALOGIO:
ANALOGIO Modes
analogioEnable
Enable I/O node; used to enable a power supply, reference voltage, etc.
analogioVoltage
analogioCurrent
analogioTemperature
Temperature I/O node; used to retrieve read values from a temperature sensor.
Page 53 of 85
FDwfAnalogIOChannelNodeSet(
HDWF hdwf, int idxChannel, int idxNode, double value)
Parameters:
hdwf Open interface handle on a device.
idxNode Node index.
idxChannel Analog I/O channel index of the device.
value Value to set.
The function above is used to set the node value for the specified node on the specified channel.
FDwfAnalogIOChannelNodeGet(
HDWF hdwf, int idxChannel, int idxNode, double *pvalue)
Parameters:
hdwf Open interface handle on a device.
idxChannel Analog I/O channel index of the device.
idxNode Node index.
pvalue Pointer to variable to return the configured value.
The function above returns the currently set value of the node on the specified channel.
Page 54 of 85
FDwfAnalogIOChannelNodeStatusInfo(
HDWF hdwf, int idxChannel, int idxNode, double *pmin, double *pmax, int
*pnSteps)
Parameters:
hdwf Interface handle.
idxChannel Channel index .
idxNode Node index.
pmin Minimum reading value.
pmax Maximum reading value.
pnSteps Number of steps between minimum and maximum values.
The function above returns node the range of reading values available for the specified node on the specified
channel.
FDwfAnalogIOChannelNodeStatus(
HDWF hdwf, int idxChannel, int idxNode, double *pvalue)
Parameters:
hdwf Interface handle.
idxChannel Channel index .
idxNode Node index.
pvalue Pointer to variable to return the value reading.
The function above returns the value reading of the node.
Digital I/O
FDwfDigitalIOConfigure(HDWF hdwf)
Parameters:
hdwf Open interface handle on a device.
The function above is used to configure the DigitalIO instrument. This doesnt have to be used if AutoConfiguration
is enabled.
Copyright Digilent, Inc. All rights reserved.
Other product and company names mentioned may be trademarks of their respective owners.
Page 55 of 85
FDwfDigitalIOStatus(HDWF hdwf)
Parameters:
hdwf Open interface handle on a device.
The function above reads the status and input values, of the device DigitalIO to the PC. The status and values are
accessed from the FDwfDigitalIOInputStatus function.
Page 56 of 85
Page 57 of 85
Ready
Reconfigure?
Start?
Configure
Armed
Start?
Prefill
Done
Trigger?
Running
Page 58 of 85
9.1
Control
FDwfDigitalInReset(HDWF hdwf)
Parameters:
hdwf Interface handle.
The function above resets and configures (by default, having auto configure enabled) all DigitalIn instrument
parameters to default values.
Page 59 of 85
FDwfDigitalInStatusRecord(
HDWF hdwf, int *pcdDataAvailable, int *pcdDataLost, int *pcdDataCorrupt)
Parameters:
hdwf Interface handle.
pcdDataAvailable Pointer to variable to receive the available number of samples.
pcdDataLost Pointer to variable to receive the lost samples after the last check.
pcdDataCorrupt Pointer to variable to receive the number of samples that could be corrupt.
The function above is used to retrieve information about the recording process. The data loss occurs when the
device acquisition is faster than the read process to PC. In this case, the device recording buffer is filled and data
samples are overwritten. Corrupt samples indicate that the samples have been overwritten by the acquisition
process during the previous read. In this case, try optimizing the loop process for faster execution or reduce the
acquisition frequency or record length to be less than or equal to the device buffer size (record length <= buffer
size/frequency).
Page 60 of 85
9.2
Configuration
Page 61 of 85
Page 62 of 85
Page 63 of 85
Page 64 of 85
9.3
Trigger
FDwfDigitalInTriggerPositionInfo(
HDWF hdwf, unsigned int *pnSamplesAfterTriggerMax)
Parameters:
hdwf Interface handle.
pnSamplesAfterTriggerMax Variable to receive the maximum trigger position.
The function above returns maximum values of the trigger position in samples. This can be greater than the
specified buffer size.
Page 65 of 85
FDwfDigitalInTriggerPositionGet(
HDWF hdwf, unsigned int *pcSamplesAfterTrigger)
Parameters:
- hdwf Interface handle.
- pcSamplesAfterTrigger Pointer to variable to receive configured value
The function above is used to get the configured trigger position.
FDwfDigitalInTriggerAutoTimeoutInfo(
HDWF hdwf, double *psecMin, double *psecMax, double *pnSteps)
Parameters:
hdwf Interface handle.
psecMin Variable to receive the minimum timeout.
psecMax Variable to receive the maximum timeout.
pnSteps Variable to return the number of steps.
The function above returns the minimum and maximum auto trigger timeout values, and the number of adjustable
steps.
Page 66 of 85
9.4
Trigger Detector
In order to use trigger on digital in pins, set trigger source with FDwfDigitalInTriggerSourceSet to
trigsrcDetectorDigitalIn.
FDwfDigitalInTriggerInfo(HDWF hdwf,
unsigned int *pfsLevelLow, unsigned int *pfsLevelHigh,
unsigned int *pfsEdgeRise, unsigned int *pfsEdgeFall)
Parameters:
hdwf Interface handle.
pfsLevelLow Variable to receive the supported low state triggers.
pfsLevelHigh Variable to receive the supported low state triggers.
pfsEdgeRise Variable to receive the supported rising edge triggers.
pfsEdgeFall Variable to receive the supported falling edge triggers.
The function above returns the supported digital in triggers. The bits of the arguments represent pins.
The logic for the trigger bits is: Low and High and (Rise or Fall). Setting a bit in both rise and fall will trigger on any
edge, any transition. For instance FDwfDigitalInTriggerInfo(hdwf, 1, 2, 4, 8) will generate trigger when DIO-0 is low
and DIO-1 is high and DIO-2 is rising or DIO-3 is falling.
FDwfDigitalInTriggerSet(HDWF hdwf,
unsigned int fsLevelLow, unsigned int fsLevelHigh,
unsigned int fsEdgeRise, unsigned int fsEdgeFall)
Parameters:
hdwf Interface handle.
fsLevelLow Set low state condition.
fsLevelHigh Set high state condition.
fsEdgeRise Set rising edge condition.
fsEdgeFall Set falling edge condition.
The function above is used to configure the digital in trigger detector.
FDwfDigitalInTriggerGet(HDWF hdwf,
unsigned int *pfsLevelLow, unsigned int *pfsLevelHigh,
unsigned int *pfsEdgeRise, unsigned int *pfsEdgeFall)
Parameters:
hdwf Interface handle.
pfsLevelLow Variable to receive the configured value.
pfsLevelHigh Variable to receive the configured value.
pfsEdgeRise Variable to receive the configured value.
pfsEdgeFall Variable to receive the configured value.
The function above returns the configured digital in trigger detector option.
Page 67 of 85
10
Ready
Start?
Done
Armed
Repeat
Trigger?
Wait
Running
Page 68 of 85
Initial
Low
High
Initial
Divider
Clock
Divider
Expire
Pulse
(Level)
Counter
(TS +2)
Expire
Address
PP OS OD
TS(2)
Idle
OE
IO
Running?
Mode
Custom
1/2
Type
Random
1/2
OE
IO
The initial values, for divider and counter, specify the initially loaded values, initial delay, when entering in Running
state. The Divider specifies the clock division. This rate will be the custom sample frequency and step for the
counter. When entering Running state, the initial value specified with FDwfDigitalOutDividerInitSet is loaded.
When this expires, the value specified by FDwfDigitalOutDividerSet will be loaded upon each expiration.
The Counter initial value is set by FDwfDigitalOutCounterInitSet function. This function also sets the initial level.
When this expires the level values specified by FDwfDigitalOutCounterSet are loaded upon further expiration. On
counter expiration the level is toggled and this directs the low or high value loading. In case one of these is zero,
the level is not toggled.
The Counter is used for:
Pulse to generate the low and high state lengths.
Random to set update rate.
Custom to address buffer. The samples are configured by FDwfDigitalOutDataSet function. This also configures
the counter low/high according countOfBits parameter. In TS mode the counter step is double, providing two
bits of samples for output: value and enable.
The output Mode (FDwfDigitalOutModeSet) selects between: PP, OS, OD and TS.
The Idle output (FDwfDigitalOutIdleSet) selects the output while not in Running state.
Page 69 of 85
Triggered/Running state
Divider
Initial
Divide
Divide
Divide
...
Low
High
Low
...
High
Low
High
...
For pulse signal the initial level and initial value are specified with FDwfDigitalOutCounterInitSet function. These
are loaded when entering Running state.
10.1 Control
FDwfDigitalOutReset(HDWF hdwf)
Parameters:
- hdwf Interface handle.
The function above resets and configures (by default, having auto configure enabled) all of the instrument
parameters to default values.
Page 70 of 85
10.2 Configuration
FDwfDigitalOutInternalClockInfo(HDWF hdwf, double *phzFreq)
Parameters:
- hdwf Interface handle.
- phzFreq Pointer to return the internal clock frequency.
The function above is used to retrieve the internal clock frequency.
Page 71 of 85
Page 72 of 85
Page 73 of 85
Page 74 of 85
FDwfDigitalOutOutputInfo(
HDWF hdwf, int idxChannel, int *pfsDwfDigitalOutOutput)
Parameters:
- hdwf Interface handle.
- idxChannel Channel index.
- pfsDwfDigitalOutOutput Pointer to variable to receive the supported output modes.
The function above returns the supported output modes of the channel. They are returned (by reference) as a bit
field. This bit field can be parsed using the IsBitSet Macro. Individual bits are defined using the
DwfDigitalOutOutput constants in DWF.h:
Page 75 of 85
Page 76 of 85
FDwfDigitalOutDividerInfo(
HDWF hdwf, int idxChannel, unsigned int *vMin, unsigned int *vMax)
Parameters:
- hdwf Interface handle.
- idxChannel Channel index.
- pnMin Variable to receive the supported minimum divider value.
- pnMax Variable to receive the supported maximum divider value.
The function above is used to return the supported clock divider value range.
Page 77 of 85
FDwfDigitalOutCounterInfo(
HDWF hdwf, int idxChannel, unsigned int *vMin, unsigned int *vMax)
Parameters:
- hdwf Interface handle.
- idxChannel Channel index.
- pnMin Variable to receive the supported minimum counter value.
- pnMax Variable to receive the supported maximum counter value.
The function above is used to return the supported counter value range.
FDwfDigitalOutCounterInitSet(
HDWF hdwf, int idxChannel, BOOL fHigh, unsigned int v)
Parameters:
- hdwf Interface handle.
- idxChannel Channel index.
- fHigh Start high.
- v Divider initial value.
The function above sets the initial state and counter value of the specified channel.
FDwfDigitalOutCounterInitGet(
HDWF hdwf, int idxChannel, int *pfHigh, unsigned int *pv)
Parameters:
- hdwf Interface handle.
- idxChannel Channel index.
- pfHigh Pointer to variable to receive configured value.
- pv Pointer to variable to receive configured value.
The function above is used to verify the initial state and counter value of the specified channel.
Copyright Digilent, Inc. All rights reserved.
Other product and company names mentioned may be trademarks of their respective owners.
Page 78 of 85
FDwfDigitalOutCounterSet(
HDWF hdwf, int idxChannel, unsigned int vLow, unsigned int vHigh)
Parameters:
- hdwf Interface handle.
- idxChannel Channel index.
- vLow Counter low value.
- vHigh Counter high value.
The function above sets the counter low and high values of the specified channel.
FDwfDigitalOutCounterGet(
HDWF hdwf, int idxChannel, unsigned int *pvLow, unsigned int *pvHigh)
Parameters:
- hdwf Interface handle.
- idxChannel Channel index.
- pvLow Pointer to variable to receive configured value.
- pvHigh Pointer to variable to receive configured value.
The function above is used to verify the low and high counter value of the specified channel.
FDwfDigitalOutDataInfo(
HDWF hdwf, int idxChannel, unsigned int *pcountOfBitsMax)
Parameters:
- hdwf Interface handle.
- idxChannel Channel index.
- pcountOfBitsMax Variable to receive the maximum number of bits.
The function above is used to return the maximum buffers size, the number of custom data bits.
FDwfDigitalOutDataSet(
HDWF hdwf, int idxChannel, void *rgBits, unsigned int countOfBits)
Parameters:
- hdwf Interface handle.
- idxChannel Channel index.
- rgBits Custom data array.
- countOfBits Number of bits.
The function above is used to set the custom data bits. The function also sets the counter initial, low and high
value, according the number of bits. The data bits are sent out in LSB first order. For TS output, the count of bits is
the total number of output value (I/O) and output enable (OE) bits, which should be an even number.
Custom Data Bits
BYTE
Bits
...
1
0
...
Output
I/O(0)
OE(0)
I/O(1)
OE(1)
...
OE(3)
I/O(4)
OE(4)
...
Page 79 of 85
11
Deprecated functions
The following functions are replaced by FDwfAnalogOutNode *providing access to the Amplitude and Frequency
Modulation of Analog Out channels.
FDwfAnalogOutPlayStatus(HDWF hdwf, int idxChannel,
int *cdDataFree, int *cdDataLost, int *cdDataCorrupted)
Parameters:
-
The function above is used to retrieve information about the play process. The data lost occurs when the device
generator is faster than the sample send process from the PC. In this case, the device buffer gets emptied and
generated samples are repeated. Corrupt samples are a warning that the buffer might have been emptied while
samples were sent to the device. In this case, try optimizing the loop for faster execution; or reduce the frequency
or run time to be less or equal to the device buffer size (run time <= buffer size/frequency).
Page 80 of 85
The function above returns the supported generator function options. They are returned (by reference) as a bit
field. This bit field can be parsed using the IsBitSet Macro. Individual bits are defined using the FUNC constants in
dwf.h. These are:
FUNC Constants
funcDC
FuncSine
funcSquare
funcTriangle
funcRampUp
funcRampDown
funcNoise
funcCustom
funcPlay
Page 81 of 85
FDwfAnalogOutFrequencyInfo(
HDWF hdwf, int idxChannel, double *phzMin, double *phzMax)
Parameters:
hdwf Open interface handle on a device.
idxChannel Channel index.
phzMin Variable to receive the supported minimum frequency.
phzMax Variable to receive the supported maximum frequency.
The function above is used to return the supported frequency range for the instrument. The maximum value
shows the DAC frequency. The frequency of the generated waveform: repetition frequency for standard types and
custom data; DAC update for noise type; sample rate for play type.
FDwfAnalogOutAmplitudeInfo(
HDWF hdwf, int idxChannel, double *pvMin, double *pvMax)
Parameters:
hdwf Open interface handle on a device.
idxChannel Channel index.
pvMin Minimum amplitude level or modulation index.
pvMax Maximal amplitude level or modulation index.
The function above is used to retrieve the amplitude range for the specified channel on the instrument. The
amplitude is expressed in Volts units for carrier and in percentage units (modulation index) for AM/FM.
Page 82 of 85
Page 83 of 85
FDwfAnalogOutSymmetryInfo(
HDWF hdwf, int idxChannel, double *ppercentageMin, double *ppercentageMax)
Parameters:
- hdwf Open interface handle on a device.
idxChannel Channel index.
ppercentageMin Minimum value of Symmetry percentage.
ppercentageMax Maximum value of Symmetry percentage.
The function above is used to obtain the symmetry (or duty cycle) range (0..100). This symmetry is supported for
standard signal types. It the pulse duration divided by the pulse period.
FDwfAnalogOutSymmetrySet(
HDWF hdwf, int idxChannel, double percentageSymmetry)
Parameters:
- hdwf Open interface handle on a device.
idxChannel Channel index.
percentageSymmetry Value of percentage of Symmetry (duty cycle).
The function above is used to set the symmetry (or duty cycle) for the specified channel on the instrument. With
channel index -1, each enabled Analog Out channel symmetry will be configured to use the same, new option.
FDwfAnalogOutSymmetryGet(
HDWF hdwf, int idxChannel, double *ppercentageSymmetry)
Parameters:
hdwf Open interface handle on a device.
idxChannel Channel index.
ppercentageSymmetry Pointer to variable to receive value of symmetry (duty cycle).
The function above is used to get the currently set symmetry (or duty cycle) for the specified channel of the
instrument.
FDwfAnalogOutPhaseInfo(
HDWF hdwf, int idxChannel, double *pdegreeMin, double *pdegreeMax)
Parameters:
hdwf Open interface handle on a device.
idxChannel Channel index.
pdegreeMin Minimum value of Phase (in degrees).
pdegreeMax Maximum value of Phase (in degrees).
The function above is used to retrieve the phase range (in degrees 0...360) for the specified channel of the
instrument.
Page 84 of 85
FDwfAnalogOutPhaseSet(
HDWF hdwf, int idxChannel, double degreePhase)
Parameters:
hdwf Open interface handle on a device.
idxChannel Channel index.
degreePhase Value of Phase in degrees.
The function above is used to set the phase for the specified channel on the instrument. With channel index -1,
each enabled Analog Out channel phase will be configured to use the same, new option.
FDwfAnalogOutDataInfo(
HDWF hdwf, int idxChannel, int *pnSamplesMin, double *pnSamplesMax)
Parameters:
hdwf Open interface handle on a device.
idxChannel Channel index.
pnSamplesMin - Minimum number of samples available for custom data.
pnSamplesMax Maximum number of samples available for custom data.
The function above is used to retrieve the minimum and maximum number of samples allowed for custom data
generation.
Page 85 of 85