SW Programming: Keysight SD1 Programming Libraries

SW Programming Overview

As described in Keysight SD1 Programming Libraries, Keysight provides highly-optimized programming librariesin the most common programming languages:

 

A. Native Languages

Ready-to-use native libraries are supplied for the following programming languages and compilers:

 

Language

Compiler

Library

Files

C

Microsoft Visual Studio . NET

.NET Library

*.dll

 

MinGW (Qt), GCC

C Library

*.h, *.a

 

Any C compiler

C Library

*.h, *.lib

C++

Microsoft Visual Studio . NET

.NET Library

*.dll

 

MinGW (Qt), GCC

C++ Library

*.h, *.a

 

C++ Builder / Turbo C++

C++ Library

*.h, *.lib

C#

Microsoft Visual Studio .NET

.NET Library

*.dll

MATLAB

MathWorks MATLAB

.NET Library

*.dll

Python

Any Python compiler

Python Library

*.py

Basic

Microsoft Visual Studio .NET

.NET Library

*.dll

LabVIEW

National Instruments LabVIEW

LabVIEW Library

*.vi

 

B. Other Languages

 

Dynamic-link libraries are compatible with any programming language that has a compiler capable of performing dynamic linking. Here are some case examples:

Exported Functions LanguageOperating SystemFiles

CMicrosoft Windows*.dll

 

DLL function prototypes: The exported functions of the dynamic libraries have the same prototype as their counterparts of the static libraries

 

Function Parameters: Some of the parameters of the library functions are language dependent. The table of inputs and outputs parameters for each function is a conceptual description, therefore, the user must check the specific language function to see how to use it. One example are the ID parameters (moduleID, etc.), which identify objects in non-object-oriented languages. In object-oriented languages the objects are identified by their instances, and therefore the IDs are not present.
Function Names: Some programming languages like C++ or LabVIEW have a feature called function overloading or polymorphism, that allows creating several functions with the same name but with different input/output parameters. In languages without this feature, functions with different parameters must have different names.

 

SD_Module Functions

open

This function initializes a hardware module therefore it must be called before using any other module-related function. A module can be opened using the serial number or the chassis and slot number. The first option ensures the same module is always opened regardless its chassis or slot location.

 

Parameters
Name Description
   
Inputs  
productName Complete product name (e.g.”M3100A”). This name can be found on the product, or in nearly any Keysight software. It can also be retrieved with the function getProductName
serialNumber Module Serial Number (e.g.”ES5641”). The serial number can be found on the product, or in nearly any Keysight software. It can also be retrieved with the function getSerialNumber
chassis Number where the device is located. The chassis number can be found in nearly any Keysight software. It can also be retrieved with the function getChassis
slot Slot number where the device is plugged in. This number can be found on the chassis, in nearly any Keysight software. It can also be retrieved with the functiongetSlot
compatibility Forces the channel facing numbers to be compatible with legacy models (Table 0).
errorIn (LabVIEW only) If it contains an error, the function will not be executed and errorIn will be passed to errorOut
   
Outputs  
moduleID (Non-object-oriented languages only) Module identifier, or a negative number for Error Codes in Section 2.4.7
errorOut See Error Codes

 

C

int SD_Module_openWithSerialNumber(const char* productName, const char* serialNumber);

int SD_Module_openWithSlot(const char* productName, int chassis, int slot);

int SD_Module_openWithSerialNumberCompatibility(const char* productName, const char* serialNumber, int compatibility);

int SD_Module_openWithSlotCompatibility(const char* productName, int chassis, int slot, int compatibility);

 

C++

int SD_Module::open(const char* productName, const char* serialNumber);

int SD_Module::open(const char* productName, int chassis, int slot);

int SD_Module::open(const char* productName, const char* serialNumber, int compatibility);

int SD_Module::open(const char* productName, int chassis, int slot, int compatibility);

 

Visual Studio .NET, MATLAB

int SD_Module::open(string productName, string serialNumber);

int SD_Module::open(string productName, int chassis, int slot);

int SD_Module::open(string productName, string serialNumber, int compatibility);

int SD_ Module::open(string productName, int chassis, int slot, int compatibility);

 

Python

int SD_Module::openWithSerialNumber(string productName, string serialNumber);

int SD_Module::openWithSlot(string productName, int chassis, int slot);

int SD_Module::openWithSerialNumberCompatibility(string productName, string serialNumber, int compatibility);

int SD_ Module::openWithSlotCompatibility(string productName, int chassis, int slot, int compatibility);

 

LabVIEW

open.vi

 

M3601A

Available: No

 

close

This function releases all the resources allocated for the module instance. It must be always called before exiting the application.

 

Parameters
Name Description
Inputs  
moduleID (Non-object-oriented languages only) Module identifier, returned by function open
errorIn (LabVIEW only) If it contains an error, the function will not be executed and errorIn will be passed to errorOut
   
Outputs  
errorOut Error Codes

 

C

int SD_Module_close(int moduleID);

 

C++

int SD_Module::close();

 

Visual Studio .NET, MATLAB

int SD_Module::close();

 

Python

int SD_Module::close();

 

LabVIEW

close.vi

 

M3601A

Available: No

moduleCount

This function returns the number of Keysight modules installed in the system.

 

Static Function: (Object-oriented languages only) moduleCount is a static function

 

Parameters
Name Description
Inputs  
errorIn (LabVIEW only) If it contains an error, the function will not be executed and errorIn will be passed to errorOut
   
Outputs  
nModules Number of Keysight modules installed in the system. Negative numbers for errors Error Codes
errorOut (LabVIEW only) Error Codes

 

C

int SD_Module_moduleCount();

 

C++

int SD_Module::moduleCount();

 

Visual Studio .NET, MATLAB

int SD_Module::moduleCount();

 

Python

int SD_Module::moduleCount();

 

LabVIEW

moduleCount.vi

 

M3601A

Available: No

 

getProductName

This function returns the product name of the specified device.

 

Static Function: (Object-oriented languages only) getProductName is a static function
Parameters
Name Description
Inputs  
index Module index. It must be in the range 0..(nModules-1), where nModules is returned by function moduleCount
chassis Chassis number where the device is located. The chassis number can be found in nearly any Keysight software. It can also be retrieved with the function getChassis
slot Slot number where the device is plugged in. This number can be found on the chassis, in nearly any Keysight software. It can also be retrieved with the function getSlot
errorIn (LabVIEW only) If it contains an error, the function will not be executed and errorIn will be passed to errorOut
   
Outputs  
productName Product name. It can be used in function open
errorOut Error Codes

 

C

int SD_Module_getProductNameByIndex(int index, char *productName);

int SD_Module_getProductNameBySlot(int chassis, int slot, char* productName);

 

C++

int SD_Module::getProductName(int index, char *productName);

int SD_Module::getProductName(int chassis, int slot, char* productName);

 

Visual Studio .NET, MATLAB

int SD_Module::getProductName(int index, string productName);

int SD_Module::getProductName(int chassis, int slot, string productName);

 

Python

int SD_Module::getProductNameByIndex(int index, string productName);

int SD_Module::getProductNameBySlot(int chassis, int slot, string productName);

 

LabVIEW

getProductNameByIndex.vi

getProductNameBySlot.vi

 

M3601A

Available: No

 

getSerialNumber

This function returns the serial number of the specified device.

 

Static Function: (Object-oriented languages only) getSerialNumber is a static function
Parameters
Name Description
   
Inputs  
index Module index. It must be in the range 0..(nModules-1), where nModules is returned by function moduleCount
chassis Chassis number where the device is located. The chassis number can be found in nearly any Keysight software. It can also be retrieved with the function getChassis
slot Slot number where the device is plugged in. This number can be found on the chassis, or in nearly any Keysight software. It can also be retrieved with the function getSlot
errorIn (LabVIEW only) If it contains an error, the function will not be executed and errorIn will be passed to errorOut
   
Outputs  
serialNumber Serial number of the product. It can be used in function open
errorOut Error Codes

 

C

int SD_Module_getSerialNumberByIndex(int index, char *serialNumber);

int SD_Module_getSerialNumberBySlot(int chassis, int slot, char* serialNumber);

 

C++

int SD_Module::getSerialNumber(int index, char *serialNumber);

int SD_Module::getSerialNumber(int chassis, int slot, char* serialNumber);

 

Visual Studio .NET, MATLAB

int SD_Module::getSerialNumber(int index, char *serialNumber);

int SD_Module::getSerialNumber(int chassis, int slot, char* serialNumber);

 

Python

int SD_Module::getSerialNumberByIndex(int index, char *serialNumber);

int SD_Module::getSerialNumberBySlot(int chassis, int slot, char* serialNumber);

 

LabVIEW

getSerialNumberByIndex.vi

getSerialNumberBySlot.vi

 

M3601A

Available: No

 

getChassis

This function returns the chassis number where the device is located.

 

Static Function: (Object-oriented languages only) getChassis is a static function
Parameters
Name Description
   
Inputs  
index Module index. It must be in the range 0..(nModules-1), where nModules is returned by function moduleCount
errorIn (LabVIEW only) If it contains an error, the function will not be executed and errorIn will be passed to errorOut
   
Outputs  
chassis Chassis number where the device is located. Negative numbers for errors Error Codes
errorOut (LabVIEW only) Error Codes

 

C

int SD_Module_getChassis(int index);

 

C++

int SD_Module::getChassis(int index);

 

Visual Studio .NET, MATLAB

int SD_Module::getChassis(int index);

 

Python

int SD_Module::getChassis(int index);

 

LabVIEW

getChassis.vi

 

M3601A

Available: No

getSlot

This function returns the slot number where the device is located.

 

Static Function: (Object-oriented languages only) getSlot is a static function
Parameters
Name Description
   
Inputs  
index Module index. It must be in the range 0..(nModules-1), where nModules is returned by function moduleCount
errorIn (LabVIEW only) If it contains an error, the function will not be executed and errorIn will be passed to errorOut
   
Outputs  
slot Slot number where the device is plugged in. Negative numbers for errors Error Codes
errorOut (LabVIEW only) Error Codes

 

C

int SD_Module_getSlot(int index);

 

C++

int SD_Module::getSlot(int index);

 

Visual Studio .NET, MATLAB

int SD_Module::getSlot(int index);

 

Python

int SD_Module::getSlot(int index);

 

LabVIEW

getSlot.vi

 

M3601A

Available: No

 

PXItriggerWrite

This function sets the digital value of a PXI trigger in the PXI backplane. This function is only available in PXI / PXI Express form factors.

 

Parameters
Name Description
   
Inputs  
moduleID (Non-object-oriented languages only) Module identifier, returned by function open
nPXItrigger PXI trigger number
value Digital value with negated logic, 0 (ON) or 1 (OFF)
errorIn (LabVIEW only) If it contains an error, the function will not be executed and errorIn will be passed to errorOut
   
Outputs  
moduleIDOut (LabVIEW only) A copy of moduleID
errorOut Error Codes

 

C

int SD_Module_PXItriggerWrite(int moduleID, int nPXItrigger, int value);

 

C++

int SD_Module::PXItriggerWrite(int nPXItrigger, int value);

 

Visual Studio .NET, MATLAB

int SD_Module::PXItriggerWrite(int nPXItrigger, int value);

 

Python

int SD_Module::PXItriggerWrite(int nPXItrigger, int value);

 

LabVIEW

PXItriggerWrite.vi

 

M3601A

Available: Yes

 

PXItriggerRead

This function reads the digital value of a PXI trigger in the PXI backplane. This function is only available in PXI / PXI Express form factors.

 

Parameters
Name Description
   
Inputs  
moduleID (Non-object-oriented languages only) Module identifier, returned by function open
nPXItrigger PXI trigger number
errorIn (LabVIEW only) If it contains an error, the function will not be executed and errorIn will be passed to errorOut
   
Outputs  
moduleIDOut (LabVIEW only) A copy of moduleID
value Digital value with negated logic, 0 (ON) or 1 (OFF), or negative numbers for errors Error Codes
errorOut Error Codes

 

C

int SD_Module_PXItriggerRead(int moduleID, int nPXItrigger);

 

C++

int SD_Module::PXItriggerRead(int nPXItrigger);

 

Visual Studio .NET, MATLAB

int SD_Module::PXItriggerRead(int nPXItrigger);

 

Python

int SD_Module::PXItriggerRead(int nPXItrigger);

 

LabVIEW

PXItriggerRead.vi

 

M3601A

Available: No (the value can be accessed using math operations: e.g. MathAssign)

 

SD_Module Functions (FPGA-related)

The following programming functions are related to Keysight’s FPGA technology and Keysight M3602A programming environment. Please check the Keysight M3602A datasheet for more information [1].

 

FPGAwritePCport

This function writes data at the PCport FPGA Block.

 

Parameters
Name Description
   
Inputs  
moduleID (Non-object-oriented languages only) Module identifier, returned by function open
nPCport PCport number
address Address that will appear the PCport interface
data Tx data buffer
dataSize Number of 32-bit words to write (maximum is 128 words)
errorIn (LabVIEW only) If it contains an error, the function will not be executed and errorIn will be passed to errorOut
   
Outputs  
moduleIDout (LabVIEW only) A copy of moduleID
errorOut Error Codes

 

C

int SD_Module_FPGAwritePCport(int moduleID, int nPCport, long* data, int dataSize, int address, int addressMode, int accessMode);

 

C++

int SD_Module::FPGAwritePCport(int nPCport, int* data, int dataSize, int address, SD_AddressingMode addressMode, SD_AccessMode accessMode);

 

Visual Studio .NET, MATLAB

int SD_Module::FPGAwritePCport(int nPCport, int [] data, int address, SD_AddressingMode addressMode, SD_AccessMode accessMode);

 

Python

int SD_Module::FPGAwritePCport(int nPCport, int [] data, int address, int addressMode, int accessMode);

 

LabVIEW

PCportWrite.vi

 

M3601A

Available: No

 

FPGAreadPCport

This function reads data at the PCport FPGA Block.

 

Parameters
Name Description
   
Inputs  
moduleID (Non-object-oriented languages only) Module identifier, returned by function open
nPCport PCport number
address Address that will appear the PCport interface
dataSize Number of 32-bit words to read (maximum is 128 words)
errorIn (LabVIEW only) If it contains an error, the function will not be executed and errorIn will be passed to errorOut
   
Outputs  
data Rx data buffer
moduleIDout (LabVIEW only) A copy of moduleID
errorOut Error Codes

 

C

int SD_Module_FPGAreadPCport(int moduleID, int nPCport, int* data, int dataSize, int address, int addressMode, int accessMode);

 

C++

int SD_Module::FPGAreadPCport(int nPCport, int* data, int dataSize, int address, SD_AddressingMode addressMode, SD_AccessMode accessMode);

 

Visual Studio .NET, MATLAB

int SD_Module::FPGAreadPCport(int nPCport, int address, int[] data, SD_AddressingMode addressMode, SD_AccessMode accessMode);

 

Python

{int[], int} SD_Module::FPGAreadPCport(int nPCport, int dataSize, int address, int addressMode, int accessMode);

*Returned data array is a NumPy array

 

LabVIEW

FPGAwritePCport.vi

 

M3601A

Available: No

 

SD Module Functions (HVI-related)

The following programming functions are related to Keysight's HVI technology and Keysight M3601A Design Environment. Please, check M3601A User Guide for more information.

 

writeRegister

This function writes a value in an HVI register of a hardware module.

 

Parameters
Name Description
   
Inputs  
moduleID (Non-object-oriented languages only) Module identifier, returned by function open in Section 2.4.2.1
regNumber Register number
regName Register name
regValue Register value
unit Unit of the register value
errorIn (LabVIEW only) If it contains an error, the function will not be executed and errorIn will be passed to errorOut
   
Outputs  
moduleIDout (LabVIEW only) A copy of moduleID
errorOut See Error Codes

 

C

int SD_Module_writeRegister(int moduleID, int regNumber, int regValue);

int SD_Module_writeRegisterWithName(int moduleID, const char* regName, int regValue);

int SD_Module_writeDoubleRegister(int moduleID, int regNumber, double regValue, const char* unit);

int SD_Module_writeDoubleRegisterWithName(int moduleID, const char* regName, double regValue, const char* unit);

 

C++

int SD_Module::writeRegister(int regNumber, int regValue);

int SD_Module::writeRegister(const char* regName, int regValue);

int SD_Module::writeRegister(int regNumber, double regValue, const char* unit);

int SD_Module::writeRegister(const char* regName, double regValue, const char* unit);

 

Visual Studio .NET, MATLAB

int SD_Module::writeRegister(int regNumber, int regValue);

int SD_Module::writeRegister(string regName, int regValue);

int SD_Module::writeRegister(int regNumber, double regValue, string unit);

int SD_Module::writeRegister(string regName, double regValue, string unit);

 

Python

int SD_Module::writeRegisterByNumber(int regNumber, int regValue);

int SD_Module::writeRegisterWithName(string regName, int regValue);

int SD_Module::writeDoubleRegisterByNumber(int regNumber, double regValue, string unit);

int SD_Module::writeDoubleRegisterWithName(string regName, double regValue, string unit);

 

LabVIEW

writeRegister.vi

 

M3601A

Available: No (the value can be accessed using math operations: e.g. MathAssign)

 

 

readRegister

This function reads a value from an HVI register of a hardware module.

 

Parameters

Name Description
   
Inputs  
moduleID (Non-object-oriented languages only) Module identifier, returned by function open in Section 2.4.2.1
regNumber Register number
regName Register name
regValue Register value
unit Unit of the register value
errorIn (LabVIEW only) If it contains an error, the function will not be executed and errorIn will be passed to errorOut
   
Outputs  
regValue Register value
moduleIDout (LabVIEW only) A copy of moduleID
errorOut See Error Codes

 

C

int SD_Module_readRegister(int moduleID, int regNumber, int regValue);

int SD_Module_readRegisterWithName(int moduleID, const char* regName, int regValue);

double SD_Module_readDoubleRegister(int moduleID, int regNumber, const char* unit, int& errorOut);

double SD_Module_readDoubleRegisterWithName(int moduleID, const char* regName, const char* unit, int& errorOut);

C++

int SD_ Module::readRegister(int regNumber, int regValue);

int SD_ Module::readRegister(const char* regName, int regValue);

double SD_ Module::readRegister(int regNumber, const char* unit, int& errorOut);

double SD_ Module::readRegister(const char* regName, const char* unit, int& errorOut);

Visual Studio .NET, MATLAB

int SD_ Module::readRegister(int regNumber, int regValue);

int SD_ Module::readRegister(string regName, int regValue);

int SD_ Module::readRegister(int regNumber, string unit, out int error);

int SD_ Module::readRegister(string regName, string unit, out int error);

 

Python

int SD_Module::readRegisterByNumber(int regNumber, int regValue);

int SD_Module::readRegisterWithName(string regName, int regValue);

[int errorOut, double regValue] SD_Module::readDoubleRegisterByNumber(int regNumber, string unit;

[int errorOut, double regValue] SD_Module::readDoubleRegisterWithName(string regName, string unit);

 

LabVIEW

readRegister.vi

 

M3601A

Available: No (the value can be accessed using math operations: e.g. MathAssign)

SD_AIN Functions

channelInputConfig

This function configures the input full scale, impedance and coupling as applicable according to the product Full Scale, Impedance and Coupling.

 

Parameters
Name Description
   
Inputs  
moduleID (Non-object-oriented languages only) Module identifier, returned by function open
nChannel Input channel number
fullScale Input full scale in volts
impedance Input impedance
coupling Input coupling
errorIn (LabVIEW only) If it contains an error, the function will not be executed and errorIn will be passed to errorOut
   
Outputs  
moduleIDout (LabVIEW only) A copy of moduleID
errorOut Error Codes

 

C

int SD_AIN_channelInputConfig(int moduleID, int nChannel, double fullScale, int coupling);

 

C++

int SD_AIN::channelInputConfig(int nChannel, double fullScale, int coupling);

 

Visual Studio .NET, MATLAB

int SD_AIN::channelInputConfig(int nChannel, double fullScale, int coupling);

 

Python

int SD_AIN::channelInputConfig(int nChannel, double fullScale, int coupling);

 

LabVIEW

channelInputConfig.vi

 

M3601A

Available: No

 

channelPrescalerConfig

This function configures the input Theory of Operation: M31/M33XX Digitizers.

 

Parameters
Name Description
   
Inputs  
moduleID (Non-object-oriented languages only) Module identifier, returned by function open
nChannel Input channel number
prescaler prescaler value ).
errorIn (LabVIEW only) If it contains an error, the function will not be executed and errorIn will be passed to errorOut
   
Outputs  
moduleIDout (LabVIEW only) A copy of moduleID
errorOut Error Codes

 

C

int SD_AIN_channelPrescalerConfig(int moduleID, int nChannel, int prescaler);

 

C++

int SD_AIN::channelPrescalerConfig(int nChannel, int prescaler);

 

Visual Studio .NET, MATLAB

int SD_AIN::channelPrescalerConfig(int nChannel, int prescaler);

 

Python

int SD_AIN::channelPrescalerConfig(int nChannel, int prescaler);

 

LabVIEW

channelPrescalerConfig.vi

 

M3601A

Available: Yes

channelTriggerConfig

This function configures the analog trigger block for each channel Analog Trigger.

 

Parameters
Name Description
   
Inputs  
moduleID (Non-object-oriented languages only) Module identifier, returned by function open
nChannel Input channel number
analogTriggerMode Trigger mode
threshold Threshold in volts
errorIn (LabVIEW only) If it contains an error, the function will not be executed and errorIn will be passed to errorOut
   
Outputs  
moduleIDout (LabVIEW only) A copy of moduleID
errorOut Error Codes

 

C

int SD_AIN_channelTriggerConfig(int moduleID, int nChannel, int analogTriggerMode, double threshold);

 

C++

int SD_AIN::channelTriggerConfig(int nChannel, int analogTriggerMode, double threshold);

 

Visual Studio .NET, MATLAB

int SD_AIN::channelTriggerConfig(int nChannel, int analogTriggerMode, double threshold);

 

Python

int SD_AIN::channelTriggerConfig(int nChannel, int analogTriggerMode, double threshold);

 

LabVIEW

channelTriggerConfig.vi

 

M3601A

Available: Yes

DAQconfig

This function configures the acquisition of words Data Acquisition (DAQs) in two possible reading modes:

 

timeout elapses. In the latter condition, there may be words available, but less than the amount specified in DAQpoints.

 

Parameters
Name Description
   
Inputs  
moduleID (Non-object-oriented languages only) Module identifier, returned by function open
nDAQ DAQ to configure
triggerMode Trigger mode
triggerDelay (number of samples that trigger is delayed (or advanced if negative))
DAQpointsPerCycle Number of words to acquire per trigger
cycles Number of acquisition cycles. Each cycle requires a trigger specified by triggerMode. A negative number means continuous acquisition
errorIn (LabVIEW only) If it contains an error, the function will not be executed and errorIn will be passed to errorOut
   
Outputs  
moduleIDout (LabVIEW only) A copy of moduleID
errorOut Error Codes

 

C

int SD_AIN_DAQconfig(int moduleID, int nDAQ, int DAQpointsPerCycle, int cycles, int triggerDelay, int triggerMode);

 

C++

