Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| software:waveforms:waveforms-sdk:reference-manual [2022/05/25 09:34] – [Table] Laszlo Attila Kovacs | software:waveforms:waveforms-sdk:reference-manual [2022/10/04 11:38] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== WaveForms SDK Reference Manual ====== | ||
| + | |||
| + | 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. The WaveForms software, as well as the SDK, can be downloaded for free from the [[software: | ||
| + | |||
| + | {{ : | ||
| + | /* | ||
| + | {{Digilent Image Gallery | ||
| + | | image = {{ : | ||
| + | }} | ||
| + | */ | ||
| + | ====== 1. The System | ||
| + | |||
| + | The WaveForms System is comprised of multiple components. The most visible component is the WaveForms Application; | ||
| + | required on the target machine in order to run the application. The WaveForms Runtime is comprised of the DWF Dynamic Library and several configuration files. This library is located in: | ||
| + | |||
| + | * Windows in System Directory: C: \Windows\System32\dwf.dll | ||
| + | * Linux: / | ||
| + | |||
| + | The static library is located in Windows through the install path: | ||
| + | |||
| + | * Windows 32-bit: C:\Program Files\Digilent\WaveFormsSDK\lib\x86 | ||
| + | * Windows 64-bit: C:\Program Files (x86)\Digilent\WaveFormsSDK\lib\x64 | ||
| + | |||
| + | The C header file is located in: | ||
| + | |||
| + | * Windows: C:\Program Files\Digilent\WaveFormsSDK\inc | ||
| + | * Windows 64bit: C:\Program Files (x86)\Digilent\WaveFormsSDK\inc | ||
| + | * Linux: / | ||
| + | |||
| + | 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: | ||
| + | |||
| + | * Windows 32-bit: C:\Program Files\Digilent\WaveFormsSDK\samples | ||
| + | * Windows 64-bit: C:\Program Files (x86)\Digilent\WaveFormsSDK\samples | ||
| + | * Linux: / | ||
| + | * OS X: / | ||
| + | |||
| + | The DWF Library uses Digilent 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. | ||
| + | |||
| + | On Mac OS X the WaveFroms Runtime (including Adept Runtime) is installed to: | ||
| + | |||
| + | * / | ||
| + | | ||
| + | The sample path contains the following directories: | ||
| + | |||
| + | * py: several Python script examples | ||
| + | * C: some C code examples | ||
| + | * cs: C# wrapper, dwf class for the API functions | ||
| + | * vb: VisualBasic wrapper, dwf module for the API function | ||
| + | * dwfcmd: a complex C example application | ||
| + | |||
| + | ==== 1.1. The API ==== | ||
| + | |||
| + | Everything needed to write custom applications is included in the WaveForms SDK, which provides the header/ | ||
| + | |||
| + | Basic usage of the WaveForms API can be broken down into the following steps: | ||
| + | |||
| + | - Call enumeration functions to discover connected hardware devices. | ||
| + | - Call FDwfDeviceOpen function to establish a connection to specific hardware device. | ||
| + | - Call function to enable instrument within hardware device. | ||
| + | - Call functions to configure instrument and acquire/ | ||
| + | - Call function to disable instrument. | ||
| + | - 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** | ||
| + | | **Device Enumeration** | ||
| + | | **Device Control** | ||
| + | | **AnalogIn (Oscilloscope)** | ||
| + | | **AnalogOut (Arbitrary Waveform Generator)** | ||
| + | | **AnalogIO** | ||
| + | | **DigitalIn (Logic Analyzer)** | ||
| + | | **DigitalOut (Pattern Generator)** | ||
| + | | **DigitalIO** | ||
| + | | **System** | ||
| + | |||
| + | Each instrument is directly controlled using three types of functions in the API: | ||
| + | |||
| + | | **API Functions** | ||
| + | | **Reset function** | ||
| + | | ::: | ::: | // | ||
| + | | ::: | ::: | // | ||
| + | | **Configure function** | ||
| + | | ::: | ::: | // | ||
| + | | ::: | ::: | // | ||
| + | | **Status function** | ||
| + | | ::: | ::: | // | ||
| + | | ::: | ::: | // | ||
| + | |||
| + | |||
| + | 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 several 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 ^ Description | ||
| + | | 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 | ||
| + | |||
| + | |||
| + | To compile and link the c/cpp applications with the dwf library use: | ||
| + | |||
| + | * Windows: gcc device_enumeration.cpp -L../ | ||
| + | * Linux: gcc device_enumeration.cpp -ldwf | ||
| + | * MacOS: gcc device_enumeration.cpp -F / | ||
| + | |||
| + | |||
| + | ==== 1.2. Calling API Functions ==== | ||
| + | |||
| + | The API functions are C style and return a Boolean value: TRUE if the call is successful, FALSE if unsuccessful. | ||
| + | |||
| + | | **Parameters** | ||
| + | | ***Info** | ||
| + | | ***Set** | ||
| + | | ***Get** | ||
| + | | ***Status** | ||
| + | |||
| + | The API functions won’t 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, | ||
| + | if(IsBitSet(fsfilter, | ||
| + | FDwfAnalogInChannelFilterSet(hdwf, | ||
| + | }// | ||
| + | |||
| + | ---- | ||
| + | |||
| + | ====== 2. System ====== | ||
| + | |||
| + | |||
| + | | **FDwfGetLastError**(DWFERC *pdwferc) | ||
| + | | **Parameters: | ||
| + | | **Description**: | ||
| + | |||
| + | | **API Error Codes** | ||
| + | | dwfercNoErc | ||
| + | | dwfercUnknownError | ||
| + | | dwfercApiLockTimeout | ||
| + | | dwfercAlreadyOpened | ||
| + | | dwfercNotSupported | ||
| + | | dwfercInvalidParameter0 | ||
| + | | dwfercInvalidParameter1 | ||
| + | | dwfercInvalidParameter2 | ||
| + | | dwfercInvalidParameter3 | ||
| + | |||
| + | |||
| + | | **FDwfGetLastErrorMsg**(char szError[512]) | ||
| + | | **Parameters: | ||
| + | | **Description: | ||
| + | |||
| + | | **FDwfGetVersion**(char szVersion[32]) | ||
| + | | **Parameters: | ||
| + | | **Description: | ||
| + | |||
| + | | **FDwfParamSet**(DwfParam param, int value) | ||
| + | | **Parameters: | ||
| + | | ::: | value — Value to set. | | ||
| + | | **Description: | ||
| + | |||
| + | ^ DwfParam | ||
| + | | DwfParamUsbPower | ||
| + | | DwfParamLedBrightness | ||
| + | | DwfParamOnClose | ||
| + | | DwfParamAudioOut | ||
| + | | DwfParamUsbLimit | ||
| + | |||
| + | | **FDwfParameGet**(DwfParam param, int *pValue) | ||
| + | | **Parameters: | ||
| + | | ::: | pValue — Pointer to value. | ||
| + | | **Description: | ||
| + | |||
| + | |||
| + | ---- | ||
| + | |||
| + | ====== 3. Device Enumeration | ||
| + | |||
| + | The // | ||
| + | See examples: Device_Enumeration.py, | ||
| + | |||
| + | | **FDwfEnum**(ENUMFILTER enumfilter, int *pnDevice) | ||
| + | | **Parameters: | ||
| + | | ::: | pnDevice – Integer pointer to return count of found devices by reference. | ||
| + | | **Description: | ||
| + | |||
| + | ^ ENUMFILTER | ||
| + | | enumfilterAll | ||
| + | | enumfilterEExplorer | ||
| + | | enumfilterDiscovery | ||
| + | | enumfilterDiscovery2 | ||
| + | | enumfilterDDiscovery | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | | **FDwfEnumDeviceType**(int idxDevice, DEVID *pDeviceId, DEVVER *pDeviceRevision) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pDeviceId – Variable to return the device id. | | ||
| + | | ::: | pDeviceRevision – Pointer to DEVVER instance to return the device revision by reference. | ||
| + | |||
| + | ^ DEVID ^ int ^ ^ | ||
| + | | devidEExplorer | ||
| + | | devidDiscovery | ||
| + | | devidDiscovery2 | ||
| + | | devidDDiscovery | ||
| + | |||
| + | | **FDwfEnumDeviceIsOpened**(int idxDevice, int *pfIsUsed) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pfIsUsed – Pointer to variable to receive Boolean indicating if the device is in use. | | ||
| + | |||
| + | | **FDwfEnumUserName**(int idxDevice, char szUserName[32]) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | szUserName – Pointer to character array to return the user name string by reference. | ||
| + | |||
| + | |||
| + | | **FDwfEnumDeviceName**(int idxDevice, char szDeviceName[32]) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | szDeviceName – Pointer to character array to return the device name by reference. | ||
| + | |||
| + | | **FDwfEnumSN**(int idxDevice, char szSN[32]) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | szSN – Pointer to character array to return the serial number by reference. | ||
| + | |||
| + | | **FDwfEnumConfig**(int idxDevice, int *pcConfig) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pcConfig – Integer pointer to return count of found configurations by reference. | ||
| + | |||
| + | | **FDwfEnumConfigInfo**(int idxConfig, DwfEnumConfigInfo info, int *pValue) | ||
| + | | **Parameters: | ||
| + | | ::: | info – Information type. | | ||
| + | | ::: | pValue – Integer pointer to return selected information type by reference. | ||
| + | | **Description: | ||
| + | |||
| + | ^ DwfEnumConfigInfo | ||
| + | | DECIAnalogInChannelCount | ||
| + | | DECIAnalogOutChannelCount | ||
| + | | DECIAnalogIOChannelCount | ||
| + | | DECIDigitalInChannelCount | ||
| + | | DECIDigitalOutChannelCount | ||
| + | | DECIDigitalIOChannelCount | ||
| + | | DECIAnalogInBufferSize | ||
| + | | DECIAnalogOutBufferSize | ||
| + | | DECIDigitalInBufferSize | ||
| + | | DECIDigitalOutBufferSize | ||
| + | |||
| + | |||
| + | ---- | ||
| + | |||
| + | ====== 4. Device Control ====== | ||
| + | |||
| + | See Device_Synchronization.py example. | ||
| + | |||
| + | | **FDwfDeviceOpen**(int idxDevice, HDWF *phdwf) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | phdwf – Pointer to //HDWF// variable to receive opened interface handle by reference. | ||
| + | |||
| + | |||
| + | | **FDwfDeviceConfigOpen**(int idxDevice, int idxCfg, HDWF *phdwf) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxCfg – Index of the device configuration. | | ||
| + | | ::: | phdwf – Pointer to //HDWF// variable to receive opened interface handle by reference. | ||
| + | |||
| + | |||
| + | | **FDwfDeviceClose**(HDWF hdwf) | | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfDeviceCloseAll**() | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | |||
| + | |||
| + | | **FDwfDeviceAutoConfigureSet**(HDWF hdwf, BOOL fAutoConfigure) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | fAutoConfigure – Value for this option: 0 disable, 1 enable, 3 dynamic. | ||
| + | |||
| + | |||
| + | | **FDwfDeviceAutoConfigureGet**(HDWF hdwf, int *pfAutoConfigure) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pfAutoConfigure – Pointer to variable to receive the current value of this option. | ||
| + | |||
| + | |||
| + | | **DwfDeviceReset**(HDWF hdwf) | | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | |||
| + | |||
| + | | **FDwfDeviceParamSet**(HDWF hdwf, DwfParam param, int value) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | value – Value to set. | | ||
| + | |||
| + | | **FDwfDeviceParamGet**(HDWF hdwf, DwfParam param, int *pValue) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pValue – Pointer to value. | ||
| + | |||
| + | The global trigger bus allows multiple instruments to trigger each other. These trigger source options are: | ||
| + | |||
| + | ^ Trigger Source Options | ||
| + | | **trigsrcNone** | ||
| + | | **trigsrcPC** | ||
| + | | **trigsrcDetectorAnalogIn** | ||
| + | | **trigsrcDetectorDigitalIn** | ||
| + | | **trigsrcAnalogIn** | ||
| + | | **trigsrcDigitalIn** | ||
| + | | **trigsrcDigitalOut** | ||
| + | | **trigsrcAnalogOut1** | ||
| + | | **trigsrcAnalogOut2** | ||
| + | | **trigsrcAnalogOut3** | ||
| + | | **trigsrcAnalogOut4** | ||
| + | | **trigsrcExternal1** | ||
| + | | **trigsrcExternal2** | ||
| + | | **trigsrcExternal3** | ||
| + | | **trigsrcExternal4** | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | | **FDwfDeviceTriggerInfo**(HDWF hdwf, int *pfstrigsrc) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pfstrigsrc – Variable to receive the supported trigger sources. | ||
| + | |||
| + | |||
| + | | **FDwfDeviceTriggerSet**(HDWF hdwf, int idxPin, TRIGSRC trigsrc) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxPin – External trigger, I/O pin index. | ||
| + | | ::: | trigsrc – Trigger source to set. | | ||
| + | |||
| + | |||
| + | | **FDwfDeviceTriggerGet**(HDWF hdwf, int idxPin, TRIGSRC *ptrigsrc) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxPin - External trigger, I/O pin index. | ||
| + | | ::: | ptrigsrc – Variable to receive the current trigger source. | ||
| + | |||
| + | |||
| + | | **FDwfDeviceTriggerPC**(HDWF hdwf) | | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | |||
| + | |||
| + | | **FDwfDeviceTriggerSlopeInfo**(HDWF hdwf, int *pfsslope) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pfsslope - Variable to receive the supported trigger slopes. | ||
| + | |||
| + | |||
| + | ---- | ||
| + | |||
| + | ===== 5. Analog In (Oscilloscope) ====== | ||
| + | |||
| + | The Analog In instrument states: | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | The states are defined in dwf.h DwfState type. | ||
| + | |||
| + | * **Ready**: Initial state. After // | ||
| + | * **Configure**: | ||
| + | * **Prefill**: | ||
| + | * **Armed**: Waits for the trigger. | ||
| + | * **Running**: | ||
| + | * Single acquisition mode: remains in this state to acquire samples after trigger according trigger position parameter. | ||
| + | * Scan screen and shift modes: remains in this state until configure or any set function of this instrument. | ||
| + | * Record mode: the time period according record length parameter. | ||
| + | * **Done**: Final state. | ||
| + | |||
| + | See the following examples: AnalogIn_Sample/ | ||
| + | |||
| + | |||
| + | ==== 5.1. Control ==== | ||
| + | |||
| + | | **FDwfAnalogInReset**(HDWF hdwf) | | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | |||
| + | |||
| + | | **FDwfAnalogInConfigure**(HDWF hdwf, int fReconfigure, | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | fReconfigure – Configure the device. | ||
| + | | ::: | fStart – Start the acquisition. | ||
| + | |||
| + | |||
| + | | **FDwfAnalogInStatus**(HDWF hdwf, int fReadData, **DwfState** *psts) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | fReadData – TRUE if data should be read. | | ||
| + | | ::: | psts – Variable to receive the acquisition state. | ||
| + | |||
| + | |||
| + | **Note: | ||
| + | |||
| + | |||
| + | | **FDwfAnalogInStatusSamplesLeft**(HDWF hdwf, int *pcSamplesLeft) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pcSamplesLeft – Variable to receive the remaining samples to acquire. | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogInStatusSamplesValid**(HDWF hdwf, int *pcSamplesValid) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pcSamplesValid – Variable to receive the number of valid samples. | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogInStatusIndexWrite**(HDWF hdwf, int *pidxWrite) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pidxWrite – Variable to receive the position of the acquisition. | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogInStatusAutoTriggered**(HDWF hdwf, int *pfAuto) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pfAuto – Returns TRUE if the acquisition was auto triggered. | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogInStatusData**(HDWF hdwf, int idxChannel, double *rgdVoltData, | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | rgdVoltData – Pointer to allocated buffer to copy the acquisition data. | | ||
| + | | ::: | cdData – Number of samples to copy. | | ||
| + | |||
| + | | **FDwfAnalogInStatusData2**(HDWF hdwf, int idxChannel, double *rgdVoltData, | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | rgdVoltData – Pointer to allocated buffer to copy the acquisition data. | | ||
| + | | ::: | idxData – First sample index to copy. | | ||
| + | | ::: | cdData – Number of samples to copy. | | ||
| + | |||
| + | |||
| + | | **FDwfAnalogInStatusData16**(HDWF hdwf, int idxChannel, short*rgs16Data, | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | rgs16VoltaData – Pointer to allocated buffer to copy the acquisition data. | | ||
| + | | ::: | idxData – Source sample index to copy. | | ||
| + | | ::: | cdData – Number of samples to copy. | | ||
| + | |||
| + | |||
| + | | **FDwfAnalogInStatusNoise**(HDWF hdwf, int idxChannel, double *rgdMin, double *rgdMax, int cdData) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | 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. | | ||
| + | |||
| + | |||
| + | | **FDwfAnalogInStatusSample**(HDWF hdwf, int idxChannel, double *pdVoltSample) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | pdVoltSample – Variable to receive the sample value. | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogInStatusRecord**(HDWF hdwf, int *pcdDataAvailable, | ||
| + | | **Desacription: | ||
| + | | **Parameters: | ||
| + | | ::: | 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. | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogInRecordLengthSet**(HDWF hdwf, double sLegth) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | sLegth – Record length to set expressed in seconds. | ||
| + | |||
| + | |||
| + | | **FDwfAnalogInRecordLengthGet**(HDWF hdwf, double *psLegth) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | sLegth – Pointer to variable to receive the record length. | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 5.2. Configuration ==== | ||
| + | |||
| + | | **FDwfAnalogInFrequencyInfo**(HDWF hdwf, double *phzMin, double *phzMax) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | phzMin – Pointer to return the minimum allowed frequency. | ||
| + | | ::: | phzMax – Pointer to return the maximum allowed frequency. | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogInFrequencySet**(HDWF hdwf, double hzFrequency) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | hzFrequency – Acquisition frequency to set. | | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogInFrequencyGet**(HDWF hdwf, double *phzFrequency) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | phzFrequency – Variable to receive the acquisition frequency. | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogInBitsInfo**(HDWF hdwf, int *pnBits) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pnBits – Variable to receive the number of ADC bits. | | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogInBufferSizeInfo**(HDWF hdwf, int *pnSizeMin, int *pnSizeMax) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pnMin – Pointer to return the minimum buffer size. | | ||
| + | | ::: | pnMax – Pointer to return the maximum buffer size. | | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogInBufferSizeSet**(HDWF hdwf, int nSize) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | nSize – Buffer size to set. | | ||
| + | |||
| + | |||
| + | | **FDwfAnalogInBufferSizeGet**(HDWF hdwf, int *pnSize) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pnSize – Variable to receive the current buffer size. | | ||
| + | |||
| + | |||
| + | | **FDwfAnalogInNoiseSizeInfo**(HDWF hdwf, int *pnSizeMax) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pnMax – Pointer to return the maximum noise buffer size. | | ||
| + | |||
| + | | **FDwfAnalogInNoiseSizeGet**(HDWF hdwf, int *pnSize) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pnSize – Variable to receive the current noise buffer size. | | ||
| + | |||
| + | |||
| + | | **FDwfAnalogInAcquisitionModeInfo**(HDWF hdwf, int *pfsacqmode) | ||
| + | | **Parameters: | ||
| + | | ::: | pfsacqmode – pointer to return the supported acquisition modes. | ||
| + | | **Description: | ||
| + | |||
| + | |||
| + | ^ ACQMODE | ||
| + | | **acqmodeSingle** | ||
| + | | **acqmodeScanShift** | ||
| + | | **acqmodeScanScreen** | ||
| + | | **acqmodeRecord** | ||
| + | | **acqmodeSingle1** | ||
| + | |||
| + | | **FDwfAnalogInAcquisitionModeSet**(HDWF hdwf, ACQMODE acqmode) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | acqmode – Acquisition mode to set. | | ||
| + | |||
| + | |||
| + | | **FDwfAnalogInAcquisitionModeGet**(HDWF hdwf, ACQMODE *pacqmode) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pacqmode – Variable to receive the current acquisition mode. | | ||
| + | |||
| + | |||
| + | | **FDwfAnalogInSamplingSourceSet**(HDWF hdwf, TRIGSRC trigsrc) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | trigsrc – Trigger source to be used as data sampling clock. | ||
| + | |||
| + | |||
| + | | **FDwfAnalogInSamplingSourceGet**(HDWF hdwf, TRIGSRC *ptrigsrc) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | ptrigsrc – Variable to receive the current sampling source. | ||
| + | |||
| + | | **FDwfAnalogInSamplingSlopeSet**(HDWF hdwf, DwfTriggerSlope slope) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | slope – Sampling clock slope to set. | | ||
| + | |||
| + | | **FDwfAnalogInSamplingSlopeGet**(HDWF hdwf, DwfTriggerSlope * pslope) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pslope – Variable to receive the current sampling slope. | ||
| + | |||
| + | | **FDwfAnalogInSamplingDelaySet**(HDWF hdwf, double sec) || | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | hzFrequency – Sampling delay to set. | | ||
| + | |||
| + | | **FDwfAnalogInSamplingDelayGet**(HDWF hdwf, double *psec) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | phzFrequency – Variable to receive the sampling delay. | ||
| + | |||
| + | |||
| + | ==== 5.3. Channels ==== | ||
| + | |||
| + | The oscilloscope channel settings are identical across all channels. | ||
| + | |||
| + | | **FDwfAnalogInChannelCount**(HDWF hdwf, int *pcChannel) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pcChannel – Variable to receive the number of channels. | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogInChannelEnableSet**(HDWF hdwf, int idxChannel, int fEnable) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Zero based index of channel to enable/ | ||
| + | | ::: | fEnable – Set TRUE to enable, FALSE to disable. | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogInChannelEnableGet**(HDWF hdwf, int idxChannel, int *pfEnable) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Index of channel. | ||
| + | | ::: | pfEnable – Variable to return enable/ | ||
| + | |||
| + | |||
| + | | **FDwfAnalogInChannelFilterInfo**(HDWF hdwf, int *pfsfilter) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pfsfilter – Pointer to return the supported acquisition modes. | ||
| + | |||
| + | ^ FILTER | ||
| + | | **filterDecimate** | ||
| + | | **filterAverage** | ||
| + | | **filterMinMax** | ||
| + | |||
| + | | **FDwfAnalogInChannelFilterSet**(HDWF hdwf, int idxChannel, FILTER filter) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index | | ||
| + | | ::: | filter – Acquisition sample filter to set | | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogInChannelFilterGet**(HDWF hdwf, int idxChannel, FILTER *pfilter) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | pfilter– Variable to receive the current sample filter. | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogInChannelRangeInfo**(HDWF hdwf, double *pvoltsMin, double *pvoltsMax, double *pnSteps) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pvoltsMin – Variable to receive the minimum voltage range. | ||
| + | | ::: | pvoltsMax – Variable to receive the maximum voltage range. | ||
| + | | ::: | pnSteps – Variable to receive number of steps. | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogInChannelRangeSteps**(HDWF hdwf, double rgVoltsStep[32], | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | rgVoltsStep – Pointer to buffer to receive the range steps. | ||
| + | | ::: | pnSteps – Variable to receive number range steps. | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogInChannelRangeSet**(HDWF hdwf, int idxChannel, double voltsRange) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | voltsRange – Voltage range to set. | | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogInChannelRangeGet**(HDWF hdwf, int idxChannel, double *pvoltsRange) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | pvoltsRange – Variable to receive the current voltage range. | ||
| + | |||
| + | |||
| + | | **FDwfAnalogInChannelOffsetInfo**(HDWF hdwf, double *pvoltsMin, double *pvoltsMax, double *pnSteps) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pvoltsMin – Variable to receive the minimum offset voltage. | ||
| + | | ::: | pvoltsMax – Variable to receive the maximum offset voltage. | ||
| + | | ::: | pnSteps – Variable to receive the number offset steps. | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogInChannelOffsetSet**(HDWF hdwf, int idxChannel, double voltOffset) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | voltsRange – Channel offset voltage to set. | | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogInChannelOffsetGet**(HDWF hdwf, int idxChannel, double *pvoltOffset) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | pvoltsRange – Variable to receive the offset voltage obtained. | ||
| + | |||
| + | | **FDwfAnalogInChannelAttenuationSet**(HDWF hdwf, int idxChannel, double xAttenuation) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index | | ||
| + | | ::: | voltsRange – Channel offset voltage to set. | | ||
| + | |||
| + | |||
| + | | **FDwfAnalogInChannelAttenuationGet**(HDWF hdwf, int idxChannel, double *pxAttenuation) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | pxAttenuation – Variable to receive the attenuation value. | ||
| + | |||
| + | |||
| + | ==== 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 // | ||
| + | * **Auto**: Set // | ||
| + | * **Normal**: Set // | ||
| + | |||
| + | See the description of **FDwfDeviceTriggerInfo**. | ||
| + | |||
| + | |||
| + | | **FDwfAnalogInTriggerSourceSet**(HDWF hdwf, TRIGSRC trigsrc) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | trigsrc – Trigger source to set. | | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogInTriggerSourceGet**(HDWF hdwf, TRIGSRC *ptrigsrc) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | ptrigsrc – Variable to receive the current trigger source. | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogInTriggerPositionInfo**(HDWF hdwf, double *psecMin, double *psecMax, double *pnSteps) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | psecMin – Variable to receive the minimum trigger position. | ||
| + | | ::: | psecMax – Variable to receive the maximum trigger position. | ||
| + | | ::: | pnSteps – Variable to return the number of steps. | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogInTriggerPositionSet**(HDWF hdwf, double secPosition) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | secPosition – Trigger position to set. | | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogInTriggerPositionGet**(HDWF hdwf, double *psecPosition) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | psecPosition – Variable to receive the current trigger position. | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogInTriggerAutoTimeoutInfo**(HDWF hdwf, double *psecMin, double *psecMax, int *pnSteps) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | psecMin – Variable to receive the minimum timeout. | ||
| + | | ::: | psecMax – Variable to receive the maximum timeout. | ||
| + | | ::: | pnSteps – Variable to return the number of steps. | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogInTriggerAutoTimeoutSet**(HDWF hdwf, double secTimeout) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | secTimeout – Timeout to set. | | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogInTriggerAutoTimeoutGet**(HDWF hdwf, double *psecTimeout) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | psecTimeout – Variable to receive the current timeout. | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogInTriggerHoldOffInfo**(HDWF hdwf, double *psecMin, double *psecMax, double *pnStep) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | psecMin – Variable to receive the minimum hold off value. | ||
| + | | ::: | psecMax – Variable to receive the maximum hold off value. | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogInTriggerHoldOffSet**(HDWF hdwf, double secHoldOff) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | secHoldOff – Holdoff to set. | | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogInTriggerHoldOffGet**(HDWF hdwf, double* psecHoldOff) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | psecHoldOff – Variable to receive the current holdoff value. | ||
| + | |||
| + | |||
| + | |||
| + | ==== 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. | ||
| + | |||
| + | | **FDwfAnalogInTriggerTypeInfo**(HDWF hdwf, int *pfstrigtype) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pfstrigtype – Variable to receive the supported trigger types. | ||
| + | |||
| + | |||
| + | | **FDwfAnalogInTriggerTypeSet**(HDWF hdwf, TRIGTYPE trigtype) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | trigtype – Trigger type to set. | | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogInTriggerTypeGet**(HDWF hdwf, TRIGTYPE *ptrigtype) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | ptrigtype – Variable to receive the current trigger type. | | ||
| + | |||
| + | |||
| + | | **FDwfAnalogInTriggerChannelInfo**(HDWF hdwf, int *pidxMin, int *pidxMax) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pidxMin – Variable to receive the minimum channel index. | ||
| + | | ::: | pidxMax – Variable to receive the maximum channel index. | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogInTriggerChannelSet**(HDWF hdwf, int idxChannel) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Trigger channel index to set. | | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogInTriggerChannelGet**(HDWF hdwf, int *pidxChannel) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pidxChannel – Variable to receive the current trigger channel index. | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogInTriggerFilterInfo**(HDWF hdwf, int *pfsfilter) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pfsFilter – Variable to receive the supported trigger filters. | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogInTriggerFilterSet**(HDWF hdwf, FILTER filter) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | filter – Trigger filter to set. | | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogInTriggerFilterGet**(HDWF hdwf, FILTER *pfilter) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pfilter – Variable to receive the current trigger filter. | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogInTriggerConditionInfo**(HDWF hdwf, int *pfstrigcond) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pfstrigcond – Variable to receive the supported trigger conditions. | ||
| + | |||
| + | |||
| + | | **FDwfAnalogInTriggerConditionSet**(HDWF hdwf, DwfTriggerSlope trigcond) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | trigcond – trigger condition to set. | | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogInTriggerConditionGet**(HDWF hdwf, DwfTriggerSlope *ptrigcond) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | ptrigcond – Variable to receive the current trigger condition. | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogInTriggerLevelInfo**(HDWF hdwf, double *pvoltsMin, double *pvoltsMax, int *pnSteps) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | 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. | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogInTriggerLevelSet**(HDWF hdwf, double voltsLevel) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | voltsLevel – Trigger voltage level to set. | | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogInTriggerLevelGet**(HDWF hdwf, double *pvoltsLevel) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pvoltsLevel – Variable to receive the current trigger voltage level. | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogInTriggerHysteresisInfo**(HDWF hdwf, double *pvoltsMin, double *pvoltsMax, int *pnSteps) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pvoltsMin – Variable to receive the minimum hysteresis | ||
| + | | ::: | pvoltsMax – Variable to receive the maximum hysteresis | ||
| + | | ::: | pnSteps – Variable to receive the number of hysteresis level steps. | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogInTriggerHysteresisSet**(HDWF hdwf, double voltsLevel) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | voltsLevel – Trigger hysteresis level to set. | | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogInTriggerHysteresisGet**(HDWF hdwf, double *pvoltsHysteresis) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pvoltsLevel – Variable to receive the current trigger hysteresis level. | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogInTriggerLengthConditionInfo**(HDWF hdwf, int *pfstriglen) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pfsstriglen – Variable to receive the supported trigger length conditions. | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogInTriggerLengthConditionSet**(HDWF hdwf, TRIGLEN triglen) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | triglen – Trigger length condition to set. | | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogInTriggerLengthConditionGet**(HDWF hdwf, TRIGLEN *ptriglen) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | ptriglen – Variable to receive the current trigger length condition. | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogInTriggerLengthInfo**(HDWF hdwf, double *psecMin, double *psecMax, double *pnStep) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | psecMin – Variable to receive the minimum trigger length. | ||
| + | | ::: | psecMax – Variable to receive the maximum trigger length. | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogInTriggerLengthSet**(HDWF hdwf, double secLength) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | secLength – Trigger length to set. | | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogInTriggerLengthGet**(HDWF hdwf, double *psecLength) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | psecLength – Variable to receive the current trigger length | ||
| + | |||
| + | |||
| + | |||
| + | ---- | ||
| + | |||
| + | ====== 6. Analog Out (Arbitrary Waveform Generator)====== | ||
| + | |||
| + | The Analog Out instrument states: | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | The states are defined in dwf.h DwfState type. | ||
| + | * **Ready:** Initial state. After // | ||
| + | * **Armed:** It waits for trigger. | ||
| + | * **Wait:** Remains in this state for the time period specified by // | ||
| + | * **Running: | ||
| + | * **Repeat:** Goes to Armed or Wait state according to the // | ||
| + | * **Done:** Final state. | ||
| + | |||
| + | The analog out channels can run independently or synchronized using the master parameter. The states are defined by trigger, wait, run, and repeat options. It is enough to start with FDwfAnalogOutConfigure (the master channel) the slave channels will also start. | ||
| + | |||
| + | See the following examples: AnalogOut_Custom/ | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | |||
| + | ==== 6.1. Control ==== | ||
| + | |||
| + | | **FDwfAnalogOutReset**(HDWF hdwf, int idxChannel) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogOutConfigure**(HDWF hdwf, int idxChannel, int fStart) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | fStart – Start the instrument: 0 stop, 1 start, 3 apply. | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogOutStatus**(HDWF hdwf, int idxChannel, **DwfState** *psts) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | psts – Pointer to variable to return the state. | ||
| + | |||
| + | The device output signal is output from carrier buffer but can also be frequency and/or amplitude modulated. | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | The Carrier/ | ||
| + | |||
| + | ^ AnalogOutNode | ||
| + | | AnalogOutNodeCarrier 0 | 0 | Carrier signal | ||
| + | | AnalogOutNodeFM | ||
| + | | AnalogOutNodeAM | ||
| + | |||
| + | | **FDwfAnalogOutNodePlayStatus**(HDWF hdwf, int idxChannel, AnalogOutNode node, int *cdDataFree, | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | node – Node index. | ||
| + | | ::: | cdDataFree – Pointer to variable to return the available free buffer space, the number of new samples that can be sent. | | ||
| + | | ::: | cdDataLost – Pointer to variable to return the number of lost samples. | ||
| + | | ::: | cdDataCorrupted – Pointer to variable to return the number of samples that could be corrupted. | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogOutNodePlayData**(HDWF hdwf, int idxChannel, AnalogOutNode node, double *rgdData, int cdData) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | node – Node index. | ||
| + | | ::: | rgdData – Pointer to samples array to be sent to the device. | ||
| + | | ::: | cdData – Number of samples to send. | | ||
| + | |||
| + | |||
| + | ==== 6.2. Configuration ==== | ||
| + | |||
| + | | **FDwfAnalogOutCount**(HDWF hdwf, int *pcChannel) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pcChannel – Pointer to variable to receive the number of channels in the instrument. | ||
| + | |||
| + | | **FDwfAnalogOutNodeInfo**(HDWF hdwf, int idxChannel, int *pfsnode) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | pfsnode – Variable to receive the supported nodes. | ||
| + | |||
| + | |||
| + | | **FDwfAnalogOutNodeEnableSet**(HDWF hdwf, int idxChannel, AnalogOutNode node, int fEnable) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | node – Node index. | ||
| + | | ::: | fEnable – TRUE to enable, FALSE to disable. | ||
| + | |||
| + | | **FDwfAnalogOutNodeEnableGet**(HDWF hdwf, int idxChannel, AnalogOutNode node, int *pfEnable) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | node – Node index. | ||
| + | | ::: | pfEnable – Pointer to variable to receive enabled state. | ||
| + | |||
| + | | **FDwfAnalogOutNodeFunctionInfo**(HDWF hdwf, int idxChannel, AnalogOutNode node, int *pfsfunc) | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | node – Node index. | ||
| + | | ::: | pfsfunc – Variable to receive the supported generator function options. | ||
| + | | **Description: | ||
| + | |||
| + | ^ FUNC Constants | ||
| + | | **funcDC** | ||
| + | | **funcSine** | ||
| + | | **funcSquare** | ||
| + | | **funcTriangle** | ||
| + | | **funcRampUp** | ||
| + | | **funcRampDown** | ||
| + | | **funcNoise** | ||
| + | | **funcCustom** | ||
| + | | **funcPlay ** | Generate waveform from custom data in stream play style. | ||
| + | |||
| + | | **FDwfAnalogOutNodeFunctionSet**(HDWF hdwf, int idxChannel, AnalogOutNode node, FUNC func) || | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | node – Node index. | ||
| + | | ::: | func – Generator function option to set. | | ||
| + | |||
| + | | **FDwfAnalogOutNodeFunctionGet**(HDWF hdwf, int idxChannel, AnalogOutNode node, FUNC *pfunc) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | node – Node index. | ||
| + | | ::: | ptrigsrc – Pointer to variable to receive the generator function option. | ||
| + | |||
| + | | **FDwfAnalogOutNodeFrequencyInfo**(HDWF hdwf, int idxChannel, AnalogOutNode node, double *phzMin, double *phzMax) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Zero based channel index. | ||
| + | | ::: | node – Zero based node index. | ||
| + | | ::: | phzMin – Variable to receive the supported minimum frequency. | ||
| + | | ::: | phzMax – Variable to receive the supported maximum frequency. | ||
| + | |||
| + | | **FDwfAnalogOutNodeFrequencySet**(HDWF hdwf, int idxChannel, AnalogOutNode node, double hzFrequency) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | node – Node index. | ||
| + | | ::: | hzFrequency – Frequency value to set expressed in Hz. | | ||
| + | |||
| + | | **FDwfAnalogOutNodeFrequencyGet**(HDWF hdwf, int idxChannel, AnalogOutNode node, double *phzFrequency) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | node – Node index. | ||
| + | | ::: | hzFrequency – Pointer to variable to receive frequency value in Hz. | | ||
| + | |||
| + | | **FDwfAnalogOutNodeAmplitudeInfo**(HDWF hdwf, int idxChannel, AnalogOutNode node, double *pvMin, double *pvMax) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index | | ||
| + | | ::: | node – Node index. | ||
| + | | ::: | pvMin – Minimum amplitude level or modulation index. | ||
| + | | ::: | pvMax – Maximal amplitude level or modulation index. | ||
| + | |||
| + | | **FDwfAnalogOutNodeAmplitudeSet**(HDWF hdwf, int idxChannel, AnalogOutNode node, double vAmplitude) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | node – Node index. | ||
| + | | ::: | vAmplitude – Amplitude of channel in Volts or modulation index in percentage. | ||
| + | |||
| + | | **FDwfAnalogOutNodeAmplitudeGet**(HDWF hdwf, int idxChannel, AnalogOutNode node, double *pvAmplitude) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | node – Node index. | ||
| + | | ::: | pvAmplitude – Pointer to variable to receive amplitude value in Volts or modulation index in percentage. | ||
| + | |||
| + | | **FDwfAnalogOutNodeOffsetInfo**(HDWF hdwf, int idxChannel, AnalogOutNode node, double *pvMin, double *pvMax) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | node – Node index. | ||
| + | | ::: | pvMin – Minimum offset voltage or modulation offset percentage. | ||
| + | | ::: | pvMax – Maximum offset voltage or modulation offset percentage. | ||
| + | |||
| + | | **FDwfAnalogOutNodeOffsetSet**(HDWF hdwf, int idxChannel, AnalogOutNode node, double vOffset) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | node – Node index. | ||
| + | | ::: | vOffset – Value to set voltage offset in Volts or modulation offset percentage. | ||
| + | |||
| + | | **FDwfAnalogOutNodeOffsetGet**(HDWF hdwf, int idxChannel, AnalogOutNode node, double *pvOffset) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | node – Node index. | ||
| + | | ::: | pvOffset – Pointer to variable to receive offset value in Volts or modulation offset percentage. | ||
| + | |||
| + | |||
| + | | **FDwfAnalogOutNodeSymmetryInfo**(HDWF hdwf, int idxChannel, AnalogOutNode node, double *ppercentageMin, | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | node – Node index. | ||
| + | | ::: | ppercentageMin – Minimum value of Symmetry percentage. | ||
| + | | ::: | ppercentageMax – Maximum value of Symmetry percentage. | ||
| + | |||
| + | | **FDwfAnalogOutNodeSymmetrySet**(HDWF hdwf, int idxChannel, AnalogOutNode node, double percentageSymmetry) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | node – Node index. | ||
| + | | ::: | percentageSymmetry –Value of percentage of Symmetry (duty cycle). | ||
| + | |||
| + | | **FDwfAnalogOutNodeSymmetryGet**(HDWF hdwf, int idxChannel, AnalogOutNode node, double *ppercentageSymmetry) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | node – Node index. | ||
| + | | ::: | ppercentageSymmetry – Pointer to variable to receive value of Symmetry (duty cycle). | ||
| + | |||
| + | | **FDwfAnalogOutNodePhaseInfo**(HDWF hdwf, int idxChannel, AnalogOutNode node, double *pdegreeMin, | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | node – Node index. | ||
| + | | ::: | pdegreeMin – Minimum value of Phase (in degrees). | ||
| + | | ::: | pdegreeMax – Maximum value of Phase (in degrees). | ||
| + | |||
| + | | **FDwfAnalogOutNodePhaseSet**(HDWF hdwf, int idxChannel, AnalogOutNode node, double degreePhase) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | node – Node index. | ||
| + | | ::: | degreePhase – Value of Phase in degrees. | ||
| + | |||
| + | | **FDwfAnalogOutNodePhaseGet**(HDWF hdwf, int idxChannel, AnalogOutNode node, double *pdegreePhase) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | node – Node index. | ||
| + | | ::: | pdegreePhase – Pointer to variable to receive Phase value (in degrees). | ||
| + | |||
| + | | **FDwfAnalogOutNodeDataInfo**(HDWF hdwf, int idxChannel, AnalogOutNode node, int *pnSamplesMin, | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | node – Node index. | ||
| + | | ::: | pnSamplesMin – Minimum number of samples available for custom data. | | ||
| + | | ::: | pnSamplesMax – Maximum number of samples available for custom data. | | ||
| + | |||
| + | | **FDwfAnalogOutNodeDataSet**(HDWF hdwf, int idxChannel, AnalogOutNode node, double *rgdData, int cdData) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | node – Node index. | ||
| + | | ::: | rgbData – Buffer of samples to set. | | ||
| + | | ::: | cData – Number of samples to set in rgbData. | ||
| + | |||
| + | | **FDwfAnalogOutLimitationInfo**(HDWF hdwf, int idxChannel, double *pvMin, double *pvMax) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | pvMin – Minimum limitation value. | ||
| + | | ::: | pvMax – Maximum offset voltage or modulation offset percentage. | ||
| + | |||
| + | | **FDwfAnalogOutLimitationSet**(HDWF hdwf, int idxChannel, double limit) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | limit – Value to set voltage offset in Volts or modulation offset percentage. | ||
| + | |||
| + | | **FDwfAnalogOutLimitationGet**(HDWF hdwf, int idxChannel, double *plimit) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | limit – Pointer to variable to receive offset value in Volts or modulation offset percentage. | ||
| + | |||
| + | | **FDwfAnalogOutModeSet**(HDWF hdwf, int idxChannel, DwfAnalogOutMode mode) || | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | mode – Generator mode option to set. | | ||
| + | |||
| + | | **FDwfAnalogOutModeGet**(HDWF hdwf, int idxChannel, DwfAnalogOutMode *pmode) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | mode – Pointer to variable to receive the generator mode option. | ||
| + | |||
| + | |||
| + | ^ DwfAnalogOutIdle | ||
| + | | **DwfAnalogOutIdleDisable** | ||
| + | | **DwfAnalogOutIdleOffset** | ||
| + | | **DwfAnalogOutIdleInitial** | ||
| + | |||
| + | | **FDwfAnalogOutIdleInfo**(HDWF hdwf, int idxChannel, int *pfsidle) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | pfsidlec – Variable to receive the supported generator idle options. | ||
| + | |||
| + | | **FDwfAnalogOutIdleSet**(HDWF hdwf, int idxChannel, AnalogOutNode idle) || | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | idle – Generator function option to set. | | ||
| + | |||
| + | | **FDwfAnalogOutIdleGet**(HDWF hdwf, int idxChannel, AnalogOutNode *pidle) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | pidle – Pointer to variable to receive the generator function option. | ||
| + | |||
| + | |||
| + | |||
| + | ==== 6.3. States ==== | ||
| + | |||
| + | See the description of **FDwfDeviceTriggerInfo**. | ||
| + | |||
| + | | **FDwfAnalogOutTriggerSourceSet**(HDWF hdwf, int idxChannel, TRIGSRC trigsrc) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | trigsrc – Trigger source to set. | | ||
| + | |||
| + | | **FDwfAnalogOutTriggerSourceGet**(HDWF hdwf, int idxChannel, TRIGSRC *ptrigsrc) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | ptrigsrc – Pointer to variable to receive the trigger source. | ||
| + | |||
| + | | **FDwfAnalogOutTriggerSlopeSet**(HDWF hdwf, int idxChannel, DwfTriggerSlope slope) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | slope – Trigger slope to set. | | ||
| + | |||
| + | | **FDwfAnalogOutTriggerSlopeGet**(HDWF hdwf, int idxChannel, DwfTriggerSlope *pslope) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | pslope – Pointer to variable to receive the trigger slope. | ||
| + | |||
| + | | **FDwfAnalogOutRunInfo**(HDWF hdwf, int idxChannel, double *psecMin, double *psecMax) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | psecMin – Variable to receive the supported minimum run length. | ||
| + | | ::: | psecMax – Variable to receive the supported maximum run length. | ||
| + | |||
| + | | **FDwfAnalogOutRunSet**(HDWF hdwf, int idxChannel, double secRun) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | secRun – Run length to set expressed in seconds. | ||
| + | |||
| + | | **FDwfAnalogOutRunGet**(HDWF hdwf, int idxChannel, double *psecRun) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | psecRun – Pointer to variable to receive the run length. | ||
| + | |||
| + | | **FDwfAnalogOutRunStatus**(HDWF hdwf, int idxChannel, double *psecRun) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | psecRun – Pointer to variable to receive the remaining run length. | ||
| + | |||
| + | | **FDwfAnalogOutWaitInfo**(HDWF hdwf, int idxChannel, double *psecMin, double *psecMax) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | psecMin/Max – Variable to receive the supported minimum/ | ||
| + | |||
| + | | **FDwfAnalogOutWaitSet**(HDWF hdwf, int idxChannel, double secWait) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | secWait – Wait length to set expressed in seconds. | ||
| + | |||
| + | |||
| + | | **FDwfAnalogOutWaitGet**(HDWF hdwf, int idxChannel, double *psecWait) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | psecWait – Pointer to variable to receive the wait length. | ||
| + | |||
| + | | **FDwfAnalogOutRepeatInfo**(HDWF hdwf, int idxChannel, int *pnMin, int *pnMax) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | pnMin – Variable to receive the supported minimum repeat count. | ||
| + | | ::: | pnMax – Variable to receive the supported maximum repeat count. | ||
| + | |||
| + | | **FDwfAnalogOutRepeatSet**(HDWF hdwf, int idxChannel, int cRepeat) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | cRepeat – Repeat count to set. | | ||
| + | |||
| + | |||
| + | | **FDwfAnalogOutRepeatGet**(HDWF hdwf, int idxChannel, int *pcRepeat) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | pcRepeat – Pointer to variable to receive the repeat count. | ||
| + | |||
| + | |||
| + | | **FDwfAnalogOutRepeatStatus**(HDWF hdwf, int idxChannel, int *pcRepeat) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | pcRepeat – Pointer to variable to receive the remaining repeat counts. | ||
| + | |||
| + | | **FDwfAnalogOutRepeatTriggerSet**(HDWF hdwf, int idxChannel, int fRepeatTrigger) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | fRepeatTrigger – Boolean used to specify if the trigger should be included in a repeat cycle. | ||
| + | |||
| + | | **FDwfAnalogOutRepeatTriggerGet**(HDWF hdwf, int idxChannel, int *pfRepeatTrigger) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | pfRepeatTrigger – Pointer to variable to receive the repeat trigger option. | ||
| + | |||
| + | | **FDwfAnalogOutMasterSet**(HDWF hdwf, int idxChannel, int idxMaster) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | idxMaster – Node index. | ||
| + | |||
| + | | **FDwfAnalogOutMasterGet**(HDWF hdwf, int idxChannel, int *pidxMaster) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | pidxMaster – Pointer to variable to receive parameter. | ||
| + | |||
| + | |||
| + | ---- | ||
| + | |||
| + | ====== 7. Analog IO ====== | ||
| + | |||
| + | The AnalogIO functions are used to control the power supplies, reference voltage supplies, voltmeters, ammeters, thermometers, | ||
| + | |||
| + | See the AnalogIO.py example | ||
| + | |||
| + | | **FDwfAnalogIOReset**(HDWF hdwf) || | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogIOConfigure**(HDWF hdwf) || | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogIOStatus**(HDWF hdwf) || | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogIOEnableInfo**(HDWF hdwf, int *pfSet, int *pfStatus) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pfSet – Returns true when the master enable setting is supported. | ||
| + | | ::: | pfStatus – Return true when the status of the master enable can be read. | | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogIOEnableSet**(HDWF hdwf, int fMasterEnable) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | fMasterEnable – Set TRUE to enable the master switch; FALSE to disable the master switch. | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogIOEnableGet**(HDWF hdwf, int *pfMasterEnable) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pfMasterEnable – Pointer to variable to return the enabled configuration. | ||
| + | |||
| + | | **FDwfAnalogIOEnableStatus**(HDWF hdwf, int *pfMasterEnable) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pfMasterEnabled – Pointer to variable to return the active status. | ||
| + | |||
| + | |||
| + | | **FDwfAnalogIOChannelCount**(HDWF hdwf, int *pnChannel) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pcChannel – Pointer to variable to return the number of channels. | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogIOChannelName**(HDWF hdwf, int idxChannel, char szName[32], char szLabel[16]) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | szName – Pointer to character array to return the user name. | | ||
| + | | ::: | szLabel – Pointer to character array to return the label. | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogIOChannelInfo**(HDWF hdwf, int idxChannel, int *pnNodes) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | pnNodes – Pointer to variable to return the number of node . | | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogIOChannelNodeName**(HDWF hdwf, int idxChannel, int idxNode, char szNodeName[32], | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | idxNode – Node index. | ||
| + | | ::: | szNodeName – Pointer to character array to return the node name. | | ||
| + | | ::: | szUnits – Pointer to character array to return the value units | | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogIOChannelNodeInfo**(HDWF hdwf, int idxChannel, ANALOGIO* panalogio) | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | idxNode – Node index. | ||
| + | | ::: | panalogio – Pointer to variable to return the node type. | | ||
| + | | **Description: | ||
| + | |||
| + | |||
| + | |||
| + | | **// | ||
| + | | **analogioEnable** | ||
| + | | **analogioVoltage** | ||
| + | | **analogioCurrent** | ||
| + | | **analogioTemperature** | ||
| + | |||
| + | |||
| + | | **FDwfAnalogIOChannelNodeSetInfo**(HDWF hdwf, int idxChannel, int idxNode, double *pmin, double *pmax, int *pnSteps) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Analog I/O channel index of the device. | ||
| + | | ::: | idxNode – Node index. | ||
| + | | ::: | pmin – Minimum settable value. | ||
| + | | ::: | pmax – Maximum settable value. | ||
| + | | ::: | pnSteps – Number of steps between minimum and maximum values. | ||
| + | |||
| + | |||
| + | | **FDwfAnalogIOChannelNodeSet**(HDWF hdwf, int idxChannel, int idxNode, double value) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxNode – Node index. | ||
| + | | ::: | idxChannel – Analog I/O channel index of the device. | ||
| + | | ::: | value – Value to set. | | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogIOChannelNodeGet**(HDWF hdwf, int idxChannel, int idxNode, double *pvalue) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Analog I/O channel index of the device. | ||
| + | | ::: | idxNode – Node index. | ||
| + | | ::: | pvalue – Pointer to variable to return the configured value. | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogIOChannelNodeStatusInfo**(HDWF hdwf, int idxChannel, int idxNode, double *pmin, double *pmax, int *pnSteps) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel –Channel index . | | ||
| + | | ::: | idxNode – Node index. | ||
| + | | ::: | pmin – Minimum reading value. | ||
| + | | ::: | pmax – Maximum reading value. | ||
| + | | ::: | pnSteps – Number of steps between minimum and maximum values. | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfAnalogIOChannelNodeStatus**(HDWF hdwf, int idxChannel, int idxNode, double *pvalue) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel –Channel index. | ||
| + | | ::: | idxNode – Node index. | ||
| + | | ::: | pvalue – Pointer to variable to return the value reading. | ||
| + | |||
| + | |||
| + | |||
| + | ---- | ||
| + | |||
| + | ====== 8. Digital I/O ====== | ||
| + | |||
| + | See the DigitalIO.py example. | ||
| + | |||
| + | | **FDwfDigitalIOReset**(HDWF hdwf) || | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfDigitalIOConfigure**(HDWF hdwf) || | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfDigitalIOStatus**(HDWF hdwf) || | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfDigitalIOOutputEnableInfo**(HDWF hdwf, unsigned int *pfsOutputEnableMask) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pfsOutputEnableMask – Variable to return the OE mask bit field. | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfDigitalIOOutputEnableSet**(HDWF hdwf, unsigned int fsOutputEnable) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | fsOutputEnable – Output enable bit set. | | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfDigitalIOOutputEnableGet**(HDWF hdwf, unsigned int *pfsOutputEnable) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pfsOutputEnable – Pointer to variable to returns output enable bit set. | | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfDigitalIOOutputInfo**(HDWF hdwf, unsigned int *pfsOutputMask) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pfsOutputMask – Variable to return the output value mask. | | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfDigitalIOOutputSet**(HDWF hdwf, unsigned int fsOutput) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | fsOutput – Output bit set. | | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfDigitalIOOutputGet**(HDWF hdwf, unsigned int *pfsOutput) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pfsOutput – Pointer to variable to returns output bit set. | | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfDigitalIOInputInfo**(HDWF hdwf, unsigned int *pfsInputMask) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pfsInputMask – Variable to return the input value mask. | | ||
| + | |||
| + | |||
| + | | **FDwfDigitalIOInputStatus**(HDWF hdwf, unsigned int *pfsInput) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pfsInput – Variable to return the input value. | ||
| + | |||
| + | |||
| + | |||
| + | ---- | ||
| + | |||
| + | ====== 9. Digital In (Logic Analyzer) ====== | ||
| + | |||
| + | The Digital In instrument states: | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | The states are defined in dwf.h DwfState type. | ||
| + | * **Ready:** Initial state. After // | ||
| + | * **Configure: | ||
| + | * **Prefill: | ||
| + | * **Armed:** It waits for trigger. | ||
| + | * **Running: | ||
| + | * **Done:** Final state. | ||
| + | |||
| + | See the following examples: DigitalIn_Acquisition/ | ||
| + | |||
| + | |||
| + | ==== 9.1. Control ==== | ||
| + | |||
| + | | **FDwfDigitalInReset**(HDWF hdwf) || | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfDigitalInConfigure**(HDWF hdwf, int fReconfigure, | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | fReconfigure – Configure the device. | ||
| + | | ::: | fStart – Start the acquisition. | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfDigitalInStatus**(HDWF hdwf, int fReadData, DwfState *psts) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | fReadData – TRUE if data should be read. | | ||
| + | | ::: | psts – Variable to receive the acquisition state. | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfDigitalInStatusSamplesLeft**(HDWF hdwf, int *pcSamplesLeft) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pcSamplesLeft – Variable to receive the remaining samples to acquire. | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfDigitalInStatusSamplesValid**(HDWF hdwf, int *pcSamplesValid) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pcSamplesValid – Variable to receive the number of valid samples. | ||
| + | |||
| + | |||
| + | | **FDwfDigitalInStatusIndexWrite**(HDWF hdwf, int *pidxWrite) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pidxWrite – Variable to receive the position of the acquisition. | ||
| + | |||
| + | |||
| + | | **FDwfDigitalInStatusAutoTriggered**(HDWF hdwf, int *pfAuto) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pfAuto – Returns TRUE if the acquisition was auto triggered. | ||
| + | |||
| + | |||
| + | | **FDwfDigitalInStatusData**(HDWF hdwf, void *rgData, int countOfDataBytes) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | rgData – Pointer to allocated buffer to copy the acquisition data. | | ||
| + | | ::: | - countOfDataBytes – Number of bytes to copy. | | ||
| + | |||
| + | |||
| + | | **FDwfDigitalInStatusData2**(HDWF hdwf, void *rgData, int idxSample, int countOfDataBytes) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | rgData – Pointer to allocated buffer to copy the acquisition data. | | ||
| + | | ::: | idxSample – First sample index to copy. | | ||
| + | | ::: | countOfDataBytes – Number of bytes to copy. | | ||
| + | |||
| + | | **FDwfDigitalInStatusRecord**(HDWF hdwf, int *pcdDataAvailable, | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | 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. | ||
| + | ==== 9.2. Configuration ==== | ||
| + | |||
| + | |||
| + | | **FDwfDigitalInInternalClockInfo**(HDWF hdwf, double *phzFreq) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | phzFreq – Pointer to return the internal clock frequency. | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfDigitalInClockSourceInfo**(HDWF hdwf, int *pfsDwfDigitalInClockSource) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pfsDwfDigitalInClockSource – Pointer to variable to return the available clock source options. | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfDigitalInClockSourceSet**(HDWF hdwf, DwfDigitalInClockSource v) || | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | v – Clock source | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | | **FDwfDigitalInClockSourceGet**(HDWF hdwf, DwfDigitalInClockSource *pv) || | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pv – Pointer to variable to return the configured value. | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfDigitalInDividerInfo**(HDWF hdwf, unsigned int *pdivMax) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pdivMax – Pointer to variable to return the available maximum divider value. | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfDigitalInDividerSet**(HDWF hdwf, unsigned int div) || | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | div – Divider value. | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfDigitalInDividerGet**(HDWF hdwf, unsigned int *pdiv) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pdiv –Pointer to return configured value. | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfDigitalInBitsInfo**(HDWF hdwf, int *pnBits) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pnBits – Pointer to variable to return the number of bits. | | ||
| + | |||
| + | | **FDwfDigitalInInputOrderSet**(HDWF hdwf, bool fDioFirst) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | fDioFirst – DIO or DIN lines start from index zero. | | ||
| + | |||
| + | |||
| + | | **FDwfDigitalInSampleFormatSet**(HDWF hdwf, int nBits) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | nBits – Sample format. | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfDigitalInSampleFormatGet**(HDWF hdwf, int *pnBits) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pnBits –Pointer to return configured value. | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfDigitalInBufferSizeInfo**(HDWF hdwf, int *pnSizeMax) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pnSizeMax – Pointer to variable to return maximum buffer size. | | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfDigitalInBufferSizeSet**(HDWF hdwf, int nSize) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | nSize – Buffer size. | | ||
| + | |||
| + | |||
| + | | **FDwfDigitalInBufferSizeGet**(HDWF hdwf, int *pnSize) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | nSize – Pointer to return configured value. | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfDigitalInSampleModeInfo**(HDWF hdwf, int *pfsDwfDigitalInSampleMode) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pfsDwfDigitalInSampleMode – Pointer to return the supported sample modes. | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfDigitalInSampleModeSet**(HDWF hdwf, DwfDigitalInSampleMode v) || | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | v – Sample mode. | | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | | **FDwfDigitalInSampleModeGet**(HDWF hdwf, DwfDigitalInSampleMode *pv) || | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pv – Pointer to return configured value. | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | | **FDwfDigitalInAcquisitionModeInfo**(HDWF hdwf, int* pfsacqmode) | ||
| + | | **Parameters: | ||
| + | | ::: | pfsacqmode – Pointer to return the supported acquisition modes. | ||
| + | | **Description: | ||
| + | |||
| + | ^ ACQMODE | ||
| + | | **acqmodeSingle** | ||
| + | | **acqmodeScanShift** | ||
| + | | **acqmodeScanScreen** | ||
| + | | **acqmodeRecord** | ||
| + | | **acqmodeSingle1** | ||
| + | |||
| + | |||
| + | | **FDwfDigitalInAcquisitionModeSet**(HDWF hdwf, ACQMODE acqmode) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | acqmode – Acquisition mode to set. | | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfDigitalInAcquisitionModeGet**(HDWF hdwf, ACQMODE *pacqmode) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pacqmode – Variable to receive the current acquisition mode. | | ||
| + | |||
| + | |||
| + | | **FDwfDigitalInSampleSensibleSet**(HDWF hdwf, unsigned int fs) || | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | fs – bit field set of signals to look for compression. | ||
| + | |||
| + | | **FDwfDigitalInSampleSensibleGet**(HDWF hdwf, unsigned int *pfs) || | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pfs – Pointer to variable to receive configured value. | ||
| + | |||
| + | |||
| + | ==== 9.3. Trigger ==== | ||
| + | |||
| + | See the description of **FDwfDeviceTriggerInfo**. | ||
| + | |||
| + | | **FDwfDigitalInTriggerSourceSet**(HDWF hdwf, TRIGSRC trigsrc) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | trigsrc – Trigger source to set. | | ||
| + | |||
| + | |||
| + | | **FDwfDigitalInTriggerSourceGet**(HDWF hdwf, TRIGSRC *ptrigsrc) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | ptrigsrc – Pointer to variable to receive the trigger source. | ||
| + | |||
| + | |||
| + | | **FDwfDigitalInTriggerSlopeSet**(HDWF hdwf, DwfTriggerSlope slope) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | slope – Trigger source to set. | | ||
| + | |||
| + | | **FDwfDigitalInTriggerSlopeGet**(HDWF hdwf, DwfTriggerSlope *pslope) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pslope – Pointer to variable to receive the trigger slope. | ||
| + | |||
| + | | **FDwfDigitalInTriggerPositionInfo**(HDWF hdwf, unsigned int *pnSamplesAfterTriggerMax) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pnSamplesAfterTriggerMax – Variable to receive the maximum trigger position. | ||
| + | |||
| + | | **FDwfDigitalInTriggerPositionSet**(HDWF hdwf, unsigned int cSamplesAfterTrigger) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | cSamplesAfterTrigger – Samples after trigger. | ||
| + | |||
| + | | **FDwfDigitalInTriggerPositionGet**(HDWF hdwf, unsigned int *pcSamplesAfterTrigger) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pcSamplesAfterTrigger – Pointer to variable to receive configured value. | ||
| + | |||
| + | | **FDwfDigitalInTriggerPrefillSet**(HDWF hdwf, unsigned int cSamplesBeforeTrigger) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | cSamplesBeforeTrigger – Samples before trigger. | ||
| + | |||
| + | | **FDwfDigitalInTriggerPrefillGet**(HDWF hdwf, unsigned int *pcSamplesBeforeTrigger) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pcSamplesBeforeTrigger – Pointer to variable to receive configured value. | ||
| + | |||
| + | | **FDwfDigitalInTriggerAutoTimeoutInfo**(HDWF hdwf, double *psecMin, double *psecMax, double *pnSteps) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | psecMin – Variable to receive the minimum timeout. | ||
| + | | ::: | psecMax – Variable to receive the maximum timeout. | ||
| + | | ::: | pnSteps – Variable to return the number of steps. | ||
| + | |||
| + | | **FDwfDigitalInTriggerAutoTimeoutSet**(HDWF hdwf, double secTimeout) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | secTimeout – Timeout to set. | | ||
| + | |||
| + | | **FDwfDigitalInTriggerAutoTimeoutGet**(HDWF hdwf, double *psecTimeout) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | psecTimeout – Variable to receive the current timeout. | ||
| + | |||
| + | |||
| + | |||
| + | |||
| + | |||
| + | ==== 9.4. Trigger Detector ==== | ||
| + | |||
| + | In order to use trigger on digital in pins, set trigger source with FDwfDigitalInTriggerSourceSet to trigsrcDetectorDigitalIn. | ||
| + | |||
| + | | **FDwfDigitalInTriggerInfo**FDwfDigitalInTriggerInfo(HDWF hdwf, unsigned int *pfsLevelLow, | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | 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. | ||
| + | |||
| + | |||
| + | | **FDwfDigitalInTriggerSet**(HDWF hdwf, unsigned int fsLevelLow, unsigned int fsLevelHigh, | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | fsLevelLow – Set low state condition. | ||
| + | | ::: | fsLevelHigh – Set high state condition. | ||
| + | | ::: | fsEdgeRise – Set rising edge condition. | ||
| + | | ::: | fsEdgeFall – Set falling edge condition. | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfDigitalInTriggerGet**(HDWF hdwf, unsigned int *pfsLevelLow, | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | 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. | ||
| + | |||
| + | | **FDwfDigitalInTriggerResetSet**(HDWF hdwf, unsigned int fsLevelLow, unsigned int fsLevelHigh, | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | fsLevelLow – Set low state condition. | ||
| + | | ::: | fsLevelHigh – Set high state condition. | ||
| + | | ::: | fsEdgeRise – Set rising edge condition. | ||
| + | | ::: | fsEdgeFall – Set falling edge condition. | ||
| + | |||
| + | |||
| + | | **FDwfDigitalInTriggerCountSet**(HDWF hdwf, int cCount, int fRestart) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | cCount – Set event count. | ||
| + | | ::: | fRestart – Set to restart counter after expires or not and wait for next reset condition. | ||
| + | |||
| + | | **FDwfDigitalInTriggerLengthSet**(HDWF hdwf, double secMin, double secMax, int idxSync) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | secMin – Set minimum length in seconds, up to 20sec. | ||
| + | | ::: | secMax – Set maximum length in seconds, up to 20sec. | ||
| + | | ::: | idxSync – Set synchronization mode. | | ||
| + | |||
| + | | **FDwfDigitalInTriggerMatchSet**(HDWF hdwf, int iPin, unsigned int fsMask, unsigned int fsValue, int cBitStuffing) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | iPin – Set pin to deserialize. | ||
| + | | ::: | fsMask – Set bit mask pattern. | ||
| + | | ::: | fsValue – Set bit match pattern. | ||
| + | | ::: | cBitStuffing – Set bit stuffing count. | ||
| + | |||
| + | To trigger on a pulse configure the following: | ||
| + | FDwfDigitalInTriggerCountSet (hdwf, 1, 0); | ||
| + | * For positive pulse specify rising and for negative falling edge reset. | ||
| + | * FDwfDigitalInTriggerResetSet(hdwf, | ||
| + | * For positive pulse specify high and for negative low level trigger. | ||
| + | * FDwfDigitalInTriggerSet(hdwf, | ||
| + | |||
| + | **Glitch/ | ||
| + | * FDwfDigitalInTriggerLengthSet(hdwf, | ||
| + | |||
| + | **Timeout: | ||
| + | * FDwfDigitalInTriggerLengthSet(hdwf, | ||
| + | |||
| + | **More:** To trigger on pulse ending slope which is longer than the specified minimum time: | ||
| + | * FDwfDigitalInTriggerLengthSet(hdwf, | ||
| + | |||
| + | **Length:** To trigger on a pulse length with the specified minimum and maximum lengths use: | ||
| + | * FDwfDigitalInTriggerLengthSet(hdwf, | ||
| + | |||
| + | |||
| + | ---- | ||
| + | |||
| + | ====== 10. Digital Out (Pattern Generator) ====== | ||
| + | |||
| + | The DigitalOut instrument states: | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | The states are described defined in dwf.h DwfState type. | ||
| + | * **Ready:** Initial state. After // | ||
| + | * **Armed:** It waits for trigger. | ||
| + | * **Wait:** Remains in this state for the time period specified by // | ||
| + | * **Running: | ||
| + | * **Repeat:** Goes to Armed or Wait state according to the FDwfDigitalOutRepeatTriggerSet setting for the number of times specified by FDwfDigitalOutRepeatSet. | ||
| + | * **Done:** Final state. | ||
| + | |||
| + | This states machine controls all digital out channels. | ||
| + | |||
| + | See the following examples: DigitalOut_BinaryCounter/ | ||
| + | |||
| + | 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 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 // | ||
| + | |||
| + | ==== 10.1. Control ==== | ||
| + | |||
| + | |||
| + | | **FDwfDigitalOutReset**(HDWF hdwf) || | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfDigitalOutConfigure**(HDWF hdwf, int fStart) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | fStart – Start the acquisition. To stop, set to FALSE. | ||
| + | |||
| + | |||
| + | | **FDwfDigitalOutStatus**(HDWF hdwf, DwfState *psts) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | psts – Pointer to variable to return the state. | ||
| + | |||
| + | |||
| + | ==== 10.2. Configuration ==== | ||
| + | |||
| + | |||
| + | | **FDwfDigitalOutInternalClockInfo**(HDWF hdwf, double *phzFreq) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | phzFreq – Pointer to return the internal clock frequency. | ||
| + | |||
| + | See the description of **FDwfDeviceTriggerInfo**. | ||
| + | |||
| + | |||
| + | | **FDwfDigitalOutTriggerSourceSet**(HDWF hdwf, TRIGSRC trigsrc) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | trigsrc – Trigger source to set. | | ||
| + | |||
| + | |||
| + | | **FDwfDigitalOutTriggerSourceGet**(HDWF hdwf, TRIGSRC *ptrigsrc) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | ptrigsrc – Pointer to variable to receive the trigger source. | ||
| + | |||
| + | | **FDwfDigitalOutTriggerSlopeSet**(HDWF hdwf, DwfTriggerSlope slope) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | slope – Trigger source to set. | | ||
| + | |||
| + | | **FDwfDigitalOutTriggerSlopeGet**(HDWF hdwf, DwfTriggerSlope *pslope) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pslope – Pointer to variable to receive the trigger slope. | ||
| + | |||
| + | |||
| + | | **FDwfDigitalOutRunInfo**(HDWF hdwf, double *psecMin, double *psecMax) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | psecMin – Variable to receive the supported minimum run length. | ||
| + | | ::: | psecMax – Variable to receive the supported maximum run length. | ||
| + | |||
| + | |||
| + | | **FDwfDigitalOutRunSet**(HDWF hdwf, double secRun) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | secRun – Run length to set expressed in seconds. | ||
| + | |||
| + | |||
| + | | **FDwfDigitalOutRunGet**(HDWF hdwf, double *psecRun) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | psecRun – Pointer to variable to receive the run length. | ||
| + | |||
| + | |||
| + | | **FDwfDigitalOutRunStatus**(HDWF hdwf, double *psecRun) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | psecRun – Pointer to variable to receive the remaining run length. | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfDigitalOutWaitInfo**(HDWF hdwf, double *psecMin, double *psecMax) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | psecMin – Variable to receive the supported minimum wait length. | ||
| + | | ::: | psecMax – Variable to receive the supported maximum wait length. | ||
| + | |||
| + | |||
| + | | **FDwfDigitalOutWaitSet**(HDWF hdwf, double secWait) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | secWait – Wait length to set expressed in seconds. | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfDigitalOutWaitGet**(HDWF hdwf, double *psecWait) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | psecWait – Pointer to variable to receive the wait length. | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfDigitalOutRepeatInfo**(HDWF hdwf, unsigned int *pnMin, unsigned int *pnMax) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pnMin – Variable to receive the supported minimum repeat count. | ||
| + | | ::: | pnMax – Variable to receive the supported maximum repeat count. | ||
| + | |||
| + | |||
| + | | **FDwfDigitalOutRepeatSet**(HDWF hdwf, unsigned int cRepeat) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | cRepeat – Repeat count to set. | | ||
| + | |||
| + | |||
| + | | **FDwfDigitalOutRepeatGet**(HDWF hdwf, unsigned int *pcRepeat) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pcRepeat – Pointer to variable to receive the repeat count. | ||
| + | |||
| + | |||
| + | | **FDwfDigitalOutRepeatStatus**(HDWF hdwf, unsigned int *pcRepeat) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pcRepeat – Pointer to variable to receive the remaining repeat counts. | ||
| + | |||
| + | |||
| + | | **FDwfDigitalOutRepeatTriggerSet**(HDWF hdwf, int fRepeatTrigger) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | fRepeatTrigger – Boolean used to specify if the trigger should be included in a repeat cycle. | ||
| + | |||
| + | |||
| + | | **FDwfDigitalOutRepeatTriggerGet**(HDWF hdwf, int *pfRepeatTrigger) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pfRepeatTrigger – Pointer to variable to receive the repeat trigger option. | ||
| + | |||
| + | |||
| + | | **FDwfDigitalOutCount**(HDWF hdwf, int *pcChannel) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pcChannel – Pointer to variable to receive the number of channels in the instrument. | ||
| + | |||
| + | |||
| + | | **FDwfDigitalOutEnableSet**(HDWF hdwf, int idxChannel, int fEnable) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | fEnable – TRUE to enable, FALSE to disable. | ||
| + | |||
| + | |||
| + | | **FDwfDigitalOutEnableGet**(HDWF hdwf, int idxChannel, int *pfEnable) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | pfEnable – Pointer to variable to receive enabled state. | ||
| + | |||
| + | |||
| + | | **FDwfDigitalOutOutputInfo**(HDWF hdwf, int idxChannel, int *pfsDwfDigitalOutOutput) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | pfsDwfDigitalOutOutput – Pointer to variable to receive the supported output modes. | ||
| + | |||
| + | |||
| + | | **FDwfDigitalOutOutputSet**(HDWF hdwf, int idxChannel, DwfDigitalOutOutput v) || | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | v – Output mode. | | ||
| + | |||
| + | |||
| + | |||
| + | | **FDwfDigitalOutOutputGet**(HDWF hdwf, int idxChannel, DwfDigitalOutOutput *pv) || | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | pfEnable – Pointer to variable to receive enabled state. | ||
| + | |||
| + | |||
| + | | **FDwfDigitalOutTypeInfo**(HDWF hdwf, int idxChannel, int *pfsDwfDigitalOutType) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | pfsDwfDigitalOutType – Pointer to variable to receive the supported output types. | ||
| + | |||
| + | |||
| + | | **FDwfDigitalOutTypeSet**(HDWF hdwf, int idxChannel, DwfDigitalOutType v) || | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | v – Output mode. | | ||
| + | |||
| + | |||
| + | | **FDwfDigitalOutTypeGet**(HDWF hdwf, int idxChannel, DwfDigitalOutType *pv) || | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | pfEnable – Pointer to variable to receive enabled state. | ||
| + | |||
| + | |||
| + | | **FDwfDigitalOutIdleInfo**(HDWF hdwf, int idxChannel, int *pfsDwfDigitalOutIdle) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | pfsDwfDigitalOutIdle – Pointer to variable to receive the supported idle output types. | ||
| + | |||
| + | |||
| + | | **FDwfDigitalOutIdleSet**(HDWF hdwf, int idxChannel, DwfDigitalOutIdle v) || | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | v – Value to set idle output. | ||
| + | |||
| + | |||
| + | | **FDwfDigitalOutIdleGet**(HDWF hdwf, int idxChannel, DwfDigitalOutIdle *pv) || | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | pv – Pointer to variable to receive configured value. | ||
| + | |||
| + | |||
| + | | **FDwfDigitalOutDividerInfo**(HDWF hdwf, int idxChannel, unsigned int *vMin, unsigned int *vMax) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | pnMin – Variable to receive the supported minimum divider value. | ||
| + | | ::: | pnMax – Variable to receive the supported maximum divider value. | ||
| + | |||
| + | |||
| + | | **FDwfDigitalOutDividerInitSet**(HDWF hdwf, int idxChannel, unsigned int v) || | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | v – Divider initial value. | ||
| + | |||
| + | |||
| + | | **FDwfDigitalOutDividerInitGet**(HDWF hdwf, int idxChannel, unsigned int *pv) || | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | pv – Pointer to variable to receive configured value. | ||
| + | |||
| + | |||
| + | | **FDwfDigitalOutDividerSet**(HDWF hdwf, int idxChannel, unsigned int v) || | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | v – Divider value. | ||
| + | |||
| + | |||
| + | | **FDwfDigitalOutDividerGet**(HDWF hdwf, int idxChannel, unsigned int *pv) || | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | pv – Pointer to variable to receive configured value. | ||
| + | |||
| + | |||
| + | | **FDwfDigitalOutCounterInfo**(HDWF hdwf, int idxChannel, unsigned int *vMin, unsigned int *vMax) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | pnMin – Variable to receive the supported minimum counter value. | ||
| + | | ::: | pnMax – Variable to receive the supported maximum counter value. | ||
| + | |||
| + | |||
| + | | **FDwfDigitalOutCounterInitSet**(HDWF hdwf, int idxChannel, int fHigh, unsigned int v) || | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | fHigh – Start high. | | ||
| + | | ::: | v – Divider initial value. | ||
| + | |||
| + | |||
| + | | **FDwfDigitalOutCounterInitGet**(HDWF hdwf, int idxChannel, int *pfHigh, unsigned int *pv) || | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | pfHigh – Pointer to variable to receive configured value. | ||
| + | | ::: | pv – Pointer to variable to receive configured value. | ||
| + | |||
| + | |||
| + | | **FDwfDigitalOutCounterSet**(HDWF hdwf, int idxChannel, unsigned int vLow, unsigned int vHigh) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | vLow – Counter low value. | ||
| + | | ::: | vHigh – Counter high value. | ||
| + | |||
| + | |||
| + | | **FDwfDigitalOutCounterGet**(HDWF hdwf, int idxChannel, unsigned int *pvLow, unsigned int *pvHigh) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | pvLow – Pointer to variable to receive configured value. | ||
| + | | ::: | pvHigh – Pointer to variable to receive configured value. | ||
| + | |||
| + | | **FDwfDigitalOutDataInfo**(HDWF hdwf, int idxChannel, unsigned int *pcountOfBitsMax) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | pcountOfBitsMax – Variable to receive the maximum number of bits. | | ||
| + | |||
| + | |||
| + | | **FDwfDigitalOutDataSet**(HDWF hdwf, int idxChannel, void *rgBits, unsigned int countOfBits) | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | rgBits – Custom data array. | ||
| + | | ::: | countOfBits –Number of bits. | | ||
| + | | **Description: | ||
| + | |||
| + | |||
| + | | **Custom Data Bits** | ||
| + | | **BYTE** | ||
| + | | **Bits** | ||
| + | | **Output** | ||
| + | |||
| + | |||
| + | The following play functions are supported by Digital Discovery. | ||
| + | |||
| + | | **FDwfDigitalOutPlayRateSet**(HDWF hdwf, double hzRate) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | v – Divider value. | ||
| + | |||
| + | | **FDwfDigitalOutPlayDataSet**(HDWF hdwf, unsigned char * rgBits, unsigned int bitPerSample, | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | rgBits – Data array to play. | | ||
| + | | ::: | bitPerSample – Bits per sample, should be 1, 2, 4, 8 or 16. | | ||
| + | | ::: | countOfSamples – Number of samples. | ||
| + | |||
| + | |||
| + | ---- | ||
| + | |||
| + | |||
| + | ====== 11. Analog Impedance | ||
| + | |||
| + | The Analog Impendace functions use the Analog Input and Output channel 1. When used with Imepdance Analyzer module the Analog IO (Power Supplies) and Digital IO will be used too. These functions can be used with [[/ | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | {{ : | ||
| + | |||
| + | The DUT (Device Under Test) stands for the inductive or capacitive load to be analyzed and Resistor is the reference resistor. The resistor value depends on the load value and frequency. | ||
| + | |||
| + | See AnalogImpedance_Meter.py, | ||
| + | |||
| + | | **FDwfAnalogImpedanceReset**(HDWF hdwf) || | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | |||
| + | | **FDwfAnalogImpedanceModeSet**(HDWF hdwf, int mode) || | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | mode – circuit model to be used\\ - 0: W1-C1-DUT-C2-R-GND\\ | ||
| + | |||
| + | | **FDwfAnalogImpedanceModeGet**(HDWF hdwf, int *pmode) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pmode – Pointer to variable to receive configured value. | ||
| + | |||
| + | | **FDwfAnalogImpedanceReferenceSet**(HDWF hdwf, double ohms) || | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | ohms – Reference resistor value. | ||
| + | |||
| + | | **FDwfAnalogImpedanceReferenceGet**(HDWF hdwf, double *pohms) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pohms – Pointer to variable to receive configured value. | ||
| + | |||
| + | | **FDwfAnalogImpedanceFrequencySet**(HDWF hdwf, double hz) || | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | hz – Frequency value. | ||
| + | |||
| + | | **FDwfAnalogImpedanceFrequencyGet**(HDWF hdwf, double *phz) || | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | phz – Pointer to variable to receive configured value. | ||
| + | |||
| + | | **FDwfAnalogImpedanceAmplitudeSet**(HDWF hdwf, double volts) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | volts – Amplitude value. | ||
| + | |||
| + | | **FDwfAnalogImpedanceAmplitudeGet**(HDWF hdwf, double *pvolts) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pvolts – Pointer to variable to receive configured value. | ||
| + | |||
| + | | **FDwfAnalogImpedanceOffsetSet**(HDWF hdwf, double volts) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | volts – Offset value. | ||
| + | |||
| + | | **FDwfAnalogImpedanceOffsetGet**(HDWF hdwf, double *pvolts) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pvolts – Pointer to variable to receive configured value. | ||
| + | |||
| + | | **FDwfAnalogImpedanceProbeSet**(HDWF hdwf, double ohmRes, double faradCap) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | ohmRes – Probe resistance. | ||
| + | | ::: | faradCap – Probe capacitance. | ||
| + | |||
| + | | **FDwfAnalogImpedanceProbeGet**(HDWF hdwf, double *pohmRes, double *pfaradCap) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pohmRes – Pointer to variable to receive configured value. | ||
| + | | ::: | pfaradCap – Pointer to variable to receive configured value. | ||
| + | |||
| + | | **FDwfAnalogImpedancePeriodSet**(HDWF hdwf, int cMinPeriods) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | cMinPeriods – Number of minimum periods, default 16. | | ||
| + | |||
| + | | **FDwfAnalogImpedancePeriodGet**(HDWF hdwf, int *pcMinPeriods) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pcMinPeriods – Pointer to variable to receive configured value. | ||
| + | |||
| + | | **FDwfAnalogImpedanceCompReset**(HDWF hdwf) || | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | |||
| + | | **FDwfAnalogImpedanceCompSet**(HDWF hdwf, double ohmOpenResistance, | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | ohmOpenResistance – Open resistance value. | ||
| + | | ::: | ohmOpenReactance – Open reactance value | | ||
| + | | ::: | ohmShortResistance – Short resistance value. | ||
| + | | ::: | ohmShortReactance – Short reactance value. | ||
| + | |||
| + | | **FDwfAnalogImpedanceCompGet**(HDWF hdwf, double *pohmOpenResistance, | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pohmOpenResistance – Pointer to variable to receive configured value. | ||
| + | | ::: | pohmOpenReactance – Pointer to variable to receive configured value. | ||
| + | | ::: | pohmShortResistance – Pointer to variable to receive configured value. | ||
| + | | ::: | pohmShortReactance – Pointer to variable to receive configured value. | ||
| + | |||
| + | | **FDwfAnalogImpedaceConfigure**(HDWF hdwf, int fStart) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | fStart – Start the analysis. | ||
| + | |||
| + | | **FDwfAnalogImpedanceStatus**(HDWF hdwf, DwfState *psts) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | psts – Variable to receive the acquisition state. | ||
| + | |||
| + | | **FDwfAnalogImpedanceStatusInput**(HDWF hdwf, int idxChannel, double *pgain, double *pradian) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Scope channel index. | ||
| + | | ::: | pgain – Pointer to variable to receive the gain. | | ||
| + | | ::: | pradian – Pointer to variable to receive the phase. | ||
| + | |||
| + | | **FDwfAnalogImpedanceStatusMeasure**(HDWF hdwf, DwfAnalogImpedance measure, double *pvalue) | ||
| + | | **Parameters: | ||
| + | | ::: | measure – Select measurement to return. | ||
| + | | ::: | pvalue – Pointer to variable to receive the measurement. | ||
| + | | **Description: | ||
| + | |||
| + | ^ **DwfAnalogImpedance** | ||
| + | | **DwfAnalogImpedanceImpedance** | ||
| + | | **DwfAnalogImpedanceImpedancePhase** | ||
| + | | **DwfAnalogImpedanceResistance** | ||
| + | | **DwfAnalogImpedanceReactance** | ||
| + | | **DwfAnalogImpedanceAdmittance** | ||
| + | | **DwfAnalogImpedanceAdmittancePhase** | ||
| + | | **DwfAnalogImpedanceConductance** | ||
| + | | **DwfAnalogImpedanceSusceptance** | ||
| + | | **DwfAnalogImpedanceSeriesCapactance** | ||
| + | | **DwfAnalogImpedanceParallelCapacitance** | ||
| + | | **DwfAnalogImpedanceSeriesInductance** | ||
| + | | **DwfAnalogImpedanceParallelInductance** | ||
| + | | **DwfAnalogImpedanceDissipation** | ||
| + | | **DwfAnalogImpedanceQuality** | ||
| + | | | | ω = 2*PI*Hz | ||
| + | |||
| + | |||
| + | ---- | ||
| + | |||
| + | |||
| + | ====== 12. Digital Protocols | ||
| + | |||
| + | The protocols use the Digital-In/ | ||
| + | |||
| + | Nore: The DIO channe indexing for Digital Discovery starts from 0, 0 is DIO-24, 1 is DIO-25… | ||
| + | |||
| + | |||
| + | ==== 12.1. UART ==== | ||
| + | |||
| + | See Digital_Uart.py example. | ||
| + | |||
| + | | **FDwfDigitalUartReset**(HDWF hdwf) || | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | |||
| + | | **FDwfDigitalUartRateSet**(HDWF hdwf, double hz) || | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | hz – data rate to set. | | ||
| + | |||
| + | | **FDwfDigitalUartBitsSet**(HDWF hdwf, double cBits) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | cBits – character length. | ||
| + | |||
| + | | **FDwfDigitalUartParitySet**(HDWF hdwf, int parity) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | parity – parity mode to set. | | ||
| + | |||
| + | | **FDwfDigitalUartStopSet**(HDWF hdwf, double cBits) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | cBits – stop length. | ||
| + | |||
| + | | **FDwfDigitalUartTxSet**(HDWF hdwf, int idxChannel) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – DIO channel to use for TX. | | ||
| + | |||
| + | | **FDwfDigitalUartRxSet**(HDWF hdwf, int idxChannel) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – DIO channel to use for RX. | | ||
| + | |||
| + | | **FDwfDigitalUartTx**(HDWF hdwf, char *szTx, int cTx) || | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | szTX – array of characters to send. | | ||
| + | | ::: | cTX – number of characters to send. | | ||
| + | |||
| + | | **FDwfDigitalUartRx**(HDWF hdwf, char *szRx, int cRxMax, int *pcRx, int *pParity) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | szRX – buffer to receive characters. | ||
| + | | ::: | cRxMax – the maximum number of characters to receive, the buffer size. | | ||
| + | | ::: | pcRX – pointer to return the number of characters received. | ||
| + | | ::: | pParity – pointer to return: | ||
| + | |||
| + | |||
| + | ==== 12.2. SPI ==== | ||
| + | |||
| + | See examples: Digital_Spi.py, | ||
| + | |||
| + | | **FDwfDigitalSpiReset**(HDWF hdwf) || | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | |||
| + | | **FDwfDigitalSpiFrequencySet**(HDWF hdwf, double hz) || | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | hz – bit rate to set (default 1kHz). | ||
| + | |||
| + | | **FDwfDigitalSpiClockSet**(HDWF hdwf, int idxChannel) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – DIO channel to use for SPI clock (default DIO1). | ||
| + | |||
| + | | **FDwfDigitalSpiDataSet**(HDWF hdwf, int idxDQ, int idxChannel) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxDQ – specify data index to set, 0 = DQ0_MOSI_SISO, | ||
| + | | ::: | idxChannel – DIO channel to use for SPI data. | | ||
| + | |||
| + | | **FDwfDigitalSpiIdleSet**(HDWF hdwf, int idxDQ, DwfDigitalOutIdle idle) || | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxDQ – specify data index. | ||
| + | | ::: | idle – idle state of the channel. | ||
| + | |||
| + | | **FDwfDigitalSpiModeSet**(HDWF hdwf, int iMode) | ||
| + | | **Parameters: | ||
| + | | ::: | iMode – specify SPI mode, bit1 CPOL and bit0 CPHA. | | ||
| + | | **Description: | ||
| + | |||
| + | ^ **iMode** | ||
| + | | 0 | 0 | 0 | | ||
| + | | 1 | 0 | 1 | | ||
| + | | 2 | 1 | 0 | | ||
| + | | 3 | 1 | 1 | | ||
| + | |||
| + | | **FDwfDigitalSpiOrderSet**(HDWF hdwf, int fMSBLSB) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | fMSB – Specify bit order, 1 MSB first (default), 0 LSB first. | ||
| + | |||
| + | | **FDwfDigitalSpiSelect**(HDWF hdwf, int idxChannel, int iLevel) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Specify DIO channel for which to set the level. | ||
| + | | ::: | iLevel – Set the channel level: 0 low, 1 high, -1 release (Z, high impedance). | ||
| + | |||
| + | | **FDwfDigitalSpiWriteRead**(HDWF hdwf, int cDQ, int cBitPerWord, | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | cBitPerWord – specify the number of bits to transfer for each word. | | ||
| + | | ::: | rgTX – array of 8bit values (byte words) to write. | ||
| + | | ::: | cTX – number of words to write. | ||
| + | | ::: | rgRx – buffer for read words. | ||
| + | | ::: | cRx – number of words to read. | | ||
| + | | ::: | cDQ – specify the DQ lines to use to transfer data: | | ||
| + | |||
| + | ^ cDQ ^ ^ ^ | ||
| + | | 0 | SISO | use only DQ0 for read and write | | ||
| + | | 1 | MOSI/ | ||
| + | | 2 | DUAL | use DQ0 for even and DQ1 for odd bits | | ||
| + | | 3 | QUAD | use DQ0 for 0,4,8…, DQ1 for 1,5,9…, DQ2 for 2,6,10…, DQ3 for 3,7,11… data bits | | ||
| + | |||
| + | | **FDwfDigitalSpiWriteOne**(HDWF hdwf, int cDQ, int cBits, unsigned int vTX) || | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | cDQ – Specify the DQ lines to use to transfer data. | | ||
| + | | ::: | cBits – Specify the number of bits to transmit. | ||
| + | | ::: | vTX – Specify the data to transmit. | ||
| + | |||
| + | | **FDwfDigitalSpiReadOne**(HDWF hdwf, int cDQ, int cBits, unsigned int *pRX) || | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | cDQ – Specify the DQ lines to use to transfer data. | | ||
| + | | ::: | cBits – Specify the number of bits to receive. | ||
| + | | ::: | pRX – Pointer to variable to return the received bits. | | ||
| + | |||
| + | | **FDwfDigitalSpiWrite**(HDWF hdwf, int cDQ, int cBitPerWord, | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | cDQ – Specify the DQ lines to use to transfer data. | | ||
| + | | ::: | cBitPerWord – Specify the number of bits to transfer for each word. | | ||
| + | | ::: | rgTX – Array of 8-bit values (words) to transmit. | ||
| + | | ::: | cTX – Number of words to transmit. | ||
| + | |||
| + | | **FDwfDigitalSpiRead**(HDWF hdwf, int cDQ, int cBitPerWord, | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | cDQ – Specify the DQ lines to use to transfer data. | | ||
| + | | ::: | cBitPerWord – Specify the number of bits to transfer for each word. | | ||
| + | | ::: | rgRx – Buffer for receive words. | ||
| + | | ::: | cRx – Number of words to received. | ||
| + | |||
| + | | **FDwfDigitalSpiWriteRead16**(HDWF hdwf, int cDQ, int cBitPerWord, | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | cDQ – Specify the DQ lines to use to transfer data. | | ||
| + | | ::: | cBitPerWord – Specify the number of bits to transfer for each word. | | ||
| + | | ::: | rgTX – Array of 16bit values (words) to transmit. | ||
| + | | ::: | cTX – Number of words to transmit. | ||
| + | | ::: | rgRx – Buffer for read words. | ||
| + | | ::: | cRx – Number of words to read. | | ||
| + | |||
| + | | **FDwfDigitalSpiWriteRead32**(HDWF hdwf, int cDQ, int cBitPerWord, | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | cDQ – Specify the DQ lines to use to transfer data. | | ||
| + | | ::: | cBitPerWord – Specify the number of bits to transfer for each word. | | ||
| + | | ::: | rgTX – Array of 32bit values (words) to write. | ||
| + | | ::: | cTX – Number of words to write. | ||
| + | | ::: | rgRx – Buffer for read words. | ||
| + | | ::: | cRx – Number of words to read. | | ||
| + | |||
| + | | **FDwfDigitalSpiRead16**(HDWF hdwf, int cDQ, int cBitPerWord, | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | cDQ – specify the DQ lines to use to transfer data. | | ||
| + | | ::: | cBitPerWord – specify the number of bits to transfer for each word. | | ||
| + | | ::: | rgRx – buffer for read words. | ||
| + | | ::: | cRx – number of words to read. | | ||
| + | |||
| + | | **FDwfDigitalSpiRead32**(HDWF hdwf, int cDQ, int cBitPerWord, | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | cDQ – specify the DQ lines to use to transfer data. | | ||
| + | | ::: | cBitPerWord – specify the number of bits to transfer for each word. | | ||
| + | | ::: | rgRx – buffer for read words. | ||
| + | | ::: | cRx – number of words to read. | | ||
| + | |||
| + | | **FDwfDigitalSpiWrite16**(HDWF hdwf, int cDQ, int cBitPerWord, | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | cDQ – specify the DQ lines to use to transfer data. | | ||
| + | | ::: | cBitPerWord – specify the number of bits to transfer for each word. | | ||
| + | | ::: | rgTX – array of 16-bit values (words) to write. | ||
| + | | ::: | cTX – number of words to write. | ||
| + | |||
| + | | **FDwfDigitalSpiWrite32**(HDWF hdwf, int cDQ, int cBitPerWord, | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | cDQ – specify the DQ lines to use to transfer data. | | ||
| + | | ::: | cBitPerWord – specify the number of bits to transfer for each word. | | ||
| + | | ::: | rgTX – array of 32-bit values (int) to write. | ||
| + | | ::: | cTX – number of bytes to write. | ||
| + | |||
| + | |||
| + | ==== 12.3. I2C ==== | ||
| + | |||
| + | See Digital_I2c.py exampels. | ||
| + | |||
| + | | **FDwfDigitalI2cReset**(HDWF hdwf) || | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | |||
| + | | **FDwfDigitalI2cClear**(HDWF hdwf, int *pfFree) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pfFree – pointer to return the value. | ||
| + | |||
| + | | **FDwfDigitalI2cRateSet**(HDWF hdwf, double hz) || | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | hz – bit rate to set (default 100kHz). | ||
| + | |||
| + | | **FDwfDigitalI2cReadNakSet**(HDWF hdwf, int fNakLastReadByte) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | fNakLastReadByte – value to set (default 1, true). | ||
| + | |||
| + | | **FDwfDigitalI2cStretchSet**(HDWF hdwf, int fEnable) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | fEnable – Enable (default) or disable the clock stretching. | ||
| + | |||
| + | | **FDwfDigitalI2cSclSet**(HDWF hdwf, int idxChannel) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – DIO channel to use for SCL. | | ||
| + | |||
| + | | **FDwfDigitalI2cSdaSet**(HDWF hdwf, int idxChannel) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – DIO channel to use for SDA. | | ||
| + | |||
| + | | **FDwfDigitalI2cWriteRead**(HDWF hdwf, unsigned char adr8bits, unsigned char *rgbTx, int cTx, unsigned char *rgbRx, int cRx, int *pNak) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | adr8bits – specify the address in 8-bit format, bAAAAAAAX. | ||
| + | | ::: | - rgbTX – array of bytes to write. | ||
| + | | ::: | cTX – number of bytes to write. | ||
| + | | ::: | rgbRx – buffer for read bytes. | ||
| + | | ::: | cRx – number of bytes to read. | | ||
| + | | ::: | pNak – pointer to variable to return eventual NAK index. | ||
| + | |||
| + | | **FDwfDigitalI2cRead**(HDWF hdwf, unsigned char adr8bits, unsigned char *rgbRx, int cRx, int *pNak) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | adr8bits – specify the address. | ||
| + | | ::: | rgbRx – buffer for read bytes. | ||
| + | | ::: | cRx – number of bytes to read. | | ||
| + | | ::: | pNak – pointer to variable to return eventual NAK index. | ||
| + | |||
| + | | **FDwfDigitalI2cWrite**(HDWF hdwf, unsigned char adr8bits, unsigned char *rgbTx, int cTx, int *pNak) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | dr8bits – specify the address. | ||
| + | | ::: | rgbTX – array of bytes to write. | ||
| + | | ::: | cTX – number of bytes to write. | ||
| + | | ::: | pNak – pointer to variable to return eventual NAK index. | ||
| + | |||
| + | | **FDwfDigitalI2cWriteOne**(HDWF hdwf, unsigned char adr8bits, unsigned char bTx, int *pNak) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | adr8bits – specify the address. | ||
| + | | ::: | bTX – bytes to write. | ||
| + | | ::: | pNak – pointer to variable to return eventual NAK index. | ||
| + | |||
| + | |||
| + | ==== 12.4. CAN ==== | ||
| + | |||
| + | See Digital_Can.py example. | ||
| + | |||
| + | | **FDwfDigitalCanReset**(HDWF hdwf) || | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | |||
| + | | **FDwfDigitalCanRateSet**(HDWF hdwf, double hz) || | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | hz – data rate to set. | | ||
| + | |||
| + | |||
| + | | **FDwfDigitalCanPolaritySet**(HDWF hdwf, double fInvert) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | fInvert – 0 normal, 1 invert. | ||
| + | |||
| + | | **FDwfDigitalCanTxSet**(HDWF hdwf, int idxChannel) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – DIO channel to use for TX. | | ||
| + | |||
| + | | **FDwfDigitalCanRxSet**(HDWF hdwf, int idxChannel) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – DIO channel to use for RX. | | ||
| + | |||
| + | | **FDwfDigitalCanTx**(HDWF hdwf, int vID, int fExtended, int fRemote, int cDLC, unsigned char *rgTX) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | vID – identifier. | ||
| + | | ::: | fExtended – 0 base frame, 1 extended frame; 11- or 29-bit identifier. | ||
| + | | ::: | fRemote – 0 data frame, 1 remote request. | ||
| + | | ::: | gTX - array of data bytes to send. | | ||
| + | |||
| + | | **FDwfDigitalCanRx**(HDWF hdwf, int *pvID, int *pfExtended, | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | pvID – pointer to return the identifier. | ||
| + | | ::: | pfExtended - pointer to return the extended bit value. | ||
| + | | ::: | pfRemote – pointer to return the remote bit value. | ||
| + | | ::: | pcDLC – pointer to return the data length code. | | ||
| + | | ::: | rgRX – poiter to array to return the data bytes | | ||
| + | | ::: | cRX - the maximum number of data bytes to receive, rgRX buffer size | | ||
| + | | ::: | pvStatus – pointer to return the function status: | ||
| + | |||
| + | |||
| + | ---- | ||
| + | |||
| + | |||
| + | ====== 13. Devices | ||
| + | |||
| + | ==== 13.1. Electronics Explorer ==== | ||
| + | |||
| + | The Electronics Explorer has nine AnalogIO channels. The master enable validates the power supplies and reference voltages. | ||
| + | |||
| + | ^ **Channel** | ||
| + | | 0 | | Vcc | Fixed Supply | ||
| + | | | 0 | Enable | ||
| + | | | 1 | Voltage | ||
| + | | | 2 | Current | ||
| + | | 1 | | VP+ | Positive supply | ||
| + | | | 0 | Enable | ||
| + | | | 1 | Voltage | ||
| + | | | 2 | Current | ||
| + | | 2 | | VP- | Negative supply | ||
| + | | | 0 | Enable | ||
| + | | | 1 | Voltage | ||
| + | | | 2 | Current | ||
| + | | 3 | | Ref1 | Voltage Reference 1 | | ||
| + | | | 0 | Enable | ||
| + | | | 1 | Voltage | ||
| + | | 4 | | Ref2 | Voltage Reference 2 | | ||
| + | | | 0 | Enable | ||
| + | | | 1 | Voltage | ||
| + | | 5 | | Vmtr1 | Voltmeter 1 | | ||
| + | | | 0 | Voltage | ||
| + | | 6 | | Vmtr2 | Voltmeter 2 | | ||
| + | | | 0 | Voltage | ||
| + | | 7 | | Vmtr3 | Voltmeter 3 | | ||
| + | | | 0 | Voltage | ||
| + | | 8 | | Vmtr4 | Voltmeter 4 | | ||
| + | | | 0 | Voltage | ||
| + | |||
| + | |||
| + | ==== 13.2. Analog Discovery ==== | ||
| + | |||
| + | The Analog Discovery has four AnalogIO channels. The master enable validates the power supplies. | ||
| + | |||
| + | ^ **Channel** | ||
| + | | 0 | | V+ | Positive supply | ||
| + | | | 0 | Enable | ||
| + | | 1 | | V- | Negative supply | ||
| + | | | 0 | Enable | ||
| + | | 2 | | SYS | USB power monitor | ||
| + | | | 0 | Voltage | ||
| + | | | 1 | Current | ||
| + | | | 2 | Temp | Status returns the device temperature | ||
| + | | 3 | | V+- | Power supply monitor | ||
| + | | | 0 | Voltage | ||
| + | | | 1 | Current | ||
| + | |||
| + | |||
| + | ==== 13.3. Analog Discovery 2 ==== | ||
| + | |||
| + | The Analog Discovery 2 has four AnalogIO channels. The master enable validates the power supplies. | ||
| + | |||
| + | ^ **Channel** | ||
| + | | 0 | | V+ | Positive supply | ||
| + | | | 0 | Enable | ||
| + | | | 1 | Voltage | ||
| + | | 1 | | V- | Negative supply | ||
| + | | | 0 | Enable | ||
| + | | | 1 | Voltage | ||
| + | | 2 | | USB | USB power monitor | ||
| + | | | 0 | Voltage | ||
| + | | | 1 | Current | ||
| + | | | 2 | Temp | Status returns the device temperature | ||
| + | | 3 | | AUX | AUX power monitor | ||
| + | | | 0 | Voltage | ||
| + | | | 1 | Current | ||
| + | |||
| + | |||
| + | ==== 13.4. Digital Discovery ==== | ||
| + | |||
| + | For the DigitalOut and IO functions, and AnalogIO DIOPP/PE the indexing 15:0 refers to DIO39:24. The Digital Discovery has tree AnalogIO channels. The master enable activates the VIO output. | ||
| + | |||
| + | ^ **Channel** | ||
| + | | 0 | 0 | Voltage | ||
| + | | | 1 | DINPP | Configures the week pull for DIN lines with values:\\ 0 down, 0.5 middle, 0.75 up, 1 up\\ See [[test-and-measurement/ | ||
| + | | | 2 | DIOPE | Configure pull enable (1) for DIO 39-24 as bit field set, like:\\ 0x00F1 enables for DIO 31,30,29,28 and 24\\ See [[test-and-measurement/ | ||
| + | | | 3 | DIOPP | Configure pull up/down (1/0) for DIO 39-24 as bit field set | | ||
| + | | | 4 | Drive | Configure drive strength for DIO lines:\\ 0 (auto), 2mA, 4mA, 6mA, 8mA, 12mA, 16mA | | ||
| + | | | 5 | Slew | Configure slew rate for DIO lines:\\ quietio, slow, fast\\ See [[https:// | ||
| + | | | 6 | Frequency | ||
| + | | | | VIO | VIO power monitor\\ See [[test-and-measurement/ | ||
| + | | | 0 | Voltage | ||
| + | | | 1 | Current | ||
| + | | 2 | | USB | USB power monitor | ||
| + | | | 0 | Voltage | ||
| + | | | 1 | Current | ||
| + | |||
| + | |||
| + | ---- | ||
| + | |||
| + | |||
| + | ====== 14. 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, | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | cdDataFree – Pointer to variable to return the available free buffer space, the number of new samples that can be sent. | | ||
| + | | ::: | cdDataLost – Pointer to variable to return the number of lost samples. | ||
| + | | ::: | cdDataCorrupted – Pointer to variable to return the number of samples that could be corrupted. | ||
| + | |||
| + | | **FDwfAnalogOutPlayData**(HDWF hdwf, int idxChannel, double *rgdData, int cdData) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | rgdData – Pointer to samples array to be sent to the device. | ||
| + | | ::: | cdData – Number of samples to send. | | ||
| + | |||
| + | | **FDwfAnalogOutEnableSet**(HDWF hdwf, int idxChannel, int fEnable) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | fEnable – TRUE to enable, FALSE to disable. | ||
| + | |||
| + | | **FDwfAnalogOutEnableGet**(HDWF hdwf, int idxChannel, int *pfEnable) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | pfEnable – Pointer to variable to receive enabled state. | ||
| + | |||
| + | | **FDwfAnalogOutFunctionInfo**(HDWF hdwf, int idxChannel, int *pfsfunc) | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | pfsfunc – Variable to receive the supported generator function options. | ||
| + | | **Description: | ||
| + | |||
| + | ^ **FUNC Constants** | ||
| + | | **funcDC** | ||
| + | | **funcSine** | ||
| + | | **funcSquare** | ||
| + | | **funcTriangle** | ||
| + | | **funcRampUp** | ||
| + | | **funcRampDown** | ||
| + | | **funcNoise** | ||
| + | | **funcCustom** | ||
| + | | **funcPlay** | ||
| + | |||
| + | | **FDwfAnalogOutFunctionSet**(HDWF hdwf, int idxChannel, FUNC func) || | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | func – Generator function option to set. | | ||
| + | |||
| + | | **FDwfAnalogOutFunctionGet**(HDWF hdwf, int idxChannel, FUNC *pfunc) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | ptrigsrc – Pointer to variable to receive the generator function option. | ||
| + | |||
| + | | **FDwfAnalogOutFrequencyInfo**(HDWF hdwf, int idxChannel, double *phzMin, double *phzMax) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | phzMin – Variable to receive the supported minimum frequency. | ||
| + | | ::: | phzMax – Variable to receive the supported maximum frequency. | ||
| + | |||
| + | | **FDwfAnalogOutFrequencySet**(HDWF hdwf, int idxChannel, double hzFrequency) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | hzFrequency – Frequency value to set expressed in Hz. | | ||
| + | |||
| + | | **FDwfAnalogOutFrequencyGet**(HDWF hdwf, int idxChannel, double *phzFrequency) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | hzFrequency – Pointer to variable to receive frequency value in Hz. | | ||
| + | |||
| + | | **FDwfAnalogOutAmplitudeInfo**(HDWF hdwf, int idxChannel, double *pvMin, double *pvMax) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | pvMin – Minimum amplitude level or modulation index. | ||
| + | | ::: | pvMax – Maximal amplitude level or modulation index. | ||
| + | |||
| + | | **FDwfAnalogOutAmplitudeSet**(HDWF hdwf, int idxChannel, double vAmplitude) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | vAmplitude – Amplitude of channel in Volts or modulation index in percentage. | ||
| + | |||
| + | | **FDwfAnalogOutAmplitudeGet**(HDWF hdwf, int idxChannel, double *pvAmplitude) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | pvAmplitude – Pointer to variable to receive amplitude value in Volts or modulation index in percentage. | ||
| + | |||
| + | | **FDwfAnalogOutOffsetInfo**(HDWF hdwf, int idxChannel, double *pvMin, double *pvMax) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | pvMin – Minimum offset voltage or modulation offset percentage. | ||
| + | | ::: | pvMax – Maximum offset voltage or modulation offset percentage. | ||
| + | |||
| + | | **FDwfAnalogOutOffsetSet**(HDWF hdwf, int idxChannel, double vOffset) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | vOffset – Value to set voltage offset in Volts or modulation offset percentage. | ||
| + | |||
| + | | **FDwfAnalogOutOffsetGet**(HDWF hdwf, int idxChannel, double *pvOffset) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | pvOffset – Pointer to variable to receive offset value in Volts or modulation offset percentage. | ||
| + | |||
| + | | **FDwfAnalogOutSymmetryInfo**(HDWF hdwf, int idxChannel, double *ppercentageMin, | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | ppercentageMin – Minimum value of Symmetry percentage. | ||
| + | | ::: | ppercentageMax – Maximum value of Symmetry percentage. | ||
| + | |||
| + | | **FDwfAnalogOutSymmetrySet**(HDWF hdwf, int idxChannel, double percentageSymmetry) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | percentageSymmetry –Value of percentage of Symmetry (duty cycle). | ||
| + | |||
| + | | **FDwfAnalogOutSymmetryGet**(HDWF hdwf, int idxChannel, double *ppercentageSymmetry) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | ppercentageSymmetry –– Pointer to variable to receive value of symmetry (duty cycle). | ||
| + | |||
| + | | **FDwfAnalogOutPhaseInfo**(HDWF hdwf, int idxChannel, double *pdegreeMin, | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | pdegreeMin – Minimum value of Phase (in degrees). | ||
| + | | ::: | pdegreeMax – Maximum value of Phase (in degrees). | ||
| + | |||
| + | | **FDwfAnalogOutPhaseSet**(HDWF hdwf, int idxChannel, double degreePhase) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | degreePhase – Value of Phase in degrees. | ||
| + | |||
| + | | **FDwfAnalogOutPhaseGet**(HDWF hdwf, int idxChannel, double *pdegreePhase) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | pdegreePhase – Pointer to variable to receive Phase value (in degrees). | ||
| + | |||
| + | | **FDwfAnalogOutDataInfo**(HDWF hdwf, int idxChannel, int *pnSamplesMin, | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | pnSamplesMin - Minimum number of samples available for custom data. | | ||
| + | | ::: | pnSamplesMax – Maximum number of samples available for custom data. | | ||
| + | |||
| + | | **FDwfAnalogOutDataSet**(HDWF hdwf, int idxChannel, double *rgdData, int cdData) | ||
| + | | **Description: | ||
| + | | **Parameters: | ||
| + | | ::: | idxChannel – Channel index. | ||
| + | | ::: | rgbData – Buffer of samples to set. | | ||
| + | | ::: | cData – Number of samples to set in rgbData. | ||
| + | |||
| + | ---- | ||
| + | |||
| + | {{tag> | ||

