/**************************************************************************** * * Filename: ps2000aApi.h * Author: MAS * Description: * * This header defines the interface to driver routines for the * PicoScope 2000A and 2000B Series, and 2205 MSO PC Oscilloscopes. * * Copyright � 2010 - 2022 Pico Technology Ltd. All rights reserved. * ****************************************************************************/ #ifndef __PS2000AAPI_H__ #define __PS2000AAPI_H__ #include #include "PicoStatus.h" #ifdef __cplusplus #define PREF0 extern "C" #define TYPE_ENUM #else #define PREF0 #define TYPE_ENUM enum #endif #ifdef WIN32 #ifdef PREF1 #undef PREF1 #endif #ifdef PREF2 #undef PREF2 #endif #ifdef PREF3 #undef PREF3 #endif /* If you are dynamically linking ps2000a.dll into your project #define DYNLINK here */ #ifdef DYNLINK #define PREF1 typedef #define PREF2 #define PREF3(x) (__stdcall *x) #else #define PREF1 #ifdef _USRDLL #define PREF2 __declspec(dllexport) __stdcall #else #define PREF2 __declspec(dllimport) __stdcall #endif #define PREF3(x) x #endif #else /* Define a 64-bit integer type */ #ifdef DYNLINK #define PREF1 typedef #define PREF2 #define PREF3(x) (*x) #else #ifdef _USRDLL #define PREF1 __attribute__((visibility("default"))) #else #define PREF1 #endif #define PREF2 #define PREF3(x) x #endif #define __stdcall #endif /* Depending on the adc; oversample (collect multiple readings at each time) by up to 256. * the results are therefore ALWAYS scaled up to 16-bits, even if * oversampling is not used. * * The maximum and minimum values returned are therefore as follows: */ // covers the PS2208 and PS2208A #define PS2208_MAX_ETS_CYCLES 500 #define PS2208_MAX_INTERLEAVE 20 // covers the PS2207 and PS2207A #define PS2207_MAX_ETS_CYCLES 500 #define PS2207_MAX_INTERLEAVE 20 // covers the PS2206 and PS2206A #define PS2206_MAX_ETS_CYCLES 250 #define PS2206_MAX_INTERLEAVE 10 #define PS2000A_EXT_MAX_VALUE 32767 #define PS2000A_EXT_MIN_VALUE -32767 #define PS2000A_MAX_LOGIC_LEVEL 32767 #define PS2000A_MIN_LOGIC_LEVEL -32767 #define MIN_SIG_GEN_FREQ 0.0f #define MAX_SIG_GEN_FREQ 20000000.0f #define PS2000A_MAX_SIG_GEN_BUFFER_SIZE 8192 #define PS2000A_MIN_SIG_GEN_BUFFER_SIZE 1 #define PS2000A_MIN_DWELL_COUNT 3 #define PS2000A_MAX_SWEEPS_SHOTS ((1 << 30) - 1) #define PS2000A_MAX_ANALOGUE_OFFSET_50MV_200MV 0.250f #define PS2000A_MIN_ANALOGUE_OFFSET_50MV_200MV -0.250f #define PS2000A_MAX_ANALOGUE_OFFSET_500MV_2V 2.500f #define PS2000A_MIN_ANALOGUE_OFFSET_500MV_2V -2.500f #define PS2000A_MAX_ANALOGUE_OFFSET_5V_20V 20.f #define PS2000A_MIN_ANALOGUE_OFFSET_5V_20V -20.f // supported by the PS2206/PS2206A, PS2207/PS2207A, PS2208/PS2208A only #define PS2000A_SHOT_SWEEP_TRIGGER_CONTINUOUS_RUN 0xFFFFFFFF /// /// The analogue channels index /// typedef enum enPS2000AChannelBufferIndex { PS2000A_CHANNEL_A_MAX, PS2000A_CHANNEL_A_MIN, PS2000A_CHANNEL_B_MAX, PS2000A_CHANNEL_B_MIN, PS2000A_CHANNEL_C_MAX, PS2000A_CHANNEL_C_MIN, PS2000A_CHANNEL_D_MAX, PS2000A_CHANNEL_D_MIN, PS2000A_MAX_CHANNEL_BUFFERS } PS2000A_CHANNEL_BUFFER_INDEX; /// /// The analogue channels and trigger channels supported by the devices /// typedef enum enPS2000AChannel { PS2000A_CHANNEL_A, PS2000A_CHANNEL_B, PS2000A_CHANNEL_C, PS2000A_CHANNEL_D, PS2000A_EXTERNAL, PS2000A_MAX_CHANNELS = PS2000A_EXTERNAL, PS2000A_TRIGGER_AUX, PS2000A_MAX_TRIGGER_SOURCES } PS2000A_CHANNEL; /// /// MSO models only. /// Defines how the analgoue and digital triggers are combined. /// typedef enum enPS2000ATriggerOperand { /// /// Ignore the trigger settings /// PS2000A_OPERAND_NONE, /// /// Fire when either trigger is activated. /// PS2000A_OPERAND_OR, /// /// Fire when both triggers are activated /// PS2000A_OPERAND_AND, /// /// Fire when one trigger is activated. /// PS2000A_OPERAND_THEN } PS2000A_TRIGGER_OPERAND; /// /// MSO ports /// typedef enum enPS2000DigitalPort { PS2000A_DIGITAL_PORT0 = 0x80, // digital channel 0 - 7 PS2000A_DIGITAL_PORT1, // digital channel 8 - 15 PS2000A_DIGITAL_PORT2, // digital channel 16 - 23 PS2000A_DIGITAL_PORT3, // digital channel 24 - 31 PS2000A_MAX_DIGITAL_PORTS = (PS2000A_DIGITAL_PORT3 - PS2000A_DIGITAL_PORT0) + 1 } PS2000A_DIGITAL_PORT; /// /// MSO digital channels /// typedef enum enPS2000ADigitalChannel { PS2000A_DIGITAL_CHANNEL_0, PS2000A_DIGITAL_CHANNEL_1, PS2000A_DIGITAL_CHANNEL_2, PS2000A_DIGITAL_CHANNEL_3, PS2000A_DIGITAL_CHANNEL_4, PS2000A_DIGITAL_CHANNEL_5, PS2000A_DIGITAL_CHANNEL_6, PS2000A_DIGITAL_CHANNEL_7, PS2000A_DIGITAL_CHANNEL_8, PS2000A_DIGITAL_CHANNEL_9, PS2000A_DIGITAL_CHANNEL_10, PS2000A_DIGITAL_CHANNEL_11, PS2000A_DIGITAL_CHANNEL_12, PS2000A_DIGITAL_CHANNEL_13, PS2000A_DIGITAL_CHANNEL_14, PS2000A_DIGITAL_CHANNEL_15, PS2000A_DIGITAL_CHANNEL_16, PS2000A_DIGITAL_CHANNEL_17, PS2000A_DIGITAL_CHANNEL_18, PS2000A_DIGITAL_CHANNEL_19, PS2000A_DIGITAL_CHANNEL_20, PS2000A_DIGITAL_CHANNEL_21, PS2000A_DIGITAL_CHANNEL_22, PS2000A_DIGITAL_CHANNEL_23, PS2000A_DIGITAL_CHANNEL_24, PS2000A_DIGITAL_CHANNEL_25, PS2000A_DIGITAL_CHANNEL_26, PS2000A_DIGITAL_CHANNEL_27, PS2000A_DIGITAL_CHANNEL_28, PS2000A_DIGITAL_CHANNEL_29, PS2000A_DIGITAL_CHANNEL_30, PS2000A_DIGITAL_CHANNEL_31, PS2000A_MAX_DIGITAL_CHANNELS } PS2000A_DIGITAL_CHANNEL; /// /// Ranges that the channels are set to: /// Not all ranges are supported by every variant /// typedef enum enPS2000ARange { PS2000A_10MV, PS2000A_20MV, PS2000A_50MV, PS2000A_100MV, PS2000A_200MV, PS2000A_500MV, PS2000A_1V, PS2000A_2V, PS2000A_5V, PS2000A_10V, PS2000A_20V, PS2000A_50V, PS2000A_MAX_RANGES, } PS2000A_RANGE; /// /// Available coupling modes. /// typedef enum enPS2000ACoupling { PS2000A_AC, PS2000A_DC } PS2000A_COUPLING; typedef enum enPS2000AChannelInfo { PS2000A_CI_RANGES, } PS2000A_CHANNEL_INFO; /// /// Ets modes avialable /// typedef enum enPS2000AEtsMode { /// /// disables /// PS2000A_ETS_OFF, /// /// enables ETS and provides etsCycles of data, which may contain data from previously returned cycles. /// PS2000A_ETS_FAST, /// /// enables ETS and provides fresh data every etsCycles. This /// mode takes longer to provide each data set, but the data sets are more stable and /// are guaranteed to contain only new data. /// PS2000A_ETS_SLOW, PS2000A_ETS_MODES_MAX } PS2000A_ETS_MODE; /// /// Time units that the time paramaters are using. /// typedef enum enPS2000ATimeUnits { PS2000A_FS, PS2000A_PS, PS2000A_NS, PS2000A_US, PS2000A_MS, PS2000A_S, PS2000A_MAX_TIME_UNITS, } PS2000A_TIME_UNITS; /// /// whether the frequency will sweep from startFrequency to /// stopFrequency, or in the opposite direction, or repeatedly reverse direction /// typedef enum enPS2000ASweepType { PS2000A_UP, PS2000A_DOWN, PS2000A_UPDOWN, PS2000A_DOWNUP, PS2000A_MAX_SWEEP_TYPES } PS2000A_SWEEP_TYPE; /// /// Built in waveform types /// typedef enum enPS2000AWaveType { PS2000A_SINE, PS2000A_SQUARE, PS2000A_TRIANGLE, PS2000A_RAMP_UP, PS2000A_RAMP_DOWN, PS2000A_SINC, PS2000A_GAUSSIAN, PS2000A_HALF_SINE, PS2000A_DC_VOLTAGE, PS2000A_MAX_WAVE_TYPES } PS2000A_WAVE_TYPE; /// /// The type of waveform to be produced, specified by one of the following /// typedef enum enPS2000AExtraOperations { /// /// Normal signal generator operation specified by wavetype. /// PS2000A_ES_OFF, /// /// The signal generator produces white noise and ignores all settings except pkToPk and offsetVoltage. /// PS2000A_WHITENOISE, /// /// produces a pseudorandom random binary sequence with a bit rate /// specified by the start and stop frequency. /// PS2000A_PRBS // Pseudo-Random Bit Stream } PS2000A_EXTRA_OPERATIONS; #define PS2000A_SINE_MAX_FREQUENCY 1000000.f #define PS2000A_SQUARE_MAX_FREQUENCY 1000000.f #define PS2000A_TRIANGLE_MAX_FREQUENCY 1000000.f #define PS2000A_SINC_MAX_FREQUENCY 1000000.f #define PS2000A_RAMP_MAX_FREQUENCY 1000000.f #define PS2000A_HALF_SINE_MAX_FREQUENCY 1000000.f #define PS2000A_GAUSSIAN_MAX_FREQUENCY 1000000.f #define PS2000A_PRBS_MAX_FREQUENCY 1000000.f #define PS2000A_PRBS_MIN_FREQUENCY 0.03f #define PS2000A_MIN_FREQUENCY 0.03f /// /// The type of trigger that will be applied to the signal generator /// typedef enum enPS2000ASigGenTrigType { /// /// Trigger on rising edge /// PS2000A_SIGGEN_RISING, /// /// Trigger on falling edge /// PS2000A_SIGGEN_FALLING, /// /// Run while trigger is high /// PS2000A_SIGGEN_GATE_HIGH, /// /// Run while trigger is low /// PS2000A_SIGGEN_GATE_LOW } PS2000A_SIGGEN_TRIG_TYPE; /// /// The source that will trigger the signal generator /// typedef enum enPS2000ASigGenTrigSource { /// /// Run without waiting for trigger /// PS2000A_SIGGEN_NONE, /// /// Use scope trigger /// /// Use AUXIO input /// PS2000A_SIGGEN_AUX_IN, /// /// Use external input /// PS2000A_SIGGEN_EXT_IN, /// /// Wait for software trigger /// PS2000A_SIGGEN_SOFT_TRIG } PS2000A_SIGGEN_TRIG_SOURCE; /// /// AWG index modes /// typedef enum enPS2000AIndexMode { /// /// The generator outputs the raw contents of the buffer repeatedly . /// PS2000A_SINGLE, /// /// The generator outputs the contents of the buffer from beginning to end, and then does a second pass in the reverse /// direction through the buffer /// PS2000A_DUAL, /// /// This is similiar to the Dual but passes through the buffer four time inverting, and inverting reversed /// PS2000A_QUAD, PS2000A_MAX_INDEX_MODES } PS2000A_INDEX_MODE; /// /// The number of thershold that will be used for triggering. /// typedef enum enPS2000A_ThresholdMode { PS2000A_LEVEL, PS2000A_WINDOW } PS2000A_THRESHOLD_MODE; /// /// The direction that the signal will pass through the trigger. /// typedef enum enPS2000AThresholdDirection { /// /// For gated triggers: above the upper threshold. /// PS2000A_ABOVE, /// /// For gated triggers: below the upper threshold. /// /// For threshold triggers: rising edge, using upper threshold. /// PS2000A_RISING, /// /// For threshold triggers: falling edge, using upper threshold. /// PS2000A_FALLING, /// /// For threshold triggers: either edge. /// PS2000A_RISING_OR_FALLING, /// /// For gated triggers: above the lower threshold. /// PS2000A_ABOVE_LOWER, /// /// For gated triggers: below the lower threshold. /// PS2000A_BELOW_LOWER, /// /// For threshold triggers: rising edge, using lower threshold. /// PS2000A_RISING_LOWER, /// /// For threshold triggers: falling edge, using lower threshold. /// PS2000A_FALLING_LOWER, /// /// For window-qualified triggers: inside window. /// PS2000A_INSIDE = PS2000A_ABOVE, /// /// For window-qualified triggers: outside window. /// PS2000A_OUTSIDE = PS2000A_BELOW, /// /// For window triggers: entering the window. /// PS2000A_ENTER = PS2000A_RISING, /// /// For window triggers: leaving the window. /// PS2000A_EXIT = PS2000A_FALLING, /// /// For window triggers: either entering or leaving the window. /// PS2000A_ENTER_OR_EXIT = PS2000A_RISING_OR_FALLING, /// /// For window-qualified triggers. /// PS2000A_POSITIVE_RUNT = 9, /// /// For window-qualified triggers. /// PS2000A_NEGATIVE_RUNT, /// /// No trigger. /// PS2000A_NONE = PS2000A_RISING } PS2000A_THRESHOLD_DIRECTION; /// /// Digital channel trigger dirction /// typedef enum enPS2000ADigitalDirection { PS2000A_DIGITAL_DONT_CARE, PS2000A_DIGITAL_DIRECTION_LOW, PS2000A_DIGITAL_DIRECTION_HIGH, PS2000A_DIGITAL_DIRECTION_RISING, PS2000A_DIGITAL_DIRECTION_FALLING, PS2000A_DIGITAL_DIRECTION_RISING_OR_FALLING, PS2000A_DIGITAL_MAX_DIRECTION } PS2000A_DIGITAL_DIRECTION; /// /// The type of condition that should be applied to each channel. /// The channels that are set to True or False must all meet their conditions /// simultaneously to produce a trigger. Channels set to DontCare are ignored. /// typedef enum enPS2000ATriggerState { PS2000A_CONDITION_DONT_CARE, PS2000A_CONDITION_TRUE, PS2000A_CONDITION_FALSE, PS2000A_CONDITION_MAX } PS2000A_TRIGGER_STATE; /// /// A structure of this type is passed to ps2000aSetTriggerChannelConditions in the /// conditions argument to specify the trigger conditions. /// #pragma pack(push,1) typedef struct tPS2000ATriggerConditions { PS2000A_TRIGGER_STATE channelA; PS2000A_TRIGGER_STATE channelB; PS2000A_TRIGGER_STATE channelC; PS2000A_TRIGGER_STATE channelD; PS2000A_TRIGGER_STATE external; PS2000A_TRIGGER_STATE aux; PS2000A_TRIGGER_STATE pulseWidthQualifier; PS2000A_TRIGGER_STATE digital; } PS2000A_TRIGGER_CONDITIONS; #pragma pack(pop) /// /// A structure of this type is passed to ps2000aSetPulseWidthQualifier in the /// conditions argument to specify the trigger conditions. /// Analog-input models only ( for MSOs use PwqConditionsV2) /// #pragma pack(push,1) typedef struct tPS2000APwqConditions { PS2000A_TRIGGER_STATE channelA; PS2000A_TRIGGER_STATE channelB; PS2000A_TRIGGER_STATE channelC; PS2000A_TRIGGER_STATE channelD; PS2000A_TRIGGER_STATE external; PS2000A_TRIGGER_STATE aux; PS2000A_TRIGGER_STATE digital; } PS2000A_PWQ_CONDITIONS; #pragma pack(pop) /// /// A structure of this type is passed to ps2000aSetTriggerChannelDirections in /// the directions argument to specify the trigger direction for a specified source. /// Not all driver series support this method. /// #pragma pack(push,1) typedef struct tPS2000ADigitalChannelDirections { /// /// The channel being configured. Channels supported by series SetChannel for allowable values. /// PS2000A_DIGITAL_CHANNEL channel; /// /// The trigger direction that should be applied to each channel. /// PS2000A_DIGITAL_DIRECTION direction; } PS2000A_DIGITAL_CHANNEL_DIRECTIONS; #pragma pack(pop) /// /// A structure of this type is passed to ps2000aSetTriggerChannelProperties in the /// channelProperties argument to specify the trigger mechanism. /// All values are scaled in 16-bit ADC counts at the currently selected range for that channel. /// #pragma pack(push,1) typedef struct tPS2000ATriggerChannelProperties { /// /// The upper threshold at which the trigger must fire /// int16_t thresholdUpper; /// /// The hysteresis by which the trigger must exceed the upper threshold before it will fire. /// uint16_t thresholdUpperHysteresis; /// /// The lower threshold at which the trigger must fire. /// int16_t thresholdLower; /// /// The hysteresis by which the trigger must exceed the lower threshold before it will fire. /// uint16_t thresholdLowerHysteresis; /// /// The channel to which the properties apply /// PS2000A_CHANNEL channel; /// /// Either a level or window trigger /// PS2000A_THRESHOLD_MODE thresholdMode; } PS2000A_TRIGGER_CHANNEL_PROPERTIES; #pragma pack(pop) /// /// Various methods of data reduction. /// Note that a single call to setting the buffers (ie. ps2000aSetDataBuffer) can only /// associate one buffer with one downsampling mode. If you intend to retrieve more than one /// downsampling mode from the get values functions, you must call set data buffer several /// times to associate a separate buffer with each channel and downsampling mode. /// typedef enum enPS2000ARatioMode { /// /// No downsampling. Returns the raw data values. /// PS2000A_RATIO_MODE_NONE, /// /// Reduces every block of n values to just two values: a minimum and a maximum. /// The minimum and maximum values are returned in two separate buffers. /// PS2000A_RATIO_MODE_AGGREGATE = 1, /// /// Reduces every block of n values to a single value representing the /// average (arithmetic mean) of all the values. /// PS2000A_RATIO_MODE_DECIMATE = 2, /// /// Reduces every block of n values to just the first value in the block, /// discarding all the other values. /// PS2000A_RATIO_MODE_AVERAGE = 4, } PS2000A_RATIO_MODE; /// /// The pulse-width type. /// typedef enum enPS2000APulseWidthType { /// /// Do not use the pulse width qualifier /// PS2000A_PW_TYPE_NONE, /// /// Pulse width less than lower pulse width counter /// PS2000A_PW_TYPE_LESS_THAN, /// /// Pulse width greater than lower pulse width counter /// PS2000A_PW_TYPE_GREATER_THAN, /// /// Pulse width between lower and upper pulsee width counter /// PS2000A_PW_TYPE_IN_RANGE, /// /// Pulse width not between lower and upper pulse width counter /// PS2000A_PW_TYPE_OUT_OF_RANGE } PS2000A_PULSE_WIDTH_TYPE; typedef enum enPS2000AHoldOffType { PS2000A_TIME, PS2000A_MAX_HOLDOFF_TYPE } PS2000A_HOLDOFF_TYPE; #pragma pack(push,1) typedef struct tPS2000AScalingFactors { PS2000A_CHANNEL channelOrPort; PS2000A_RANGE range; int16_t offset; double scalingFactor; }PS2000A_SCALING_FACTORS_VALUES; #pragma pack(pop) /// /// This callback function is part of your application. You register it with the ps3000a /// driver using series RunBlock, and the driver calls it back when block-mode data is /// ready. You can then download the data using series GetValues. /// /// Device identifier returned by OpenUnit. /// Indicates whether an error occurred during collection of the data. /// A void pointer passed from series RunBlock. Your callback function can write to this /// location to send any data, such as a status flag, back to your application. typedef void (__stdcall *ps2000aBlockReady) ( int16_t handle, PICO_STATUS status, void * pParameter ); /// /// This callback function is part of your application. You register it with the driver using /// series GetStreamingLatestValues, and the driver calls it back when streaming- mode data is /// ready. You can then download the data using the series GetValuesAsync function. /// /// Device identifier returned by OpenUnit. /// The number of samples available. /// An index to the first valid sample in the buffer. This is /// the buffer that was previously passed to series SetDataBuffer. /// Returns a set of flags that indicate whether an overvoltage has occurred /// on any of the channels.It is a bit pattern with bit 0 denoting Channel. /// An index to the buffer indicating the location of the trigger point relative /// to startIndex.This parameter is valid only when triggered is non-zero. /// A flag indicating whether a trigger occurred. If non-zero, /// a trigger occurred at the location indicated by triggerAt. /// The flag that was set in the call to series RunStreaming. /// a void pointer passed from series GetStreamingLatestValues. /// The callback function can write to this locatio. typedef void (__stdcall *ps2000aStreamingReady) ( int16_t handle, int32_t noOfSamples, uint32_t startIndex, int16_t overflow, uint32_t triggerAt, int16_t triggered, int16_t autoStop, void * pParameter ); /// /// This is a callback function that you write to collect data from the driver. You supply a /// pointer to the function when you call ps3000aGetValuesAsync, and the driver calls /// your function back when the data is ready. /// /// Device identifier returned by OpenUnit. /// Indicates whether an error occurred during collection of the data. /// the number of samples collected. /// A set of flags that indicates whether an overvoltage has /// occurred and on which channels.It is a bit field with bit 0 representing Channel A. /// A void pointer passed from ps3000aGetValuesAsync. The callback function can /// write to this location to send any data, such as a status flag, back to the application. /// The data type is defined by the application programmer. typedef void (__stdcall *ps2000aDataReady) ( int16_t handle, PICO_STATUS status, uint32_t noOfSamples, int16_t overflow, void * pParameter ); /// /// This function opens a PicoScope 2000 Series (A API) scope attached to the computer. /// The maximum number of units that can be opened depends on the operating system, the kernel driver and the computer. /// /// on exit, the result of the attempt to open a scope: /// -1 : if the scope fails to open /// 0 : if no scope is found /// > 0 : a number that uniquely identifies the scope /// If a valid handle is returned, it must be used in all subsequent calls /// to API functions to identify this scope. /// on entry, a null-terminated string containing the serial /// number of the scope to be opened.If serial is NULL then the /// function opens the first scope found; otherwise, it tries to open the /// scope that matches the string. /// /// PICO_OK /// PICO_OS_NOT_SUPPORTED /// PICO_OPEN_OPERATION_IN_PROGRESS /// PICO_EEPROM_CORRUPT /// PICO_KERNEL_DRIVER_TOO_OLD /// PICO_FPGA_FAIL /// PICO_MEMORY_CLOCK_FREQUENCY /// PICO_FW_FAIL /// PICO_MAX_UNITS_OPENED /// PICO_NOT_FOUND(if the specified unit was not found) /// PICO_NOT_RESPONDING /// PICO_MEMORY_FAIL /// PICO_ANALOG_BOARD /// PICO_CONFIG_FAIL_AWG /// PICO_INITIALISE_FPGA /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aOpenUnit) ( int16_t * handle, int8_t * serial ); /// /// This function opens a scope without blocking the calling thread. You can find out when /// it has finished by periodically calling ps2000aOpenUnitProgress until that function /// returns a non - zero value. /// /// a status code: /// 0 if the open operation was disallowed because another open /// operation is in progress. 1 if the open operation was successfully. /// see ps2000aOpenUnit. /// /// PICO_OK /// PICO_OPEN_OPERATION_IN_PROGRESS /// PICO_OPERATION_FAILED /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aOpenUnitAsync) ( int16_t * status, int8_t * serial ); /// /// This function checks on the progress of a request made to ps2000aOpenUnitAsync to /// open a scope. /// /// This handle is valid only if the function returns PICO_OK. /// On exit, the percentage progress towards /// opening the scope. 100% implies that the open operation is complete. /// Set to 1 when the open operation has finished. /// /// PICO_OK /// PICO_NULL_PARAMETER /// PICO_OPERATION_FAILED /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aOpenUnitProgress) ( int16_t * handle, int16_t * progressPercent, int16_t * complete ); /// /// This function retrieves information about the specified oscilloscope. If the device fails /// to open, or no device is opened only the driver version is available. /// /// device identifier returned by ps2000aOpenUnit. If an invalid /// handle is passed, only the driver versions can be read. /// On exit, the unit information string selected specified by /// the info argument.If string is NULL, only requiredSize is returned. /// The maximum number of chars that may be written to string. /// On exit, the required length of the string array. /// a number specifying what information is required. /// The possible values are listed in the table below. /// /// PICO_OK /// PICO_INVALID_HANDLE /// PICO_NULL_PARAMETER /// PICO_INVALID_INFO /// PICO_INFO_UNAVAILABLE /// PICO_DRIVER_FUNCTION /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aGetUnitInfo) ( int16_t handle, int8_t * string, int16_t stringLength, int16_t * requiredSize, PICO_INFO info ); /// /// This function flashes the LED on the front of the scope without blocking the calling /// thread.Calls to ps2000aRunStreaming and ps2000aRunBlock cancel any flashing /// started by this function.It is not possible to set the LED to be constantly illuminated, /// as this state is used to indicate that the scope has not been initialized. /// /// Device identifier returned by ps2000aOpenUnit. /// the action required: /// < 0 : flash the LED indefinitely /// 0 : stop the LED flashing /// > 0 : flash the LED start times.If the LED is already flashing /// on entry to this function, the flash count will be reset to start. /// /// PICO_OK /// PICO_HANDLE_INVALID /// PICO_BUSY /// PICO_DRIVER_FUNCTION /// PICO_NOT_RESPONDING /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aFlashLed) ( int16_t handle, int16_t start ); /// /// This function shuts down an oscilloscope. /// /// Device identifier returned by ps2000aOpenUnit. /// /// PICO_OK /// PICO_HANDLE_INVALID /// PICO_USER_CALLBACK /// PICO_DRIVER_FUNCTION /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aCloseUnit) ( int16_t handle ); /// /// This function sets the number of memory segments that the scope will use. When the scope is opened, /// the number of segments defaults to 1, meaning that each capture fills the scope's available memory. /// This function allows you to divide the memory into a number of segments so that the scope can /// store several waveforms sequentially. /// /// Device identifier returned by ps2000aOpenUnit. /// The number of segments required, from 1 to ps2000aGetMaxSegments. /// on exit, the number of samples available in each segment.This is /// the total number over all channels, so if more than one channel is in use then the number /// of samples available to each channel is nMaxSamples divided by the number of channels. /// /// PICO_OK /// PICO_USER_CALLBACK /// PICO_INVALID_HANDLE /// PICO_TOO_MANY_SEGMENTS /// PICO_MEMORY /// PICO_DRIVER_FUNCTION /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aMemorySegments) ( int16_t handle, uint32_t nSegments, int32_t * nMaxSamples ); /// /// This function specifies whether an input channel is to be enabled, its input coupling /// type, voltage range, analog offset. /// /// Device identifier returned by ps2000aOpenUnit. /// , the channel to be configured. The values are: /// PS2000A_CHANNEL_A: Channel A input /// PS2000A_CHANNEL_B : Channel B input /// PS2000A_CHANNEL_C : Channel C input /// PS2000A_CHANNEL_D : Channel D input /// Whether or not to enable the channel. The values are: /// TRUE: enable /// FALSE : do not enable /// the impedance and coupling type. The values are: /// PS2000A_AC: 1 megohm impedance, AC coupling.The channel accepts input frequencies /// from about 1 hertz up to its maximum analog bandwidth. /// PS2000A_DC: 1 megohm impedance, DC coupling.The channel accepts all input frequencies /// from zero(DC) up to its maximum analog bandwidth. /// The input voltage range. /// a voltage to add to the input channel before digitization. /// The allowable range of offsets can be obtained from ps2000aGetAnalogueOffset and depends /// on the input range selected for the channel.This argument is ignored if the device is a /// PicoScope 2205 MSO. /// /// PICO_OK /// PICO_USER_CALLBACK /// PICO_INVALID_HANDLE /// PICO_INVALID_CHANNEL /// PICO_INVALID_VOLTAGE_RANGE /// PICO_INVALID_COUPLING /// PICO_INVALID_ANALOGUE_OFFSET /// PICO_DRIVER_FUNCTION /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aSetChannel) ( int16_t handle, PS2000A_CHANNEL channel, int16_t enabled, PS2000A_COUPLING type, PS2000A_RANGE range, float analogOffset ); /// /// This function is used to enable the digital ports of an MSO and set the logic level (the /// voltage point at which the state transitions from 0 to 1). /// /// Device identifier returned by ps2000aOpenUnit. /// the digital port to be configured: /// PS2000A_DIGITAL_PORT0 = 0x80 (D0 to D7) /// PS2000A_DIGITAL_PORT1 = 0x81 (D8 to D15) /// Whether or not to enable the channel. The values are: /// TRUE: enable /// FALSE : do not enable /// The logic threshold voltage. Range: �32767 (�5 V) to 32767 (5 V). /// /// PICO_OK /// PICO_INVALID_HANDLE /// PICO_INVALID_CHANNEL /// PICO_RATIO_MODE_NOT_SUPPORTED /// PICO_SEGMENT_OUT_OF_RANGE /// PICO_DRIVER_FUNCTION /// PICO_INVALID_PARAMETER /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aSetDigitalPort) ( int16_t handle, PS2000A_DIGITAL_PORT port, int16_t enabled, int16_t logicLevel ); /// /// This function sets the number of captures to be collected in one run of rapid block /// mode.If you do not call this function before a run, the driver will capture only one /// waveform.Once a value has been set, the value remains constant unless changed. /// /// Device identifier returned by ps2000aOpenUnit. /// The number of waveforms to capture in one run. /// /// PICO_OK /// PICO_INVALID_HANDLE /// PICO_INVALID_PARAMETER /// PICO_DRIVER_FUNCTION /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aSetNoOfCaptures) ( int16_t handle, uint32_t nCaptures ); /// /// This function calculates the sampling rate and maximum number of samples for a /// given timebase under the specified conditions.The result will depend on the number of /// channels enabled by the last call to ps2000aSetChannel. /// /// This function is provided for use with programming languages that do not support the /// float data type.The value returned in the timeIntervalNanoseconds argument is /// restricted to integers.If your programming language supports the float type, we /// recommend that you use ps2000aGetTimebase2 instead. /// /// To use ps2000aGetTimebase or ps2000aGetTimebase2, first estimate the timebase /// number that you require using the information in the timebase guide.Next, call one of /// these functions with the timebase that you have just chosen and verify that the /// timeIntervalNanoseconds argument that the function returns is the value that you /// require.You may need to iterate this process until you obtain the time interval that you need. /// /// Device identifier returned by ps2000aOpenUnit. /// The timebase guide. /// The number of samples required. /// On exit, the time interval between readings at the /// selected timebase.Use NULL if not required.In ETS mode this argument is not valid; /// use the sample time returned by ps2000aSetEts. /// Not used. /// On exit, the maximum number of samples available. The scope allocates /// a certain amount of memory for internal overheads and this may vary depending on the number of /// segments, number of channels enabled, and the timebase chosen.Use NULL if not required. /// The index of the memory segment to use. /// /// /// PICO_OK /// PICO_INVALID_HANDLE /// PICO_TOO_MANY_SAMPLES /// PICO_INVALID_CHANNEL /// PICO_INVALID_TIMEBASE /// PICO_INVALID_PARAMETER /// PICO_SEGMENT_OUT_OF_RANGE /// PICO_DRIVER_FUNCTION /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aGetTimebase) ( int16_t handle, uint32_t timebase, int32_t noSamples, int32_t * timeIntervalNanoseconds, int16_t oversample, int32_t * maxSamples, uint32_t segmentIndex ); /// /// This function is an upgraded version of ps2000aGetTimebase, and returns the time /// interval as a float rather than a long.This allows it to return sub - nanosecond time /// intervals.See ps2000aGetTimebase for a full description. /// /// Device identifier returned by ps2000aOpenUnit. /// The timebase guide. /// The number of samples required. /// A pointer to the time interval between readings at /// the selected timebase.If a null pointer is passed, the parameter will be ignored. /// Not used. /// On exit, the maximum number of samples available. The scope allocates /// a certain amount of memory for internal overheads and this may vary depending on the number of /// segments, number of channels enabled, and the timebase chosen.Use NULL if not required. /// The index of the memory segment to use. /// /// PICO_OK /// PICO_INVALID_HANDLE /// PICO_TOO_MANY_SAMPLES /// PICO_INVALID_CHANNEL /// PICO_INVALID_TIMEBASE /// PICO_INVALID_PARAMETER /// PICO_SEGMENT_OUT_OF_RANGE /// PICO_DRIVER_FUNCTION /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aGetTimebase2) ( int16_t handle, uint32_t timebase, int32_t noSamples, float * timeIntervalNanoseconds, int16_t oversample, int32_t * maxSamples, uint32_t segmentIndex ); /// /// This function programs the signal generator to produce an arbitrary waveform. The arbitrary waveform /// generator uses direct digital synthesis (DDS). It maintains a 32 - bit phase accumulator that /// indicates the present location in the waveform.The top bits of the phase accumulator are used as /// an index into a buffer containing the arbitrary waveform.The remaining bits act as the fractional /// part of the index, enabling high - resolution control of output frequency and allowing the /// generation of lower frequencies. /// /// The phase accumulator initially increments by startDeltaPhase.If the AWG is set to sweep mode, the /// phase increment is increased at specified intervals until it reaches stopDeltaPhase. The easiest way /// to obtain the values of startDeltaPhase and stopDeltaPhase necessary to generate the desired frequency /// is to call ps2000aSigGenFrequencyToPhase. /// /// Device identifier returned by ps2000aOpenUnit. /// The voltage offset, in microvolts, to be applied to the waveform. /// The peak-to-peak voltage, in microvolts, of the waveform signal. /// The initial value added to the phase accumulator as the generator /// begins to step through the waveform buffer.Calculate this value from the information above, or use /// ps2000aSigGenFrequencyToPhase. /// The final value added to the phase accumulator before the generator /// restarts or reverses the sweep.When frequency sweeping is not required, set equal to startDeltaPhase. /// the amount added to the delta phase value every time the dwellCount /// period expires.This determines the amount by which the generator sweeps the output frequency in each /// dwell period.When frequency sweeping is not required, set to zero. /// the time, in multiples of ddsPeriod, between successive additions of /// deltaPhaseIncrement to the delta phase accumulator.This determines the rate at which the generator /// sweeps the output frequency.Minimum value : PS2000A_MIN_DWELL_COUNT. /// A buffer that holds the waveform pattern as a set of samples equally /// spaced in time.Each sample is scaled to an output voltage as follows: /// /// vOUT = 1 �V *(pkToPk / 2) *(sample_value / 32767) + offsetVoltage /// /// and clipped to the overall �2 V range of the AWG. /// the size of the arbitrary waveform buffer, in samples, in the range: /// [minArbitraryWaveformSize, maxArbitraryWaveformSize] where minArbitraryWaveformSize and /// maxArbitraryWaveformSize are the values returned by ps2000aSigGenArbitraryMinMaxValues. /// , determines whether the startDeltaPhase is swept up to the stopDeltaPhase, /// or down to it, or repeatedly swept up and down. /// The type of waveform to be produced. /// Specifies how the signal will be formed from the arbitrary waveform data. /// Single and dual index modes are possible. /// 0: sweep the frequency as specified by sweeps /// 1...PS2000A_MAX_SWEEPS_SHOTS: the number of cycles of the waveform to be /// produced after a trigger event.sweeps must be zero. /// PS2000A_SHOT_SWEEP_TRIGGER_CONTINUOUS_RUN : start and run continuously after trigger /// occurs(not PicoScope 2205 MSO). /// 0: produce number of cycles specified by shots /// 1..PS2000A_MAX_SWEEPS_SHOTS: the number of times to sweep the frequency after a trigger event, /// according to sweepType.shots must be zero. /// PS2000A_SHOT_SWEEP_TRIGGER_CONTINUOUS_RUN: start a sweep and continue after trigger /// occurs(not PicoScope 2205 MSO). /// The type of trigger that will be applied to the signal generator. /// The source that will trigger the signal generator. /// If a trigger source other than P2000A_SIGGEN_NONE is specified, then either shots or sweeps, /// but not both, must be non - zero. /// Trigger level, in ADC counts, for external trigger. /// /// PICO_OK /// PICO_AWG_NOT_SUPPORTED /// PICO_BUSY /// PICO_INVALID_HANDLE /// PICO_SIG_GEN_PARAM /// PICO_SHOTS_SWEEPS_WARNING /// PICO_NOT_RESPONDING /// PICO_WARNING_EXT_THRESHOLD_CONFLICT /// PICO_NO_SIGNAL_GENERATOR /// PICO_SIGGEN_OFFSET_VOLTAGE /// PICO_SIGGEN_PK_TO_PK /// PICO_SIGGEN_OUTPUT_OVER_VOLTAGE /// PICO_DRIVER_FUNCTION /// PICO_SIGGEN_WAVEFORM_SETUP_FAILED /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aSetSigGenArbitrary) ( int16_t handle, int32_t offsetVoltage, uint32_t pkToPk, uint32_t startDeltaPhase, uint32_t stopDeltaPhase, uint32_t deltaPhaseIncrement, uint32_t dwellCount, int16_t * arbitraryWaveform, int32_t arbitraryWaveformSize, PS2000A_SWEEP_TYPE sweepType, PS2000A_EXTRA_OPERATIONS operation, PS2000A_INDEX_MODE indexMode, uint32_t shots, uint32_t sweeps, PS2000A_SIGGEN_TRIG_TYPE triggerType, PS2000A_SIGGEN_TRIG_SOURCE triggerSource, int16_t extInThreshold ); /// /// This function sets up the signal generator to produce a signal from a list of built-in /// waveforms.If different start and stop frequencies are specified, the device will sweep /// either up, down, or up and down. /// /// Device identifier returned by ps2000aOpenUnit. /// The voltage offset, in microvolts, to be applied to the waveform /// The peak-to-peak voltage, in microvolts, of the waveform signal. /// /// Note: if the signal voltages described by the combination of offsetVoltage and pkToPk /// extend outside the voltage range of the signal generator, the output waveform will be clipped. /// The type of waveform to be generated. /// The frequency that the signal generator will initially produce. See /// #defines above. /// The frequency at which the sweep reverses direction or returns to /// the initial frequency. /// The amount of frequency increase or decrease in sweep mode. /// The time for which the sweep stays at each frequency, in seconds. /// whether the frequency will sweep from startFrequency to stopFrequency, /// or in the opposite direction, or repeatedly reverse direction. /// the type of waveform to be produced, specified by one of the following /// enumerated types : /// PS2000A_ES_OFF, normal signal generator operation specified by waveType.PS2000A_WHITENOISE, /// the signal generator produces white noise and ignores all settings except pkToPk and offsetVoltage. /// PS2000A_PRBS, produces a random bitstream with a bit rate specified by the start and stop /// frequency(not available on PicoScope 2205 MSO). /// 0: sweep the frequency as specified by sweeps /// 1...PS2000A_MAX_SWEEPS_SHOTS: the number of cycles of the waveform to be /// produced after a trigger event.sweeps must be zero. /// PS2000A_SHOT_SWEEP_TRIGGER_CONTINUOUS_RUN : start and run continuously after trigger /// occurs(not PicoScope 2205 MSO)./param> /// 0: produce number of cycles specified by shots /// 1..PS2000A_MAX_SWEEPS_SHOTS: the number of times to sweep the frequency after a trigger event, /// according to sweepType.shots must be zero. /// PS2000A_SHOT_SWEEP_TRIGGER_CONTINUOUS_RUN: start a sweep and continue after trigger /// occurs(not PicoScope 2205 MSO). /// The type of trigger that will be applied to the signal generator. /// The source that will trigger the signal generator. /// If a trigger source other than P2000A_SIGGEN_NONE is specified, then either shots or sweeps, /// but not both, must be non - zero. /// Trigger level, in ADC counts, for external trigger. /// /// PICO_OK /// PICO_BUSY /// PICO_INVALID_HANDLE /// PICO_SIG_GEN_PARAM /// PICO_SHOTS_SWEEPS_WARNING /// PICO_NOT_RESPONDING /// PICO_WARNING_AUX_OUTPUT_CONFLICT /// PICO_WARNING_EXT_THRESHOLD_CONFLICT /// PICO_NO_SIGNAL_GENERATOR /// PICO_SIGGEN_OFFSET_VOLTAGE /// PICO_SIGGEN_PK_TO_PK /// PICO_SIGGEN_OUTPUT_OVER_VOLTAGE /// PICO_DRIVER_FUNCTION /// PICO_SIGGEN_WAVEFORM_SETUP_FAILED /// PICO_NOT_RESPONDING /// PREF0 PREF1 PICO_STATUS PREF2 PREF3(ps2000aSetSigGenBuiltIn) ( int16_t handle, int32_t offsetVoltage, uint32_t pkToPk, int16_t waveType, float startFrequency, float stopFrequency, float increment, float dwellTime, PS2000A_SWEEP_TYPE sweepType, PS2000A_EXTRA_OPERATIONS operation, uint32_t shots, uint32_t sweeps, PS2000A_SIGGEN_TRIG_TYPE triggerType, PS2000A_SIGGEN_TRIG_SOURCE triggerSource, int16_t extInThreshold ); /// /// This function sets up the signal generator. It differs from ps2000SetSigGenBuiltIn in /// having double - precision arguments instead of floats, giving greater resolution when /// setting the output frequency. /// /// Device identifier returned by ps2000aOpenUnit. /// The voltage offset, in microvolts, to be applied to the waveform. /// The peak-to-peak voltage, in microvolts, of the waveform signal. /// /// Note: if the signal voltages described by the combination of offsetVoltage and pkToPk /// extend outside the voltage range of the signal generator, the output waveform will be clipped. /// The type of waveform to be generated. /// The frequency that the signal generator will initially produce. See /// #defines above. /// The frequency at which the sweep reverses direction or returns to /// the initial frequency. /// The amount of frequency increase or decrease in sweep mode. /// The time for which the sweep stays at each frequency, in seconds. /// whether the frequency will sweep from startFrequency to stopFrequency, /// or in the opposite direction, or repeatedly reverse direction. /// the type of waveform to be produced, specified by one of the following /// enumerated types : /// PS2000A_ES_OFF, normal signal generator operation specified by waveType.PS2000A_WHITENOISE, /// the signal generator produces white noise and ignores all settings except pkToPk and offsetVoltage. /// PS2000A_PRBS, produces a random bitstream with a bit rate specified by the start and stop /// frequency(not available on PicoScope 2205 MSO). /// 0: sweep the frequency as specified by sweeps /// 1...PS2000A_MAX_SWEEPS_SHOTS: the number of cycles of the waveform to be /// produced after a trigger event.sweeps must be zero. /// PS2000A_SHOT_SWEEP_TRIGGER_CONTINUOUS_RUN : start and run continuously after trigger /// occurs(not PicoScope 2205 MSO). /// 0: produce number of cycles specified by shots /// 1..PS2000A_MAX_SWEEPS_SHOTS: the number of times to sweep the frequency after a trigger event, /// according to sweepType.shots must be zero. /// PS2000A_SHOT_SWEEP_TRIGGER_CONTINUOUS_RUN: start a sweep and continue after trigger /// occurs(not PicoScope 2205 MSO). /// The type of trigger that will be applied to the signal generator. /// The source that will trigger the signal generator. /// If a trigger source other than P2000A_SIGGEN_NONE is specified, then either shots or sweeps, /// but not both, must be non - zero. /// Trigger level, in ADC counts, for external trigger. /// /// PICO_OK /// PICO_BUSY /// PICO_INVALID_HANDLE /// PICO_SIG_GEN_PARAM /// PICO_SHOTS_SWEEPS_WARNING /// PICO_NOT_RESPONDING /// PICO_WARNING_AUX_OUTPUT_CONFLICT /// PICO_WARNING_EXT_THRESHOLD_CONFLICT /// PICO_NO_SIGNAL_GENERATOR /// PICO_SIGGEN_OFFSET_VOLTAGE /// PICO_SIGGEN_PK_TO_PK /// PICO_SIGGEN_OUTPUT_OVER_VOLTAGE /// PICO_DRIVER_FUNCTION /// PICO_SIGGEN_WAVEFORM_SETUP_FAILED /// PICO_NOT_RESPONDING /// PREF0 PREF1 PICO_STATUS PREF2 PREF3(ps2000aSetSigGenBuiltInV2) ( int16_t handle, int32_t offsetVoltage, uint32_t pkToPk, int16_t waveType, double startFrequency, double stopFrequency, double increment, double dwellTime, PS2000A_SWEEP_TYPE sweepType, PS2000A_EXTRA_OPERATIONS operation, uint32_t shots, uint32_t sweeps, PS2000A_SIGGEN_TRIG_TYPE triggerType, PS2000A_SIGGEN_TRIG_SOURCE triggerSource, int16_t extInThreshold ); /// /// This function reprograms the arbitrary waveform generator. All values can be reprogrammed while /// the signal generator is waiting for a trigger. /// /// Device identifier returned by ps2000aOpenUnit. /// The initial value added to the phase accumulator as the generator /// begins to step through the waveform buffer.Calculate this value from the information above, or use /// ps2000aSigGenFrequencyToPhase. /// The final value added to the phase accumulator before the generator /// restarts or reverses the sweep.When frequency sweeping is not required, set equal to startDeltaPhase. /// the amount added to the delta phase value every time the dwellCount /// period expires.This determines the amount by which the generator sweeps the output frequency in each /// dwell period.When frequency sweeping is not required, set to zero. /// the time, in multiples of ddsPeriod, between successive additions of /// deltaPhaseIncrement to the delta phase accumulator.This determines the rate at which the generator /// sweeps the output frequency.Minimum value : PS2000A_MIN_DWELL_COUNT. /// A buffer that holds the waveform pattern as a set of samples equally /// spaced in time.Each sample is scaled to an output voltage as follows: /// /// vOUT = 1 �V *(pkToPk / 2) *(sample_value / 32767) + offsetVoltage /// /// and clipped to the overall �2 V range of the AWG. /// the size of the arbitrary waveform buffer, in samples, in the range: /// [minArbitraryWaveformSize, maxArbitraryWaveformSize] where minArbitraryWaveformSize and /// maxArbitraryWaveformSize are the values returned by ps2000aSigGenArbitraryMinMaxValues. /// , determines whether the startDeltaPhase is swept up to the stopDeltaPhase, /// or down to it, or repeatedly swept up and down. /// The type of waveform to be produced. /// Specifies how the signal will be formed from the arbitrary waveform data. /// Single and dual index modes are possible. /// 0: sweep the frequency as specified by sweeps /// 1...PS2000A_MAX_SWEEPS_SHOTS: the number of cycles of the waveform to be /// produced after a trigger event.sweeps must be zero. /// PS2000A_SHOT_SWEEP_TRIGGER_CONTINUOUS_RUN : start and run continuously after trigger /// occurs(not PicoScope 2205 MSO). /// 0: produce number of cycles specified by shots /// 1..PS2000A_MAX_SWEEPS_SHOTS: the number of times to sweep the frequency after a trigger event, /// according to sweepType.shots must be zero. /// PS2000A_SHOT_SWEEP_TRIGGER_CONTINUOUS_RUN: start a sweep and continue after trigger /// occurs(not PicoScope 2205 MSO). /// The type of trigger that will be applied to the signal generator. /// The source that will trigger the signal generator. /// If a trigger source other than P2000A_SIGGEN_NONE is specified, then either shots or sweeps, /// but not both, must be non - zero. /// Trigger level, in ADC counts, for external trigger. /// /// PICO_OK if successful /// PICO_INVALID_HANDLE /// PICO_NO_SIGNAL_GENERATOR /// PICO_DRIVER_FUNCTION /// PICO_AWG_NOT_SUPPORTED /// PICO_SIGGEN_OFFSET_VOLTAGE /// PICO_SIGGEN_PK_TO_PK /// PICO_SIGGEN_OUTPUT_OVER_VOLTAGE /// PICO_SIG_GEN_PARAM /// PICO_SHOTS_SWEEPS_WARNING /// PICO_WARNING_EXT_THRESHOLD_CONFLICT /// PICO_BUSY /// PICO_SIGGEN_WAVEFORM_SETUP_FAILED /// PICO_NOT_RESPONDING /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aSetSigGenPropertiesArbitrary) ( int16_t handle, uint32_t startDeltaPhase, uint32_t stopDeltaPhase, uint32_t deltaPhaseIncrement, uint32_t dwellCount, PS2000A_SWEEP_TYPE sweepType, uint32_t shots, uint32_t sweeps, PS2000A_SIGGEN_TRIG_TYPE triggerType, PS2000A_SIGGEN_TRIG_SOURCE triggerSource, int16_t extInThreshold ); /// /// This function reprograms the signal generator. Values can be changed while the signal /// generator is waiting for a trigger. /// /// Device identifier returned by ps2000aOpenUnit. /// The frequency that the signal generator will initially produce. See /// #defines above. /// The frequency at which the sweep reverses direction or returns to /// the initial frequency. /// The amount of frequency increase or decrease in sweep mode. /// The time for which the sweep stays at each frequency, in seconds. /// whether the frequency will sweep from startFrequency to stopFrequency, /// or in the opposite direction, or repeatedly reverse direction. /// the type of waveform to be produced, specified by one of the following /// enumerated types : /// PS2000A_ES_OFF, normal signal generator operation specified by waveType.PS2000A_WHITENOISE, /// the signal generator produces white noise and ignores all settings except pkToPk and offsetVoltage. /// PS2000A_PRBS, produces a random bitstream with a bit rate specified by the start and stop /// frequency(not available on PicoScope 2205 MSO). /// 0: sweep the frequency as specified by sweeps /// 1...PS2000A_MAX_SWEEPS_SHOTS: the number of cycles of the waveform to be /// produced after a trigger event.sweeps must be zero. /// PS2000A_SHOT_SWEEP_TRIGGER_CONTINUOUS_RUN : start and run continuously after trigger /// occurs(not PicoScope 2205 MSO). /// 0: produce number of cycles specified by shots /// 1..PS2000A_MAX_SWEEPS_SHOTS: the number of times to sweep the frequency after a trigger event, /// according to sweepType.shots must be zero. /// PS2000A_SHOT_SWEEP_TRIGGER_CONTINUOUS_RUN: start a sweep and continue after trigger /// occurs(not PicoScope 2205 MSO). /// The type of trigger that will be applied to the signal generator. /// The source that will trigger the signal generator. /// If a trigger source other than P2000A_SIGGEN_NONE is specified, then either shots or sweeps, /// but not both, must be non - zero. /// Trigger level, in ADC counts, for external trigger. /// /// PICO_OK if successful /// PICO_INVALID_HANDLE /// PICO_NO_SIGNAL_GENERATOR /// PICO_DRIVER_FUNCTION /// PICO_WARNING_EXT_THRESHOLD_CONFLICT /// PICO_SIGGEN_OFFSET_VOLTAGE /// PICO_SIGGEN_PK_TO_PK /// PICO_SIGGEN_OUTPUT_OVER_VOLTAGE /// PICO_SIG_GEN_PARAM /// PICO_SHOTS_SWEEPS_WARNING /// PICO_WARNING_EXT_THRESHOLD_CONFLICT /// PICO_BUSY /// PICO_SIGGEN_WAVEFORM_SETUP_FAILED /// PICO_NOT_RESPONDING /// PREF0 PREF1 PICO_STATUS PREF2 PREF3(ps2000aSetSigGenPropertiesBuiltIn) ( int16_t handle, double startFrequency, double stopFrequency, double increment, double dwellTime, PS2000A_SWEEP_TYPE sweepType, uint32_t shots, uint32_t sweeps, PS2000A_SIGGEN_TRIG_TYPE triggerType, PS2000A_SIGGEN_TRIG_SOURCE triggerSource, int16_t extInThreshold ); /// /// This function converts a frequency to a phase count for use with the arbitrary waveform /// generator setup functions ps2000aSetSigGenArbitrary and ps2000aSetSigGenPropertiesArbitrary. /// The value returned depends on the length of the buffer, the index mode passed and the device model. /// /// Device identifier returned by ps2000aOpenUnit. /// The required AWG output frequency. /// See AWG index modes. /// The number of samples in the AWG buffer. /// On exit, the deltaPhase argument to be sent to the AWG setup function. /// /// PICO_OK /// PICO_NOT_SUPPORTED_BY_THIS_DEVICE, if the device does not have an AWG. /// PICO_SIGGEN_FREQUENCY_OUT_OF_RANGE, if the frequency is out of range. /// PICO_NULL_PARAMETER, if phase is a NULL pointer. /// PICO_SIG_GEN_PARAM, if indexMode or bufferLength is out of range. /// PICO_INVALID_HANDLE /// PICO_DRIVER_FUNCTION /// PREF0 PREF1 PICO_STATUS PREF2 PREF3(ps2000aSigGenFrequencyToPhase) ( int16_t handle, double frequency, PS2000A_INDEX_MODE indexMode, uint32_t bufferLength, uint32_t * phase ); /// /// This function returns the range of possible sample values and waveform buffer sizes /// that can be supplied to ps2000aSetSigGenArbitrary for setting up the arbitrary /// waveform generator(AWG).These values may vary between models. /// /// Device identifier returned by ps2000aOpenUnit. /// On exit, the lowest sample value allowed in the /// arbitraryWaveform buffer supplied to ps2000aSetChannelInfoSigGenArbitrary. /// On exit, the highest sample value allowed in the /// arbitraryWaveform buffer supplied to ps2000aSetSigGenArbitrary. /// On exit, the minimum value allowed for the /// arbitraryWaveformSize argument supplied to ps2000aSetSigGenArbitrary. /// On exit, the maximum value allowed for the /// arbitraryWaveformSize argument supplied to ps2000aSetSigGenArbitrary. /// /// PICO_OK /// PICO_NOT_SUPPORTED_BY_THIS_DEVICE, if the device does not have an arbitrary waveform generator. /// PICO_NULL_PARAMETER, if all the parameter pointers are NULL. /// PICO_INVALID_HANDLE /// PICO_DRIVER_FUNCTION /// PREF0 PREF1 PICO_STATUS PREF2 PREF3(ps2000aSigGenArbitraryMinMaxValues) ( int16_t handle, int16_t * minArbitraryWaveformValue, int16_t * maxArbitraryWaveformValue, uint32_t * minArbitraryWaveformSize, uint32_t * maxArbitraryWaveformSize ); /// /// This function causes a trigger event, or starts and stops gating. Use it as follows: /// 1. Call ps2000aSetSigGenBuiltIn or ps2000aSetSigGenArbitrary to set up the signal generator, /// setting the triggerSource argument to SIGGEN_SOFT_TRIG. /// 2. (a)If you set the signal generator triggerType to edge triggering (PS2000A_SIGGEN_RISING or /// PS2000A_SIGGEN_FALLING), call ps2000aSigGenSoftwareControl once to trigger a capture. /// (b)If you set the signal generator triggerType to gated triggering (PS2000A_SIGGEN_GATE_HIGH /// or PS2000A_SIGGEN_GATE_LOW), call ps2000aSigGenSoftwareControl with state set to 0 to start /// capture, and then again with state set to 1 to stop capture. /// /// Device identifier returned by ps2000aOpenUnit. /// specifies whether to start or stop capture. Effective only when the signal /// generator triggerType is set to SIGGEN_GATE_HIGH or SIGGEN_GATE_LOW.Ignored for other trigger types. /// 0: to start capture /// <> 0 : to stop /// /// PICO_OK /// PICO_INVALID_HANDLE /// PICO_NO_SIGNAL_GENERATOR /// PICO_SIGGEN_TRIGGER_SOURCE /// PICO_DRIVER_FUNCTION /// PICO_NOT_RESPONDING /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aSigGenSoftwareControl) ( int16_t handle, int16_t state ); /// /// This function is used to enable or disable ETS (equivalent-time sampling) and to set /// the ETS parameters.See ETS overview for an explanation of ETS mode. /// /// Device identifier returned by ps2000aOpenUnit. /// The ETS mode. /// the number of cycles to store: the computer can then select etsInterleave /// cycles to give the most uniform spread of samples.Range: between two and five times the value of /// etsInterleave, and not more than the appropriate MAX_ETS_CYCLES constant: /// see #defines above. /// the number of waveforms to combine into a single ETS capture. /// see #defines above for Maximum value. /// on exit, the effective sampling interval of the ETS data. /// For example, if the captured sample time is 4 ns and etsInterleave is 10, then the effective /// sample time in ETS mode is 400 ps. /// /// PICO_OK /// PICO_USER_CALLBACK /// PICO_INVALID_HANDLE /// PICO_INVALID_PARAMETER /// PICO_DRIVER_FUNCTION /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aSetEts) ( int16_t handle, PS2000A_ETS_MODE mode, int16_t etsCycles, int16_t etsInterleave, int32_t * sampleTimePicoseconds ); /// /// This function simplifies arming the trigger. It supports only the LEVEL trigger types /// and does not allow more than one channel to have a trigger applied to it.Any previous /// pulse width qualifier is canceled. /// /// Device identifier returned by ps2000aOpenUnit. /// Zero to disable the trigger, any non-zero value to set the trigger. /// The channel on which to trigger. /// The ADC count at which the trigger will fire. /// The direction in which the signal must move to cause a trigger. /// The time between the trigger occurring and the first sample being taken. /// For example, if delay = 100 then the scope would wait 100 sample periods before sampling. /// the number of milliseconds the device will wait if no trigger occurs. /// If this is set to zero, the scope device will wait indefinitely for a trigger. /// /// PICO_OK /// PICO_INVALID_CHANNEL /// PICO_INVALID_PARAMETER /// PICO_MEMORY /// PICO_CONDITIONS /// PICO_INVALID_HANDLE /// PICO_USER_CALLBACK /// PICO_DRIVER_FUNCTION /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aSetSimpleTrigger) ( int16_t handle, int16_t enable, PS2000A_CHANNEL source, int16_t threshold, PS2000A_THRESHOLD_DIRECTION direction, uint32_t delay, int16_t autoTrigger_ms ); /// /// This function will set the individual Digital channels trigger directions. Each trigger /// direction consists of a channel name and a direction.If the channel is not included in /// the array of PS2000A_DIGITAL_CHANNEL_DIRECTIONS the driver assumes the digital /// channel's trigger direction is PS2000A_DIGITAL_DONT_CARE. /// /// Device identifier returned by ps2000aOpenUnit. /// a pointer to an array of PS2000A_DIGITAL_CHANNEL_DIRECTIONS /// structures describing the requested properties.The array can contain a single element /// describing the properties of one channel, or a number of elements describing several /// digital channels.If directions is NULL, digital triggering is switched off.A digital /// channel that is not included in the array will be set to PS2000A_DIGITAL_DONT_CARE. /// The number of digital channel directions being passed to the driver. /// /// PICO_OK /// PICO_INVALID_HANDLE /// PICO_DRIVER_FUNCTION /// PICO_INVALID_DIGITAL_CHANNEL /// PICO_INVALID_DIGITAL_TRIGGER_DIRECTION /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aSetTriggerDigitalPortProperties) ( int16_t handle, PS2000A_DIGITAL_CHANNEL_DIRECTIONS * directions, int16_t nDirections ); /// /// Mixed-signal (MSO) models in this series have two independent triggers, one for the /// analog input channels and another for the digital inputs.This function defines how the /// two triggers are combined. /// /// Device identifier returned by ps2000aOpenUnit. /// How the analogue and digital triggers will interact with each other. /// /// PICO_OK /// PICO_INVALID_HANDLE /// PICO_DRIVER_FUNCTION /// PICO_NOT_USED /// PICO_INVALID_PARAMETER /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aSetDigitalAnalogTriggerOperand) ( int16_t handle, PS2000A_TRIGGER_OPERAND operand ); /// /// This function will set the individual digital channels' pulse-width trigger directions. /// Each trigger direction consists of a channel name and a direction. If the channel is not /// included in the array of PS2000A_DIGITAL_CHANNEL_DIRECTIONS the driver assumes the digital /// channel's pulse-width trigger direction is PS2000A_DIGITAL_DONT_CARE. /// /// Device identifier returned by ps2000aOpenUnit. /// A pointer to an array of PS2000A_DIGITAL_CHANNEL_DIRECTIONS structures /// describing the requested properties.The array can contain a single element describing the /// properties of one channel, or a number of elements describing several digital channels. /// If directions is NULL, digital pulse - width triggering is switched off. A digital channel that /// is not included in the array will be set to PS2000A_DIGITAL_DONT_CARE. /// the number of digital channel directions being passed to the driver. /// /// PICO_OK /// PICO_INVALID_HANDLE /// PICO_DRIVER_FUNCTION /// PICO_INVALID_DIGITAL_CHANNEL /// PICO_INVALID_DIGITAL_TRIGGER_DIRECTION /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aSetPulseWidthDigitalPortProperties) ( int16_t handle, PS2000A_DIGITAL_CHANNEL_DIRECTIONS *directions, int16_t nDirections ); /// /// This function is used to enable or disable triggering and set its parameters. /// /// Device identifier returned by ps2000aOpenUnit. /// A pointer to an array of PS2000A_TRIGGER_CHANNEL_PROPERTIES /// structures describing the requested properties.The array can contain a single element /// describing the properties of one channel, or a number of elements describing several channels. /// If NULL is passed, triggering is switched off. /// The size of the channelProperties array. If zero, triggering /// is switched off. /// Not used. /// The time in milliseconds for which the scope device will /// wait before collecting data if no trigger event occurs.If this is set to zero, the scope /// device will wait indefinitely for a trigger. /// /// PICO_OK /// PICO_INVALID_HANDLE /// PICO_USER_CALLBACK /// PICO_TRIGGER_ERROR /// PICO_MEMORY /// PICO_INVALID_TRIGGER_PROPERTY /// PICO_DRIVER_FUNCTION /// PICO_INVALID_PARAMETER /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aSetTriggerChannelProperties) ( int16_t handle, PS2000A_TRIGGER_CHANNEL_PROPERTIES * channelProperties, int16_t nChannelProperties, int16_t auxOutputEnable, int32_t autoTriggerMilliseconds ); /// /// This function sets up trigger conditions on the scope's inputs. The trigger is defined by /// one or more PS2000A_TRIGGER_CONDITIONS structures that are then ORed together. Each structure /// is itself the AND of the states of one or more of the inputs.This AND - OR logic allows /// you to create any possible Boolean function of the scope's inputs. /// /// If complex triggering is not required, use ps2000aSetSimpleTrigger. /// /// Device identifier returned by ps2000aOpenUnit. /// An array of PS2000A_TRIGGER_CONDITIONS structures specifying the /// conditions that should be applied to each channel. In the simplest case, the array consists /// of a single element.When there is more than one element, the overall trigger condition is /// the logical OR of all the elements. /// The number of elements in the conditions array. If nConditions is zero /// then triggering is switched. /// /// PICO_OK /// PICO_INVALID_HANDLE /// PICO_USER_CALLBACK /// PICO_CONDITIONS /// PICO_MEMORY /// PICO_DRIVER_FUNCTION /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aSetTriggerChannelConditions) ( int16_t handle, PS2000A_TRIGGER_CONDITIONS * conditions, int16_t nConditions ); /// /// This function sets the direction of the trigger for each channel. /// /// If using a level trigger in conjunction with a pulse - width trigger, see the /// description of the direction argument to ps2000aSetPulseWidthQualifier for more information. /// /// Device identifier returned by ps2000aOpenUnit. /// The direction in which the signal must pass through the threshold /// to activate the trigger. /// The direction in which the signal must pass through the threshold /// to activate the trigger. /// The direction in which the signal must pass through the threshold /// to activate the trigger. Four channel variants only. /// The direction in which the signal must pass through the threshold /// to activate the trigger. Four channel variants only. /// The direction in which the signal must pass through the threshold /// to activate the trigger. /// Not used. /// /// PICO_OK /// PICO_INVALID_HANDLE /// PICO_USER_CALLBACK /// PICO_INVALID_PARAMETER /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aSetTriggerChannelDirections) ( int16_t handle, PS2000A_THRESHOLD_DIRECTION channelA, PS2000A_THRESHOLD_DIRECTION channelB, PS2000A_THRESHOLD_DIRECTION channelC, PS2000A_THRESHOLD_DIRECTION channelD, PS2000A_THRESHOLD_DIRECTION ext, PS2000A_THRESHOLD_DIRECTION aux ); /// /// This function sets the post-trigger delay, which causes capture to start a defined time /// after the trigger event. /// /// Device identifier returned by ps2000aOpenUnit. /// The time between the trigger occurring and the first sample. For example, /// if delay=100 then the scope would wait 100 sample periods before sampling.At a timebase of /// 1GS/s, or 1ns per sample, the total delay would then be 100 x 1 ns = 100 ns.Range: /// 0 to MAX_DELAY_COUNT. /// /// PICO_OK /// PICO_INVALID_HANDLE /// PICO_USER_CALLBACK /// PICO_DRIVER_FUNCTION /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aSetTriggerDelay) ( int16_t handle, uint32_t delay ); /// /// This function sets up the conditions for pulse width qualification, which is used with /// either threshold triggering, level triggering or window triggering to produce /// time - qualified triggers. /// /// Device identifier returned by ps2000aOpenUnit. /// This function sets up the conditions for pulse width qualification, /// which is used with either threshold triggering, level triggering or window triggering to /// produce time - qualified triggers. /// The number of elements in the conditions array. If nConditions is /// zero then the pulse-width qualifier is not used. Range: /// 0 to PS2000A_MAX_PULSE_WIDTH_QUALIFIER_COUNT. /// the direction of the signal required for the pulse width trigger to /// fire.See PS2000A_THRESHOLD_DIRECTION constants for the list of possible values.Each channel /// of the oscilloscope(except the EXT input) has two thresholds for each direction�for example, /// PS2000A_RISING and PS2000A_RISING_LOWER � so that one can be used for the pulse - width /// qualifier and the other for the level trigger.The driver will not let you use the same /// threshold for both triggers; so, for example, you cannot use PS2000A_RISING as the direction /// argument for both ps2000aSetTriggerConditions and ps2000aSetPulseWidthQualifier at the same /// time. There is no such restriction when using window triggers. /// The lower limit of the pulse-width counter, measured in sample periods. /// The upper limit of the pulse-width counter, measured in sample periods. /// This parameter is used only when the type is set to PS2000A_PW_TYPE_IN_RANGE or /// PS2000A_PW_TYPE_OUT_OF_RANGE. /// The pulse-width type. /// /// PICO_OK /// PICO_INVALID_HANDLE /// PICO_USER_CALLBACK /// PICO_DRIVER_FUNCTION /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aSetPulseWidthQualifier) ( int16_t handle, PS2000A_PWQ_CONDITIONS * conditions, int16_t nConditions, PS2000A_THRESHOLD_DIRECTION direction, uint32_t lower, uint32_t upper, PS2000A_PULSE_WIDTH_TYPE type ); /// /// This function discovers whether a trigger, or pulse width triggering, is enabled. /// /// Device identifier returned by ps2000aOpenUnit. /// on exit, indicates whether the trigger will successfully /// be set when ps2000aRunBlock or ps2000aRunStreaming is called.A non - zero value indicates /// that the trigger is set, zero that the trigger is not set. /// on exit, indicates whether the pulse width /// qualifier will successfully be set when ps2000aRunBlock or ps2000aRunStreaming is /// called.A non - zero value indicates that the pulse width qualifier is set, zero that /// the pulse width qualifier is not set. /// /// PICO_OK /// PICO_INVALID_HANDLE /// PICO_NULL_PARAMETER /// PICO_DRIVER_FUNCTION /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aIsTriggerOrPulseWidthQualifierEnabled) ( int16_t handle, int16_t * triggerEnabled, int16_t * pulseWidthQualifierEnabled ); /// /// This function gets the time, as two 4-byte values, at which the trigger occurred. Call it /// after block - mode data has been captured or when data has been retrieved from a /// previous block - mode capture.A 64 - bit version of this function, /// ps2000aGetTriggerTimeOffset64, is also available. /// /// Device identifier returned by ps2000aOpenUnit. /// on exit, the upper 32 bits of the time at which the trigger point occurred. /// on exit, the lower 32 bits of the time at which the trigger point occurred. /// returns the time units in which timeUpper and timeLower are measured. /// the number of the memory segment for which the information is required. /// /// PICO_OK /// PICO_INVALID_HANDLE /// PICO_DEVICE_SAMPLING /// PICO_SEGMENT_OUT_OF_RANGE /// PICO_NOT_USED_IN_THIS_CAPTURE_MODE /// PICO_NOT_RESPONDING /// PICO_NULL_PARAMETER /// PICO_NO_SAMPLES_AVAILABLE /// PICO_DRIVER_FUNCTION /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aGetTriggerTimeOffset) ( int16_t handle, uint32_t * timeUpper, uint32_t * timeLower, PS2000A_TIME_UNITS * timeUnits, uint32_t segmentIndex ); /// /// This function gets the time, as a single 64-bit value, at which the trigger occurred. Call /// it after block - mode data has been captured or when data has been retrieved from a /// previous block - mode capture.A 32 - bit version of this function, ps2000aGetTriggerTimeOffset, /// is also available. /// /// Device identifier returned by ps2000aOpenUnit. /// On exit, the time at which the trigger point occurred. /// On exit, the time units in which time is measured. /// Yhe number of the memory segment for which the information is required. /// /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aGetTriggerTimeOffset64) ( int16_t handle, int64_t * time, PS2000A_TIME_UNITS * timeUnits, uint32_t segmentIndex ); /// /// This function retrieves the time offsets, as lower and upper 32-bit values, for /// waveforms obtained in rapid block mode.The time offset of a waveform is the delay /// from the trigger sampling instant to the time at which the driver estimates the /// waveform to have crossed the trigger threshold.You can add this offset to the time of /// each sample in the waveform to reduce trigger jitter.Without using the time offset, /// trigger jitter can be up to 1 sample period; adding the time offset reduces jitter to a /// small fraction of a sample period.This function is provided for use in programming /// environments that do not support 64 - bit integers.If your programming environment /// supports this data type, it is easier to use ps2000aGetValuesTriggerTimeOffsetBulk64. /// /// Device identifier returned by ps2000aOpenUnit. /// An array of integers. On exit, the most significant 32 /// bits of the time offset for each requested segment index.times[0] will hold the /// fromSegmentIndex time offset and the last times index will hold the toSegmentIndex /// time offset.The array must be long enough to hold the number of requested times. /// An array of integers. On exit, the least significant 32 bits /// of the time offset for each requested segment index.times[0] will hold the /// fromSegmentIndex time offset and the last times index will hold the toSegmentIndex /// time offset.The array size must be long enough to hold the number of requested times. /// An array of integers. The array must be long enough to hold /// the number of requested times.On exit, timeUnits[0] will contain the time unit for /// fromSegmentIndex and the last element will contain the time unit for toSegmentIndex. /// Refer to ps2000aGetTriggerTimeOffset for allowable values. /// The first segment for which the time offset is required /// The last segment for which the time offset is required. /// If toSegmentIndex is less than fromSegmentIndex then the driver will wrap around /// from the last segment to the first. /// /// PICO_OK /// PICO_INVALID_HANDLE /// PICO_NOT_USED_IN_THIS_CAPTURE_MODE /// PICO_NOT_RESPONDING /// PICO_NULL_PARAMETER /// PICO_DEVICE_SAMPLING /// PICO_SEGMENT_OUT_OF_RANGE /// PICO_NO_SAMPLES_AVAILABLE /// PICO_DRIVER_FUNCTION /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aGetValuesTriggerTimeOffsetBulk) ( int16_t handle, uint32_t * timesUpper, uint32_t * timesLower, PS2000A_TIME_UNITS * timeUnits, uint32_t fromSegmentIndex, uint32_t toSegmentIndex ); /// /// This function retrieves the 64-bit time offsets for waveforms captured in rapid block mode. /// A 32 - bit version of this function, ps2000aGetValuesTriggerTimeOffsetBulk, is available /// for use with programming languages that do not support 64 - bit integers. /// /// Device identifier returned by ps2000aOpenUnit. /// an array of integers. On exit, this will hold the time offset /// for each requested segment index.times[0] will hold the time offset for fromSegmentIndex, /// and the last times index will hold the time offset for toSegmentIndex.The array must be /// long enough to hold the number of times requested. /// an array of integers long enough to hold the number of requested /// times.timeUnits[0] will contain the time unit for fromSegmentIndex, and the last element /// will contain the toSegmentIndex. Refer to ps2000aGetTriggerTimeOffset64 for specific /// figures. /// the first segment for which the time offset is required. /// The results for this segment will be placed in times[0] and timeUnits[0]. /// the last segment for which the time offset is required. /// The results for this segment will be placed in the last elements of the times and /// timeUnits arrays.If toSegmentIndex is less than fromSegmentIndex then the driver /// will wrap around from the last segment to the first. /// /// PICO_OK /// PICO_INVALID_HANDLE /// PICO_NOT_USED_IN_THIS_CAPTURE_MODE /// PICO_NOT_RESPONDING /// PICO_NULL_PARAMETER /// PICO_DEVICE_SAMPLING /// PICO_SEGMENT_OUT_OF_RANGE /// PICO_NO_SAMPLES_AVAILABLE /// PICO_DRIVER_FUNCTION /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aGetValuesTriggerTimeOffsetBulk64) ( int16_t handle, int64_t * times, PS2000A_TIME_UNITS * timeUnits, uint32_t fromSegmentIndex, uint32_t toSegmentIndex ); /// /// This function sets the number of captures to be collected in one run of rapid block /// mode. If you do not call this function before a run, the driver will capture only one /// waveform. Once a value has been set, the value remains constant unless changed. /// /// Device identifier returned by ps2000aOpenUnit. /// the number of waveforms to capture in one run. /// /// PICO_OK /// PICO_INVALID_HANDLE /// PICO_INVALID_PARAMETER /// PICO_DRIVER_FUNCTION /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aGetNoOfCaptures) ( int16_t handle, uint32_t * nCaptures ); /// /// This function finds out how many captures in rapid block mode have been processed /// after ps2000aRunBlock has been called when either the collection completed or the /// collection of waveforms was interrupted by calling ps2000aStop.The returned value /// (nCaptures) can then be used to iterate through the number of segments using /// ps2000aGetValues, or in a single call to ps2000aGetValuesBulk where it is used to /// calculate the toSegmentIndex parameter. /// /// Device identifier returned by ps2000aOpenUnit. /// Output: the number of available captures that has /// been collected from calling ps2000aRunBlock. /// /// PICO_OK /// PICO_DRIVER_FUNCTION /// PICO_INVALID_HANDLE /// PICO_NO_SAMPLES_AVAILABLE /// PICO_NULL_PARAMETER /// PICO_INVALID_PARAMETER /// PICO_SEGMENT_OUT_OF_RANGE /// PICO_TOO_MANY_SAMPLES /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aGetNoOfProcessedCaptures) ( int16_t handle, uint32_t * nProcessedCaptures ); /// /// This function tells the driver where to store the data, either unprocessed or /// downsampled, that will be returned after the next call to one of the GetValues /// functions.The function allows you to specify only a single buffer, so for aggregation /// mode, which requires two buffers, you need to call ps2000aSetDataBuffers instead. /// /// You must allocate memory for the buffer before calling this function. /// /// Device identifier returned by ps2000aOpenUnit. /// The analogue channel you want to use with the buffer. /// To set the buffer for a digital port (MSO models only), use one of these values : /// PS2000A_DIGITAL_PORT0 = 0x80 /// PS2000A_DIGITAL_PORT1 = 0x81 /// The location of the buffer. /// The size of the buffer array. /// The number of the memory segment to be used. /// The downsampling mode. See PS2000A_RATIO_MODE for the available modes. /// /// PICO_OK /// PICO_INVALID_HANDLE /// PICO_INVALID_CHANNEL /// PICO_RATIO_MODE_NOT_SUPPORTED /// PICO_SEGMENT_OUT_OF_RANGE /// PICO_DRIVER_FUNCTION /// PICO_INVALID_PARAMETER /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aSetDataBuffer) ( int16_t handle, int32_t channelOrPort, int16_t * buffer, int32_t bufferLth, uint32_t segmentIndex, PS2000A_RATIO_MODE mode ); /// /// This function tells the driver the location of one or two buffers for receiving data. You /// need to allocate memory for the buffers before calling this function.If you do not need /// two buffers, because you are not using aggregate mode, you can optionally use /// ps2000aSetDataBuffer instead. /// /// Device identifier returned by ps2000aOpenUnit. /// The analogue channel you want to use with the buffer. /// To set the buffer for a digital port (MSO models only), use one of these values : /// PS2000A_DIGITAL_PORT0 = 0x80 /// PS2000A_DIGITAL_PORT1 = 0x81 /// A buffer to receive the maximum data values in aggregation mode, /// or the non - aggregated values otherwise. /// A buffer to receive the minimum aggregated data values. Not used /// in other downsampling modes. /// The size of the buffer array. /// The number of the memory segment to be used. /// The downsampling mode. See PS2000A_RATIO_MODE for the available modes. /// /// PICO_OK /// PICO_INVALID_HANDLE /// PICO_INVALID_CHANNEL /// PICO_RATIO_MODE_NOT_SUPPORTED /// PICO_SEGMENT_OUT_OF_RANGE /// PICO_DRIVER_FUNCTION /// PICO_INVALID_PARAMETER /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aSetDataBuffers) ( int16_t handle, int32_t channelOrPort, int16_t * bufferMax, int16_t * bufferMin, int32_t bufferLth, uint32_t segmentIndex, PS2000A_RATIO_MODE mode ); PREF0 PREF1 PICO_STATUS PREF2 PREF3(ps2000aSetUnscaledDataBuffers) ( int16_t handle, PS2000A_CHANNEL channelOrPort, int8_t *bufferMax, int8_t *bufferMin, int32_t bufferLth, uint32_t segmentIndex, PS2000A_RATIO_MODE mode ); /// /// This function tells the driver where to find your application's ETS time buffers. These /// buffers contain the 64 - bit timing information for each ETS sample after you run a /// block - mode ETS capture. /// /// Device identifier returned by ps2000aOpenUnit. /// An array of 64-bit words, each representing the time in /// femtoseconds(10^-15s) at which the sample was captured. /// The size of the buffer array. /// /// PICO_OK /// PICO_INVALID_HANDLE /// PICO_NULL_PARAMETER /// PICO_DRIVER_FUNCTION /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aSetEtsTimeBuffer) ( int16_t handle, int64_t * buffer, int32_t bufferLth ); /// /// This function tells the driver where to find your application's ETS time buffers. These /// buffers contain the timing information for each ETS sample after you run a block - mode /// ETS capture.There are two buffers containing the upper and lower 32 - bit parts of the /// timing information, to allow programming languages that do not support 64 - bit data to /// retrieve the timings. /// If your programming language supports 64 - bit data then you can use ps2000aSetEtsTimeBuffer /// instead. /// /// Device identifier returned by ps2000aOpenUnit. /// An array of 32-bit words, each representing the upper /// 32 bits of the time in femtoseconds(10^�15s) at which the sample was captured. /// An array of 32-bit words, each representing the lower /// 32 bits of the time in femtoseconds(10^�15s) at which the sample was captured. /// The size of the timeUpper and timeLower arrays. /// /// PICO_OK /// PICO_INVALID_HANDLE /// PICO_NULL_PARAMETER /// PICO_DRIVER_FUNCTION /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aSetEtsTimeBuffers) ( int16_t handle, uint32_t * timeUpper, uint32_t * timeLower, int32_t bufferLth ); /// /// This function may be used instead of a callback function to receive data from /// ps2000aRunBlock.To use this method, pass a NULL pointer as the lpReady argument /// to ps2000aRunBlock.You must then poll the driver to see if it has finished collecting /// the requested samples. /// /// Device identifier returned by ps2000aOpenUnit. /// Output: indicates the state of the collection. If zero, the /// device is still collecting.If non - zero, the device has finished collecting and /// ps2000aGetValues can be used to retrieve the data. /// /// PICO_OK /// PICO_INVALID_HANDLE /// PICO_DRIVER_FUNCTION /// PICO_NULL_PARAMETER /// PICO_NO_SAMPLES_AVAILABLE /// PICO_CANCELLED /// PICO_NOT_RESPONDING /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aIsReady) ( int16_t handle, int16_t * ready ); /// /// This function starts collecting data in block mode. For a step-by-step guide to this /// process, see Using block mode.The number of samples is determined by noOfPreTriggerSamples /// and noOfPostTriggerSamples(see below for details).The total number of samples must /// not be more than the size of the segment referred to by segmentIndex. /// /// Device identifier returned by ps2000aOpenUnit. /// The number of samples to store before the trigger event. /// The number of samples to store after the trigger event. /// Note: the maximum number of samples returned is always noOfPreTriggerSamples + /// noOfPostTriggerSamples. This is true even if no trigger event has been set. /// A number in the range 0 to 2 32�1.See the guide to calculating timebase /// values.This argument is ignore. /// Not used. /// On exit, the time, in milliseconds, that the scope will spend /// collecting samples.This does not include any auto trigger timeout. It is not valid in ETS /// capture mode.The pointer can be set to null if a value is not required. /// Zero-based, which memory segment to use. /// A pointer to the ps2000aBlockReady callback function that the driver /// will call when the data has been collected.To use the ps2000aIsReady polling method instead /// of a callback function, set this pointer to NULL. /// a void pointer that is passed to the ps2000aBlockReady callback /// function.The callback can use this pointer to return arbitrary data to the application. /// /// PICO_OK /// PICO_BUFFERS_NOT_SET(in Overlapped mode) /// PICO_INVALID_HANDLE /// PICO_USER_CALLBACK /// PICO_SEGMENT_OUT_OF_RANGE /// PICO_INVALID_CHANNEL /// PICO_INVALID_TRIGGER_CHANNEL /// PICO_INVALID_CONDITION_CHANNEL /// PICO_TOO_MANY_SAMPLES /// PICO_INVALID_TIMEBASE /// PICO_NOT_RESPONDING /// PICO_CONFIG_FAIL /// PICO_INVALID_PARAMETER /// PICO_NOT_RESPONDING /// PICO_TRIGGER_ERROR /// PICO_DRIVER_FUNCTION /// PICO_FW_FAIL /// PICO_NOT_ENOUGH_SEGMENTS(in Bulk mode) /// PICO_PULSE_WIDTH_QUALIFIER /// PICO_SEGMENT_OUT_OF_RANGE(in Overlapped mode) /// PICO_STARTINDEX_INVALID(in Overlapped mode) /// PICO_INVALID_SAMPLERATIO(in Overlapped mode) /// PICO_CONFIG_FAIL /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aRunBlock) ( int16_t handle, int32_t noOfPreTriggerSamples, int32_t noOfPostTriggerSamples, uint32_t timebase, int16_t oversample, int32_t * timeIndisposedMs, uint32_t segmentIndex, ps2000aBlockReady lpReady, void * pParameter ); /// /// This function tells the oscilloscope to start collecting data in streaming mode. When /// data has been collected from the device it is downsampled if necessary and then /// delivered to the application.Call ps2000aGetStreamingLatestValues to retrieve the /// data. See Using streaming mode for a step - by - step guide to this process.When a /// trigger is set, the total number of samples stored in the driver is the sum of /// maxPreTriggerSamples and maxPostTriggerSamples.If autoStop is false, this will /// become the maximum number of samples without downsampling. /// /// Device identifier returned by ps2000aOpenUnit. /// On entry, the requested time interval between samples; on exit, the actual /// time interval used. /// The maximum number of raw samples before a trigger event for each enabled /// channel.If no trigger condition is set this argument is ignored. /// The maximum number of raw samples after a trigger event for each enabled channel. /// If no trigger condition is set, this argument states the maximum number of samples to be stored. /// A flag that specifies if the streaming should stop when all of maxSamples /// have been captured. /// A flag that specifies if the streaming should stop when all of maxSamples have /// been captured. /// The downsampling factor that will be applied to the raw data. /// See PS2000A_RATIO_MODE for available modes. /// The size of the overview buffers. These are temporary buffers used for storing /// the data before returning it to the application.The size is the same as the bufferLth value passed /// to ps2000aSetDataBuffer. /// /// PICO_OK /// PICO_INVALID_HANDLE /// PICO_ETS_MODE_SET /// PICO_USER_CALLBACK /// PICO_NULL_PARAMETER /// PICO_INVALID_PARAMETER /// PICO_STREAMING_FAILED /// PICO_NOT_RESPONDING /// PICO_TRIGGER_ERROR /// PICO_INVALID_SAMPLE_INTERVAL /// PICO_INVALID_BUFFER /// PICO_DRIVER_FUNCTION /// PICO_FW_FAIL /// PICO_MEMORY /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aRunStreaming) ( int16_t handle, uint32_t * sampleInterval, PS2000A_TIME_UNITS sampleIntervalTimeUnits, uint32_t maxPreTriggerSamples, uint32_t maxPostPreTriggerSamples, int16_t autoStop, uint32_t downSampleRatio, PS2000A_RATIO_MODE downSampleRatioMode, uint32_t overviewBufferSize ); /// /// This function instructs the driver to return the next block of values to your /// ps2000aStreamingReady callback function.You must have previously called /// ps2000aRunStreaming beforehand to set up streaming. /// /// Device identifier returned by ps2000aOpenUnit. /// a pointer to your ps2000aStreamingReady callback function. /// a void pointer that will be passed to the ps2000aStreamingReady /// callback function.The callback function may optionally use this pointer to return /// information to the application. /// /// PICO_OK /// PICO_INVALID_HANDLE /// PICO_NO_SAMPLES_AVAILABLE /// PICO_INVALID_CALL /// PICO_BUSY /// PICO_NOT_RESPONDING /// PICO_DRIVER_FUNCTION /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aGetStreamingLatestValues) ( int16_t handle, ps2000aStreamingReady lpPs2000aReady, void * pParameter ); /// /// This function returns the number of samples available after data collection in /// streaming mode.Call it after calling ps2000aStop. /// /// Device identifier returned by ps2000aOpenUnit. /// On exit, the number of samples. /// /// PICO_OK /// PICO_INVALID_HANDLE /// PICO_NULL_PARAMETER /// PICO_NO_SAMPLES_AVAILABLE /// PICO_NOT_USED /// PICO_BUSY /// PICO_DRIVER_FUNCTION /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aNoOfStreamingValues) ( int16_t handle, uint32_t * noOfValues ); /// /// This function returns the maximum downsampling ratio that can be used for a given /// number of samples in a given downsampling mode /// /// Device identifier returned by ps2000aOpenUnit. /// The number of unprocessed samples to be downsampled. /// The maximum possible downsampling ratio output. /// See PS2000A_RATIO_MODE available modes. /// The memory segment where the data is stored. /// /// PICO_OK /// PICO_INVALID_HANDLE /// PICO_NO_SAMPLES_AVAILABLE /// PICO_NULL_PARAMETER /// PICO_INVALID_PARAMETER /// PICO_SEGMENT_OUT_OF_RANGE /// PICO_TOO_MANY_SAMPLES /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aGetMaxDownSampleRatio) ( int16_t handle, uint32_t noOfUnaggreatedSamples, uint32_t * maxDownSampleRatio, PS2000A_RATIO_MODE downSampleRatioMode, uint32_t segmentIndex ); /// /// This function returns block-mode data, with or without downsampling, starting at the /// specified sample number.It is used to get the stored data from the driver after data /// collection has stopped. /// /// Device identifier returned by ps2000aOpenUnit. /// A zero-based index that indicates the start point for /// data collection.It is measured in sample intervals from the start of the buffer. /// On entry, the number of samples required. On exit, /// the actual number retrieved. The number of samples retrieved will not be more than the /// number requested, and the data retrieved starts at startIndex. /// The downsampling factor that will be applied to the raw data. /// Downsampling mode to use. The available values are : /// PS2000A_RATIO_MODE_NONE(downSampleRatio is ignored) /// PS2000A_RATIO_MODE_AGGREGATE /// PS2000A_RATIO_MODE_AVERAGE /// PS2000A_RATIO_MODE_DECIMATE /// AGGREGATE, AVERAGE, DECIMATE are single - bit constants that can be ORed to apply multiple /// downsampling modes to the same data. /// The zero-based number of the memory segment where the data is stored. /// On exit, a set of flags that indicate whether an overvoltage has occurred /// on any of the channels.It is a bit field with bit 0 denoting Channel. /// /// PICO_OK /// PICO_INVALID_HANDLE /// PICO_NO_SAMPLES_AVAILABLE /// PICO_DEVICE_SAMPLING /// PICO_NULL_PARAMETER /// PICO_SEGMENT_OUT_OF_RANGE /// PICO_STARTINDEX_INVALID /// PICO_ETS_NOT_RUNNING /// PICO_BUFFERS_NOT_SET /// PICO_INVALID_PARAMETER /// PICO_TOO_MANY_SAMPLES /// PICO_DATA_NOT_AVAILABLE /// PICO_STARTINDEX_INVALID /// PICO_INVALID_SAMPLERATIO /// PICO_INVALID_CALL /// PICO_NOT_RESPONDING /// PICO_MEMORY /// PICO_RATIO_MODE_NOT_SUPPORTED /// PICO_DRIVER_FUNCTION /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aGetValues) ( int16_t handle, uint32_t startIndex, uint32_t * noOfSamples, uint32_t downSampleRatio, PS2000A_RATIO_MODE downSampleRatioMode, uint32_t segmentIndex, int16_t * overflow ); /// /// This function retrieves waveforms captured using rapid block mode. The waveforms /// must have been collected sequentially and in the same run. /// /// Device identifier returned by ps2000aOpenUnit. /// On entry, the number of samples required; on exit, the actual /// number retrieved. The number of samples retrieved will not be more than the number /// requested.The data retrieved always starts with the first sample captured. /// The first segment from which the waveform should be retrieved. /// The last segment from which the waveform should be retrieved. /// The downsampling factor that will be applied to the raw data. /// See PS2000A_RATIO_MODE for available modes. /// An array of integers equal to or larger than the number of waveforms to /// be retrieved.Each segment index has a corresponding entry in the overflow array, with overflow[0] /// containing the flags for the segment numbered fromSegmentIndex and the last element in the /// array containing the flags for the segment numbered toSegmentIndex. Each element in the array /// is a bit field. /// /// PICO_OK /// PICO_INVALID_HANDLE /// PICO_INVALID_PARAMETER /// PICO_INVALID_SAMPLERATIO /// PICO_ETS_NOT_RUNNING /// PICO_BUFFERS_NOT_SET /// PICO_TOO_MANY_SAMPLES /// PICO_SEGMENT_OUT_OF_RANGE /// PICO_NO_SAMPLES_AVAILABLE /// PICO_NOT_RESPONDING /// PICO_DRIVER_FUNCTION /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aGetValuesBulk) ( int16_t handle, uint32_t * noOfSamples, uint32_t fromSegmentIndex, uint32_t toSegmentIndex, uint32_t downSampleRatio, PS2000A_RATIO_MODE downSampleRatioMode, int16_t * overflow ); /// /// This function returns data either with or without downsampling, starting at the /// specified sample number.It is used to get the stored data from the scope after data /// collection has stopped.It returns the data using a callback. /// /// Device identifier returned by ps2000aOpenUnit. /// A zero-based index that indicates the start point for data collection. /// It is measured in sample intervals from the start of the buffer. /// On entry, the number of samples required. On exit, the actual number /// retrieved. The number of samples retrieved will not be more than the number requested, and the /// data retrieved starts at startIndex. /// See The downsampling factor that will be applied to the raw data. /// See PS2000A_RATIO_MODE fro available modes. /// The zero-based number of the memory segment where the data is stored. /// A pointer to the user-supplied function that will be /// called when the data is ready.This will be a ps2000aDataReady function for /// block - mode data or a ps2000aStreamingReady function for streaming - mode data. /// a void pointer that will be passed to the callback function.The /// data type is determined by the application. /// /// PICO_OK /// PICO_INVALID_HANDLE /// PICO_NO_SAMPLES_AVAILABLE /// PICO_DEVICE_SAMPLING /// PICO_NULL_PARAMETER /// PICO_STARTINDEX_INVALID /// PICO_SEGMENT_OUT_OF_RANGE /// PICO_INVALID_PARAMETER /// PICO_DATA_NOT_AVAILABLE /// PICO_INVALID_SAMPLERATIO /// PICO_INVALID_CALL /// PICO_DRIVER_FUNCTION /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aGetValuesAsync) ( int16_t handle, uint32_t startIndex, uint32_t noOfSamples, uint32_t downSampleRatio, PS2000A_RATIO_MODE downSampleRatioMode, uint32_t segmentIndex, void * lpDataReady, void * pParameter ); /// /// This function allows you to make a deferred data-collection request in block mode. The /// request will be executed, and the arguments validated, when you call /// ps2000aRunBlock.The advantage of this function is that the driver makes contact with /// the scope only once, when you call ps2000aRunBlock, compared with the two contacts /// that occur when you use the conventional ps2000aRunBlock, ps2000aGetValues /// calling sequence.This slightly reduces the dead time between successive captures in /// block mode. /// /// After calling ps2000aRunBlock, you can optionally use ps2000aGetValues to request /// further copies of the data.This might be required if you wish to display the data with /// different data reduction settings. /// /// Device identifier returned by ps2000aOpenUnit. /// A zero-based index that indicates the start point for data /// collection.It is measured in sample intervals from the start of the buffer /// n entry, the number of raw samples to be collected before any /// downsampling is applied.On exit, the actual number stored in the buffer.The number of /// samples retrieved will not be more than the number requested, and the data retrieved /// starts at startIndex. /// The downsampling factor that will be applied to the raw data. /// See PS2000A_RATIO_MODE for available modes. /// The zero-based number of the memory segment where the data is stored. /// An array of integers equal to or larger than the number of waveforms to /// be retrieved.Each segment index has a corresponding entry in the overflow array, with overflow[0] /// containing the flags for the segment numbered fromSegmentIndex and the last element in the array /// containing the flags for the segment numbered toSegmentIndex.Each element in the array is a bit field /// /// PICO_OK /// PICO_INVALID_HANDLE /// PICO_INVALID_PARAMETER /// PICO_DRIVER_FUNCTION /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aGetValuesOverlapped) ( int16_t handle, uint32_t startIndex, uint32_t * noOfSamples, uint32_t downSampleRatio, PS2000A_RATIO_MODE downSampleRatioMode, uint32_t segmentIndex, int16_t * overflow ); /// /// This function allows you to make a deferred data-collection request, which will later be /// executed, and the arguments validated, when you call ps2000aRunBlock in rapid block /// mode.The advantage of this method is that the driver makes contact with the scope /// only once, when you call ps2000aRunBlock, compared with the two contacts that occur /// when you use the conventional ps2000aRunBlock, ps2000aGetValuesBulk calling /// sequence.This slightly reduces the dead time between successive captures in rapid /// block mode. /// /// After calling ps2000aRunBlock, you can optionally use ps2000aGetValues to request /// further copies of the data.This might be required if you wish to display the data with /// different data reduction settings. /// /// Device identifier returned by ps2000aOpenUnit. /// A zero-based index that indicates the start point for data /// collection.It is measured in sample intervals from the start of the buffer /// On entry, the number of samples required; on exit, the actual /// number retrieved. The number of samples retrieved will not be more than the number /// requested.The data retrieved always starts with the first sample captured. /// The downsampling factor that will be applied to the raw data. /// See PS2000A_RATIO_MODE for available modes. /// The first segment from which the waveform should be retrieved. /// The last segment from which the waveform should be retrieved. /// An array of integers equal to or larger than the number of waveforms to /// be retrieved.Each segment index has a corresponding entry in the overflow array, with overflow[0] /// containing the flags for the segment numbered fromSegmentIndex and the last element in the /// array containing the flags for the segment numbered toSegmentIndex. Each element in the array /// is a bit field. /// /// PICO_OK /// PICO_INVALID_HANDLE /// PICO_INVALID_PARAMETER /// PICO_DRIVER_FUNCTION /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aGetValuesOverlappedBulk) ( int16_t handle, uint32_t startIndex, uint32_t * noOfSamples, uint32_t downSampleRatio, PS2000A_RATIO_MODE downSampleRatioMode, uint32_t fromSegmentIndex, uint32_t toSegmentIndex, int16_t * overflow ); /// /// This function stops the scope device from sampling data. If this function is called /// before a trigger event occurs, the oscilloscope may not contain valid data. Always /// call this function after the end of a capture to ensure that the scope is ready /// for the next capture. /// /// Device identifier returned by ps2000aOpenUnit. /// /// PICO_OK /// PICO_INVALID_HANDLE /// PICO_USER_CALLBACK /// PICO_DRIVER_FUNCTION /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aStop) ( int16_t handle ); /// /// This function has no effect and is reserved for future use. /// /// Device identifier returned by ps2000aOpenUnit. /// Reserved for future use. /// Reserved for future use. /// /// PICO_OK /// PICO_INVALID_HANDLE /// PICO_NULL_PARAMETER /// PICO_NO_SAMPLES_AVAILABLE /// PICO_NOT_USED /// PICO_BUSY /// PICO_DRIVER_FUNCTION /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aHoldOff) ( int16_t handle, uint64_t holdoff, PS2000A_HOLDOFF_TYPE type ); /// /// This function queries which ranges are available on a scope device. /// /// Device identifier returned by ps2000aOpenUnit. /// The type of information required. /// The following value iscurrently supported : PS2000A_CI_RANGES /// Not used, must be set to 0. /// An array that will be populated with available PS2000A_RANGE /// values for the given info.If NULL, length is set tothe number of ranges available. /// Input: length of ranges array; output: number of elements /// written to ranges. /// The channel for which the information is required. /// /// PICO_OK /// PICO_HANDLE_INVALID /// PICO_BUSY /// PICO_DRIVER_FUNCTION /// PICO_NOT_RESPONDING /// PICO_NULL_PARAMETER /// PICO_INVALID_CHANNEL /// PICO_INVALID_INFO /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aGetChannelInformation) ( int16_t handle, PS2000A_CHANNEL_INFO info, int32_t probe, int32_t * ranges, int32_t * length, int32_t channels ); /// /// This function counts the number of PicoScope 2000 Series (A API) units connected to /// the computer, and returns a list of serial numbers as a string. /// /// On exit, the number of ps2000a units found. /// On exit, a list of serial numbers separated by commas and terminated /// by a final null. /// /// Example: AQ005 / 139, VDR61 / 356, ZOR14 / 107 /// /// Can be NULL on entry if serial numbers are not required. /// On entry, the length of the char buffer pointed to by serials; /// on exit, the length of the string written to serials. /// /// PICO_OK /// PICO_BUSY /// PICO_NULL_PARAMETER /// PICO_FW_FAIL /// PICO_CONFIG_FAIL /// PICO_MEMORY_FAIL /// PICO_CONFIG_FAIL_AWG /// PICO_INITIALISE_FPGA /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aEnumerateUnits) ( int16_t * count, int8_t * serials, int16_t * serialLth ); /// /// This function can be used to check that the already opened device is still connected to /// the USB port and communication is successful. /// /// Device identifier returned by ps2000aOpenUnit. /// /// PICO_OK /// PICO_INVALID_HANDLE /// PICO_DRIVER_FUNCTION /// PICO_BUSY /// PICO_NOT_RESPONDING /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aPingUnit) ( int16_t handle ); /// /// This function returns the maximum ADC count returned by calls to the "GetValues" /// functions. /// /// Device identifier returned by ps2000aOpenUnit. /// Output: the maximum ADC value. /// /// PICO_OK /// PICO_USER_CALLBACK /// PICO_INVALID_HANDLE /// PICO_TOO_MANY_SEGMENTS /// PICO_MEMORY /// PICO_DRIVER_FUNCTION /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aMaximumValue) ( int16_t handle, int16_t * value ); /// /// This function returns the minimum ADC count returned by calls to the GetValues /// functions /// /// Device identifier returned by ps2000aOpenUnit. /// Output: the minimum ADC value. /// /// PICO_OK /// PICO_USER_CALLBACK /// PICO_INVALID_HANDLE /// PICO_TOO_MANY_SEGMENTS /// PICO_MEMORY /// PICO_DRIVER_FUNCTION /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aMinimumValue) ( int16_t handle, int16_t * value ); /// /// This function is used to get the maximum and minimum allowable analog offset for a /// specific voltage range. /// /// If both maximumVoltage and minimumVoltage are NULL, the driver will return PICO_NULL_PARAMETER /// /// Device identifier returned by ps2000aOpenUnit. /// The voltage range to be used when gathering the min and max information. /// The type of AC/DC coupling used /// Output: maximum voltage allowed for the range. Pointer will be /// ignored if NULL.If device does not support analog offset, zero will be returned. /// Output: minimum voltage allowed for the range. Pointer will /// be ignored if NULL. If device does not support analog offset, zero will be returned. /// /// PICO_OK /// PICO_INVALID_HANDLE /// PICO_DRIVER_FUNCTION /// PICO_INVALID_VOLTAGE_RANGE /// PICO_NULL_PARAMETER /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aGetAnalogueOffset) ( int16_t handle, PS2000A_RANGE range, PS2000A_COUPLING coupling, float * maximumVoltage, float * minimumVoltage ); /// /// This function returns the maximum number of segments allowed for the opened /// variant.Refer to ps2000aMemorySegments for specific figures. /// /// Device identifier returned by ps2000aOpenUnit. /// Output: maximum number of segments allowed. /// /// PICO_OK /// PICO_INVALID_HANDLE /// PICO_DRIVER_FUNCTION /// PICO_NULL_PARAMETER /// PREF0 PREF1 PICO_STATUS PREF2 PREF3 (ps2000aGetMaxSegments) ( int16_t handle, uint32_t * maxSegments ); /// /// Retrieves the current state of the output edge detect flag /// /// Device identifier returned by ps2000aOpenUnit. /// Output: The current of the output edge detect /// /// PICO_OK /// PICO_NOT_USED /// PICO_NULL_PARAMETER /// PICO_NOT_SUPPORTED_BY_THIS_DEVICE /// PICO_INVALID_HANDLE /// PICO_DRIVER_FUNCTION /// PREF0 PREF1 PICO_STATUS PREF2 PREF3(ps2000aQueryOutputEdgeDetect) ( int16_t handle, int16_t * state ); /// /// Sets the state of the output edge detect flag, Default value is TRUE /// /// Device identifier returned by ps2000aOpenUnit. /// The output edge detect state to be set: /// any none 0 value: enable /// 0: disable /// /// PICO_OK /// PICO_NOT_USED /// PICO_NULL_PARAMETER /// PICO_NOT_SUPPORTED_BY_THIS_DEVICE /// PICO_INVALID_HANDLE /// PICO_DRIVER_FUNCTION /// PREF0 PREF1 PICO_STATUS PREF2 PREF3(ps2000aSetOutputEdgeDetect) ( int16_t handle, int16_t state ); PREF0 PREF1 PICO_STATUS PREF2 PREF3(ps2000aGetScalingValues) ( int16_t handle, PS2000A_SCALING_FACTORS_VALUES *scalingValues, int16_t nChannels ); #endif