int SD_AIN::DAQconfig(int nDAQ, int DAQpointsPerCycle, int cycles, int triggerDelay, int triggerMode;

 

Visual Studio .NET, MATLAB

int SD_AIN::DAQconfig(int nDAQ, int DAQpointsPerCycle, int cycles, int triggerDelay, int triggerMode;

 

Python

int SD_AIN::DAQconfig(int nDAQ, int DAQpointsPerCycle, int cycles, int triggerDelay, int triggerMode;

 

LabVIEW

DAQconfig.vi

DAQdigitalTriggerConfig

This function configures the digital hardware triggers for the selected DAQ Trigger.

 

Parameters
Name Description
   
Inputs  
moduleID (Non-object-oriented languages only) Module identifier, returned by function open
nDAQ DAQ number
triggerSource HW digital trigger source
triggerNumber PXI (PXI/PXIe only) trigger number or external I/O trigger number
triggerBehavior Trigger behaviour (
errorIn (LabVIEW only) If it contains an error, the function will not be executed and errorIn will be passed to errorOut
   
Outputs  
moduleIDOut (LabVIEW only) A copy of moduleID
errorOut Error Codes
C

int SD_AIN_DAQdigitalTriggerConfig(int moduleID, int nDAQ, int triggerSource, int triggerNumber, int triggerBehaviour);

 

C++

int SD_AIN::DAQdigitalTriggerConfig(int nDAQ, int triggerSource, int triggerBehaviour);

 

Visual Studio .NET, MATLAB

int SD_AIN::DAQdigitalTriggerConfig(int nDAQ, int triggerSource, int triggerBehaviour);

 

Python

int SD_AIN::DAQdigitalTriggerConfig(int nDAQ, int triggerSource, int triggerBehaviour);

 

LabVIEW

DAQdigitalTriggerConfig.vi

 

M3601A

Available: Yes

DAQanalogTriggerConfig

This function configures the analog hardware trigger for the selected DAQ Trigger.

 

Analog DAQ: This feature is only available for Data Acquisition Blocks (DAQs) included in products with analog inputs
Parameters
Name Description
   
Inputs  
moduleID (Non-object-oriented languages only) Module identifier, returned by function open
nDAQ DAQ number
triggerNumber Analog trigger number
errorIn (LabVIEW only) If it contains an error, the function will not be executed and errorIn will be passed to errorOut
   
Outputs  
moduleIDOut (LabVIEW only) A copy of moduleID
errorOut Error Codes

 

C

int SD_AIN_DAQanalogTriggerConfig (int moduleID, int nDAQ, int triggerNumber);

 

C++

int SD_AIN::DAQanalogTriggerConfig (int nDAQ, int triggerNumber);

 

Visual Studio .NET, MATLAB

int SD_AIN::DAQanalogTriggerConfig (int nDAQ, int triggerNumber);

 

Python

int SD_AIN::DAQanalogTriggerConfig (int nDAQ, int triggerNumber);

 

LabVIEW

DAQanalogTriggerConfig .vi

 

M3601A

Available: No

DAQread

 

This function reads the words acquired with the selected DAQ Data Acquisition (DAQs). It can be used only after calling the function DAQconfig and when a callback function is not configured. DAQread is a blocking function released when the configured amount of words is acquired, or when the configured timeout elapses (if timeout is set to ”0” , then DAQreadwaits until DAQpoints are acquired). In the timeout elapses, there may be words available, but less than the configured amount.

 

Parameters
Name Description
   
Inputs  
moduleID (Non-object-oriented languages only) Module identifier, returned by function open
nDAQ DAQ to be read
DAQdata Array to be filled with acquired words
DAQpoints Size (number of words) of DAQdata
timeout Timeout in ms when waiting for the amount of words specified in DAQpoints. "0" means infinite
errorIn (LabVIEW only) If it contains an error, the function will not be executed and errorIn will be passed to errorOut
   
Outputs  
moduleIDout (LabVIEW only) A copy of moduleID
DAQdata Array with acquired words
DAQpoints Number of acquired words
status ”1” if DAQpoints is equal to the amount of words configured with DAQconfig, ”0” in case of timeout, or negative numbers for Error Codes
errorOut Error Codes

 

C

int SD_AIN_DAQread(int moduleID, int nDAQ, short* DAQdata, int DAQpoints, int timeout);

 

C++

int SD_AIN::DAQread(int nDAQ, short* DAQdata, int DAQpoints, int timeout);

 

Visual Studio .NET, MATLAB

int SD_AIN::DAQread(int nDAQ, short[] DAQdata, int timeout);

 

Python

{short[], int} SD_AIN::DAQread(int nDAQ, int DAQpoints, int timeout);

*Returned data array is a NumPy array

 

LabVIEW

DAQread.vi

 

M3601A

Available: No

DAQstart

 

This function starts acquisition on the selected DAQs Data Acquisition (DAQs). Acquisition will start when a trigger is received.

 

Parameters
Name Description
   
Inputs  
moduleID (Non-object-oriented languages only) Module identifier, returned by function open
nDAQ DAQ to be started or resumed. DAQ n is connected to channel n
errorIn (LabVIEW only) If it contains an error, the function will not be executed and errorIn will be passed to errorOut
   
Outputs  
moduleIDOut (LabVIEW only) A copy of moduleID
errorOut Error Codes

 

C

int SD_AIN_DAQstart(int moduleID, int nDAQ);

 

C++

int SD_AIN::DAQstart(int nDAQ);

 

Visual Studio .NET, MATLAB

int SD_AIN::DAQstart(int nDAQ);

 

Python

int SD_AIN::DAQstart(int nDAQ);

 

LabVIEW

DAQstart.vi

 

M3601A

Available: Yes

 

DAQstartMultiple

This function starts acquisition on the selected DAQs Data Acquisition (DAQs). Acquisition will start when a trigger is received.

 

Parameters

Name

Description

   

Inputs

 

moduleID

(Non-object oriented languages only) Module identifier, returned by function open

DAQmask Mask to select which DAQs are started or resumed (LSB is 0, bit 1 and so forth). DAQ n is connected to channel n

nDAQ

DAQ to be started or resumed. DAQ n is connected to channel n

errorIn

(LabVIEW only) If it contains an error, the function will not be executed and errorIn will be passed to errorOut

   

Outputs

 

moduleIDOut

(LabVIEW only) A copy of moduleID

errorOut

See Error Codes

 

C

int SD_AIN_DAQstartMultiple(int moduleID, int DAQmask);

 

C++

int SD_AIN::DAQstartMultiple(int DAQmask);

 

Visual Studio .NET, MATLAB

int SD_AIN::DAQstartMultiple(int nDAQmask);

 

Python

int SD_AIN::DAQstartMultiple(int nDAQmask);

 

LabVIEW

DAQstartMultiple.vi

 

M3601A

Available: No (multiple DAQstart from different channels can be executed at once)

DAQstop

This function stops the words acquisition Data Acquisition (DAQs).

 

Parameters
Name Description
   
Inputs  
moduleID (Non-object-oriented languages only) Module identifier, returned by function open
nDAQ DAQ to be paused. DAQ n is connected to channel n
errorIn (LabVIEW only) If it contains an error, the function will not be executed and errorIn will be passed to errorOut
   
Outputs  
moduleIDOut (LabVIEW only) A copy of moduleID
errorOut Error Codes

 

C

int SD_AIN_DAQstop(int moduleID, int nDAQ);

 

C++

int SD_AIN::DAQstop(int nDAQ);

 

Visual Studio .NET, MATLAB

int SD_AIN::DAQstop(int nDAQ);

 

Python

int SD_AIN::DAQstop(int nDAQ);

 

LabVIEW

DAQstop.vi

 

M3601A

Available: Yes

DAQstopMultiple

This function pauses the words acquisition Data Acquisition (DAQs).

 

Parameters

Name

Description

   

Inputs

 

moduleID

(Non-object oriented languages only) Module identifier, returned by function open

DAQmask Mask to select which DAQs are paused (LSB is 0, bit 1 and so forth). DAQ n is connected to channel n

nDAQ

DAQ is paused. DAQ n is connected to channel n

errorIn

(LabVIEW only) If it contains an error, the function will not be executed and errorIn will be passed to errorOut

   

Outputs

 

moduleIDOut

(LabVIEW only) A copy of moduleID

errorOut

See Error Codes

 

C

int SD_AIN_DAQstopMultiple(int moduleID, int DAQmask);

 

C++

int SD_AIN::DAQstopMultiple(int DAQmask);

 

Visual Studio .NET, MATLAB

int SD_AIN::DAQstopMultiple(int nDAQ);

 

Python

int SD_AIN::DAQstopMultiple(int nDAQ);

 

LabVIEW

DAQstopMultiple.vi

 

M3601A

Available: No (multiple DAQstop from different channels can be executed at once)

DAQpause

This function pauses the words acquisition Data Acquisition (DAQs). Acquisition can be resumed using DAQresume.

 

Parameters

Name

Description

   

Inputs

 

moduleID

(Non-object oriented languages only) Module identifier, returned by function open

nDAQ

DAQ to be stopped

errorIn

(LabVIEW only) If it contains an error, the function will not be executed and errorIn will be passed to errorOut

   

Outputs

 

moduleIDOut

(Non-object-oriented languages only) Module identifier, or a negative number for errors (see Error Codes)

errorOut

See Error Codes

C

int SD_AIN_DAQpause(int moduleID, int nDAQ);

 

C++

int SD_AIN::DAQpause(int nDAQ);

 

Visual Studio .NET, MATLAB

 

int SD_AIN::DAQpause(int nDAQ);

 

Python

int SD_AIN::DAQpause(int nDAQ);

 

LabVIEW

DAQpause.vi

 

M3601A

Available: Yes

DAQpauseMultiple

This function pauses the words acquisition Data Acquisition (DAQs). Acquisition can be resumed using DAQresume.

 

Parameters

Name

Description

   

Inputs

 

moduleID

(Non-object oriented languages only) Module identifier, returned by function open

DAQmask Mask to select which DAQs are paused (LSB is 0, bit 1 and so forth). DAQ n is connected to channel n

DAQ

DAQ is paused. DAQ n is connected to channel n

errorIn

(LabVIEW only) If it contains an error, the function will not be executed and errorIn will be passed to errorOut

   

Outputs

 

moduleIDOut

(LabVIEW only) A copy of noduleID

errorOut

See Error Codes

 

C

int SD_AIN_DAQpauseMultiple(int moduleID, int DAQmask);

 

C++

int SD_AIN::DAQpauseMultiple(int DAQmask);

 

Visual Studio .NET, MATLAB

int SD_AIN::DAQpauseMultiple(int DAQmask);

 

Python

int SD_AIN::DAQpauseMultiple(int DAQmask);

 

LabVIEW

DAQpauseMultiple.vi

 

M3601A

Available: No (multiple DAQpause from different channels can be executed at once)

 

DAQresume

This function resumes acquisition on the selected DAQs Data Acquisition (DAQs).

 

Parameters

Name

Description

   

Inputs

 

moduleID

(Non-object oriented languages only) Module identifier, returned by function open

nDAQ

DAQ to be resumed

errorIn

(LabVIEW only) If it contains an error, the function will not be executed and errorIn will be passed to errorOut

   

Outputs

 

moduleID

(Non-object-oriented languages only) Module identifier, or a negative number for errors (Error Codes)

errorOut

Error Codes

 

C

int SD_AIN_DAQresume(int moduleID, int nDAQ);

 

C++

int SD_AIN::DAQresume(int nDAQ);

 

Visual Studio .NET, MATLAB

int SD_AIN::DAQresume(int nDAQ);

 

Python

int SD_AIN::DAQresume(int nDAQ);

 

LabVIEW

DAQresume.vi

 

M3601A

Available: Yes

DAQresumeMultiple

This function resumes acquisition on the selected DAQs Data Acquisition (DAQs)

 

Parameters

Name

Description

   

Inputs

 

moduleID

(Non-object oriented languages only) Module identifier, returned by function open

DAQmask Mask to select which DAQs are started or resumed (LSB is 0, bit 1 and so forth). DAQ n is connected to channel n

nDAQ

DAQ is started or resumed. DAQ n is connected to channel n

errorIn

(LabVIEW only) If it contains an error, the function will not be executed and errorIn will be passed to errorOut

   

Outputs

 

moduleIDOut

(LabVIEW only) A copy of moduleID

errorOut

See Error Codes

 

C

int SD_AIN_DAQresumeMultiple(int moduleID, int DAQmask);

 

C++

int SD_AIN::DAQresumeMultiple(int DAQmask);

 

Visual Studio .NET, MATLAB

int SD_AIN::DAQresumeMultiple(int DAQmask);

 

Python

int SD_AIN::DAQresumeMultiple(int DAQmask);

 

LabVIEW

DAQresumeMultiple.vi

 

M3601A

Available: No (multiple DAQresume from different channels can be executed at once)

 

DAQflush

This function flushes the acquisition buffers and resets the acquisition counter included in a Data Acquisition block (Data Acquisition (DAQs)).

 

Parameters
Name Description
   
Inputs  
moduleID (Non-object-oriented languages only) Module identifier, returned by function open
nDAQ DAQ to be reset.
errorIn (LabVIEW only) If it contains an error, the function will not be executed and errorIn will be passed to errorOut
   
Outputs  
moduleIDOut Non-object-oriented languages only) Module identifier, or a negative number for errors (see Error Codes)
errorOut Error Codes

 

C

int SD_AIN_DAQflush(int moduleID, int nDAQ);

 

C++

int SD_AIN::DAQflush(int nDAQ);

 

Visual Studio .NET, MATLAB

int SD_AIN::DAQflush(int nDAQ);

 

Python

int SD_AIN::DAQflush(int nDAQ);

 

LabVIEW

DAQflush.vi

 

M3601A

Available: Yes

DAQflushMultiple

This function flushes the acquisition buffers and resets the acquisition counter included in a Data Acquisition block (Data Acquisition (DAQs).

 

Parameters
Name Description
   
Inputs  
moduleID (Non-object-oriented languages only) Module identifier, returned by function open
DAQmask Mask to select which DAQs are reset (LSB is DAQ 0, bit 1 is DAQ 1 and so forth). DAQ n is connected to channel n
DAQ DAQ to be reset. DAQ n is connected to channel n
errorIn (LabVIEW only) If it contains an error, the function will not be executed and errorIn will be passed to errorOut
   
Outputs  
moduleIDOut (LabVIEW only) A copy of moduleID
errorOut Error Codes

 

C

int SD_AIN_DAQflushMultiple(int moduleID, int DAQmask);

 

C++

int SD_AIN::DAQflushMultiple(int DAQmask);

 

Visual Studio .NET, MATLAB

int SD_AIN::DAQflushMultiple(int DAQmask);

 

Python

int SD_AIN::DAQflushMultiple(int DAQmask);

 

LabVIEW

DAQflushMultiple.vi

 

M3601A

Available: No (multiple DAQflush from different channels can be executed at once)

DAQtrigger

This function triggers the acquisition of words in the selected DAQs (Data Acquisition (DAQs)) provided that they are configured for VI/HVI Trigger.

 

Parameters
Name Description
   
Inputs  
moduleID (Non-object-oriented languages only) Module identifier, returned by function open
nDAQ DAQ to be triggered. DAQ n is connected to channel n
erronIn (LabVIEW only) If it contains an error, the function will not be executed and errorIn will be passed to errorOut
   
Outputs  
moduleID (Non-object-oriented languages only) Module identifier, or a negative number for errors (see Error Codes
errorOut Error Codes

 

C

int SD_AIN_DAQtrigger(int moduleID, int nDAQ);

 

C++

int SD_AIN::DAQtrigger(int nDAQ);

 

Visual Studio .NET, MATLAB

int SD_AIN::DAQtrigger(int nDAQ);

 

Python

int SD_AIN::DAQtrigger(int nDAQ);

 

LabVIEW

DAQtrigger.vi

 

M3601A

Available: Yes

DAQtriggerMultiple

This function triggers the acquisition of words in the selected DAQs Data Acquisition (DAQs) provided that they are configured for VI/HVI Trigger.

 

Parameters

Name

Description

   

Inputs

 

moduleID

(Non-object oriented languages only) Module identifier, returned by function open

DAQmask Mask to select which DAQs are triggered (LSB is 0, bit 1 and so forth). DAQ n is connected to channel n

DAQ

DAQ to be triggered. DAQ n is connected to channel n

errorIn

(LabVIEW only) If it contains an error, the function will not be executed and errorIn will be passed to errorOut

   

Outputs

 

moduleIDOut

(LabVIEW only) A copy of moduleID

errorOut

See Error Codes

 

C

int SD_AIN_DAQtriggerMultiple(int moduleID, int DAQmask);

 

C++

int SD_AIN::DAQtriggerMultiple(int DAQmask);

 

Visual Studio .NET, MATLAB

int SD_AIN::DAQtriggerMultiple(int DAQmask);

 

Python

int SD_AIN::DAQtriggerMultiple(int DAQmask);

 

LabVIEW

DAQtriggerMultiple.vi

 

M3601A

Available: No (multiple DAQtrigger from different channels can be executed at once)

 

DAQcounterRead

This function reads the number of words acquired by the selected DAQ (Data Acquisition (DAQs)) since the last call to DAQflush or DAQ.

 

Parameters
Name Description
   
Inputs  
moduleID (Non-object-oriented languages only) Module identifier, returned by function open
DAQ DAQ whose counter is read
errorIn (LabVIEW only) If it contains an error, the function will not be executed and errorIn will be passed to errorOut
   
Outputs  
moduleIDOut (LabVIEW only) A copy of moduleID
counter Value of the DAQ counter or a negative number for errors Error Codes
errorOut Error Codes

 

C

int SD_AIN_DAQcounterRead(int moduleID, int DAQ);

 

C++

int SD_AIN::DAQcounterRead(int DAQ);

 

Visual Studio .NET, MATLAB

int SD_AIN::DAQcounterRead(int DAQ);

 

Python

int SD_AIN::DAQcounterRead(int DAQ);

LabVIEW

DAQcounterRead.vi

 

M3601A

Available: No

triggerIOconfig

This function configures the trigger connector/line direction and synchronization/sampling method (I/O Triggers).

 

Parameters
Name Description
   
Inputs  
moduleID (Non-object-oriented languages only) Module identifier, returned by function open
direction Input or output
syncMode Sampling/synchronization mode
errorIn (LabVIEW only) If it contains an error, the function will not be executed and errorIn will be passed to errorOut
   
Outputs  
moduleIDout (LabVIEW only) A copy of moduleID
errorOut Error Codes

 

C

int SD_AIN_triggerIOconfig(int moduleID, int direction, int syncMode);

 

C++

int SD_AIN::triggerIOconfig(int direction, int syncMode);

 

Visual Studio .NET, MATLAB

int SD_AIN::triggerIOconfig(int direction, int syncMode);

 

Python

int SD_AIN::triggerIOconfig(direction);

 

LabVIEW

triggerIOconfig.vi

 

M3601A

Available: No

 

triggerIOwrite

This function sets the trigger output. The trigger must be configured as output using function triggerIOconfig) and I/O Triggers.

 

Parameters
Name Description
  Inputs
   
moduleID (Non-object-oriented languages only) Module identifier, returned by function open
value Trigger output value: 0 (OFF), 1 (ON)
errorIn (LabVIEW only) If it contains an error, the function will not be executed and errorIn will be passed to errorOut
   
Outputs  
moduleIDout (LabVIEW only) A copy of moduleID
errorOut Error Codes

 

C

int SD_AIN_triggerIOwrite(int moduleID, int value);

 

C++

int SD_AIN::triggerIOwrite(int value);

 

Visual Studio .NET, MATLAB

int SD_AIN::triggerIOwrite(int value);

 

Python

int SD_AIN::triggerIOwrite(int value);

 

LabVIEW

triggerIOwrite.vi

 

M3601A

Available: Yes

 

triggerIOread

This function reads the trigger input (I/O Triggers)

 

Parameters
Name Description
   
Inputs  
moduleID (Non-object-oriented languages only) Module identifier, returned by functionopen
errorIn (LabVIEW only) If it contains an error, the function will not be executed and errorIn will be passed to errorOut
   
Outputs  
moduleIDout (LabVIEW only) A copy of moduleID
value Trigger input value: 0 (OFF), 1 (ON). Negative numbers forError Codes
errorOut Error Codes

 

C

int SD_AIN_triggerIOread(int moduleID);

 

C++

int SD_AIN::triggerIOread();

 

Visual Studio .NET, MATLAB

int SD_AIN::triggerIOread();

 

Python

int SD_AIN::triggerIOread();

 

LabVIEW

triggerIOread.vi

 

M3601A

Available: No (can be acceses usingmat operations)

clockSetFrequency

This function sets the module clock frequency, see FlexCLK Technology (models with variable sampling rate).

 

Parameters
Name Description
   
Inputs  
moduleID (Non-object-oriented languages only) Module identifier, returned by function open
frequency Frequency in Hz
mode Operation mode of the variable Clock System
errorIn (LabVIEW only) If it contains an error, the function will not be executed and errorIn will be passed to errorOut
   
Outputs  
moduleIDout (LabVIEW only) A copy of moduleID
CLKsysFreq* It returns the real frequency applied to the hardware in Hz. It may differ from the desired frequency due to the hardware frequency resolution. Negative numbers for Error Codes
errorOut(LabVIEW only) Error Codes

 

*In Keysight Programming Libraries v.1.57.61 or older, clockSetFrequency returns CLKsyncFreq, the frequency of the internal CLKsync in Hz

 

C

double SD_AIN_clockSetFrequency(int moduleID, double frequency, int mode);

 

C++

double SD_AIN::clockSetFrequency(double frequency, int mode);

 

Visual Studio .NET, MATLAB

double SD_AIN::clockSetFrequency(double frequency, int mode);

 

Python

double SD_AIN::clockSetFrequency(double frequency, int mode);

 

LabVIEW

clockSetFrequency.vi

 

M3601A

Available: No

clockGetFrequency

This function returns the real hardware clock frequency (Clock System). It may differ from the frequency set with the function clockSetFrequency, due to the hardware frequency resolution.

 

Parameters
Name Description
   
Inputs  
moduleID (Non-object-oriented languages only) Module identifier, returned by function open
errorIn (LabVIEW only) If it contains an error, the function will not be executed and errorIn will be passed to errorOut
   
Outputs  
moduleIDout (LabVIEW only) A copy of moduleID
CLKsysFreq It returns the real hardware clock frequency in Hz (CLKsys). Negative numbers forError Codes
errorOut (LabVIEW only) Error Codes

 

C

double SD_AIN_clockGetFrequency(int moduleID);

 

C++

double SD_AIN::clockGetFrequency();

 

Visual Studio .NET, MATLAB

double SD_AIN::clockGetFrequency();

 

Python

double SD_AIN::clockGetFrequency();

LabVIEW

clockGetFrequency.vi

 

M3601A

Available: No

 

clockGetSyncFrequency

This function returns the frequency of Clock System

 

Parameters
Name Description
   
Inputs  
moduleID (Non-object-oriented languages only) Module identifier, returned by function open
errorIn (LabVIEW only) If it contains an error, the function will not be executed and errorIn will be passed to errorOut
   
Outputs  
moduleIDout (LabVIEW only) A copy of moduleID
CLKsyncFreq It returns the frequency of the internal CLKsync in Hz (Equation 2 on page 12). Negative numbers for Error Codes
errorOut (LabVIEW only) Error Codes

 

C

int SD_AIN_clockGetSyncFrequency(int moduleID);

 

C++

int SD_AIN::clockGetSyncFrequency();

 

Visual Studio .NET, MATLAB

int SD_AIN::clockGetSyncFrequency();

 

Python

int SD_AIN::clockGetSyncFrequency();

 

LabVIEW

clockGetSyncFrequency.vi

 

M3601A

Available: No

clockResetPhase

This function sets the module in a sync state, waiting for the first trigger to reset the phase of the internal clocks CLKsync and CLKsys (see Clock System).

 

Parameters
Name Description
   
Inputs  
moduleID (Non-object-oriented languages only) Module identifier, returned by function open
triggerBehavior Trigger behaviour
PXItrigger PXI trigger number
skew Skew between PXI CLK10 and CLKsync in multiples of 10 ns
errorIn (LabVIEW only) If it contains an error, the function will not be executed and errorIn will be passed to errorOut
   
Outputs  
moduleIDout (LabVIEW only) A copy of moduleID 
errorOut Error Codes

 

C

int SD_AIN_clockResetPhase(int moduleID, int triggerBehavior, int PXItrigger, double skew);

 

C++

int SD_AIN::clockResetPhase(int triggerBehavior, int PXItrigger, double skew);

 

Visual Studio .NET, MATLAB

int SD_AIN::clockResetPhase(int triggerBehavior, int PXItrigger, double skew);

 

Python

int SD_AIN::clockResetPhase(int triggerBehavior, int PXItrigger, double skew);

 

LabVIEW

clockResetPhase.vi

 

M3601A

Available: No

 

DAQbufferPoolConfig

This function configures buffer pool that will be filled with the data of the channel to be transferred to PC.

 

Parameters
Name Description
   
Inputs  
moduleID (Non-object oriented languages only) Module identifier, returned by function open
nDAQ DAQ to configure
dataBuffer Buffer to use in buffer pool. Has to be created and released by user
nPoints Size of dataBuffer buffer
timeOut Maximum time used to fill each buffer. If 0, timeout is not set and buffer will not be delivered to the user until it’s full
callbackFunction Callback that will be called each time a buffer is ready. It can be null. If callback is set, DAQbufferGet is useless
callbackUserObj Pointer to user object that will be passed in the callback as parameter called userObject. It can be null
errorIn (LabVIEW only) If it contains an error, the function will not be executed and errorIn will be passed to errorOut
   
Outputs  
moduleID (Non-object-oriented languages only) Module identifier, or a negative number for errors (see Error Codes
errorOut See Error Codes

 

C

int SD_AIN_DAQbufferPoolConfig(int moduleID, int nDAQ, short* dataBuffer, int nPoints, int timeOut, callbackEventPtr callbackFunction, void *callbackUserObj);

 

C++

int SD_AIN::DAQbufferPoolConfig(int nDAQ, short* dataBuffer, int nPoints, int timeOut, callbackEventPtr callbackFunction, void *callbackUserObj);

 

Visual Studio .NET, MATLAB

int SD_AIN::DAQbufferPoolConfig(int nDAQ, short[] dataBuffer);

 

Python

int SD_AIN::DAQbufferPoolConfig(int nDAQ, int nPoints, int timeOut);

 

LabVIEW

DAQbuffer functions are not accessible

 

M3601A

Available: No

DAQbufferAdd

Adds an additional buffer to the channel’s previously configured pool.

 

Parameters
Name Description
   
Inputs  
moduleID (Non-object oriented languages only) Module identifier, returned by function open
nDAQ DAQ to configure
dataBuffer Buffer to use in buffer pool. Has to be created and released by user
nPoints Size of dataBuffer buffer
errorIn (LabVIEW only) If it contains an error, the function will not be executed and errorIn will be passed to errorOut
   
Outputs  
moduleID (Non-object-oriented languages only) Module identifier, or a negative number for errors (see Error Codes)
errorOut See Error Codes

 

C

int SD_AIN_DAQbufferAdd(int moduleID, int nDAQ, short* dataBuffer, int nPoints);

 

C++

int SD_AIN::DAQbufferAdd(int nDAQ, short *dataBuffer, int nPoints);

 

Visual Studio .NET, MATLAB

int SD_AIN::DAQbufferAdd(int nDAQ, short[] dataBuffer);

 

Python

Not available

 

LabVIEW

DAQbuffer functions are not accessible

 

M3601A

Available: No

DAQbufferGet

Gets a filled buffer from the channel buffer pool. User has to call DAQbufferAdd with this buffer to tell the pool that the buffer can be used again.

 

Parameters
Name Description
   
Inputs  
moduleID (Non-object oriented languages only) Module identifier, returned by function open
nDAQ DAQ from where get the buffer
errorIn (LabVIEW only) If it contains an error, the function will not be executed and errorIn will be passed to errorOut
   
Outputs  
moduleID (Non-object-oriented languages only) Module identifier, or a negative number for errors (see Error Codes)
errorOut See Error Codes
buffer Buffer obtained
readPointsOut Number of points of the returned buffer

 

C

short* SD_AIN_DAQbufferGet(int moduleID, int nDAQ, int &readPointsOut, int &errorOut);

 

C++

short* SD_AIN:: DAQbufferGet(int nDAQ, int &readPointsOut, int &errorOut);

 

Visual Studio .NET, MATLAB

short[] SD_AIN::DAQbufferGet(int nDAQ, out int readPointsOut, out int errorOut);

 

Python

[short[], int} SD_AIN::DAQbufferGet(int nDAQ);

*Returned data array is a NumPY array

 

LabVIEW

DAQbuffer functions are not accessible

 

M3601A

Available: No

DAQbufferPoolRelease

Releases the channel buffer pool and its resources. After this call, user has to call DAQbufferRemove consecutively to get all buffers back and release them.

 

Parameters
Name Description
   
Inputs  
moduleID (Non-object oriented languages only) Module identifier, returned by function open
nDAQ DAQ from where use take out the buffer
errorIn (LabVIEW only) If it contains an error, the function will not be executed and errorIn will be passed to errorOut
   
Outputs  
moduleID (Non-object-oriented languages only) Module identifier, or a negative number for errors (see Error Codes
errorOut See Error Codes

 

C

int SD_AIN_DAQbufferRelease(int moduleID, int nDAQ);

 

C++

int SD_AIN::DAQbufferPoolRelease(int nDAQ);

 

Visual Studio .NET, MATLAB

int SD_AIN::DAQbufferPoolRelease(int nDAQ);

 

Python

SD_AIN::DAQbufferDAQbufferPoolRelease(int nDAQ);

 

LabVIEW

DAQbuffer functions are not accessible

 

M3601A

Available: No

DAQbufferRemove

Ask for a buffer to be removed from the channel buffer pool. If NULL pointer is returned, no more buffers remains in buffer pool. Returned buffer is a previously added buffer from user and user has to release/delete it.

 

Parameters
Name Description
   
Inputs  
moduleID (Non-object oriented languages only) Module identifier, returned by function open
nDAQ DAQ from where use take out the buffer
errorIn (LabVIEW only) If it contains an error, the function will not be executed and errorIn will be passed to errorOut
   
Outputs  
moduleID (Non-object-oriented languages only) Module identifier, or a negative number for errors (see Error Codes
buffer Buffer obtained

 

C

short* SD_AIN_DAQbufferRemove(int moduleID, int nDAQ);

 

C++

short* SD_AIN::DAQbufferRemove(int nDAQ);

 

Visual Studio .NET, MATLAB

short[] SD_AIN::DAQbufferRemove(int nDAQ);

 

Python

Not available

 

LabVIEW

DAQbuffer functions are not accessible

 

M3601A

Available: No

 

FFT

Calculates the FFT of data captured by DAQread for the selected channel.

 

Parameters
Name Description
   
Inputs  
moduleID (Non-object oriented languages only) Module identifier, returned by function open
channel Input channel number
data data previously acquired by DAQread
size Input data size
resultSize Size of the output buffers (module and phase)
dB Scale (dB or linear)
windowType Windowing option (section 2.1.5)
errorIn (LabVIEW only) If it contains an error, the function will not be executed and errorIn will be passed to errorOut
   
Outputs  
moduleID (Non-object-oriented languages only) Module identifier, or a negative number for errors (see Error Codes (page 70)
result Module (magnitude) of the FFT
resultPhase Phase of the FFT
errorOut Error Codes

 

C

int SD_AIN_FFT(int moduleID, int channel, short *data, int size, double *result, int resultSize, double *resultPhase, bool dB, int windowType);

 

C++

int SD_AIN::FFT(int channel, short *data, int size, double *result, int resultSize, double *resultPhase, bool dB, int windowType);

 

Visual Studio .NET, MATLAB

int SD_AIN::FFT(int channel, short[] data, out double[] result, bool dB, int windowType);

int SD_AIN::FFT(int channel, short[] data, out double[] result, out double[] resultPhase, bool dB, int windowType);

 

Python

{double[][], int} SD_AIN::FFT(int channel, short[] data, bool dB, int windowType);

*Returned data array is a NumPy array

 

LabVIEW

Not available

 

M3601A

Available: No

 

Error Codes

 

Error Define

Error No

Error Description

     
SD_ERROR_OPENING_MODULE -8000 Keysight Error: Opening module
SD_ERROR_CLOSING_MODULE -8001 Keysight Error: Closing module
SD_ERROR_OPENING_HVI -8002 Keysight Error: Opening HVI
SD_ERROR_CLOSING_HVI -8003 Keysight Error: Closing HVI
SD_ERROR_MODULE_NOT_OPENED -8004 Keysight Error: Module not opened
SD_ERROR_MODULE_NOT_OPENED_BY_USER -8005 Keysight Error: Module not opened by user
SD_ERROR_MODULE_ALREADY_OPENED -8006 Keysight Error: Module already opened
SD_ERROR_HVI_NOT_OPENED -8007 Keysight Error: HVI not opened
SD_ERROR_INVALID_OBJECTID -8008 Keysight Error: Invalid ObjectID
SD_ERROR_INVALID_MODULEID -8009 Keysight Error: Invalid ModuleID
SD_ERROR_INVALID_MODULEUSERNAME -8010 Keysight Error: Invalid Module User Name
SD_ERROR_INVALID_HVIID -8011 Keysight Error: Invalid HVI
SD_ERROR_INVALID_OBJECT -8012 Error: Invalid Object
SD_ERROR_INVALID_NCHANNEL -8013 Keysight Error: Invalid channel number
SD_ERROR_BUS_DOES_NOT_EXIST -8014 Keysight Error: Bus doesn’t exist
SD_ERROR_BITMAP_ASSIGNED_DOES_NOT_EXIST -8015 Keysight Error: Any input assigned to the bitMap does not exist
SD_ERROR_BUS_INVALID_SIZE -8016 Keysight Error: Input size does not fit on this bus
SD_ERROR_BUS_INVALID_DATA -8017 Keysight Error: Input data does not fit on this bus
SD_ERROR_INVALID_VALUE -8018 Keysight Error: Invalid value
SD_ERROR_CREATING_WAVE -8019 Keysight Error: Creating Waveform
SD_ERRO_NOT_VALID_PARAMETERS -8020 Keysight Error: Invalid Parameters
SD_ERROR_AWG -8021 Keysight Error: AWG function failed
SD_ERROR_DAQ_INVALID_FUNCTIONALITY -8022 Keysight Error: Invalid DAQ functionality
SD_ERROR_DAQ_POOL_ALREADY_RUNNING -8023 Keysight Error: DAQ buffer pool is already running
SD_ERROR_UNKNOWN -8024 Keysight Error: Unknown error
SD_ERROR_INVALID_PARAMETERS -8025 Keysight Error: Invalid parameter
SD_ERROR_MODULE_NOT_FOUND -8026 Keysight Error: Module not found
SD_ERROR_DRIVER_RESOURCE_BUSY -8027 Keysight Error: Driver resource busy
SD_ERROR_DRIVER_RESOURCE_NOT_READY -8028 Keysight Error: Driver resource not ready
SD_ERROR_DRIVER_ALLOCATE_BUFFER -8029 Keysight Error: Cannot allocate buffer in driver
SD_ERROR_ALLOCATE_BUFFER -8030 Keysight Error: Cannot allocate buffer
SD_ERROR_RESOURCE_NOT_READY -8031 Keysight Error: Resource not ready
SD_ERROR_HARDWARE -8032 Keysight Error: Hardware error
SD_ERROR_INVALID_OPERATION -8033 Keysight Error: Invalid Operation
SD_ERROR_NO_COMPILED_CODE -8034 Keysight Error: No compiled code in the module
SD_ERROR_FW_VERIFICATION -8035 Keysight Error: Firmware verification failed
SD_ERROR_COMPATIBILITY -8036 Keysight Error: Compatibility error
SD_ERROR_INVALID_TYPE -8037 Keysight Error: Invalid type
SD_ERROR_DEMO_MODULE -8038 Keysight Error: Demo module
SD_ERROR_INVALID_BUFFER -8039 Keysight Error: Invalid buffer
SD_ERROR_INVALID_INDEX -8040 Keysight Error: Invalid index
SD_ERROR_INVALID_NHISTOGRAM -8041 Keysight Error: Invalid histogram number
SD_ERROR_INVALID_NBINS -8042 Keysight Error: Invalid number of bins
SD_ERROR_INVALID_MASK -8043 Keysight Error: Invalid mask
SD_ERROR_INVALID_WAVEFORM -8044 Keysight Error: Invalid waveform
SD_ERROR_INVALID_STROBE -8045 Keysight Error: Invalid strobe
SD_ERROR_INVALID_STROBE_VALUE -8046 Keysight Error: Invalid strobe value
SD_ERROR_INVALID_DEBOUNCING -8047 Keysight Error: Invalid debouncing
SD_ERROR_INVALID_PRESCALER -8048 Keysight Error: Invalid prescaler
SD_ERROR_INVALID_PORT -8049 Keysight Error: Invalid port
SD_ERROR_INVALID_DIRECTION -8050 Keysight Error: Invalid direction
SD_ERROR_INVALID_MODE -8051 Keysight Error: Invalid mode
SD_ERROR_INVALID_FREQUENCY -8052 Keysight Error: Invalid frequency
SD_ERROR_INVALID_IMPEDANCE -8053 Keysight Error: Invalid impedance
SD_ERROR_INVALID_GAIN -8054 Keysight Error: Invalid gain
SD_ERROR_INVALID_FULLSCALE -8055 Keysight Error: Invalid fullscale
SD_ERROR_INVALID_FILE -8056 Keysight Error: Invalid file
SD_ERROR_INVALID_SLOT -8057 Keysight Error: Invalid slot
SD_ERROR_INVALID_NAME -8058 Keysight Error: Invalid product name
SD_ERROR_INVALID_SERIAL -8059 Keysight Error: Invalid serial number
SD_ERROR_INVALID_START -8060 Keysight Error: Invalid start
SD_ERROR_INVALID_END -8061 Keysight Error: Invalid end
SD_ERROR_INVALID_CYCLES -8062 Keysight Error: Invalid number of cycles
SD_ERROR_HVI_INVALID_NUMBER_MODULES -8063 Keysight Error: Invalid number of modules on HVI
SD_ERROR_DAQ_P2P_ALREADY_RUNNING -8064 Keysight Error: DAQ P2P is already running
SD_Error.OPEN_DRAIN_NOT_SUPPORTED -8065 Open drain not supported
SD_Error.CHASSIS_PORTS_NOT_SUPPORTED -8066 Chassis port not supported
SD_Error.CHASSIS_SETUP_NOT_SUPPORTED -8067 Chassis setup not supported
SD_Error.OPEN_DRAIN_FAILED -8068 Open drain failed
SD_Error.CHASSIS_SETUP_FAILED -8069 Chassis setup failed
SD_Error.INVALID_PART -8070 Invalid part
SD_Error.INVALID_SIZE -8071 Invalid size
SD_Error.INVALID_HANDLE -8072 Invalid handle

 

Table 15: Software error codes