📄 daq53.cpp
字号:
if (!_get_numeric(prhs[2], &_arg_calOP))
mexErrMsgTxt("Expecting numeric scalar for argument calOP");
if (_n_dims(prhs[3]) > 0)
mexErrMsgTxt("Error in dimension of argument saveNewCal");
if (!_get_numeric(prhs[3], &_arg_saveNewCal))
mexErrMsgTxt("Expecting numeric scalar for argument saveNewCal");
if (_n_dims(prhs[4]) > 0)
mexErrMsgTxt("Error in dimension of argument EEPROMloc");
if (!_get_numeric(prhs[4], &_arg_EEPROMloc))
mexErrMsgTxt("Expecting numeric scalar for argument EEPROMloc");
if (_n_dims(prhs[5]) > 0)
mexErrMsgTxt("Error in dimension of argument calRefChan");
if (!_get_numeric(prhs[5], &_arg_calRefChan))
mexErrMsgTxt("Expecting numeric scalar for argument calRefChan");
if (_n_dims(prhs[6]) > 0)
mexErrMsgTxt("Error in dimension of argument grndRefChan");
if (!_get_numeric(prhs[6], &_arg_grndRefChan))
mexErrMsgTxt("Expecting numeric scalar for argument grndRefChan");
if (_n_dims(prhs[7]) > 0)
mexErrMsgTxt("Error in dimension of argument DAC0chan");
if (!_get_numeric(prhs[7], &_arg_DAC0chan))
mexErrMsgTxt("Expecting numeric scalar for argument DAC0chan");
if (_n_dims(prhs[8]) > 0)
mexErrMsgTxt("Error in dimension of argument DAC1chan");
if (!_get_numeric(prhs[8], &_arg_DAC1chan))
mexErrMsgTxt("Expecting numeric scalar for argument DAC1chan");
if (_n_dims(prhs[9]) > 0)
mexErrMsgTxt("Error in dimension of argument calRefVolts");
if (!_get_numeric(prhs[9], &_arg_calRefVolts))
mexErrMsgTxt("Expecting numeric scalar for argument calRefVolts");
if (_n_dims(prhs[10]) > 0)
mexErrMsgTxt("Error in dimension of argument gain");
if (!_get_numeric(prhs[10], &_arg_gain))
mexErrMsgTxt("Expecting numeric scalar for argument gain");
plhs[0] = mxCreateDoubleMatrix(1, 1, mxREAL);
_arg_retval = (short)
Calibrate_1200(_arg_deviceNumber, _arg_calOP, _arg_saveNewCal, _arg_EEPROMloc, _arg_calRefChan, _arg_grndRefChan, _arg_DAC0chan, _arg_DAC1chan, _arg_calRefVolts, _arg_gain);
*mxGetPr(plhs[0]) = (double)_arg_retval;
}
void _wrap_Calibrate_E_Series(int nlhs, mxArray **plhs, int nrhs, const mxArray **prhs)
{
if (nlhs > 1 ||
nrhs != 4+1)
mexErrMsgTxt("Wrong number of arguments to function Calibrate_E_Series");
short _arg_deviceNumber;
unsigned long _arg_calOp;
unsigned long _arg_setOfCalConst;
double _arg_calRefVolts;
short _arg_retval;
if (_n_dims(prhs[1]) > 0)
mexErrMsgTxt("Error in dimension of argument deviceNumber");
if (!_get_numeric(prhs[1], &_arg_deviceNumber))
mexErrMsgTxt("Expecting numeric scalar for argument deviceNumber");
if (_n_dims(prhs[2]) > 0)
mexErrMsgTxt("Error in dimension of argument calOp");
if (!_get_numeric(prhs[2], &_arg_calOp))
mexErrMsgTxt("Expecting numeric scalar for argument calOp");
if (_n_dims(prhs[3]) > 0)
mexErrMsgTxt("Error in dimension of argument setOfCalConst");
if (!_get_numeric(prhs[3], &_arg_setOfCalConst))
mexErrMsgTxt("Expecting numeric scalar for argument setOfCalConst");
if (_n_dims(prhs[4]) > 0)
mexErrMsgTxt("Error in dimension of argument calRefVolts");
if (!_get_numeric(prhs[4], &_arg_calRefVolts))
mexErrMsgTxt("Expecting numeric scalar for argument calRefVolts");
plhs[0] = mxCreateDoubleMatrix(1, 1, mxREAL);
_arg_retval = (short)
Calibrate_E_Series(_arg_deviceNumber, _arg_calOp, _arg_setOfCalConst, _arg_calRefVolts);
*mxGetPr(plhs[0]) = (double)_arg_retval;
}
void _wrap_Configure_HW_Analog_Trigger(int nlhs, mxArray **plhs, int nrhs, const mxArray **prhs)
{
if (nlhs > 1 ||
nrhs != 6+1)
mexErrMsgTxt("Wrong number of arguments to function Configure_HW_Analog_Trigger");
short _arg_deviceNumber;
unsigned long _arg_onOrOff;
long _arg_lowValue;
long _arg_highValue;
unsigned long _arg_mode;
unsigned long _arg_trigSource;
short _arg_retval;
if (_n_dims(prhs[1]) > 0)
mexErrMsgTxt("Error in dimension of argument deviceNumber");
if (!_get_numeric(prhs[1], &_arg_deviceNumber))
mexErrMsgTxt("Expecting numeric scalar for argument deviceNumber");
if (_n_dims(prhs[2]) > 0)
mexErrMsgTxt("Error in dimension of argument onOrOff");
if (!_get_numeric(prhs[2], &_arg_onOrOff))
mexErrMsgTxt("Expecting numeric scalar for argument onOrOff");
if (_n_dims(prhs[3]) > 0)
mexErrMsgTxt("Error in dimension of argument lowValue");
if (!_get_numeric(prhs[3], &_arg_lowValue))
mexErrMsgTxt("Expecting numeric scalar for argument lowValue");
if (_n_dims(prhs[4]) > 0)
mexErrMsgTxt("Error in dimension of argument highValue");
if (!_get_numeric(prhs[4], &_arg_highValue))
mexErrMsgTxt("Expecting numeric scalar for argument highValue");
if (_n_dims(prhs[5]) > 0)
mexErrMsgTxt("Error in dimension of argument mode");
if (!_get_numeric(prhs[5], &_arg_mode))
mexErrMsgTxt("Expecting numeric scalar for argument mode");
if (_n_dims(prhs[6]) > 0)
mexErrMsgTxt("Error in dimension of argument trigSource");
if (!_get_numeric(prhs[6], &_arg_trigSource))
mexErrMsgTxt("Expecting numeric scalar for argument trigSource");
plhs[0] = mxCreateDoubleMatrix(1, 1, mxREAL);
_arg_retval = (short)
Configure_HW_Analog_Trigger(_arg_deviceNumber, _arg_onOrOff, _arg_lowValue, _arg_highValue, _arg_mode, _arg_trigSource);
*mxGetPr(plhs[0]) = (double)_arg_retval;
}
void _wrap_DAQ_Check(int nlhs, mxArray **plhs, int nrhs, const mxArray **prhs)
{
if (nlhs != 3 ||
nrhs != 1+1)
mexErrMsgTxt("Wrong number of arguments to function DAQ_Check");
short _arg_slot;
short _arg_status;
unsigned long _arg_retrieved;
short _arg_retval;
if (_n_dims(prhs[1]) > 0)
mexErrMsgTxt("Error in dimension of argument slot");
if (!_get_numeric(prhs[1], &_arg_slot))
mexErrMsgTxt("Expecting numeric scalar for argument slot");
plhs[0] = mxCreateDoubleMatrix(1, 1, mxREAL);
plhs[1] = mxCreateDoubleMatrix(1, 1, mxREAL);
plhs[2] = mxCreateDoubleMatrix(1, 1, mxREAL);
_arg_retval = (short)
DAQ_Check(_arg_slot, &_arg_status, &_arg_retrieved);
*mxGetPr(plhs[0]) = (double)_arg_retval;
*mxGetPr(plhs[1]) = (double)_arg_status;
*mxGetPr(plhs[2]) = (double)_arg_retrieved;
}
void _wrap_DAQ_Clear(int nlhs, mxArray **plhs, int nrhs, const mxArray **prhs)
{
if (nlhs > 1 ||
nrhs != 1+1)
mexErrMsgTxt("Wrong number of arguments to function DAQ_Clear");
short _arg_slot;
short _arg_retval;
if (_n_dims(prhs[1]) > 0)
mexErrMsgTxt("Error in dimension of argument slot");
if (!_get_numeric(prhs[1], &_arg_slot))
mexErrMsgTxt("Expecting numeric scalar for argument slot");
plhs[0] = mxCreateDoubleMatrix(1, 1, mxREAL);
_arg_retval = (short)
DAQ_Clear(_arg_slot);
*mxGetPr(plhs[0]) = (double)_arg_retval;
}
void _wrap_DAQ_Config(int nlhs, mxArray **plhs, int nrhs, const mxArray **prhs)
{
if (nlhs > 1 ||
nrhs != 3+1)
mexErrMsgTxt("Wrong number of arguments to function DAQ_Config");
short _arg_slot;
short _arg_startTrig;
short _arg_extConv;
short _arg_retval;
if (_n_dims(prhs[1]) > 0)
mexErrMsgTxt("Error in dimension of argument slot");
if (!_get_numeric(prhs[1], &_arg_slot))
mexErrMsgTxt("Expecting numeric scalar for argument slot");
if (_n_dims(prhs[2]) > 0)
mexErrMsgTxt("Error in dimension of argument startTrig");
if (!_get_numeric(prhs[2], &_arg_startTrig))
mexErrMsgTxt("Expecting numeric scalar for argument startTrig");
if (_n_dims(prhs[3]) > 0)
mexErrMsgTxt("Error in dimension of argument extConv");
if (!_get_numeric(prhs[3], &_arg_extConv))
mexErrMsgTxt("Expecting numeric scalar for argument extConv");
plhs[0] = mxCreateDoubleMatrix(1, 1, mxREAL);
_arg_retval = (short)
DAQ_Config(_arg_slot, _arg_startTrig, _arg_extConv);
*mxGetPr(plhs[0]) = (double)_arg_retval;
}
void _wrap_DAQ_DB_Config(int nlhs, mxArray **plhs, int nrhs, const mxArray **prhs)
{
if (nlhs > 1 ||
nrhs != 2+1)
mexErrMsgTxt("Wrong number of arguments to function DAQ_DB_Config");
short _arg_slot;
short _arg_dbMode;
short _arg_retval;
if (_n_dims(prhs[1]) > 0)
mexErrMsgTxt("Error in dimension of argument slot");
if (!_get_numeric(prhs[1], &_arg_slot))
mexErrMsgTxt("Expecting numeric scalar for argument slot");
if (_n_dims(prhs[2]) > 0)
mexErrMsgTxt("Error in dimension of argument dbMode");
if (!_get_numeric(prhs[2], &_arg_dbMode))
mexErrMsgTxt("Expecting numeric scalar for argument dbMode");
plhs[0] = mxCreateDoubleMatrix(1, 1, mxREAL);
_arg_retval = (short)
DAQ_DB_Config(_arg_slot, _arg_dbMode);
*mxGetPr(plhs[0]) = (double)_arg_retval;
}
void _wrap_DAQ_DB_HalfReady(int nlhs, mxArray **plhs, int nrhs, const mxArray **prhs)
{
if (nlhs != 3 ||
nrhs != 1+1)
mexErrMsgTxt("Wrong number of arguments to function DAQ_DB_HalfReady");
short _arg_slot;
short _arg_halfReady;
short _arg_status;
short _arg_retval;
if (_n_dims(prhs[1]) > 0)
mexErrMsgTxt("Error in dimension of argument slot");
if (!_get_numeric(prhs[1], &_arg_slot))
mexErrMsgTxt("Expecting numeric scalar for argument slot");
plhs[0] = mxCreateDoubleMatrix(1, 1, mxREAL);
plhs[1] = mxCreateDoubleMatrix(1, 1, mxREAL);
plhs[2] = mxCreateDoubleMatrix(1, 1, mxREAL);
_arg_retval = (short)
DAQ_DB_HalfReady(_arg_slot, &_arg_halfReady, &_arg_status);
*mxGetPr(plhs[0]) = (double)_arg_retval;
*mxGetPr(plhs[1]) = (double)_arg_halfReady;
*mxGetPr(plhs[2]) = (double)_arg_status;
}
void _wrap_DAQ_Monitor(int nlhs, mxArray **plhs, int nrhs, const mxArray **prhs)
{
if (nlhs != 4 ||
nrhs != 4+1)
mexErrMsgTxt("Wrong number of arguments to function DAQ_Monitor");
short _arg_slot;
short _arg_chan;
short _arg_seq;
unsigned long _arg_monitorCnt;
short *_arg_monitorBuf;
unsigned long _arg_newestIndex;
short _arg_status;
short _arg_retval;
if (!_get_numeric(prhs[4], &_arg_monitorCnt))
mexErrMsgTxt("Expecting numeric scalar for argument monitorCnt");
if (_n_dims(prhs[1]) > 0)
mexErrMsgTxt("Error in dimension of argument slot");
if (!_get_numeric(prhs[1], &_arg_slot))
mexErrMsgTxt("Expecting numeric scalar for argument slot");
if (_n_dims(prhs[2]) > 0)
mexErrMsgTxt("Error in dimension of argument chan");
if (!_get_numeric(prhs[2], &_arg_chan))
mexErrMsgTxt("Expecting numeric scalar for argument chan");
if (_n_dims(prhs[3]) > 0)
mexErrMsgTxt("Error in dimension of argument seq");
if (!_get_numeric(prhs[3], &_arg_seq))
mexErrMsgTxt("Expecting numeric scalar for argument seq");
if (_n_dims(prhs[4]) > 0)
mexErrMsgTxt("Error in dimension of argument monitorCnt");
plhs[0] = mxCreateDoubleMatrix(1, 1, mxREAL);
{
int _ds[] = { _arg_monitorCnt, 1 };
plhs[1] = mxCreateNumericArray(max(1, 2), _ds, mxDOUBLE_CLASS, mxREAL);
_arg_monitorBuf = MEM_ALLOC(short *, _arraylen(plhs[1]), sizeof (short));
}
plhs[2] = mxCreateDoubleMatrix(1, 1, mxREAL);
plhs[3] = mxCreateDoubleMatrix(1, 1, mxREAL);
_arg_retval = (short)
DAQ_Monitor(_arg_slot, _arg_chan, _arg_seq, _arg_monitorCnt, _arg_monitorBuf, &_arg_newestIndex, &_arg_status);
*mxGetPr(plhs[0]) = (double)_arg_retval;
{
int _fidx;
double *d_ptr = mxGetPr(plhs[1]);
for (_fidx = 0; _fidx < _arraylen(plhs[1]); ++_fidx)
*d_ptr++ = (double)*_arg_monitorBuf++;
}
*mxGetPr(plhs[2]) = (double)_arg_newestIndex;
*mxGetPr(plhs[3]) = (double)_arg_status;
}
void _wrap_DAQ_Op(int nlhs, mxArray **plhs, int nrhs, const mxArray **prhs)
{
if (nlhs != 2 ||
nrhs != 5+1)
mexErrMsgTxt("Wrong number of arguments to function DAQ_Op");
short _arg_slot;
short _arg_chan;
short _arg_gain;
short *_arg_buffer;
unsigned long _arg_cnt;
double _arg_sampleRate;
short _arg_retval;
if (!_get_numeric(prhs[4], &_arg_cnt))
mexErrMsgTxt("Expecting numeric scalar for argument cnt");
if (_n_dims(prhs[1]) > 0)
mexErrMsgTxt("Error in dimension of argument slot");
if (!_get_numeric(prhs[1], &_arg_slot))
mexErrMsgTxt("Expecting numeric scalar for argument slot");
if (_n_dims(prhs[2]) > 0)
mexErrMsgTxt("Error in dimension of argument chan");
if (!_get_numeric(prhs[2], &_arg_chan))
mexErrMsgTxt("Expecting numeric scalar for argument chan");
if (_n_dims(prhs[3]) > 0)
mexErrMsgTxt("Error in dimension of argument gain");
if (!_get_numeric(prhs[3], &_arg_gain))
mexErrMsgTxt("Expecting numeric scalar for argument gain");
if (_n_dims(prhs[4]) > 0)
mexErrMsgTxt("Error in dimension of argument cnt");
if (_n_dims(prhs[5]) > 0)
mexErrMsgTxt("Error in dimension of argument sampleRate");
if (!_get_numeric(prhs[5], &_arg_sampleRate))
mexErrMsgTxt("Expecting numeric scalar for argument sampleRate");
plhs[0] = mxCreateDoubleMatrix(1, 1, mxREAL);
{
int _ds[] = { _arg_cnt, 1 };
plhs[1] = mxCreateNumericArray(max(1, 2), _ds, mxDOUBLE_CLASS, mxREAL);
_arg_buffer = MEM_ALLOC(short *, _arraylen(plhs[1]), sizeof (short));
}
_arg_retval = (short)
DAQ_Op(_arg_slot, _arg_chan, _arg_gain, _arg_buffer, _arg_cnt, _arg_sampleRate);
*mxGetPr(plhs[0]) = (double)_arg_retval;
{
int _fidx;
double *d_ptr = mxGetPr(plhs[1]);
for (_fidx = 0; _fidx < _arraylen(plhs[1]); ++_fidx)
*d_ptr++ = (double)*_arg_buffer++;
}
}
void _wrap_DAQ_Rate(in
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -