📄 daq53.cpp
字号:
plhs[0] = mxCreateDoubleMatrix(1, 1, mxREAL);
plhs[1] = mxCreateDoubleMatrix(1, 1, mxREAL);
plhs[2] = mxCreateDoubleMatrix(1, 1, mxREAL);
_arg_retval = (short)
CTR_EvRead(_arg_slot, _arg_ctr, &_arg_overflow, &_arg_counts);
*mxGetPr(plhs[0]) = (double)_arg_retval;
*mxGetPr(plhs[1]) = (double)_arg_overflow;
*mxGetPr(plhs[2]) = (double)_arg_counts;
}
void _wrap_CTR_FOUT_Config(int nlhs, mxArray **plhs, int nrhs, const mxArray **prhs)
{
if (nlhs > 1 ||
nrhs != 5+1)
mexErrMsgTxt("Wrong number of arguments to function CTR_FOUT_Config");
short _arg_slot;
short _arg_FOUT;
short _arg_mode;
short _arg_timebase;
short _arg_division;
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 FOUT");
if (!_get_numeric(prhs[2], &_arg_FOUT))
mexErrMsgTxt("Expecting numeric scalar for argument FOUT");
if (_n_dims(prhs[3]) > 0)
mexErrMsgTxt("Error in dimension of argument mode");
if (!_get_numeric(prhs[3], &_arg_mode))
mexErrMsgTxt("Expecting numeric scalar for argument mode");
if (_n_dims(prhs[4]) > 0)
mexErrMsgTxt("Error in dimension of argument timebase");
if (!_get_numeric(prhs[4], &_arg_timebase))
mexErrMsgTxt("Expecting numeric scalar for argument timebase");
if (_n_dims(prhs[5]) > 0)
mexErrMsgTxt("Error in dimension of argument division");
if (!_get_numeric(prhs[5], &_arg_division))
mexErrMsgTxt("Expecting numeric scalar for argument division");
plhs[0] = mxCreateDoubleMatrix(1, 1, mxREAL);
_arg_retval = (short)
CTR_FOUT_Config(_arg_slot, _arg_FOUT, _arg_mode, _arg_timebase, _arg_division);
*mxGetPr(plhs[0]) = (double)_arg_retval;
}
void _wrap_CTR_Period(int nlhs, mxArray **plhs, int nrhs, const mxArray **prhs)
{
if (nlhs > 1 ||
nrhs != 3+1)
mexErrMsgTxt("Wrong number of arguments to function CTR_Period");
short _arg_slot;
short _arg_ctr;
short _arg_timebase;
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 ctr");
if (!_get_numeric(prhs[2], &_arg_ctr))
mexErrMsgTxt("Expecting numeric scalar for argument ctr");
if (_n_dims(prhs[3]) > 0)
mexErrMsgTxt("Error in dimension of argument timebase");
if (!_get_numeric(prhs[3], &_arg_timebase))
mexErrMsgTxt("Expecting numeric scalar for argument timebase");
plhs[0] = mxCreateDoubleMatrix(1, 1, mxREAL);
_arg_retval = (short)
CTR_Period(_arg_slot, _arg_ctr, _arg_timebase);
*mxGetPr(plhs[0]) = (double)_arg_retval;
}
void _wrap_CTR_Pulse(int nlhs, mxArray **plhs, int nrhs, const mxArray **prhs)
{
if (nlhs > 1 ||
nrhs != 5+1)
mexErrMsgTxt("Wrong number of arguments to function CTR_Pulse");
short _arg_slot;
short _arg_ctr;
short _arg_timebase;
unsigned short _arg_delay;
unsigned short _arg_pulseWidth;
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 ctr");
if (!_get_numeric(prhs[2], &_arg_ctr))
mexErrMsgTxt("Expecting numeric scalar for argument ctr");
if (_n_dims(prhs[3]) > 0)
mexErrMsgTxt("Error in dimension of argument timebase");
if (!_get_numeric(prhs[3], &_arg_timebase))
mexErrMsgTxt("Expecting numeric scalar for argument timebase");
if (_n_dims(prhs[4]) > 0)
mexErrMsgTxt("Error in dimension of argument delay");
if (!_get_numeric(prhs[4], &_arg_delay))
mexErrMsgTxt("Expecting numeric scalar for argument delay");
if (_n_dims(prhs[5]) > 0)
mexErrMsgTxt("Error in dimension of argument pulseWidth");
if (!_get_numeric(prhs[5], &_arg_pulseWidth))
mexErrMsgTxt("Expecting numeric scalar for argument pulseWidth");
plhs[0] = mxCreateDoubleMatrix(1, 1, mxREAL);
_arg_retval = (short)
CTR_Pulse(_arg_slot, _arg_ctr, _arg_timebase, _arg_delay, _arg_pulseWidth);
*mxGetPr(plhs[0]) = (double)_arg_retval;
}
void _wrap_CTR_Rate(int nlhs, mxArray **plhs, int nrhs, const mxArray **prhs)
{
if (nlhs != 4 ||
nrhs != 2+1)
mexErrMsgTxt("Wrong number of arguments to function CTR_Rate");
double _arg_freq;
double _arg_duty;
short _arg_timebase;
unsigned short _arg_period1;
unsigned short _arg_period2;
short _arg_retval;
if (_n_dims(prhs[1]) > 0)
mexErrMsgTxt("Error in dimension of argument freq");
if (!_get_numeric(prhs[1], &_arg_freq))
mexErrMsgTxt("Expecting numeric scalar for argument freq");
if (_n_dims(prhs[2]) > 0)
mexErrMsgTxt("Error in dimension of argument duty");
if (!_get_numeric(prhs[2], &_arg_duty))
mexErrMsgTxt("Expecting numeric scalar for argument duty");
plhs[0] = mxCreateDoubleMatrix(1, 1, mxREAL);
plhs[1] = mxCreateDoubleMatrix(1, 1, mxREAL);
plhs[2] = mxCreateDoubleMatrix(1, 1, mxREAL);
plhs[3] = mxCreateDoubleMatrix(1, 1, mxREAL);
_arg_retval = (short)
CTR_Rate(_arg_freq, _arg_duty, &_arg_timebase, &_arg_period1, &_arg_period2);
*mxGetPr(plhs[0]) = (double)_arg_retval;
*mxGetPr(plhs[1]) = (double)_arg_timebase;
*mxGetPr(plhs[2]) = (double)_arg_period1;
*mxGetPr(plhs[3]) = (double)_arg_period2;
}
void _wrap_CTR_Reset(int nlhs, mxArray **plhs, int nrhs, const mxArray **prhs)
{
if (nlhs > 1 ||
nrhs != 3+1)
mexErrMsgTxt("Wrong number of arguments to function CTR_Reset");
short _arg_slot;
short _arg_ctr;
short _arg_outState;
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 ctr");
if (!_get_numeric(prhs[2], &_arg_ctr))
mexErrMsgTxt("Expecting numeric scalar for argument ctr");
if (_n_dims(prhs[3]) > 0)
mexErrMsgTxt("Error in dimension of argument outState");
if (!_get_numeric(prhs[3], &_arg_outState))
mexErrMsgTxt("Expecting numeric scalar for argument outState");
plhs[0] = mxCreateDoubleMatrix(1, 1, mxREAL);
_arg_retval = (short)
CTR_Reset(_arg_slot, _arg_ctr, _arg_outState);
*mxGetPr(plhs[0]) = (double)_arg_retval;
}
void _wrap_CTR_Restart(int nlhs, mxArray **plhs, int nrhs, const mxArray **prhs)
{
if (nlhs > 1 ||
nrhs != 2+1)
mexErrMsgTxt("Wrong number of arguments to function CTR_Restart");
short _arg_slot;
short _arg_ctr;
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 ctr");
if (!_get_numeric(prhs[2], &_arg_ctr))
mexErrMsgTxt("Expecting numeric scalar for argument ctr");
plhs[0] = mxCreateDoubleMatrix(1, 1, mxREAL);
_arg_retval = (short)
CTR_Restart(_arg_slot, _arg_ctr);
*mxGetPr(plhs[0]) = (double)_arg_retval;
}
void _wrap_CTR_Simul_Op(int nlhs, mxArray **plhs, int nrhs, const mxArray **prhs)
{
if (nlhs > 1 ||
nrhs != 3+1)
mexErrMsgTxt("Wrong number of arguments to function CTR_Simul_Op");
short _arg_slot;
short _arg_numCtrs;
short *_arg_ctrList;
short _arg_mode;
short _arg_retval;
_arg_numCtrs = (_dim(prhs[2], 0));
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]) > 1)
mexErrMsgTxt("Error in dimension of argument ctrList");
if (mxIsInt16(prhs[2]) || mxIsUint16(prhs[2]))
_arg_ctrList = (short *)mxGetData(prhs[2]);
else
{
_arg_ctrList = MEM_ALLOC(short *, _arraylen(prhs[2]), sizeof (short));
if (!_get_numeric(prhs[2], _arg_ctrList))
mexErrMsgTxt("Expecting numeric matrix for argument ctrList");
}
if (_n_dims(prhs[3]) > 0)
mexErrMsgTxt("Error in dimension of argument mode");
if (!_get_numeric(prhs[3], &_arg_mode))
mexErrMsgTxt("Expecting numeric scalar for argument mode");
plhs[0] = mxCreateDoubleMatrix(1, 1, mxREAL);
_arg_retval = (short)
CTR_Simul_Op(_arg_slot, _arg_numCtrs, _arg_ctrList, _arg_mode);
*mxGetPr(plhs[0]) = (double)_arg_retval;
}
void _wrap_CTR_Square(int nlhs, mxArray **plhs, int nrhs, const mxArray **prhs)
{
if (nlhs > 1 ||
nrhs != 5+1)
mexErrMsgTxt("Wrong number of arguments to function CTR_Square");
short _arg_slot;
short _arg_ctr;
short _arg_timebase;
unsigned short _arg_period1;
unsigned short _arg_period2;
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 ctr");
if (!_get_numeric(prhs[2], &_arg_ctr))
mexErrMsgTxt("Expecting numeric scalar for argument ctr");
if (_n_dims(prhs[3]) > 0)
mexErrMsgTxt("Error in dimension of argument timebase");
if (!_get_numeric(prhs[3], &_arg_timebase))
mexErrMsgTxt("Expecting numeric scalar for argument timebase");
if (_n_dims(prhs[4]) > 0)
mexErrMsgTxt("Error in dimension of argument period1");
if (!_get_numeric(prhs[4], &_arg_period1))
mexErrMsgTxt("Expecting numeric scalar for argument period1");
if (_n_dims(prhs[5]) > 0)
mexErrMsgTxt("Error in dimension of argument period2");
if (!_get_numeric(prhs[5], &_arg_period2))
mexErrMsgTxt("Expecting numeric scalar for argument period2");
plhs[0] = mxCreateDoubleMatrix(1, 1, mxREAL);
_arg_retval = (short)
CTR_Square(_arg_slot, _arg_ctr, _arg_timebase, _arg_period1, _arg_period2);
*mxGetPr(plhs[0]) = (double)_arg_retval;
}
void _wrap_CTR_State(int nlhs, mxArray **plhs, int nrhs, const mxArray **prhs)
{
if (nlhs != 2 ||
nrhs != 2+1)
mexErrMsgTxt("Wrong number of arguments to function CTR_State");
short _arg_slot;
short _arg_ctr;
short _arg_outState;
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 ctr");
if (!_get_numeric(prhs[2], &_arg_ctr))
mexErrMsgTxt("Expecting numeric scalar for argument ctr");
plhs[0] = mxCreateDoubleMatrix(1, 1, mxREAL);
plhs[1] = mxCreateDoubleMatrix(1, 1, mxREAL);
_arg_retval = (short)
CTR_State(_arg_slot, _arg_ctr, &_arg_outState);
*mxGetPr(plhs[0]) = (double)_arg_retval;
*mxGetPr(plhs[1]) = (double)_arg_outState;
}
void _wrap_CTR_Stop(int nlhs, mxArray **plhs, int nrhs, const mxArray **prhs)
{
if (nlhs > 1 ||
nrhs != 2+1)
mexErrMsgTxt("Wrong number of arguments to function CTR_Stop");
short _arg_slot;
short _arg_ctr;
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 ctr");
if (!_get_numeric(prhs[2], &_arg_ctr))
mexErrMsgTxt("Expecting numeric scalar for argument ctr");
plhs[0] = mxCreateDoubleMatrix(1, 1, mxREAL);
_arg_retval = (short)
CTR_Stop(_arg_slot, _arg_ctr);
*mxGetPr(plhs[0]) = (double)_arg_retval;
}
void _wrap_Calibrate_1200(int nlhs, mxArray **plhs, int nrhs, const mxArray **prhs)
{
if (nlhs > 1 ||
nrhs != 10+1)
mexErrMsgTxt("Wrong number of arguments to function Calibrate_1200");
short _arg_deviceNumber;
short _arg_calOP;
short _arg_saveNewCal;
short _arg_EEPROMloc;
short _arg_calRefChan;
short _arg_grndRefChan;
short _arg_DAC0chan;
short _arg_DAC1chan;
double _arg_calRefVolts;
double _arg_gain;
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");
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -