public class Nidaq
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
Nidaq.DaqConfig |
class |
Nidaq.DaqData |
class |
Nidaq.DAQmxCfgSampClkTimingParams |
class |
Nidaq.DAQmxClearTaskParams |
class |
Nidaq.DAQmxCreateAIVoltageChanParams |
class |
Nidaq.DAQmxCreateTaskParams |
class |
Nidaq.DAQmxGetDevIsSimulatedParams |
class |
Nidaq.DAQmxReadAnalogF64Params |
class |
Nidaq.DAQmxStartTaskParams |
class |
Nidaq.DAQmxStopTaskParams |
Constructor and Description |
---|
Nidaq() |
Modifier and Type | Method and Description |
---|---|
void |
daqTest() |
NIDeviceInfo |
findDeviceInfo(int deviceNumber)
Find information for a specific device number
|
static void |
fullBuffer(int iChan,
double[] data) |
double[] |
getAIVoltageRanges(int deviceNo) |
double[] |
getAOVoltageRanges(int deviceNo) |
int |
getCallBacksPerSecond()
Get the number of call backs per second.
|
java.lang.String |
getDeviceName(int deviceNo) |
java.util.ArrayList<NIDeviceInfo> |
getDevicesList()
Retrieve information for all NI devices.
|
java.lang.String |
getDeviceType(int deviceNo) |
int |
getMajorVersion()
Get the NI Major version number
|
int |
getMaxInputChannels(int deviceNo) |
double |
getMaxMultiChannelRate(int deviceNo) |
int |
getMaxOutputChannels(int deviceNo) |
double |
getMaxSingleChannelRate(int deviceNo) |
int |
getMinorVersion()
Get the NI Minor version number
|
static NIDAQProcess |
getNiDaqProcess() |
int |
getNumDevices()
Get the Number of NI devices.
|
int |
getSerialNum(int deviceNo)
Get the devices serial number
|
boolean |
isAISimultaneousSampling(int deviceNo)
Get if the device is simulated
|
boolean |
isLoadLibraryOK() |
boolean |
isSimulated(int deviceNo)
Get if the device is simulated
|
boolean |
javaDAQmxFailed(int error) |
java.lang.String |
javaDAQmxGetErrorString(int errorCode) |
int |
javaPlaybackData(double[] data) |
int |
javaPreparePlayback(int boardNumber,
int sampleRate,
int bufferSamples,
int[] outputChannelList) |
boolean |
javaStartPlayback() |
boolean |
javaStopPlayback() |
void |
load() |
int |
prepareDAQ(int deviceNo,
int sampleRate,
int[] inputChannelList,
double[] rangeListLo,
double[] rangeListHi,
int[] deviceList) |
static void |
resetPamguard(int errorCode,
char[] errorString) |
static void |
sayString(char[] string) |
void |
setCallBacksPerSecond(int callBacksPerSecond)
Set the number of times that NI calls the EveryNCallbacks function
to read from the internal buffers and send data through to the JAva side.
|
static void |
setNiDaqProcess(NIDAQProcess niDaqProcess) |
void |
setTerminalConfig(int terminalConfig) |
boolean |
setVoltageChannel(int deviceNo,
int channel,
double voltage) |
boolean |
setVoltageChannel(int deviceNo,
int channel,
double[] range,
double voltage)
Set a single voltage channel to a fixed value.
|
void |
showString(char[] string)
Mostly used as a callback from the C side to show string messages
|
int |
startDAQ() |
int |
stopDAQ() |
public boolean isLoadLibraryOK()
public boolean javaDAQmxFailed(int error)
public java.lang.String getDeviceName(int deviceNo)
deviceNo
- the device numberpublic java.lang.String getDeviceType(int deviceNo)
deviceNo
- the device numberpublic int getNumDevices()
N.B. the devices are 1 indexed, so when device numbers will range from 1 to getNumDevices() not 0 to getNumDevices()-1.
public int getMajorVersion()
public int getMinorVersion()
public void setCallBacksPerSecond(int callBacksPerSecond)
callBacksPerSecond
- public int getCallBacksPerSecond()
public int javaPreparePlayback(int boardNumber, int sampleRate, int bufferSamples, int[] outputChannelList)
public boolean javaStartPlayback()
public boolean javaStopPlayback()
public int javaPlaybackData(double[] data)
public java.util.ArrayList<NIDeviceInfo> getDevicesList()
public NIDeviceInfo findDeviceInfo(int deviceNumber)
deviceNumber
- device number (NOT index !)public int getSerialNum(int deviceNo)
deviceNo
- the device numberpublic boolean setVoltageChannel(int deviceNo, int channel, double[] range, double voltage)
deviceNo
- device numberchannel
- channel numberrange
- voltage rangevoltage
- voltagepublic boolean setVoltageChannel(int deviceNo, int channel, double voltage)
public boolean isSimulated(int deviceNo)
deviceNo
- the device numberpublic boolean isAISimultaneousSampling(int deviceNo)
deviceNo
- the device numberpublic int getMaxInputChannels(int deviceNo)
public double getMaxSingleChannelRate(int deviceNo)
public double getMaxMultiChannelRate(int deviceNo)
public int getMaxOutputChannels(int deviceNo)
public double[] getAIVoltageRanges(int deviceNo)
public double[] getAOVoltageRanges(int deviceNo)
public java.lang.String javaDAQmxGetErrorString(int errorCode)
public void daqTest()
public void load()
public void setTerminalConfig(int terminalConfig)
public int prepareDAQ(int deviceNo, int sampleRate, int[] inputChannelList, double[] rangeListLo, double[] rangeListHi, int[] deviceList)
public int startDAQ()
public int stopDAQ()
public void showString(char[] string)
string
- public static void sayString(char[] string)
public static void fullBuffer(int iChan, double[] data)
public static void resetPamguard(int errorCode, char[] errorString)
public static NIDAQProcess getNiDaqProcess()
public static void setNiDaqProcess(NIDAQProcess niDaqProcess)
niDaqProcess
- the niDaqProcess to set