Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
waveforms:ref_manual [2014/09/23 22:27] – [6Analog Out (Arbitrary Waveform Generator)] Joshua Woldstad | waveforms:ref_manual [2021/10/13 21:06] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 2: | Line 2: | ||
WaveForms™ provides an interface that allows users to interact with Digilent Analog Design hardware, such as the 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. | WaveForms™ provides an interface that allows users to interact with Digilent Analog Design hardware, such as the 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. | + | 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. The WaveForms software, as well as the SDK, can be downloaded for free at the [[https:// |
{{ : | {{ : | ||
Line 617: | Line 617: | ||
The function above returns for each AnalogIn channel the real offset level. | The function above returns for each AnalogIn channel the real offset level. | ||
- | ---- | ||
==== 5.4 Trigger ==== | ==== 5.4 Trigger ==== | ||
Line 984: | Line 983: | ||
The function above is used to retrieve information about the play process. | The function above is used to retrieve information about the play process. | ||
- | | **FDwfAnalogOutNodePlayData**( | + | | **FDwfAnalogOutNodePlayData**(HDWF hdwf, int idxChannel, AnalogOutNode node, double* rgdData, int cdData) |
- | HDWF hdwf, int idxChannel, AnalogOutNode node, double* rgdData, int cdData) | + | |
| Parameters: | | Parameters: | ||
| - hdwf – Open interface handle on a device. | | - hdwf – Open interface handle on a device. | ||
Line 1012: | Line 1010: | ||
The function above sets the state machine master of the channel generator. | The function above sets the state machine master of the channel generator. | ||
+ | |||
+ | | **FDwfAnalogOutMasterGet**(HDWF hdwf, int idxChannel, int *pidxMaster) | ||
+ | | Parameters: | ||
+ | | - hdwf – Open interface handle on a device. | ||
+ | | - idxChannel – Channel index. | ||
+ | | - node – Node index. | ||
+ | | - pidxMaster – Pointer to variable to receive parameter. | ||
+ | |||
+ | The function above is used to verify the parameter. | ||
+ | |||
+ | | **FDwfAnalogOutNodeInfo**(HDWF hdwf, int idxChannel, int* pfsnode) | ||
+ | | Parameters: | ||
+ | | - hdwf – Open interface handle on a device. | ||
+ | | - idxChannel – Channel index. | ||
+ | |- pfsnode – Variable to receive the supported nodes. | ||
+ | |||
+ | |||
+ | 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 | ||
+ | |||
+ | | **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. | ||
+ | |||
+ | | **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. | ||
+ | |||
+ | | **FDwfAnalogOutNodeFunctionInfo**(HDWF hdwf, int idxChannel, AnalogOutNode node, int* pfsfunc) | ||
+ | | Parameters: | ||
+ | | - hdwf – Open interface handle on a device. | ||
+ | | - idxChannel – Channel index. | ||
+ | |- node – Node index. | ||
+ | |- pfsfunc – Variable to receive the supported generator function options.| | ||
+ | |||
+ | 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. | ||
+ | |||
+ | |||
+ | | **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. | ||
+ | |||
+ | | **FDwfAnalogOutNodeFunctionGet**(HDWF hdwf, int idxChannel, AnalogOutNode node, FUNC* pfunc) | ||
+ | | Parameters: | ||
+ | | - hdwf – Open interface handle on a device. | ||
+ | | - idxChannel – Channel index. | ||
+ | |- node – Node index. | ||
+ | |- pfunc – 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. | ||
+ | |||
+ | | **FDwfAnalogOutNodeFrequencyInfo**(HDWF hdwf, int idxChannel, AnalogOutNode node, double* phzMin, double* phzMax) | ||
+ | | Parameters: | ||
+ | | - hdwf – Open interface handle on a device. | ||
+ | | - idxChannel – Channel index. | ||
+ | |- node – Node 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. | ||
+ | |||
+ | | **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. | ||
+ | |||
+ | | **FDwfAnalogOutNodeFrequencyGet**(HDWF hdwf, int idxChannel, AnalogOutNode node, double hzFrequency) | ||
+ | | Parameters: | ||
+ | | - hdwf – Open interface handle on a device. | ||
+ | | - idxChannel – Channel index. | ||
+ | |- node – Node index. | ||
+ | |- PhzFrequency – 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. | ||
+ | |||
+ | | **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 .| | ||
+ | |- pvMax – Maximal amplitude level .| | ||
+ | |||
+ | The function above is used to retrieve the amplitude range for the specified channel-node on the instrument. The amplitude is expressed in Volts 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.| | ||
+ | |||
+ | The function above is used to set the amplitude or modulation index for the specified channel-node on the instrument. | ||
+ | |||
+ | | **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.| | ||
+ | |||
+ | The function above is used to get the currently set amplitude or modulation index for the specified channel-node on the instrument. | ||
+ | |||
+ | |**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.| | ||
+ | |- pvMax – Maximum offset voltage.| | ||
+ | |||
+ | |||
+ | 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.| | ||
+ | |||
+ | The function above is used to set the offset value for the specified channel-node on the instrument. | ||
+ | |||
+ | |**FDwfAnalogOutNodeOffsetget**(HDWF hdwf, int idxChannel, AnalogOutNode node, double* PvOffset)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Open interface handle on a device.| | ||
+ | |- idxChannel – Channel index.| | ||
+ | |- node – Node index.| | ||
+ | |- pvOffset – Value to set voltage offset in Volts.| | ||
+ | |||
+ | The function above is used to get the current offset value for the specified channel-node on the instrument. | ||
+ | |||
+ | | **FDwfAnalogOutNodeSymmetryInfo**(HDWF hdwf, int idxChannel, AnalogOutNode node, double* ppercentageMin, | ||
+ | | Parameters: | ||
+ | | - hdwf – Open interface handle on a device. | ||
+ | | - idxChannel – Channel index. | ||
+ | | - node – Node 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. | ||
+ | |||
+ | | **FDwfAnalogOutNodeSymmetrySet**(HDWF hdwf, int idxChannel, AnalogOutNode node, double percentageSymmetry) | ||
+ | | Parameters: | ||
+ | | - hdwf – Open interface handle on a device. | ||
+ | | - idxChannel – Channel index. | ||
+ | | - node – Node 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-node on the instrument. | ||
+ | |||
+ | |**FDwfAnalogOutNodeSymmetryGet**(HDWF hdwf, int idxChannel, AnalogOutNode node, AnalogOutNode node, double *ppercentageSymmetry)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Open interface handle on a device.| | ||
+ | |- idxChannel – Channel index.| | ||
+ | |- node – Node index.| | ||
+ | |- ppercentageSymmetry –Value of percentage 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. | ||
+ | |||
+ | |**FDwfAnalogOutNodePhaseInfo**(HDWF hdwf, int idxChannel, AnalogOutNode node, double* pdegreeMin, double* pdegreeMax)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Open interface handle on a device.| | ||
+ | |- idxChannel – Channel index.| | ||
+ | |- node – Node 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-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. | ||
+ | |||
+ | |**FDwfAnalogOutNodePhaseGet**(HDWF hdwf, int idxChannel, AnalogOutNode node, double* pdegreePhase)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Open interface handle on a device.| | ||
+ | |- idxChannel – Channel index.| | ||
+ | |- node – Node index.| | ||
+ | |- pdegreePhase – Pointer to variable to receive | ||
+ | |||
+ | The function above is used to get the current phase for the specified channel-node on the instrument. | ||
+ | |||
+ | | **FDwfAnalogOutNodeDataInfo**(HDWF hdwf, int idxChannel, AnalogOutNode node, int* pnSamplesMin, | ||
+ | | Parameters: | ||
+ | | - hdwf – Open interface handle on a device. | ||
+ | | - idxChannel – Channel index. | ||
+ | | - node – Node 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. | ||
+ | |||
+ | |**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, | ||
+ | |||
+ | * 0 value sample will output: Offset. | ||
+ | * +1 value sample will output: Offset + Amplitude. | ||
+ | * -1 value sample will output: Offset – Amplitude. | ||
+ | |||
+ | ==== 6.3 States ==== | ||
+ | |||
+ | | **FDwfAnalogOutTriggerSourceInfo**(HDWF hdwf, int idxChannel, int* pfstrigsrc) | ||
+ | | Parameters: | ||
+ | | - hdwf – Open interface handle on a device. | ||
+ | | - idxChannel – Channel index. | ||
+ | | - pfstrigsrc – Variable to receive the supported trigger sources. | ||
+ | |||
+ | The function above returns the supported trigger source options for the instrument. See the description of **FDwfDeviceTriggerInfo**. | ||
+ | |||
+ | | **FDwfAnalogOutTriggerSourceSet**(HDWF hdwf, int idxChannel, TRIGSRC trigsrc) | ||
+ | | Parameters: | ||
+ | | - hdwf – Open interface handle on a device. | ||
+ | | - idxChannel – Channel index. | ||
+ | |- trigsrc – Trigger source to set. | | ||
+ | |||
+ | The function above is used to set the trigger source for the channel on instrument. | ||
+ | |||
+ | | **FDwfAnalogOutTriggerSourceGet**(HDWF hdwf, int idxChannel, TRIGSRC* ptrigsrc) | ||
+ | | Parameters: | ||
+ | | - hdwf – Open interface handle on a device. | ||
+ | | - idxChannel – Channel index. | ||
+ | |- ptrigsrc – Pointer to variable to receive the trigger source. | ||
+ | |||
+ | The function above is used to get the current trigger source setting for the channel on instrument. | ||
+ | |||
+ | |||
+ | | **FDwfAnalogOutRunInfo**(HDWF hdwf, int idxChannel, double* psecMin, double* psecMax) | | ||
+ | | Parameters: | ||
+ | | - hdwf – Open interface handle on a device. | ||
+ | | - idxChannel – Channel index. | ||
+ | |- psecMin – Variable to receive the supported minimum run length.| | ||
+ | |- psecMax – Variable to receive the supported maximum run length.| | ||
+ | |||
+ | The function above is used to return the supported run length range for the instrument in Seconds. | ||
+ | |||
+ | | **FDwfAnalogOutRunSet**(HDWF hdwf, int idxChannel, double secRun) | | ||
+ | | Parameters: | ||
+ | | - hdwf – Open interface handle on a device. | ||
+ | | - idxChannel – Channel index. | ||
+ | |- secRun – Run length to set expressed in seconds.| | ||
+ | |||
+ | The function above is used to set the run length for the instrument in Seconds. | ||
+ | |||
+ | | **FDwfAnalogOutRunGet**(HDWF hdwf, int idxChannel, double* psecRun) | | ||
+ | | Parameters: | ||
+ | | - hdwf – Open interface handle on a device. | ||
+ | | - idxChannel – Channel index. | ||
+ | |- psecRun – Pointer to variable to receive the run length.| | ||
+ | |||
+ | The function above is used to read the configured run length for the instrument in Seconds. | ||
+ | |||
+ | |**FDwfAnalogOutRunStatus**(HDWF hdwf, int idxChannel, double* psecRun)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Open interface handle on a device.| | ||
+ | |- idxChannel – Channel index.| | ||
+ | |- psecRun – Pointer to variable to receive the remaining run length.| | ||
+ | |||
+ | The function above is used to read the remaining run length. It returns data from the last FDwfAnalogOutStatus call. | ||
+ | |||
+ | |**FDwfAnalogOutWaitInfo**(HDWF hdwf, int idxChannel, double* psecMin, double* psecMax)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Open interface handle on a device.| | ||
+ | |- idxChannel – Channel index.| | ||
+ | |- psecMin – Variable to receive the supported minimum wait length.| | ||
+ | |- psecMax – Variable to receive the supported maximum wait length.| | ||
+ | |||
+ | The function above is used to return the supported wait length range in Seconds. The wait length is how long the instrument waits after being triggered to generate the signal. Default value is zero. | ||
+ | |||
+ | |**FDwfAnalogOutWaitSet**(HDWF hdwf, int idxChannel, double secWait)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Open interface handle on a device.| | ||
+ | |- idxChannel – Channel index.| | ||
+ | |- secWait – Wait length to set expressed in seconds.| | ||
+ | |||
+ | The function above is used to set the wait length for the channel on instrument. | ||
+ | |||
+ | |**FDwfAnalogOutWaitGet**(HDWF hdwf, int idxChannel, double* psecWait)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Open interface handle on a device.| | ||
+ | |- idxChannel – Channel index.| | ||
+ | |- psecWait – Pointer to variable to receive the wait length.| | ||
+ | |||
+ | |||
+ | The function above is used to get the current wait length for the channel on instrument. | ||
+ | |||
+ | |**FDwfAnalogOutRepeatInfo**(HDWF hdwf, int idxChannel, int* pnMin, int* pnMax)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Open interface handle on a device.| | ||
+ | |- idxChannel – Channel index.| | ||
+ | |- pnMin – Variable to receive the supported minimum repeat count.| | ||
+ | |- pnMax – Variable to receive the supported maximum repeat count.| | ||
+ | |||
+ | The function above is used to return the supported repeat count range. This is how many times the generated signal will be repeated upon. Zero value represents infinite repeat. Default value is one. | ||
+ | |||
+ | |**FDwfAnalogOutRepeatSet**(HDWF hdwf, int idxChannel, int cRepeat)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Open interface handle on a device.| | ||
+ | |- idxChannel – Channel index.| | ||
+ | |- cRepeat – Repeat count to set.| | ||
+ | |||
+ | The function above is used to set the repeat count. | ||
+ | |||
+ | |**FDwfAnalogOutRepeatGet**(HDWF hdwf, int idxChannel, int* pcRepeat)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Open interface handle on a device.| | ||
+ | |- idxChannel – Channel index.| | ||
+ | |- pcRepeat – Pointer to variable to receive the repeat count.| | ||
+ | |||
+ | The function above is used to read the current repeat count. | ||
+ | |||
+ | |**FDwfAnalogOutRepeatStatus**(HDWF hdwf, int idxChannel, int* pcRepeat)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Open interface handle on a device.| | ||
+ | |- idxChannel – Channel index.| | ||
+ | |- pcRepeat – Pointer to variable to receive the remaining repeat counts.| | ||
+ | |||
+ | The function above is used to read the remaining repeat counts. It only returns information from the last FDwfAnalogOutStatus function call, it does not read from the device. | ||
+ | |||
+ | |**FDwfAnalogOutRepeatTriggerSet**(HDWF hdwf, int idxChannel, BOOL fRepeatTrigger)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Open interface handle on a device.| | ||
+ | |- idxChannel – Channel index.| | ||
+ | |- fRepeatTrigger – Boolean used to specify if the trigger should be included in a repeat cycle.| | ||
+ | |||
+ | The function above is used to set the repeat trigger option. | ||
+ | |||
+ | |||
+ | |**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. | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ======7 Analog IO ====== | ||
+ | |||
+ | The AnalogIO functions are used to control the power supplies, reference voltage supplies, voltmeters, ammeters, thermometers, | ||
+ | |||
+ | |**FDwfAnalogIOReset**(HDWF hdwf)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Open interface handle on a device.| | ||
+ | |||
+ | The function above resets and configures 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. | ||
+ | |||
+ | |**FDwfAnalogIOEnableInfo**(HDWF hdwf, BOOL* pfSet, BOOL* pfStatus)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Open interface handle on a device.| | ||
+ | |- pfSet – Returns true when the master enable setting is supported.| | ||
+ | |- pfStatus – Return true when the status of the master enable can be read.| | ||
+ | |||
+ | The function above is used to verify if Master Enable Setting and/or Master Enable Status are supported for the AnalogIO instrument. The Master Enable setting is essentially a software switch that “enables” or “turns on” the AnalogIO channels. If supported, the status of this Master Enable switch (Enabled/ | ||
+ | |||
+ | |**FDwfAnalogIOEnableSet**(HDWF hdwf, BOOL fMasterEnable)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Open interface handle on a device.| | ||
+ | |- fMasterEnable – Set TRUE to enable the master switch; FALSE to disable the master switch.| | ||
+ | |||
+ | The function above is used to set the master enable switch. | ||
+ | |||
+ | |**FDwfAnalogIOEnableGet**(HDWF hdwf, BOOL* pfMasterEnable)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Open interface handle on a device.| | ||
+ | |- pfMasterEnable – Pointer to variable to return the enabled configuration.| | ||
+ | |||
+ | The function above returns the current state of the master enable switch. This is not obtained from the device. | ||
+ | |||
+ | |**FDwfAnalogIOEnableGet**(HDWF hdwf, BOOL* pfMasterEnable)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Open interface handle on a device.| | ||
+ | |- pfMasterEnable – Pointer to variable to return the enabled configuration.| | ||
+ | |||
+ | The function above returns the master enable status (if the device supports it). This can be a switch on the board or an overcurrent protection circuit state. | ||
+ | |||
+ | |**FDwfAnalogIOChannelCount**(HDWF hdwf, int* pcChannel)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Open interface handle on a device.| | ||
+ | |- pcChannel – Pointer to variable to return the number of channels.| | ||
+ | |||
+ | The function above returns the number of AnalogIO channels available on the device. | ||
+ | |||
+ | |**FDwfAnalogIOChannelName**(HDWF hdwf, int idxChannel, char szName[32], char szLabel[8])| | ||
+ | |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. | ||
+ | |||
+ | |**FDwfAnalogIOChannelInfo**(HDWF hdwf, int idxChannel, int* pnNodes)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Open interface handle on a device.| | ||
+ | |- idxChannel – Channel index.| | ||
+ | |- pnNodes – Pointer to variable to return the number of node .| | ||
+ | |||
+ | The function above returns the number of nodes associated with the specified channel. | ||
+ | |||
+ | |**FDwfAnalogIOChannelNodeName**(HDWF hdwf, int idxChannel, char szNodeName[32], | ||
+ | |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”, | ||
+ | |||
+ | |||
+ | |**FDwfAnalogIOChannelNodeInfo**(HDWF hdwf, int idxChannel, ANALOGIO* panalogio)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Open interface handle on a device.| | ||
+ | |- idxChannel – Channel 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 Modes** | ||
+ | | **analogioEnable** | ||
+ | | **analogioVoltage** | ||
+ | | **analogioCurrent** | ||
+ | | **analogioTemperature** | ||
+ | |||
+ | |||
+ | |**FDwfAnalogIOChannelNodeSetInfo**(HDWF hdwf, int idxChannel, int idxNode, double* pmin, double* pmax, int* |pnSteps)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Open interface handle on a device.| | ||
+ | |- idxChannel – Analog I/O channel index of the device.| | ||
+ | |- pmin – Minimum settable value.| | ||
+ | |- pmax – Maximum settable value.| | ||
+ | |- pnSteps – Number of steps between minimum and maximum values.| | ||
+ | |||
+ | These functions return node value limits. Since a Node can represent many things (Power supply, Temperature sensor, etc.), the Minimum, Maximum, and Steps parameters also represent different types of values. In broad terms, the (Maximum – Minimum)/ | ||
+ | |||
+ | **FDwfAnalogIOChannelNodeInfo** returns the type of values to expect and | ||
+ | |||
+ | | ||
+ | |||
+ | |||
+ | |**FDwfAnalogIOChannelNodeSet**(HDWF hdwf, int idxChannel, int idxNode, double value)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Open interface handle on a device.| | ||
+ | |- 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.| | ||
+ | |- pvalue – Pointer to variable to return the configured value.| | ||
+ | |||
+ | The function above returns the currently set value of the node on the specified channel. | ||
+ | |||
+ | |**FDwfAnalogIOChannelNodeStatusInfo**(HDWF hdwf, int idxChannel, int idxNode, double* pmin, double* pmax, int* pnSteps)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- idxChannel –Channel 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 .| | ||
+ | |- pvalue – Pointer to variable to return the value reading.| | ||
+ | |||
+ | The function above returns the value reading of the node. | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ====== Digital I/O ====== | ||
+ | |||
+ | |**FDwfDigitalIOReset**(HDWF hdwf)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Open interface handle on a device.| | ||
+ | |||
+ | The function above resets all DigitalIO instrument parameters to default values. It sets the output enables to zero (tri-state), | ||
+ | |||
+ | |**FDwfDigitalIOConfigure**(HDWF hdwf)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Open interface handle on a device.| | ||
+ | |||
+ | The function above is used to configure the DigitalIO instrument. This doesn’t have to be used if AutoConfiguration is enabled. | ||
+ | |||
+ | |**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. | ||
+ | |||
+ | |**FDwfDigitalIOOutputEnableInfo**(HDWF hdwf, unsigned int* pfsOutputEnableMask)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Open interface handle on a device.| | ||
+ | |- pfsOutputEnableMask – Variable to return the OE mask bit field.| | ||
+ | |||
+ | The function above returns the output enable mask (bit set) that can be used on this device. These are the pins that can be used as outputs on the device. | ||
+ | |||
+ | |**FDwfDigitalIOOutputEnableSet**(HDWF hdwf, unsigned int fsOutputEnable)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Open interface handle on a device.| | ||
+ | |- fsOutputEnable – Output enable bit set.| | ||
+ | |||
+ | The function above is used to enable specific pins for output. This is done by setting bits in the fsOutEnable bit field (1 for enabled, 0 for disabled). | ||
+ | |||
+ | |**FDwfDigitalIOOutputEnableGet**(HDWF hdwf, unsigned int* pfsOutputEnable)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Open interface handle on a device.| | ||
+ | |- pfsOutputEnable – Pointer to variable to returns output enable bit set.| | ||
+ | |||
+ | The function above returns a bit field that specifies which output pins have been enabled. | ||
+ | |||
+ | |**FDwfDigitalIOOutputInfo**(HDWF hdwf, unsigned int* pfsOutputMask)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Open interface handle on a device.| | ||
+ | |- pfsOutputMask – Variable to return the output value mask.| | ||
+ | |||
+ | The function above returns the settable output value mask (bit set) that can be used on this device. | ||
+ | |||
+ | |**FDwfDigitalIOOutputSet**(HDWF hdwf, unsigned int fsOutput)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Open interface handle on a device.| | ||
+ | |- fsOutput – Output enable bit set.| | ||
+ | |||
+ | The function above is used to set the output logic value on all output pins. | ||
+ | |||
+ | |**FDwfDigitalIOOutputGet**(HDWF hdwf, unsigned int* pfsOutput)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Open interface handle on a device.| | ||
+ | |- pfsOutput – Pointer to variable to returns output enable bit set.| | ||
+ | |||
+ | The function above returns the currently set output values across all output pins. | ||
+ | |||
+ | |**FDwfDigitalIOInputInfo**(HDWF hdwf, unsigned int* pfsInputMask)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Open interface handle on a device.| | ||
+ | |- pfsInputMask – Variable to return the input value mask.| | ||
+ | |||
+ | The function above returns the readable input value mask (bit set) that can be used on the device. | ||
+ | |||
+ | **FDwfDigitalIOInputStatus**(HDWF hdwf, unsigned int* pfsInput) | ||
+ | |Parameters: | ||
+ | |- hdwf – Open interface handle on a device.| | ||
+ | |- pfsInput – Variable to return the input value.| | ||
+ | |||
+ | The function above returns the input states of all I/O pins. Before calling the function above, call the // | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ====== 9 Digital In (Logic Analyzer) ====== | ||
+ | |||
+ | The Digital In instrument states: | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | The states are defined in dwf.h DwfState type. | ||
+ | * **Ready**: Initial state. After FDwfDigitalInConfigure or any FDwfDigitalIn*Set function call goes to this state. With FDwfDigitalInConfigure reconfigure goes to Configure state | ||
+ | * **Configure**: | ||
+ | * **Prefill**: | ||
+ | * **Armed**: It waits for trigger. | ||
+ | * **Running**: | ||
+ | * **Done**: Final state. | ||
+ | |||
+ | ==== 9.1 Control ==== | ||
+ | |||
+ | |**FDwfDigitalInReset**(HDWF hdwf)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |||
+ | The function above resets and configures all DigitalIn instrument parameters to default values. | ||
+ | |||
+ | |**FDwfDigitalInConfigure**(HDWF hdwf, BOOL fReconfigure, | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- fReconfigure – Configure the device.| | ||
+ | |- fStart – Start the acquisition.| | ||
+ | |||
+ | The function above is used to configure the instrument and start or stop the acquisition. To reset the Auto trigger timeout, set fReconfigure to TRUE. | ||
+ | |||
+ | |||
+ | |**FDwfDigitalInStatus**(HDWF hdwf, BOOL fReadData, STS* psts)| | ||
+ | |Parameters: | ||
+ | |- hdwf – interface handle.| | ||
+ | |- fReadData – TRUE if data should be read.| | ||
+ | |- psts – Variable to receive the acquisition state.| | ||
+ | |||
+ | The function above is used to check the state of the instrument. To read the data from the device, set fReadData to TRUE. For single acquisition mode, the data will be read only when the acquisition is finished. | ||
+ | |||
+ | |||
+ | |**FDwfDigitalInStatusSamplesLeft**(HDWF hdwf, int *pcSamplesLeft)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- pcSamplesLeft – Variable to receive the remaining samples to acquire.| | ||
+ | |||
+ | The function above is used to retrieve the number of samples left in the acquisition. | ||
+ | |||
+ | |**FDwfDigitalInStatusSamplesValid**(HDWF hdwf, int * pcSamplesValid)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- pcSamplesValid – Variable to receive the number of valid samples.| | ||
+ | |||
+ | The function above is used to retrieve the number of valid/ | ||
+ | |||
+ | |||
+ | |**FDwfDigitalInStatusIndexWrite**(HDWF hdwf, int *pidxWrite)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- pidxWrite – Variable to receive the position of the acquisition.| | ||
+ | |||
+ | The function above is used to retrieve the buffer write pointer. This is needed in ScanScreen acquisition mode to display the scan bar. | ||
+ | |||
+ | |||
+ | |**FDwfDigitalInStatusAutoTriggered**(HDWF hdwf, BOOL* pfAuto)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- pfAuto – Returns TRUE if the acquisition was auto triggered.| | ||
+ | |||
+ | The function above is used to verify if the acquisition is auto triggered. | ||
+ | |||
+ | |||
+ | |**FDwfDigitalInStatusData**(HDWF hdwf, void *rgData, int countOfDataBytes)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- rgData – 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 instrument. It copies the data samples to the provided buffer. The sample format is specified by FDwfDigitalInSampleFormatSetfunction. | ||
+ | |||
+ | |||
+ | ==== 9.2 Configuration ==== | ||
+ | |||
+ | |||
+ | |**FDwfDigitalInInternalClockInfo**(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. | ||
+ | |||
+ | |**FDwfDigitalInClockSourceInfo**(HDWF hdwf, int *pfsDwfDigitalInClockSource)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Open interface handle on a device.| | ||
+ | |- pfsDwfDigitalInClockSource – Pointer to variable to return the available clock source options.| | ||
+ | |||
+ | The function above returns the supported clock sources for Digital In instrument. 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 DwfDigitalInClockSource constants in dwf.h: | ||
+ | * DwfDigitalInClockSourceInternal: | ||
+ | * DwfDigitalInClockSourceExternal: | ||
+ | |||
+ | |**FDwfDigitalInClockSourceSet**(HDWF hdwf, DwfDigitalInClockSource v)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Open interface handle on a device.| | ||
+ | |- v – Clock source| | ||
+ | |||
+ | The function above is used to set the clock source of instrument. | ||
+ | |||
+ | |||
+ | |**FDwfDigitalInClockSourceGet**(HDWF hdwf, DwfDigitalInClockSource *pv)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Open interface handle on a device.| | ||
+ | |- pv – Pointer to variable to return the configured value.| | ||
+ | |||
+ | The function above is used to get the clock source of instrument. | ||
+ | |||
+ | |**FDwfDigitalInDividerInfo**(HDWF hdwf, unsigned int *pdivMax)| | ||
+ | |Parameters: | ||
+ | |- hdwf –Interface handle.| | ||
+ | |- pdivMax – Pointer to variable to return the available maximum divider value.| | ||
+ | |||
+ | The function above returns the maximum supported clock divider value. This specifies the sample rate. | ||
+ | |||
+ | |**FDwfDigitalInDividerSet**(HDWF hdwf, unsigned int div)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- div – Divider value.| | ||
+ | |||
+ | The function above is used to set the clock divider value. | ||
+ | |||
+ | |**FDwfDigitalInDividerGet**(HDWF hdwf, unsigned int *pdiv)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- pdiv –Pointer to return configured value.| | ||
+ | |||
+ | The function above is used to get the configured clock divider value. | ||
+ | |||
+ | |**FDwfDigitalInBitsInfo**(HDWF hdwf, int *pnBits)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- pnBits – Pointer to variable to return the number of bits.| | ||
+ | |||
+ | The function above returns the number of Digital In bits. | ||
+ | |||
+ | |||
+ | |**FDwfDigitalInSampleFormatSet**(HDWF hdwf, int nBits) | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- nBits – Sample format.| | ||
+ | |||
+ | The function above is used to set the sample format, the number of bits starting from least significant bit. Valid options are 8, 16, and 32. | ||
+ | |||
+ | |**FDwfDigitalInSampleFormatGet**(HDWF hdwf, int *pnBits)| | ||
+ | |Parameters: | ||
+ | |- hdwf –Interface handle.| | ||
+ | |- pnBits –Pointer to return configured value.| | ||
+ | |||
+ | The function above is used to return the configured sample format. | ||
+ | |||
+ | |**FDwfDigitalInBufferSizeInfo**(HDWF hdwf, int *pnSizeMax)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- pnSizeMax – Pointer to variable to return maximum buffer size.| | ||
+ | |||
+ | The function above returns the Digital In maximum buffer size. | ||
+ | |||
+ | |**FDwfDigitalInBufferSizeSet**(HDWF hdwf, int nSize)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- nSize – Buffer size.| | ||
+ | |||
+ | The function above is used to set the buffer size. | ||
+ | |||
+ | |**FDwfDigitalInBufferSizeGet**(HDWF hdwf, int *pnSize)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- nSize – Pointer to return configured value.| | ||
+ | |||
+ | The function above is used to return the configured buffer size. | ||
+ | |||
+ | |**FDwfDigitalInSampleModeInfo**(HDWF hdwf, int *pfsDwfDigitalInSampleMode)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- pfsDwfDigitalInSampleMode – Pointer to return the supported sample modes.| | ||
+ | |||
+ | The function above returns the supported sample 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 DwfDigitalInSampleMode constants in dwf.h: | ||
+ | * DwfDigitalInSampleModeSimple: | ||
+ | * DwfDigitalInSampleModeNoise: | ||
+ | |||
+ | |||
+ | |**FDwfDigitalInSampleModeSet**(HDWF hdwf, DwfDigitalInSampleMode v) | | ||
+ | |Parameters: | ||
+ | |- hdwf – Open interface handle on a device.| | ||
+ | |- v – Sample mode.| | ||
+ | |||
+ | The function above is used to set the sample mode. | ||
+ | |||
+ | |||
+ | |**FDwfDigitalInSampleModeGet**(HDWF hdwf, DwfDigitalInSampleMode *pv)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Open interface handle on a device.| | ||
+ | |- pv – Pointer to return configured value.| | ||
+ | |||
+ | The function above is used to return the configured sample mode | ||
+ | |||
+ | |||
+ | |**FDwfDigitalInAcquisitionModeInfo**(HDWF hdwf, int* pfsacqmode)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- pfsacqmode – Pointer to return the supported acquisition modes.| | ||
+ | |||
+ | The function above returns the supported AnalogIn acquisition modes. | ||
+ | * **acqmodeSingle**: | ||
+ | * **acqmodeScanShift**: | ||
+ | * **acqmodeScanScreen**: | ||
+ | |||
+ | |||
+ | |**FDwfDigitalInAcquisitionModeSet**(HDWF hdwf, ACQMODE acqmode)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- acqmode – Acquisition mode to set.| | ||
+ | |||
+ | The function above is used to set the acquisition mode. | ||
+ | |||
+ | |||
+ | |**FDwfDigitalInAcquisitionModeGet**(HDWF hdwf, ACQMODE* pacqmode)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- pacqmode – Variable to receive the current acquisition mode.| | ||
+ | |||
+ | The function above is used to get retrieve the acquisition mode. | ||
+ | |||
+ | |||
+ | ==== 9.3 Trigger ==== | ||
+ | |||
+ | |**FDwfDigitalInTriggerSourceInfo**(HDWF hdwf, int* pfstrigsrc)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- pfstrigsrc – Variable to receive the supported trigger sources.| | ||
+ | |||
+ | The function above returns the supported trigger source options for the instrument. See the description of FDwfDeviceTriggerInfo. | ||
+ | |||
+ | |**FDwfDigitalInTriggerSourceSet**(HDWF hdwf, TRIGSRC trigsrc)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- trigsrc – Trigger source to set.| | ||
+ | |||
+ | The function above is used to set the trigger source for the instrument. | ||
+ | |||
+ | |||
+ | |**FDwfDigitalInTriggerSourceGet**(HDWF hdwf, TRIGSRC* ptrigsrc)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- ptrigsrc – Pointer to variable to receive the trigger source.| | ||
+ | |||
+ | The function above is used to get the current trigger source setting for the instrument. | ||
+ | |||
+ | |**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. | ||
+ | |||
+ | |**FDwfDigitalInTriggerPositionSet**(HDWF hdwf, unsigned int cSamplesAfterTrigger)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- cSamplesAfterTrigger – Samples after trigger.| | ||
+ | |||
+ | The function above is used to set the number of samples to acquire after trigger. | ||
+ | |||
+ | |**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, 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. | ||
+ | |||
+ | |**FDwfDigitalInTriggerAutoTimeoutSet**(HDWF hdwf, double secTimeout)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- secTimeout – Timeout to set.| | ||
+ | |||
+ | The function above is used to configure the auto trigger timeout value in seconds. | ||
+ | |||
+ | |**FDwfDigitalInTriggerAutoTimeoutGet**(HDWF hdwf, double* psecTimeout)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- psecTimeout – Variable to receive the current timeout.| | ||
+ | |||
+ | The function above returns the configured auto trigger timeout value in seconds. | ||
+ | |||
+ | |||
+ | ==== 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, | ||
+ | |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, | ||
+ | |||
+ | |||
+ | |**FDwfDigitalInTriggerSet**(HDWF hdwf, unsigned int fsLevelLow, unsigned int fsLevelHigh, | ||
+ | |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, | ||
+ | |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. | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ====== 10 Digital Out (Pattern Generator) ====== | ||
+ | |||
+ | The DigitalOut instrument states: | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | The states are described defined in dwf.h DwfState type. | ||
+ | * **Ready**: Initial state. After FDwfDigitalOutConfigure or any FDwfDigitalOut*Set function call goes to this state. With digital out configure start command goes to Armed state | ||
+ | * **Armed**: It waits for trigger. | ||
+ | * **Wait**: Remains in this state for time period specified by FDwfDigitalOutWaitSet function. | ||
+ | * **Running**: | ||
+ | * **Repeat**: Goes to Armed or Wait state according the FDwfDigitalOutRepeatTriggerSet setting, for number of times specified by FDwfDigitalOutRepeatSet. | ||
+ | * **Done**: Final state. | ||
+ | |||
+ | This states machine controls all digital out channels. | ||
+ | |||
+ | Channel configuration: | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | 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 // | ||
+ | The Counter initial value is set by // | ||
+ | |||
+ | 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 // | ||
+ | |||
+ | |||
+ | The output Mode (// | ||
+ | The Idle output (// | ||
+ | |||
+ | Pulse signal: | ||
+ | |||
+ | {{ : | ||
+ | |||
+ | 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 all of the instrument parameters to default values. | ||
+ | |||
+ | |**FDwfDigitalOutConfigure**(HDWF hdwf, BOOL fStart)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- fStart – Start the acquisition. To stop, set to FALSE. | | ||
+ | |||
+ | The function above is used to start or stop the instrument. | ||
+ | |||
+ | |||
+ | |**FDwfDigitalOutStatus**(HDWF hdwf, STS* psts)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- psts – Pointer to variable to return the state.| | ||
+ | |||
+ | The function above is used to check the state of the instrument. | ||
+ | |||
+ | |||
+ | ==== 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. | ||
+ | |||
+ | |**FDwfDigitalOutTriggerSourceInfo**(HDWF hdwf, int* pfstrigsrc)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- pfstrigsrc – Variable to receive the supported trigger sources.| | ||
+ | |||
+ | The function above returns the supported trigger source options for the instrument. See the description of FDwfDeviceTriggerInfo. | ||
+ | |||
+ | |**FDwfDigitalOutTriggerSourceSet**(HDWF hdwf, TRIGSRC trigsrc)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- trigsrc – Trigger source to set .| | ||
+ | |||
+ | The function above is used to set the trigger source for the instrument. Default setting is trigsrcNone. | ||
+ | |||
+ | |**FDwfDigitalOutTriggerSourceGet**(HDWF hdwf, TRIGSRC* ptrigsrc)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- ptrigsrc – Pointer to variable to receive the trigger source.| | ||
+ | |||
+ | The function above is used to get the current trigger source setting for the instrument. | ||
+ | |||
+ | |**FDwfDigitalOutRunInfo**(HDWF hdwf, double* psecMin, double* psecMax)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- psecMin – Variable to receive the supported minimum run length.| | ||
+ | |- psecMax – Variable to receive the supported maximum run length. | | ||
+ | |||
+ | The function above is used to return the supported run length range for the instrument in seconds. Zero value (default) represent an infinite (or continuous) run. | ||
+ | |||
+ | |**FDwfDigitalOutRunSet**(HDWF hdwf, double secRun)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- secRun – Run length to set expressed in seconds.| | ||
+ | |||
+ | The function above is used to set the run length for the instrument in Seconds. | ||
+ | |||
+ | |**FDwfDigitalOutRunGet**(HDWF hdwf, double* psecRun)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- psecRun – Pointer to variable to receive the run length.| | ||
+ | |||
+ | The function above is used to read the configured run length for the instrument in seconds. | ||
+ | |||
+ | |**FDwfDigitalOutRunStatus**(HDWF hdwf, double* psecRun)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- psecRun – Pointer to variable to receive the remaining run length.| | ||
+ | |||
+ | The function above is used to read the remaining run length. It returns data from the last FDwfDigitalOutStatus call. | ||
+ | |||
+ | |**FDwfDigitalOutWaitInfo**(HDWF hdwf, double* psecMin, double* psecMax)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- psecMin – Variable to receive the supported minimum wait length.| | ||
+ | |- psecMax – Variable to receive the supported maximum wait length.| | ||
+ | |||
+ | The function above is used to return the supported wait length range in seconds. The wait length is how long the instrument waits after being triggered to generate the signal. Default value is zero. | ||
+ | |||
+ | |||
+ | |**FDwfDigitalOutWaitSet**(HDWF hdwf, double secWait)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- secWait – Wait length to set expressed in seconds.| | ||
+ | |||
+ | The function above is used to set the wait length. | ||
+ | |||
+ | |**FDwfDigitalOutWaitGet**(HDWF hdwf, double* psecWait)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- psecWait – Pointer to variable to receive the wait length.| | ||
+ | |||
+ | The function above is used to get the current wait length. | ||
+ | |||
+ | |**FDwfDigitalOutRepeatInfo**(HDWF hdwf, unsigned int* pnMin, unsigned int* pnMax)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- pnMin – Variable to receive the supported minimum repeat count.| | ||
+ | |- pnMax – Variable to receive the supported maximum repeat count. | | ||
+ | |||
+ | The function above is used to return the supported repeat count range. This is how many times the generated signal will be repeated. Zero value represents infinite repeats. Default value is one. | ||
+ | |||
+ | |**FDwfDigitalOutRepeatSet**(HDWF hdwf, unsigned int cRepeat)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- cRepeat – Repeat count to set.| | ||
+ | |||
+ | The function above is used to set the repeat count. | ||
+ | |||
+ | |**FDwfDigitalOutRepeatGet**(HDWF hdwf, unsigned int* pcRepeat)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- pcRepeat – Pointer to variable to receive the repeat count.| | ||
+ | |||
+ | The function above is used to read the current repeat count. | ||
+ | |||
+ | |||
+ | |**FDwfDigitalOutRepeatStatus**(HDWF hdwf, unsigned int* pcRepeat)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- pcRepeat – Pointer to variable to receive the remaining repeat counts.| | ||
+ | |||
+ | The function above is used to read the remaining repeat counts. It only returns information from the last FDwfDigitalOutStatus function call, it does not read from the device. | ||
+ | |||
+ | |**FDwfDigitalOutRepeatTriggerSet**(HDWF hdwf, BOOL fRepeatTrigger)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- fRepeatTrigger – Boolean used to specify if the trigger should be included in a repeat cycle. | | ||
+ | |||
+ | The function above is used to set the repeat trigger option. To include the trigger in wait-run repeat cycles, set fRepeatTrigger to TRUE. It is disabled by default. | ||
+ | |||
+ | |**FDwfDigitalOutRepeatTriggerGet**(HDWF hdwf, BOOL* pfRepeatTrigger)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Open interface handle on a device.| | ||
+ | |- 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. | ||
+ | |||
+ | |**FDwfDigitalOutCount**(HDWF hdwf, int* pcChannel)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- pcChannel – Pointer to variable to receive the number of channels in the instrument. | | ||
+ | |||
+ | The function above returns the number of Digital Out channels by the device specified by hdwf. | ||
+ | |||
+ | |**FDwfDigitalOutEnableSet**(HDWF hdwf, int idxChannel, BOOL fEnable)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- idxChannel – Channel index.| | ||
+ | |- fEnable – TRUE to enable, FALSE to disable.| | ||
+ | |||
+ | The function above enables or disables the channel specified by idxChannel. | ||
+ | |||
+ | |||
+ | |**FDwfDigitalOutEnableGet**(HDWF hdwf, int idxChannel, BOOL* pfEnable)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- idxChannel – Channel index.| | ||
+ | |- pfEnable – Pointer to variable to receive enabled state.| | ||
+ | |||
+ | The function above is used to verify if a specific channel is enabled or disabled. | ||
+ | |||
+ | |||
+ | |**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: | ||
+ | * **DwfDigitalOutOutputPushPull**: | ||
+ | * **DwfDigitalOutOutputOpenDrain**: | ||
+ | * **DwfDigitalOutOutputOpenSource**: | ||
+ | * **DwfDigitalOutOutputThreeState**: | ||
+ | |||
+ | |||
+ | |**FDwfDigitalOutOutputSet**(HDWF hdwf, int idxChannel, DwfDigitalOutOutput v) | | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- idxChannel – Channel index.| | ||
+ | |- v – Output mode.| | ||
+ | |||
+ | The function above specifies output mode of the channel. | ||
+ | |||
+ | |**FDwfDigitalOutOutputGet**(HDWF hdwf, int idxChannel, DwfDigitalOutOutput* pv)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- idxChannel – Channel index.| | ||
+ | |- pfEnable – Pointer to variable to receive enabled state.| | ||
+ | |||
+ | The function above is used to verify if a specific channel output mode. | ||
+ | |||
+ | |**FDwfDigitalOutTypeInfo**(HDWF hdwf, int idxChannel, int *pfsDwfDigitalOutType)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- idxChannel – Channel index.| | ||
+ | |- pfsDwfDigitalOutType – Pointer to variable to receive the supported output types.| | ||
+ | |||
+ | The function above returns the supported types 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 DwfDigitalOutType constants in dwf.h: | ||
+ | DwfDigitalOutTypePulse: | ||
+ | DwfDigitalOutTypeCustom: | ||
+ | DwfDigitalOutTypeRandom: | ||
+ | |||
+ | |||
+ | |**FDwfDigitalOutTypeSet**(HDWF hdwf, int idxChannel, DwfDigitalOutType v)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- idxChannel – Channel index.| | ||
+ | |- v – Output mode.| | ||
+ | |||
+ | The function above sets the output type of the specified channel. | ||
+ | |||
+ | |**FDwfDigitalOutTypeGet**(HDWF hdwf, int idxChannel, DwfDigitalOutType *pv)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- idxChannel – Channel index. | | ||
+ | |- pfEnable – Pointer to variable to receive enabled state.| | ||
+ | |||
+ | The function above is used to verify the type of a specific channel. | ||
+ | |||
+ | |**FDwfDigitalOutIdleInfo**(HDWF hdwf, int idxChannel, int *pfsDwfDigitalOutIdle) | | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- idxChannel – Channel index.| | ||
+ | |- pfsDwfDigitalOutIdle – Pointer to variable to receive the supported idle output types.| | ||
+ | |||
+ | The function above returns the supported idle output types 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 * DwfDigitalOutIdle constants in dwf.h. Output while not running: | ||
+ | * DwfDigitalOutIdleInit: | ||
+ | * DwfDigitalOutIdleLow: | ||
+ | * DwfDigitalOutIdleHigh: | ||
+ | * DwfDigitalOutIdleZet: | ||
+ | |||
+ | |||
+ | |**FDwfDigitalOutIdleSet**(HDWF hdwf, int idxChannel, DwfDigitalOutIdle v)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- idxChannel – Channel index. | | ||
+ | |- v – Value to set idle output.| | ||
+ | |||
+ | The function above sets the idle output of the specified channel. | ||
+ | |||
+ | |**FDwfDigitalOutIdleGet**(HDWF hdwf, int idxChannel, DwfDigitalOutIdle *pv)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- idxChannel – Channel index.| | ||
+ | |- pv – Pointer to variable to receive configured value.| | ||
+ | |||
+ | The function above is used to verify the idle output of a specific channel. | ||
+ | |||
+ | |**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. | ||
+ | |||
+ | |**FDwfDigitalOutDividerInitSet**(HDWF hdwf, int idxChannel, unsigned int v)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- idxChannel – Channel index. | | ||
+ | |- v – Divider initial value. | | ||
+ | |||
+ | The function above sets the initial divider value of the specified channel. | ||
+ | |||
+ | |**FDwfDigitalOutDividerInitGet**(HDWF hdwf, int idxChannel, unsigned int *pv)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- idxChannel – Channel index.| | ||
+ | |- pv – Pointer to variable to receive configured value.| | ||
+ | |||
+ | The function above is used to verify the initial divider value of the specified channel. | ||
+ | |||
+ | |**FDwfDigitalOutDividerSet**(HDWF hdwf, int idxChannel, unsigned int v)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- idxChannel – Channel index.| | ||
+ | |- v – Divider value. | | ||
+ | |||
+ | The function above sets the divider value of the specified channel. | ||
+ | |||
+ | |**FDwfDigitalOutDividerGet**(HDWF hdwf, int idxChannel, unsigned int *pv)| | ||
+ | |Parameters: | ||
+ | |- hdwf – Interface handle.| | ||
+ | |- idxChannel – Channel index. | | ||
+ | |- pv – Pointer to variable to receive configured value. | | ||
+ | |||
+ | The function above is used to verify the divider value of the specified channel. | ||
+ | |||
+ | |**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. | ||
+ | |||
+ | |**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** | ||
+ | | **Output** | ||
+ | |||
+ |